#circuitpython-dev
1 messages Β· Page 124 of 1
the .DS_Store?
ya
HEAD detached at 39f28ed
nothing to commit, working tree clean
what about from the circuitpython repo?
Oi, the first one isn't there now. Let me try this in the other one.
π
lol that's what it was. Oi. A bunch of .DS_Store files in different directories.
Thank you!
no problem
Hmm I just realised something. Do all PDM mics supported in CircuitPython require 16000 or only the CPX for sure?
I think most do
okay. I've got it, by George. ```Adafruit CircuitPython 2.1.0 on 2017-10-17; Adafruit Feather M0 Express with samd21g18
yay @hollow tartan !
Great job @hollow tartan
I could not have done it without you @idle owl and @slender iron π
I am afraid it only gets harder from here on ....
Or more fun π
yes, that is true. thank you. sometimes, I forget to look on the Sunny Side.
This drag and drop user interface is a Purely Miraculous Wonder . Congrats & Thanks to all who have made it a reality.
fyi I'm changing the bundle and library build mechanics. new related repo is here: https://github.com/adafruit/circuitpython-build-tools
Oi I think it worked
nice!
Excellent!
Nice!
very very very compact
Kinda pro-trinket++ ish?
its kinda a pro-trinket killer
cause i gotta end pro trinket soon
bitbang usb is on its last little legs
for sure
it did its job admirably
but we eventually were able to get very good pricing from atmel
so we could jump to the nicer chips, for a reasonable price!
I suppose being a loyal customer has it's benefits?
yep! if you can show you'll sell 10K chips+ a year
Also, that layout is really very nice
After you mentioned those tiny flash chips I had to grab some for some future projects. Just finished a double sided breakout for the 2x3, 4x3 and 5x6
arent they bonkers cute?
i didnt even know they made em so small!!!
Talking Heads is great electronics hacking muzik!!
so nice
I heard rumors you're considering a QSPI version of the m4?
the M4 has hardware support for QSPI
we dont know how much it will speed it up but we have a prototype to try
but the QSPI pins do not support hardware SPI
which is...silly
so we're going to continue as is with hw spi
then try qspi
That's strange...
atmel makes 'creative hardware decisions' sometimes
there's no true crossbar, so you have to pick and choose pins
Did you mean above that you can't have the same layout for QSPI and normal SPI? What's the impact of the QSPI pins not supporting hardware SPI?
I thought QSPI was just a faster SPI that you can execute code from
Anyone out there running CP on a Metro M0 Express? First time, here. I've got the Blinky from the learning system running just fine, but I can't get to the REPL. I have a COM port in my Win10 device manager, but it doesn't ID as an Adafruit board -- just "USB Serial Device". It's the only USB thang that I've got plugged in. When I PuTTY to it (COM13@115200), the window opens but the connection doesn't happen (it says "Offline/inactive"). Doesn't respond to Enter or CTRL-C. I've even rescanned in Device Manager and the COM port situation stays the same.
When you plug it in do you get a CIRCUITPY drive?
nevermind, you said you got a blinky working
Yup. Drag and drop of code and re-save from edit works, cheanges code and runs just fine. I have multiple LEDs.
I was going to induce and error and see the output in the REPL window, but no go.
The 'USB serial device' thing sounds about right
Learning system doc says it should say which Adafruit board it is.
Not just generic "USB Serial Device"
I'm not on windows so I could be wrong
I'm not Windozing because I love it π
Try again starting from where?
remove the file(s), unplug and replug the USB
Also remove the power supply if you have one as well
I unplugged and re-enumerated to the same state. Can change program and blink different LED fine. No ExtraPuTTY love, again.
@idle owl Any ideas?
If I unplug from USB, COM13 goes away and comes back after re-insert, so I'm definitely COM13.
If you double tap the reset do you get a METROBOOT drive?
Ah, just ran TeraTerm instead and now I'm good.
It took me a while to remember what my other terminal emulator was called π
Excellent
It's been years since I used a serial terminal on windows so I wasn't much help in that department
Sure thing, glad you got it working
I think that if I were to double-reset I'd get CIRCUITPY as the MSD.
tested pins, SPI flash audio playback and interfaces. all seems good
If you double reset you should get a METROBOOT instead of the CIRCUITPY. It's how you update the verson of Circuit Python that your running
My thought was that ISRs would free up some resources from polling, though honestly I don't know what resources those would be. Clock cycles? Maybe that's not an issue.
I suppose my thought was that CP should be able to do the normal MCU things that Arduino and others can and that people willing to pay the complexity cost would do so. Then again I don't know how much people would want use it or what the development opportunity cost would be.
Yeah, I don't want to assume our primary audience is people with existing Arduino and microcontroller experience. Instead, I want to approach it from a blank slate perspective and there isn't an easy to understand way of doing concurrency.
One thing mark shannon and I were kicking around was a way of doing an event loop where you can polling for a number of separate events simultaneously.
Er, so like POSIX select()? I think that most users might find that less obvious.
@jovial steppe yeah
Understanding concurrency isn't difficult -- it's doing it right... π
now I don't know if I should respond in github or here
Scratch actually makes it easy.
Is there a Github chat feature that's bridged to here?
issue comments show up here
Ah, to it echoes the logs here. That makes sense, but it sounded like you two were talking live there.
Just logging thinking out loud? Interesting.
I think my main point was that we don't assume that our audience isn't experienced
Seems like for CP, that is what you probably want to be assuming. I thought that that's what sets CP apart from MP.
I'm fine with biasing towards beginners but having hidden complexity for the more advanced users seems reasonable
I'm fine with inheriting stuff from micropython, its just untested.
its possible it does work
I used an Arduino library a few months ago that turned asynch events and made them callbacks -- I think. The work was done by the runtime outside of loop(), in main(). I had to think about how the API I was given actually worked, and I think that's what I decided. There may be some other way to hide the complexity. Like what React tries to do.
and if it doesn't then its gotta get prioritized with all of the other things we want to do
Of course
@jovial steppe thats why I want to approach it from the "why we need it" rather than "we need x feature"
I'm new to MP/CP, but interrupts are untrodden territory?
Thats fair
micropython has them @jovial steppe
they are untested in circuitpython's ports
got it
so if folks wanted to fix it up, I'd be open to it π
the other tricky bit is doing it in a CPython compatible way
I'll think about it when I can get a dang pwm pin working. I'm feeling rather dim at the moment
I always assumed that CP was a layer on top of MP, but it sounds like it comes in through the side or is next to it down to the HW in some places. Brand new to me.
I can help with that @pastel panther
haven't even start CP yet, but would it be based on mult-processing (join, etc)?
Sometimes you just need to sleep on it @pastel panther
Perhaps. I was thinking I need to read more code but maybe you're right
I need to figure out these CP vs MP diffs fast because I need to decide which to start with for students that we're porting from Arduino/C to *Python.
@jovial steppe there are enough differences between ports that its uncertain
@jovial steppe what hardware?
@pastel panther post your code somewhere and I can take a peek
I'm looking at MM0E because I need R3 shields.
then its circuitpython only. micropython doesn't support samd21 micros
I'm porting a class, not code. We've been using Arduino for 7 years.
@slender iron , that's great to know!
π
@slender iron will do
porting a class is awesome!
I ported the class from Atmel Studio 4 to Arduino 7 years ago. Time for a refresh.
ATmega32, IIRC.
Pre-ATmega168.
So I guess that means that there's no MP port to the Arduino Zero. So that's not even a Plan B.
I want to settle on hardware that's also possible to run Arduino/C on because we'll have students in transition from a prerequesite course that will have seen only that.
circuitpython runs on it but metro m0 express is better
I have the option of putting the SPI flash chip on the edu. shield that we use for the intro course.
But the pricing on the MM0E is obviously much better.
And we dont' need the DBG hardware.
Only 1% of students will probably ever switch to Atmel Studio at any point.
They're not EEs.
and the metro has the swd header in case you need it
It would almost have to, no? Are there no brick scenarios if you don't have it?
I've never seen anyone brick their Unos.
So, bricking is only theoretical to me, in my experience.
So, I don't want to distract you from what you're doing. I've got plenty of CP/MP to learn...
But it's kinda locked on the 328, no? But apparently it can still happen, so the rumor goes.
I thought that that was in the fuse bits.
I have not idea. I've never developed on the 328
Git back to git. You got stuph to do.
I'm just doing two things at once π
Not as well as you think. Read the studies :-).
haha. i was about to make a switch-tasking remark!
Censor ate my last comment. So, no comment.
I never said I was doing it well π
that bot is mean sometimes.
I don't want to be the one to blame for it. Get back to it. See ya.
no biggie, its late here and my other task is installing ubuntu
I've got a hot sauna calling my name. Well, it's not hot quite yet.
that sounds nice!
RE: Arduino Board Manager Q: Does it matter which gets installed first: Adafruit SAMD or Arduino SAMD?
not sure what you are actually doing
is that an esp8266? what "folder" are you dragging it into?
more details please, what error you are getting?
@hollow tartan typically library files like neopixel.mpy are put in /lib I usually keep my code in the top level directory. easier to get to via ampy. to put neopixel.mpy in /lib ampy -p <yourport> mkdir lib ampy -p <yourport> put neopixel.mpy /lib/neopixel.mpy that said, circuitpython or micropython will search a standard path to satisfy an import and it starts with the current directory so is should also work if neopixel.mpy is at the top level. It is just cleaner to keep all the library files in /lib espesially if you have a lot of them. To see the ssearch path ``` import sys
sys.path
>>> sys.path
['', '/lib', '/', '.frozen']
>>>
@hollow tartan for example - here is how I have files on my esp8266 ```jerryneedell@Ubuntu-Macmini:~$ ampy -p /dev/ttyUSB0 ls
boot.py
lib
simpletest.py
cptof_m0.py
jerryneedell@Ubuntu-Macmini:~$ ampy -p /dev/ttyUSB0 ls /lib
adafruit_bus_device
adafruit_register
adafruit_ssd1306
simpletest.py and cptof_m0.py are my test scripts adafruit_xxx are libraries from the adafruit "bundle"
cptof_m0.py was a SAMD script, but I wanted to run it on the esp8266 (worked fine) π
FWIW: Simon Monkβs Micro:bit/MicroPython book launched today.
@solar whale wonderful info. thanks. working with feather express M0. any changes to above?
don't need to use ampy π you can just use your file manager or drag/drop
on the M0 express, you can just copy the entire /lib folder from the Bundle release https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases
@hollow tartan are you using CP 2.1 or 3.0?
The scan would be top level. Once that's done, you'd have the known addresses for what's on the bus and could then create specific devices using those addresses.
All that would be needed for a transaction is access to the digital pin.
Sounds good!
On Fri, Nov 17, 2017 at 9:24 AM Carter Nelson notifications@github.com
wrote:
The scan would be top level. Once that's done, you'd have the known
addresses for what's on the bus and could then create specific devices
using those addresses.All that would be needed for a transaction is access to the digital pin.
β
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://github.com/adafruit/circuitpytho...
27d5f27 Add ItsyBitsy M0 support with 1MB flash support... - ladyada
Instead of adding a note here, how about a full sentence before the first :param:? That way it can explain the total 1mhz frequency requirement that is determined by frequency * oversample.
@slender iron π if you have a spare moment or two to give create release rights to me and kattni π
yeah, I'll do that now
thank-you!
I've been working on code to auto-release a bundle but it'll still require manual driver releases
ItsyBitsy!
@fading solstice you should have gotten an email invite
π
gonna go plug into my computer so I can quickly add the team to all of the repos
@fading solstice what repos do you need soon? I'm gonna write a script to validate repo set up
i need create new tag/release for the following repos: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice https://github.com/adafruit/Adafruit_CircuitPython_BME280 https://github.com/adafruit/Adafruit_CircuitPython_BME680 https://github.com/adafruit/Adafruit_CircuitPython_BNO055 https://github.com/adafruit/Adafruit_CircuitPython_CCS811 https://github.com/adafruit/Adafruit_CircuitPython_DS3231 https://github.com/adafruit/Adafruit_CircuitPython_MAX31855 https://github.com/adafruit/Adafruit_CircuitPython_MCP9808 https://github.com/adafruit/Adafruit_CircuitPython_MPR121 https://github.com/adafruit/Adafruit_CircuitPython_PCF8523 https://github.com/adafruit/Adafruit_CircuitPython_Register https://github.com/adafruit/Adafruit_CircuitPython_SI7021
Adafruit_CircuitPython_BusDevice - Two helper classes that handle transaction related state for I2C and SPI including locks.
tnx
just curious @fading solstice what are the new tagged releases for? for most of those libs i just created new releases a few days ago so might not need anything extra
This is to release the change I made changing read_into to readinto. and to release busdevice removing read_into method. we will only release libraries that need to be released, ie., if you have already released my changes, we will not release that library again
oh cool gotcha! yeah you might need to check the date of when the release was made
but i was looking as i went and mentioned it in the release notes
called out if it changed and required an updated bus device
so that might help too
great thanks
Playing around with the rgb display libraries and the metro m0, are the SCK/MOSI/MISO pins on the right hand side top to bottom in that order?
It looks like the hardware SPI is on the 2x3 pin header on the bottom
And just there, unlike Arduino
Yeah, I know, I am assuming top == SCK, middle == MOSI and bottom == MISO
Hm, the guide doesn't say
But try tapping it out with a multimeter. If power and ground are the same as an arduino icsp header, the SPI is probably the same too
Ah, it's on the schematic
got it thanks
Where do you think these top level functions, like scan, should live?
Documenting some usages:
Case 1
>>> import board, busio
>>> import adafruit_ds18x20
>>> ow = busio.OneWire(board.D2)
>>> ds18 = ds18x20.DS18X20(ow)
>>> ds18.temperature
23.7
This would require the DS18X20 class to scan the bus and pick one (the first?) to use.
Case 2:
>>> import board, busio
>>> import adafruit_ds18x20
>>> ow = busio.OneWire(board.D2)
>>> ds18 = ds18x20.DS1...
@idle owl
this was easier than i imagined. so i am going to do them all. thanks for your offer. maybe i will have you review my releases.
@slender iron I have created new releases for libraries that needed to be. note that tony had already release some of our changes.
fyi, I'm restarting travis builds to test the new rosie setup
thanks @fading solstice !
i was wondering if there was something more i had to do for the "frozen" .py such as lis3dh.py
@tulip sleet would know
ok
I'm headed to the gym for an hour. I'll be back later
have funπ
thanks!
@fading solstice Nice! Let me know if you want reviews.
yep
@fading solstice The frozen modules in CPX are git submodules, so they need to be updated with the new versions when you're ready. It's pretty much just a matter of doing a git pull in each of the circuitpython/frozen/ directories, and then committing those changes and making a pull request against circuitpython.
I can do that if you want.
@tulip sleet Yesterday I setup a branch with git push --set-upstream kattni branch-name and Scott said it should remember upstream... So I just do a git push kattni branch-name this time and it should push to my fork?
yes, though I thought that was a bit complicated. hold on a sec
Ok
can you show me the output of git remote -v?
adafruit https://github.com/adafruit/circuitpython (push)
kattni https://github.com/kattni/circuitpython (fetch)
kattni https://github.com/kattni/circuitpython (push)```
I had just checked that π
Not that I expected it to help me any, but it seemed like a logical next step.
I ask because I need to make another push with the same branch with a requested change.
I usually don't specify the branch name explicitly, and I usually have my private repo set to "origin". So then a simple "git push" with no arguments pushes the current branch to origin, which is dhalbert/circuitpython.
hmm. All of my origins are kattni. So when I only clone my own repo, it's git push kattni branch-name.
since you have no "origin", you have to specify one of the remotes. git push defaults to git push origin, but you don't have one named origin.
But yesterday I forked circuitpython and Scott said if I already had the source, I didn't need to clone it again. I thought I'd try it but I keep thinking if I don't do it exactly right I'll mess up master somehow.
i would have just cloned again π
My workflow is that I clone my private repos and have them be "origin". If I clone an adafruit repo directly, I keep that in a separate directory called adafruit/. I could keep them all together but sometimes I want to compare what I'm working on with what's in the adafruit repo, so it's nice to have multiple repos. I also have two copies of dhalbert/circuitpython: one is usually on master or a branch of master, and one is on 2.x or a branch. So it's easier to switch back and forth between working on 2.x and master without going through machinations.
you're mostly worried about branches. if you try to push and there's no corresponding branch on the remote repo, git will complain and tell you to do --set-upstream.
Ok.
I have a 2x one like you said.
And I have a separate one for Scott's repo.
But I thought, hey new Git thing, give it a try. I imagine there must be blocks in place to keep me from breaking CircuitPython, but in the back of my mind, the potential is there.
me too. Scott likes to name the upstreams explicitly by their name, though the canonical way is to just call it "upstream". But if you name it explicitly, you're more sure where it is. Just five minutes ago I renamed mine from "upstream" to "adafruit".
I call them upstream as well so far. Ah nice
git remote rename upstream adafruit
It looks like it worked.
k!
I included set upstream, but on seeing the output Branch pdmin-freq-doc-update set up to track remote branch pdmin-freq-doc-update from kattni. I don't think I needed it. Good to know.
@tulip sleet I have release several libraries and built the bundle using update-submodules.sh and python3 build-bundels.py. Seemed to produce mpy files from source with my changes. The two frozen .mpy's changed by me are LIS3DH and BusDevice. Note that other libraries are dependent on these frozen .mpy's and will get errors without the changes to the frozen guys. Also note that next offical release of CircuitPython will require a release of the bundle as well. For people building their own CP will want a new bundle.
i would happy to have a voice conversation is needed.
@fading solstice so you ran the update script in the Bundle repo, so you can make a PR for Adafruit_CircuitPython_Bundle from that. Did you create a new tag? (The build script prompts you to.) The CPX builtin frozen modules are only used if lib/ doesn't have copies, so it's not critical to have everyone update them immediately
gotta go for a little while - someone came to the house I need to talk to
For anyone who is using the test code in this issue, be aware that we identified a necessary change. The frequency must be at least 16000 to work with the mic. Overall frequency must be at least 1MHz, and it is determined by multiplying oversample and frequency. The default for oversample is 64. It is possible this issue will be resolved in the future, but as it is, this change may fix issues you're having with the mic appearing not to be functional.
A number of the Circuit Playground Express boards have an onboard mic that, based on software reesearch, takes longer to initialise than others. (I specify software research to clarify that I did not determine this with a logic analyser or other hardware-specific testing.) This results in failure when trying to run code that uses a small buffer to record as there is no data being returned. This can be resolved by sampling a small slice at the end of a larger buffer, however, this causes massi...
@idle owl after you set upstream you should be able to do git push after
Is there a document that goes through settign up to debug CP onboard with jlink & gdb? I have the generic SAMD/jlink/gdb doc.
@slender iron Good to know. I thought I had to specify the renamed origin and branch name every time. Although I don't think I've been setting upstream per-branch previous to this. I haven't used the same local repo for two different forks before either though.
@umbral dagger just my learn guide which I think you have
@slender iron https://learn.adafruit.com/debugging-the-samd21-with-gdb ??
yup π
@tidal kiln psych
@umbral dagger I think @drowsy geyser has a OneNote document they wrote up on some of the steps we did, but I don't know if it included gdb or if it's the same OS.
The status NeoPixel flashes an error code when no main.py is present on the board. It flashes blue for ~0.5s, yellow for ~0.5s, and then it quickly flashes some more yellow potentially followed by cyan. It is similar to the type of sequence that usually indicates the line on which an error is located in main.py.
This happens regardless of how main.py is removed. I performed an erase and clean flash of the current 3.0 build. I also loaded, ran and deleted a main.py from the drive w...
@slender iron I didn't put milestones or tags on either of the issues I just posted. I wasn't sure which ones to add. Should I tag them with what I think makes sense and you can change it if it's wrong? Or should I let you tag them?
Please do a best guess @idle owl
Np, thank you
I like to have milestones on everything
most stuff should go on 3.0 and not the beta
Oh. I put the m4 flashing issue on beta. Should I put it on 3.0 instead?
Flashing LED issue I mean. Not flashing the board.
doesn't really matter
Ok
RE: CP on FeatherX M0 I used windows to create a /lib folder and put neopixel.mpy, main.py, and neopixel.py ( a CP script identical to main.py). main.py was also placed into the root dir. Upon reboot: no special display on the neopixel on board and ALL my new files and folders are gone. UF2 Bootloader v1.23.0 SFHR Model: Feather M0 Board-ID: SAMD21G18A-Feather-v0
//// no unmount //// when and how do I do that? I am only tapping the board's reset once or twice as needed.
the board will actually reset automatically once it sees the new files
if you reset before safely removing its possible windows hasn't actually written the file changes yet
I'll be back in a bit. gonna rake leaves before the sun goes down
yay 4pm sunsets!
[ NOTE: The following is not true. Read postscript below. ] Ok! so I am experiencing the wicked Windows 'file commit delay' that was mentioned here previously. I did skip the part of the learn guide about exercising the board with the Arduino IDE.
Of what use is the empty boot_out.txt file that appears on the file system of the FxM0 when it is in a different mode? @Dan Halbet helped me to correctly understand my error. He said: drag it (CircuitPython.bin) into FEATHERBOOT. You'll see a flickering LED as it loads, and then leave it alone and CIRCUITPY should appear and FEATHERBOOT device/folder will be replaced with a CIRCUITPY device/folder. FEATHERBOOT is a fake drive - it just takes .uf2 files to load into flash - it's not a real filesystem [POSTSCRIPT] The TRUTH is I was creating a /lib subdirectory and adding files to a fake drive; that is why they disappeared upon reset.
Bad news: I did the eject and the files vanished again.
@hollow tartan did you right click on the CIRCUITPY drive and click Eject? Or click the USB drive icon in the lower right of the taskbar (may be hidden behind the up-caret).
What version of CPy is this?
UF2 Bootloader v1.23.0 SFHR
Model: Feather M0
Board-ID: SAMD21G18A-Feather-v0
2.1
got it, so did you do the eject before pressing reset or removing the USB plug?
wait a sec.
you don't need to press reset most of the time
if you press reset once, you should see a CIRCUITPY drive in an Explorer Window.
If you just see CPLAYBOOT or nothing then it's not loaded
no , I see featherboot drive ! I need to put adafruit-circuitpython-feather_m0_express-2.1.0 WHERE in it's file system?
drag it into FEATHERBOOT. You'll see a flickering LED as it loads, and then leave it alone and CIRCUITPY should appear
FEATHERBOOT will disappear
FEATHERBOOT is a fake drive - it just takes .uf2 files to load into flash - it's not a real filesystem
do you have teraterm or putty to talk to the REPL when you're done? I like Teraterm better.
ok, I have featherboot with the boot_out.txt and the NP is pulsing green.
drag the adafruit-circuitpython-feather_m0_express-2.1.0.uf2 into featherboot
sorry, I have the circuitpy folder....
that's great, now you have circuitpython loaded
here is teraterm: https://osdn.net/projects/ttssh2/releases/
yes, or main.txt or code.txt (the latter for people who don't understand file extensions)
although, I do have a question about it.
I need multiple choices when I enter it depending on if esp8266 or Fxm0 is connected.
you mean if they are both connected? When I do New Connnection..., it just seems to the list the COM ports that are actually available.
one at a time, actually, yeah, I can go to the menu and switch the COM port to what is offered. but it seems ineligant to me.
you mean the dropdown in the New Connection... box? Yes, I do the same. Maybe there's an easier way with profiles or something, but I haven't bothered to read the documentation yet
or maybe you can make some shortcut icons that supply command-line arguments
yeah, I will work on that. thanks for helping me up the learning curve. I don't understand why I seem to have such trouble with Lady Ada's tutorial. Either I am dense and slow to understand OR she is putting the info out a little too concentrated.
I haven't reviewed it in detail. If you think there are confusing parts definitely give us feedback. There is a feedback mechanism in the Learn Guides but the feedback is not very visible. You could drop something here as well.
OMG. I just dropped the CIRC00 from C:\AdaFruit_Archive\Metro Experimenter Guide\METROX-Examples-and-Project-Sketches-master\circuitpython having renamed CIRC00 to main.py . IT JUST UP AND RAN. LOVELY!!!!
I have and will use the feedback mecha.
I have gdb & jlink up & running, digging deep into the CP runtime.
@umbral dagger Excellent
Nope. What are you looking for?
noi, I was just wondering
Ah
It is a great coding website with thousands of examples and libraries
Oh nice! Always handy to have that sort of resource
yeah
\sadly they ran out of money and You have to pay
But you should try it out, you get the first month free
it's specifically for arduino
yeah
serial moniter and everything
I cant use arduino IDE though, I have a chromebook not a pc
I had it on my rpi, but that lost its os
I've not worked with Arduino.
I fixed it but everything is gone
yeah
I have 3
One I use to turn my lights on and off with a wireless remote
Nice!
An done of my others I use to turn my OTHER lights on and off by clapping
I have a tabletop lightbox photo studio running off of a Raspberry PI ZeroW. I ssh into it and run a program to control the lights.
https://create.arduino.cc/ is similar
huh
ok
Os there any arduino coding apps for a chrome extension
???
I( want to code on my chromebook
but most apps download as a zip and they dont work
I want a decent coding app for chrome extensions
https://blog.arduino.cc/2017/07/17/arduino-create-comes-to-chrome-os-devices/ not trying to sell it, but similar to codebender. still costs, but $0.99/month. (not trying to sell it)
there's this, but it's old, and may not work well: https://chrome.google.com/webstore/detail/chromeduino/dmkincdpchiadkhhocmbpjljebfifgbl
you're in the circuitpython channel, where we talk about CircuitPython, which runs on arduino-style boards. You can write bare-metal arduino-style programs, and all you need is a text editor. So it works fine with a chromebook. If you can get a chrome extension that talks to a usb serial port, then you can also type at the board and get serial output back
https://chrome.google.com/webstore/detail/beagle-term/gkdofhllgfohlddimiiildbgoggdpoea?hl=en is an example of a serial terminal
@tulip sleet Based on my recent cognitive malfunction, my suggestion is to make little bread crum/signpost files/readme files for new users in BOTH the FEATHERBOOT and CIRCUITPY directories. I would have enjoyed reading something along the lines of "Welcome, Dear Maker! You have arrived at the FeatherBoot Marker. You are now ready to proceed with installing the latest UF2 Bootloader (or you may want to upgrade the one already present). After that you may proceed with installing a recent version of AdaFruit's Circuit Python into this directory. We are pleased that you have chosen to join us on this Adventure.
@hollow tartan that's an interesting idea. I'm not sure we have the room in the ...BOOT directories for a lot of text. However, did you see the INDEX.HTM in FEATHERBOOT? it links to the product page. How about if we just had a small .htm file with links to intro material? We could provide it in both ...BOOT and CIRCUITPY. Maybe call it README.HTM instead of INDEX.HTM
Btw, if you see FEATHERBOOT, the UF2 bootloader is already installed.
the more Maker Markers the better! π
hey @tulip sleet can I ask you a TCC/PWM question?
I probably don't know the answer!
haven't looked at that stuff at all in any detail yet
well I can try? I'm trying to adjust the duty cycle of a pwm by changing the CC register like so:
TCC0->CC[3].bit.CC = 10;
while (TCC0->SYNCBUSY.bit.CC0 == 1) {}
The same code works to set the initial duty cycle but calling it again with a different value for CC doesn't seem to do anything
a number of peripheral settings are "enable-protected": you can't change them while the peripheral is enabled. you have to disable, write the register, and re-enable. That may or may not be true of this setting. I'll look
'21 or '51?
21
it just looks like it needs to be synchronized, but I don't think it's enable-protected. In the code above, are you setting CC3 and then waiting on CC0?
Okay, I will compromise.
How about pointing appropriately to one of many local harddrive .html resource files that provide the Maker Markers which include the link to offical Adafruit html page. if the local does not exist then go direct to adafru.it. I think you get the idea.
@tulip sleet It does kinda look like that...
But the first set/sync seems to work just fine
thought I don't see why that wouldn't work at all, it would just happen late, since you're just busy-waiting until it happens
Bah,I'll figure it out later. Gotta run to a bday party
thanks @tulip sleet
π
@pastel panther last thought for later... do you enable the TCC before setting the CC or after? see page 656 for the gory details of what to do when
@hollow tartan where would the hard drive files be? we don't know about the host computer.
I was thinking of a "C:\Adasupport" directory. But it could be done by a slightly more sophisicated HTML file at adafru.it if you pass a token. right?
@slender iron are you trying something besides the rpi for Rosie? I was thinking of suggesting some used Dell USFF boxes or an Intel NUC.
@tulip sleet I got an intel nuc
@slender iron sounds great; is it i3 or greater or one of the low-end processors
i3
should be a little more stable! π
@hollow tartan we can just have a landing page for a circuitpython intro. Right now METROBOOT contains
<!doctype html>
<html><body><script>
location.replace("http://adafru.it/3505");
</script></body></html>
yup! its faster too
WAY FASTER
π still trying to get it green though
@tulip sleet you could location.replace("http://adafru.it/MakerMarkers/FeatherX/001");
you mean go to sleep or get very slow when not needed?
@hollow tartan exactly; I like "MakerMarkers"; is that your own invented alliteration?
it tis
I have posted to feedback on the relavant learning page .
https://learn.adafruit.com/adafruit-feather-m0-express-designed-for-circuit-python-circuitpython/m0-boards-faq?view=all
@slender iron you could have the nuc sleep most of the time, but turn on wake-on-lan or similar. have an esp8266 or the rpi wait for work notifications, and then wake up the nuc. not sure how rosie polls or gets notified there's work to do
@tulip sleet it gets a webhook from travis
so you have an incoming http request that goes through your home router?
could have the esp8266/rpi serve as a kind of proxy for that, and then pass it on. https://askubuntu.com/questions/764158/how-to-enable-wake-on-lan-wol-in-ubuntu-16-04, etc.
not a high priority for me
i thought that's what you meant by green
getting a really weird error: https://rosie-ci.ngrok.io/log/adafruit/circuitpython/ea4b08de20c4b677b04eb94322ece5d3af31703b
haha, nope. as in the test is passing
you need to set the udev rules: https://learn.adafruit.com/adafruit-arduino-ide-setup/linux-setup#udev-rules
the second way to get them to reload works: sudo udevadm control...
you're trying to solve Permission denied: '/dev/ttyACM5'? etc?
nah, scroll to the bottom
(its all the runs on the same commit)
the set_remove.py test timing out
works ok in screen
is it testing 2.1 or 3.0? maybe too much output at once for the usb buffer?
remove those print(len(s)) lines; they don't seem useful, unless the output is being compared
3.0
usb output should block when full I think
the output does end up being compared to python output
rosie doesn't actually do it yet though
and it works fine when manually run
is that the very last test or is it in the middle?
11
12
11
ATE1 E0ATE1 E0
is weird
k, I reran a 2.x on travis
and it changed; I refreshed and now there's an 8 before the ATE1
I ran it again @tulip sleet
right, it's not consistently the same weird
its close but not exact
is the output ofthe three boards interleaved?
and all of the other tests seem ok
they seem mixed up
the test output shouldn't be but the messages are
k - hard to tell exactly what's going on
yeah, there is room for improvement
travis 2.x is so slow π
2.x did have the weirdness on two boards
a couple others did have resource busy errors
*did not
I always forget the negation
that's weird; the nuc prob has USB3 ports; are you connecting the boards directly to the nuc or through the usb2 hub?
its through a hub from the store
same hub as rosie 1.0?
yeah
bleah - another theory shot
I did replace some of the usb cables with short ones
i bought a bunch of those from the AF store for rosie east but haven't tried them
they are like 4 inch cables off amazon
Rosie east, I love it π
I'm gonna take a break and play with the cats before dinner
actually I thought it should be rosie boston, in case there's a rosie nyc
rosie soho
I'll need to take a beagle to it I think
gn - late for me; you could try longer cables, though that seems faintly ridiculous. or maybe split traffic between a couple of hubs. i wonder if that particular test is the one with the most output
but the hub is just seeing too much traffic? seems unlikely given the bit rate, but...
probably a race in the usb code
maybe, I do have it do four boards at a time
thats not new though
and 2.x was ok
it had other issues
i know, but maybe the rpi was slower enough
ok take it easy - i found the hpl dmac code and it looks general purpose so I think I can put it in shared_dma.c. I didn't update the atstart files - I just made a new project that had the code I wanted
great!
but i should update the atstarts so I can get it again. i forget again where the json came from?
is there code in the custom project thats not loaded by the other one?
yeah - i just made a quick one with one sercom that uses the spi dma driver; the regular one is just spi sync (default driver)
unless I didn't look in the right place
the json I got from the network request made when you generate the code
thats possible
using the browser dev tools
did you choose different drivers in the atstarts? it defaults to the sync drivers and omits the unneeded code. F12
got it
I didn't, you can hack the json and it'll generate a new atstart for you
the atstart is actually pretty clean looking - i might modify that. or i can just reload it and add another sercom with the right driver
and save it
sounds good
k - good night again - it's too late!
good night!
Have a good one, guys!
you too @idle owl
tnx!
Case 2 and 3. The coder will have to know the address somehow. Its pretty
easy for them to do a scan and select the first address if thats what they
want.
On Fri, Nov 17, 2017 at 11:29 AM Carter Nelson notifications@github.com
wrote:
Where do you think these top level functions, like scan, should live?
Documenting some usages:
Case 1import board, busio>>> import adafruit_ds18x20>>> ow = busio.OneWire(board.D2)>>> ds18 = ds18x20.DS18X20(ow)>>> ds18.temperature23.7
This...
@ Dan Halbert
Bug or Feature? RE: CP 2.1 on FeatherX M0 , Win7Pro Doing pretty good here, but, while dropping files to run for NP and LED (inf. looper). Had NO-JOY getting back to REPL via TeraTerm. Deleted the main.py from FxM0. reset. Was not able to connect to COM8. Cannot open COM8. Not Found. I had to reboot the desktop to reset whatever was hosed up in the USB port. So, Please do share any relevant insights, Dan. Thanks a Bunch.
No trouble with MetroExpressM0 on this point. On the Feather Express M0, Windows 7 seems to have a problem with the USB Port used by CIRCUITPY after running a .py via Drag&Drop (Copy&Paste is what I actually used). Even after going to FEATHERBOOT and refreshing the CP 2.1; it is a problem until the Win Desktop is rebooted.
I can try this out on my win 10 home laptop latter when I wake up.
FWIW I have a Sino:bit on the way. It uses the same Nordic MCU as the Micro:bit so it wonβt run CP, but should run uP. It has some neat features: 12x12 led array, and an I2C connector, among others. No clip/banana/edge connections but does have 2x? headers. I havenβt looked that closely at the schematic yet. A little harder to connect to in some ways, but easier in others.
Correction, it does have banana/clip connections.
@hollow tartan there are several possible causes of that. You might unplug all the boards and try the Device Cleanup Tool here: http://www.uwe-sieber.de/misc_tools_e.html. Delete all the assignments related to Adafruit boards (and whatever else you want to delete), and then plug in again. Also there were some issues about the USB id for a couple of boards and they might not match up with the driver. If it happens again, look in Device Manager and report what's listed in the "Ports" section when the board is plugged in.
Windows 10 will be much easier. You don't need to install any drivers: the proper serial drivers are included in Windows.
@umbral dagger it's supposed to be pretty much the same as the german caliope
except for the larger display
@stuck elbow Yes. Which is a riff on the Micro:bit.
@stuck elbow I'm imagining one with a 12x12 dotstar array π
I recently got an sh1306 oled display to work with microbit over i2c
since in recent micropython you can do i2c on any pins, you can connect to the 3 that are exposed
Cool
it's even fast enough for animations
one could make a gameboy shield for the microbit
I haven't done much with my micro:bits yet beyond experimenting in MakeCode.
I had one before they were launched -- as the "microbit world tour" -- and made some robots with it
Nice
Haha.. the little blinky micro:faces at the top of the world tour page.. and the dead ones
yeah, the dead ones were added when I killed mine
it was kinda a big thing, because we only had 4 total at the time for all the testing
and two were being used for developing micropython
but I think the final version had something added to it to prevent killing it this particular way
@stuck elbow I don't know that the micro:bit is "fast enough" after watching the line following car demo. But I guess it could have been that the width of the black line and the spacing on the sensor array were badly matched. https://www.youtube.com/watch?v=SGhpBDQU5uA
As above ; microbit powered 'robot' with linesensors, lightsensors , neopixels, buzzer. (more testing to follow) Made by @4tronix_uk (apologies for poor soun...
@hollow tartan fast enough for what? it's an order of magnitude faster than arduino
@stuck elbow What I said was that the line following car demo could have been a magnatude better. It was clunky in a very mild "hilly" part of the track and jumped the rails on a hairpin curve. I just wished it had made a better showing for the Arm Cortex hardware and micropython. https://www.youtube.com/watch?v=SGhpBDQU5uA
As above ; microbit powered 'robot' with linesensors, lightsensors , neopixels, buzzer. (more testing to follow) Made by @4tronix_uk (apologies for poor soun...
building line followers is a bit of an art in itself, there is a lot you can do with the right positioning of sensors and tuning of the PID controller
agreed
it doesn't have to be just raw computation speed
I mean, there are line followers that don't even have a microcontroller on board.
am aware of analog solutions to line following. π
@tulip sleet ππΌ Pure Genius. Both You and the Author of Device Cleanup Tool http://www.uwe-sieber.de/misc_tools_e.html . It worked beautifully. Now the Ctrl-C in the TeraTerm works to interrupt the inf-looper blink also. It's all really good now. Wanna know what I did to corrupt the driver? I plugged the FxM0 in first and the first two out of five steps failed. So I went and got the AdaFruit drivers pack and ran it. Created a small blooper in part of the FeatherX driver; should have run the install of AdaFruit Drivers first! It was very easy to use the Device Cleanup Tool. I only removed the two Feather drivers.
@tulip sleet Wow, it is slow a trudge here. New horizons for me, old hat for you. the TeraTerm is displaying USBS at each key stroke. Does this hold any meaning for you? USBSUSBSUSBS
@hollow tartan that means you're talking to the UF2 BOOTLOADER, probably. Is CIRCUITPY showing?
@tulip sleet would you say that there is not indication that the FeatherExpress is defective? Is it safe to try to use on Win 10?
yeah, the NP was white. I thought I was ready to REPL.
no, it's not defective. you'll have an eaiser time on windows 10: no drivers to install. CircuitPython is running if CIRCUITPY is showing. If FEATHERBOOT is showing, you're talking to the bootloader
you mean you copy them as main.py? After you do that, Eject or do Safe Removal, to make sure the file is completely written. Also consider using the Mu editor, which takes care to make sure the file is completely written: https://blog.adafruit.com/2017/11/13/mu-editor-beta-works-with-raspberry_pi-microbit_edu-adafruit-boards-by-ntoll/
yes, I do a 'save as' main.py from Geany, confirm that I want to replace the one there and it usually starts running immediately.
@stuck elbow do you mean the ssd1306?
@hollow tartan that should be fine, most of the time. occasionally the whole file will not write completely the first time, and you may see a syntax error or other error in the repl
@tulip sleet I really want to trust you on that, but, this idea that Windows 7 fails to fully transmit a file to an external device on the USB is just a little hard to swallow. Is it something that M$ uses to force product creators to pay fee$ for to be certified and kept in the loop so they know how to patch their drivers when the next phase of USB driver poison pill is released?
@hollow tartan it has to do with the FAT filesystem driver. Gory details: https://superuser.com/questions/1197897/windows-delays-writing-fat-table-on-small-usb-drive-despite-quick-removal/
@hollow tartan goodnight for now!
Yes, thank you, sir.
@jovial wind sh1106, sorry
Hi everyone, including <@&356864093652516868>, we're on for our weekly circuitpython meeting tomorrow (Monday) at 11am PT / 2pm ET here on Discord!
I'll be in the middle of my work day
yeah, I know its inconvenient for some folks
Is what it is
Maybe one day I'll be able to make electronics for a living and not work in retail (ugh)
we can also explore doing it other times
e.g.
Adafruit CircuitPython 2.1.0 on 2017-10-17; Adafruit CircuitPlayground Express with samd21g18
I spent Saturday working on my CP debugger ideas, mostly poking around in GDB. I think I'm close to having the local context working (so in the debug repl you can get/set local vars from where you call breakpoint)
Interesting - o few observations:
after a power cycle
I am seeing a flashing green pattern when no main.py is present.
Solid green when main.py is present.
however if I have a main.py then remove main.py it goes into a very colorful fast flashing sequence when it reboots or after pressing RESET.
It goes back to flashing green if do do a power cycle.
On at lease one occasion it go int a state when it came up white (as in REPL) but screen was not connected. It went back to flashin...
@umbral dagger thats awesome! have you looked into cpython's debugging?
@slender iron I noticed the PR I did for the PDMIn RTD did a little weirdness with the formatting. I think the spaces got deleted around the x in frequency x oversample https://circuitpython.readthedocs.io/en/latest/shared-bindings/audiobusio/PDMIn.html
yup, that looks a little weird
Do you want to get it or should I put in another PR? I wasn't sure if building Sphinx worked the same with with the entire CP repo as it did with the CPX API, so I hadn't run it.
You should take a look. π It should be the same process with sphinx
Ok will do π
bugs like that don't bother me. we move fast and break things π
That's a perfectly valid sum-up.
π
"Programming: We move fast and break things." :the more you know star:
could someone with a trinket m0 try to reproduce this? https://forums.adafruit.com/viewtopic.php?f=60&t=126740
my CIRCUITPY drive on my trinket is causing a funny error on latest mac osx
On it.
thanks!
If anyone wants to take a look at this I'd suggest starting here:
https://github.com/adafruit/circuitpython/blob/master/main.c#L161
https://github.com/adafruit/circuitpython/blob/master/supervisor/shared/rgb_led_status.c#L202
Blergh I'm getting a no module named dotstar error.
did you grab the library?
Is import adafruit_dotstar as dotstar the right formatting?
I am testing that code, but I think the problem is he is passing an array to the pixel instead of a tuple (or does it not matter)?
it shouldn't matter
Yeah I grabbed adafruit_dotstar.mpy
@idle owl yeah, I think so
try just import adafruit_dotstar from REPL
the test code works fo me with the Trinket in "normal" USB write mode
@fading solstice nope, I thought time.sleep was close to accurate
Ok.. hmm. It works in the REPL.
works fine for me
I also added a while loop and code to alternate red, green, blue (doesn't seem to matter whether you pass a tuple or array to the pixel, both work)
@opaque patrol are you testing with the remount in boot.py? controlling it based on a pin may be more useful
@slender iron it works in both cases for me as well.
and unplugged, then plugged back in
I toggle i based on D4
I can't even get it to work in the first place π I copied and pasted it as-is into the REPL and it works.
@slender iron I haven't looked into CPython. Since uPython is a from scratch implementation, I didn't think it relevant. I'll have a peak.
pylint (using VS Code) is complaining that APA102_SCK and APA102_MOSI are undefined
@idle owl not following. works in repl, but not if saved as file?
@umbral dagger I was just thinking about the debugger API
@tidal kiln Correct. The file is failing with "no module named dotstar" but if I paste the entire file into the REPL, it works.
@opaque patrol guess the linter doesn't like the import *?
do you have adafruit_dotstar.mpy in the lib folder?
how are you pasting file into repl?
I did it line by line once, then just copied the entire file and pasted it all at once. Both ways worked. On MacOS, using command+c/v
@idle owl - did you name your test file dotstar.py?
Ah, I am using CP 2.0.0
@slender iron Ah. I'll look, but mine will be minimal. My goal is to minimize impact to performance and both code and data foorprint.
@solar whale My test file? It's code.py if that's what you're asking....
@opaque patrol Ooh, good catch. Update it and try it again, see if you get different results with the remount
OK - just a wild guess - sory _ am not running it from code.py -- I run it from a dotstar_test.py
sorry, I only got it last Thursday along with a metro m0 and haven't had a chance to play with it much
Ah, and importing the entire file into the REPL @solar whale ?
I was concerned taht if it was called dotstar.py it would caus a problem
@solar whale good guess though, that would cause it
yes - import dotstar_test
@opaque patrol Don't be sorry! That's what it's shipping with, it's good to have a test with that too so we can more easily identify people's issues later.
Then if someone updates and had this work before the update, we might remember to mention that it's the update.
I am running it on 2.1.0-14 - built a few days ago.
when I try to drag n drop the uf2 file, I don't have enought room, is it safe to delete the lib folder first?
Yeah you can remove the lib folder
@opaque patrol yah, you can always put it back. the as-shipped contents are here:
https://learn.adafruit.com/adafruit-trinket-m0-circuitpython-arduino/downloads
@opaque patrol but are you doing the uf2 drag/drop in bootloader mode?
Ok, deleted all the files and it still shows I am 1.5 kb short (need 59kb, 57.5 available), I am using the adafruit-circuitpython-trinket_m0-2.1.0.uf2
All I did was go to the REPL, type "import code.py", and it worked, then I hit ctrl+D to reload the serial connection, and now it works.
Also it works with the remount added to boot.py
I'm able to edit code.py to change the color of the dotstar after resetting.
To verify: I was to create a new file called boot.py and add that line of code into it, correct? storage.remount("/", False)
you will also need to import storage
you should not be able to edit code.py if it is set to False
Ok now I can't edit code.py, but it's still changed the dotstar color after restarting the board and importing storage
Oh it just shifted to pulsing green.
Reconnect to serial, and it changes to the color in code.py again.
pulsing green after 60 seconds?
Ok so long story short, I don't think any of us have replicated that issue.
correct - just found our own ... π
Works fine using 2.1.0, you want me to try the latest build?
If you need an excuse to build CP, go for it, but I wouldn't worry about it. We've now had separate tests from 2.0.0 to current build with all the same results.
To give CircuitPython write capabilities
okay, I didn't realize we didn't have that. I hadn't tested anything that writes yet.
@opaque patrol I haven't either. I don't entirely understand it, but apparently both USB and CP can't have write at the same time. So if you want CP to write, you have to revoke USB write.
@slender iron for what it's worth, I just ran a test on my Trinket M0 with some test code using an I2C sensor that changes dotstart continuously - it works under both storage.mount settings
try ```
import os
os.remove("filename")
Ooh I was on the right track. Nice.
i had looked at the storage class earlier today, I thought you would use it with sd cards or something.
@idle owl that worked for me
@solar whale Worked for me as well, thank you.
what is OSError: 30?
So I can add files via USB, but os.remove ("filename") throws and exception with OSError: 30. I assume that is correct behavior
@opaque patrol that's correct because only either the USB or the internal Python code can do writes to the filesystem, not both. If you did the .remount mentioned in the forum posting, then you've switched write access from USB to Python.
I posted a note to the forum regarding the dotstar question - seeking more info on the tests run.
there's no locking on the filesystem to allow this, and it's very difficult because the USB access is at the block level, not at a semantic filesystem level.
@solar whale perfect thank you
Is there anywhere that explains this better? The 'readthedocs' just has the function defs
So if I understand it correctly, You cannot remove (or add) files from repl, only from code and only if you remount and set read-only to false in boot.py
@opaque patrol right
if you mount the FS read-only you can actually read and write from REPL using standard python open and read, write etc. functions
er sorry if you mount the USB access to the FS read only that is
i.e. if you run storage.mount('/', False)
I just getting ready to ask how to undo that without reflashing the board
@opaque patrol same info here: https://forums.adafruit.com/viewtopic.php?f=60&t=126745&p=632190#p632190
I have to step away, brb
kk, thanks @idle owl
let me know when you are back @idle owl and we can hear your report
I'm back but I think I'll have to step away once more in a bit.
kk
flash erasers (these do not erase SPI flash, only internal SAMD flash): https://github.com/adafruit/Adafruit_Learning_System_Guides/tree/master/uf2_flash_erasers
but Iβm happy to work on some simple CP code, Drivers, documentation, bean counting,etc. I should probably just look at outstanding issues.
Also Iβm waiting for mkii of the metrowing from OSHpark
will do, thx
? IS BEAN COUNTING
mic stoped working? had to reconnect...
path on my linux box: /home/halbert/.local/bin/mu
for me it's /usr/local/bin/mu
Thanks!
@errant grail We're so glad you joined us!
OneWireDevice(bus.scan()[0])
I missed whether you saw this API: https://github.com/PaulStoffregen/OneWire
ok, arduino lib is based on this (or is this)
@tulip sleet yep. saw that. as you can see, provides a select and skip and a search, etc.
@tidal kiln - yeah maybe good model
#toastthatboard
#orfryitup
I'm going to have to be doing the same thing soon. Is this documented somewhere?
I mean the flashing bootloader to bare chip process
SWD and SWC
They can be a pain in the ... bottom and really easy to bend.
Pads can be nice as you can hot glue some wires to a clothes pin for a simple test/programming clip
#ghettotek
banana for scale
#leekenvy
I made a breakout for those chips if anyone is interested
#leeks
https://github.com/siddacious/breakout_pcbs for the USON 2x3mm, 4x3mm and 5x6mm:
(untested)
It's got a battery JST pad underneath
Right? or the trinkets did
@cosmic fractal I have a feeling that's gonna be my new favorite board...
@slender iron, that is!
@pastel panther no jst spot
π @marble talon
an xray of @stuck elbow's blinka
these should be attached
@slender iron dotstar to the
eye
Is it possible to set a I2C device as a slave device in CP?
I have to go for awhile - have a great week.
bye @solar whale
you too @solar whale !
ta ta
@solar whale Later, thanks!
yay lunchtime
to you @solar whale when you are away
Hi all, here is the recording of the weekly meeting today. https://youtu.be/zwMdCCw6DtM
Join here for the chat all week: http://adafru.it/discord The weekly happens normally at 2pm ET/11am PT on Mondays. Check the #circuitpython channel for noti...
Is gc.mem_free() the same as "available RAM"? Someone's asking a question about wanting to see available RAM, ustack isn't working, and the only thing I know is gc but I'm now wondering if that even does what they want.
@idle owl gc.mem_free() reports available heap space is RAM. Part of RAM is allocated to the stack, so that isn't included. On M0 boards, 20k is allocated to heap and 12k to stack. Of the 20k, 4k is allocated to an SPI RAM buffer if you read anything from the SPI flash chip.
@tulip sleet Most of that makes sense to me. I'm thinking maybe I don't know what's going onto or being read from the SPI flash chip. So if you start with a fresh board, and do gc.mem_free() and then compare it to that number as you write your project, you'll know how much RAM your project is using?
you'll know how much heap ram you're using. But always do gc.collect();gc.mem_free() so you make sure you're not counting garbage. The garbage collector runs irregularly, and so you may appear to have less than you really have if you don't collect first.
i rarely see anyone run out of stack. That would happen if they were writing a highly recursive program or had some kind of recursive loop
So what are we running out of with the memory allocation errors then?
we are running out of heap. The heap could be Python objects or it could just be temporary storage that used by the compiler when it reads in the .py file and converts it to byte codes. Or it could be the resulting bytecodes. If get memory allocation erros while importing .mpy's, then you know your program is just too big to fit. If you get memory allocation errors when importing .py's, then maybe you should try using .mpy's. And if you get memory allocation errors after all the imports are done, then your Python data structures are getting too large.
Ahh ok
(Also, should I just link you to the forum post I'm talking about? I can answer but I'll be using the info you gave me. So if you wanted to answer instead, you can. I'm fine with either way.)
So that's why gc.mem_free reports the memory we're going to run out of because it's reporting heap space remaining.
just got a phone call - will get back to you
Ok np
@timber lion @slender iron I did manage to get mu working on my Ubuntu Linux by creating a virtual environment and following the instruction on ntoll's site. It looks like I need to do some cleanup on my deafult python3 setup. It worked fine via pip3 install on my Mac. Thanks for the help. I have not gotten the REPL to appear for my Circuit python board in mu yet, but it works fine with a microbit. Still poking at it.
@slender iron FYI - My Mac is not happy with my Trinket M0 - It works OK with the Metro M0 but not the Trinket.
@timber lion update - mu REPL works OK under linux talking to my Metro M0 -- having issues with the Trinket M0. On the Mac, Metro M0 works fine. Mac does not recognize the Tinket M0 ... progress is not always forward π
@solar whale @timber lion how about gemma m0? and do you mean 2.1? just trying to narrow it down to Express vs non-Express, maybe
@tulip sleet cp 2.1 Iβll try the Gemma next opportunity.
I built a 3.x version of circuitpython and found that on my metro M4 the time.sleep() funciton returns way to fast. About 9 times too fast! The following code turns the LED on for 1 second and turn it off for 1 second. I tried the same thing on a metro M0 and the LED stays on for 9 seconds, then off for 9 seconds. So Metro M4 is returning way too fast and Metro M0 is working as expected.
while True:
led.value = 1
time.sleep(9.0)
led.value = 0
time.sleep(9.0)
LEEKS are delicious.
I have a couple of wire bound copies of this very interesting book to make available to my AdaFruit friends who will put them to good use. https://www.ti.com/seclit/sl/slyw038b/slyw038b.pdf
Hi guys. I'm having problems with installing the drivers for my Adafruit stuff again, I'm installing on a different machine. The not all of the drivers (like the ones needed for the MO devices) shown on instruction page to choose from to install. Only four out of the six shown on the instructions page are displayed after the download I purposely re-downloaded the newest posted driver install, which I believe is 2.0.0.0 . However when I installed it, the same problem happened as before with my other machine, both are Windows 10 machines, first was a PC, this is a laptop, downloaded through Firefox, (if that makes a difference). Is there something wrong with the download? is there something wrong with BOTH of my machines to cause the same problem to occur?
@solar atlas For circuitpython on Windows 10 you shouldn't need drivers. They are for Windows 7
See that's what is getting me. If the drivers are installed & working correctly shouldn't the CIRCUITPY folder, or drive name be on here? But instead what is showing is CPLAYBOOT (when it's bootloader mode & nothing when it's in normal mode. Sorry, the CPX.
Just got the last trinket M0 at the local shop. So tinyyy!!
@tawny creek Congrats!
@solar atlas I'm not a windows expert ( @tulip sleet knows more) but I think the drivers can actually break the CIRCUITPY drive when they aren't needed
Still waiting for an m4 but this shall satiate my GaS
@tawny creek I had to trim the headers down once I soldered them on because the PCB is so thin they were sticking out quite a bit.
I want to make my build fully doable with cp as an example
Ooh whatβd you make yours do @idle owl
@midnight falcon You don't need any M0 device drivers for Windows 10. If you bought a CPX, it doesn't come with Circuit Python installed. You need to download the appropriate UF2 and copy it to CPLAYBOOT. The Gemma and Trinket M0 do come with CPy already installed.
@tawny creek Blink lights mostly, and I've tested code for others. I've been primarily focused on the Circuit Playground Express, so my other boards haven't gotten as much love.
@midnight falcon download from here: https://github.com/adafruit/circuitpython/releases
@tawny creek What is it you're building?
@midnight falcon the CPX comes with a demo makecode program that is very blinky
Itβd be cool to see a feather with all the sensors of a cp x
It'd look like a giant breadboard with a bunch of breakouts as it is π
@idle owl building a portable Pi. The cp boards act as io since the display Iβm using takes up all the gpios
@tawny creek Oh yeah! I wasn't sure what you were doing, but I did see the images you uploaded. That's really neat!
Thanks! I really like the workflow of circuit python. I could edit the button mapping of my code on the fly without compiling etc over the network
Really great as right now Iβm using arduino with my feather so I have to disassemble the build to update code
That will definitely be a nice improvement
@idle owl when the m4 comes out it can all be in one neat package
Yeah! The M4 is going to make a lot of projects easier, and some doable in the first place.
Ahh, ok @tulip sleet That's what is confusing me, I was thinking that it came with CP already on i.t I was trying to show my daughter how "EASY" you can just change the code, only I obviously cldn't get it pull up the code let alone change anything. The bit of the drivers being bad, how do I uninstall them then? Cause I did install them.
well, the driver package won't let you install the m0 drivers on Windows 10, so you probably just installed the other drivdrs, like the FTDI, etc. drivers. Probably not going to interfere. You can go to Settings->Apps and uninstall anything Adafruit, but it doesn't matter.
Wow, you guys put out 2.1.0 already? Lol, didn't you just put 2.0 out like last week??
no, that was weeks ago
Timeflys made me think multiples of a fly that can move through space-time.
Lol, my daughter & I both like that time flys comment. π Ah, ok, That must be why the difference that I was seeing. You guys' good work protecting me from my own ignorance.
@solar atlas It's all about learning!
@solar atlas Good luck! But I don't think you'll need it.
@idle owl have you used a tft lcd shield on Metro express M0?
@hollow tartan I have not. It is my understanding that it'll fit all Arduino shields, and I think as long as you can identify the pinouts, you should be able to translate it to CircuitPython. There might not be drivers for CP yet though if it is something that requires drivers. I don't know Arduino hardware well enough to know off hand.
OK?? I'm confused, why did the whole drive change name & I can't even view the other files on there anymore? Or did that U2F file just completely own & rewrite the drive deleting the other stuff?
@solar atlas the CPLAYBOOT is a fake drive
@solar atlas It's into the bootloader if it's CPLAYBOOT. It happens if you press reset twice. Press it once more time to get back to CIRCUITPY.
O is that kind of like the virtual drive that a boot disk used to create when dianosing problems on Win XP machines?
It's how you update CircuitPython or if it gets corrupted, it's how you reflash CircuitPython to get back to where you were.
So if you were still on 2.0.0, you could download the 2.1.0 file, which is a .uf2 file, press reset twice, and then simply drag the .uf2 file to CPLAYBOOT. It resets on its own at that point and then returns to CIRCUITPY.
There are a few other things to be done with it, but that's the main thing.
ok, is there supposed to be any sample code CIRCUITPY drive or in boot_out file?
Nope, you start fresh with the Circuit Playground Express once you install CircuitPython on it.
ok. π¦ is there any sample code that I can put on and then play with from there?
no worries, I get the same issue. Well actually it's more of ridiculously slow machines.
I think that might be more accurate to be honest. I'm really thinking of upgrading. This is a laptop from 2011.
Ok! So here's the definitive guide: https://learn.adafruit.com/adafruit-circuit-playground-express/adafruit2-circuitpython There are tons of examples in here. However!
Ya I cld see that beeing a good time to up grade. The sad thing is the one machine I have a is actually an old server, from the XP Win 2000 days, but I don't have a clue how to really utilize.
You can also look at something like this. It's a project with a lot of explanations, and it uses the Circuit Playground Express API which means simpler code. https://learn.adafruit.com/circuit-playground-express-piano-in-the-key-of-lime?view=all
It really depends on where you are in learning/writing CircuitPython (or Python). If you (or your daughter!) are just beginning, I would suggest the second one. There's another guide as well that I'm having trouble pulling up that's a UFO by John Park that also uses the API.
This should be the link: https://learn.adafruit.com/ufo-circuit-playground-express/overview
But I'm getting an internal server error, so I'm not sure what's going on there.
@solar atlas Anyway I hope those links help! Should be a good place to get started for sure.
it most certainly does!! Thanks again @idle owl π
Just name whatever file you want to run as code.py and it'll get started!
@solar atlas You're welcome! And we're always here for more questions, so never hesitate!
My daughter & I were just talking about making her a Playground Drum Machine shirt. I told her EVERY kid in her school would be coming up to her wanting to smack her. lol
OverflowError: long int not supported in this build
i can see working with 64bit values is going to be fun π₯
@tidal kiln thats why I suggested making a class for it. use a bytearray internally
@solar atlas Did you find the drum machine example in the Intro Guide?
Lol, yup
I copied the code for the Playground light sensor example & saved as a code.py but nothing happened?
@idle owl i'm getting 500 for ufo guide also, not sure whats up, sent email about it
@tidal kiln Ok thank you for checking.
@solar atlas What program did you use? Notepad will, by default, append ".txt" to any file it saves.
@solar atlas Oh! Right. What @cunning crypt said. Windows hides the file extension. So sometimes you'll end up with a .py.py or .py.txt.
Also, sometimes it needs to reset once when the file is first copied on the board. You can try a single press of the reset button.
I did bopt the drum machine & the light sensor, na thy both showed as code.py. ok forgot that Win does that. Yup just that the problem, it saved it as code.py.txt
Nice!
I'm redoing it using Atom now.
we have code in master that will actually run code.py.txt π
I'm guessing not cause it didn't work.
If it's in master, it's not in 2.1.0.
it'll be in 3.0
ok, how do I get this to work then? cuz Atom is saving it the same way.
atom shouldn't save with the extension but I'm not a windows user to know for sure
IF you're just re-saving the file, it'll keep the extension
Have you tried to create the file using Atom directly on the Circuit Playground Express and then paste the code into it?
I got it to save correct but it still didn't work.
Are you able to connect to the REPL?
I saved it to the CPX, as code.py, & I confirmed that it is a py file, but still no luck. Help?? lol
O & also reset it once.
I would suggest connecting to the serial port and checking for error messages
What's a REPL @opaque patrol ? I only have the USB code that the CPX came with. I don't have any serial port cables.
@solar atlas You reset it once, right? You didn't end up in the bootloader, did you?
Nope only did it once. also later tried turning the power off with the slider switch but that didn't seam to make any diffence no matter which position it was in.
Slide switch for the CPX isn't a power switch
Just to double check things... Can you copy the contents of the file over to something like pastebin or hastebin?
Never heard of either of those @cunning crypt
Copy/paste the contents into there, hit the save button, and then copy/paste the URL here
Sorry, I had to run out for a few minutes....You can connect through the USB cable on Windows using Putty
@solar atlas You've copied the .wav files to the device as well, correct?
Skip the windows drivers section and look at how to determine your serial port and Install Serial Port software, there is a link to Putty on the page
What is Putty? @opaque patrol
Putty is a terminal application that can do serial and ssh connections as well as other things
Its a free windows implementation of SSH and Telnet, it allows you to open a serial connection and access the REPL (read-evaluate-print-loop). That should give you a useful error messsage
It's a way to connect to a remote thing, like a server or a microcontroller, and talk to it
@tulip sleet @timber lion update on trinket/gemma m0 mu mac tests. The gemma m0 is recognized by my MAc and the next time I tried the Trinket M0 it was also recognized. Mu on the Mac does not seem to be able to find either for opening REPL but I am also having similar issues on the linux box with REPL under Mu. Lots of variables to explore. For what it is worth, if I plug in a Micro:bit it the REPL within Mu works fine.
@solar whale Has anyone gotten MU to recognize devices on Windows?
Tera Term is good too - I find it a bit easier to use than Putty for CPy because it reconnects easily when the connection is broken. https://osdn.net/projects/ttssh2/releases/
@opaque patrol sorry - no windows experience here.
@solar whale It worked beautifully on my raspberry pi, but the screen is only 7"
@tulip sleet A lot of options, any recommendations or should I go with the default?
For Tera Term
when installing? I just used the defaults. Or when running? You just need to set the com port. The defaults are good, I believe.
made timers be off be a factor of 10.
I like that it reconnects automatically
@solar atlas Did you get things sorted out?
nope, I'm even more clueless then before.
@idle owl after switching to a code that doesn't require any additional files & then swithing to a different CPX, I still have absolutely nada
@solar atlas Ok. Did you load the library bundle?
It's a folder you copy to the CPX containing the library files. I just realised I totally forgot to mention it...
im curious, not necessarily going to attempt to anytime soon.. but say I wanted to customize the trinket m0 's pcb design and get it fabricated, what would i need to do to load circuitpython in it?
all in the pursuit of space saving..
On the second CPX, I copied the UF2 file & then copied the PG light sensor code & made the code.py file. It's showing that it's on the CPX but the CPX is doing absolutely bubcus
Ok, yeah. Download that zip file, unzip it, copy the lib folder inside it to the CPX
All CircuitPython files have import something at the beginning. Those imports are calling the information in the library files, which are stored in the lib folder.
What lib folder?
Download the zip file from the link I posted.
A lot of the libraries are built into the Circuit Playground Express though.
Can you copy and paste the code here? If you put 3 backticks on both sides of it, the thing in the upper left corner of your keyboard, on the same key as the tilde, it will make it a codeblock
@tawny creek https://learn.adafruit.com/adafruit-feather-m0-express-designed-for-circuit-python-circuitpython/circuitpython-setup Looks like you need to use a command line tool
I'm trying to @idle owl but Firefox on my laptop keeps taking a dump.
I'm having to use another computer just so I can send this.
Ooh, ok. Not great.
I'm realising though that most of the libraries you'd need for the example code are built in so I'm not even sure this will resolve it.
I kind of want to walk you through starting completely fresh, but that also involves downloading things and I would hate to have you spend forever trying to get though those steps and not have it work.
Ya really. I'm going to have to recreate everything on here instead.
What example are you using for your code?
Hay if can FINALLY get these things to work I'm game. The light sensor one form the example code list
Ok let me paste this onto a CPX and test to see what I get. Give me a minute.
Yes yes yes!!!
Ok.
It needs a library! That's the issue.
It's missing simpleio.
seriously??? out of all the ones to pic I picd the one with an error?
No, I mean it needs the library. The code doesn't have an error.
The two examples you chose both required libraries that you didn't have loaded. Most of the examples under "CircuitPython" use built in libraries.
I want you to make a folder on your CIRCUITPY drive called "lib", on the Circuit Playground Express
gottcha.
Then I want you to put this file in it:
This is not the normal way to do this, but I want to get you going as quickly as possible.
k done
And you put the simpleio.mpy in the folder?
and waa Laaaa.... it works
Yay!!
I had to shine a bright light on the CPX to really light up. It likes a lot of light.
does the drum one require the same file?
Let me look π
@glacial bronze hm! doesnt seem as complex as i thought it would be
It looks like it's just development of CircuitPython itself and debugging thereof that needs a J-Link
@solar atlas No, I downloaded the file from the drum example, and copied all the drum samples to my CPX and it worked without any library files.
hmm, ok let me try doing it wit this pc
Try downloading directly and renaming to code.py: https://learn.adafruit.com/pages/10702/elements/2915137/download
Hmm, I think that link will work anyway
I clicked on the "Download Playground_808.py" link at the top of the codeblock in the example.
do I copy the _macosx file too?
I don't know what file you're referring to
_macosx is a hidden folder full of metadata for Mac PCs
just ignore it
same way a Linux or Mac system looking at a Windows drive will see thumbs.db files all over the place
and Windows machines will see .profile and etc. hidden Linux things
Macs get overloaded with .DS_Store and a couple other not-so-well-hidden files as well
its one of the files in with the drumsamples.zip file
Ah, no just copy the .wav files
YAAA IT WORKS!!! lol.
YAY!!
how loud can that lil speaker kick out?
Surprisingly
mmm celebratory bacon philly chesse steak pizza taste even better now. π
That's great!!
How do pump up the jam?
My daughter is going to be extatic in the morning.
Thank u sooo many times over!!!
Your positive reaction is why we help out
@solar atlas I'm so happy for you! You're so very welcome!
Lol, o my possitive reaction is nothing compared to what My daughter Mia is going to be expressing in the morning.
Circuit Python: Making hackers one CPX at a time since... a while now
@solar atlas Well I'm excited for Mia!
lmao @pastel panther well its making two in this household!
@solar atlas Were you guys on Show and Tell this past week?
yup yup
Ahhh!!!!!!
she also won the ask an engeneer prize too.