This makes it different from the bootloaders and Arduino.
Fixes #324.
1 messages Β· Page 121 of 1
This makes it different from the bootloaders and Arduino.
Fixes #324.
@tulip sleet My mother always said "check the wiring" - bothte BMP280 and MCP9808 work fine on the M4 - sorry for the confusion. Great job on this - nice to have sensors!
That works. You might mention that in the release notes as well going forward.
High Sierra 10.13. I have my Mac on auto update so I am usually pretty current. Except when I refuse to let it reboot of course. ;-)
Ok perfect! I've update the last release with a sentence and a link.
I'm also on the beta builds of High Sierra so I'll keep an eye out for it. For now, I'll close this issue. If you see the flakiness again please open another issue for it.
@tulip sleet also checked out an mpr121 touch sensor no problems so far.
In this file is fine. I'd probably just put it above maybe_run_list.
@slender iron very interesting proposition RE usb descriptors! ... we hope to run the library on CircuitPython itself! That way we can change the descriptor dynamically on boot! Weβll be able to choose between HID, MIDI and other things dynamically.
I am no expert in the USB standards arena and therefore I am unable to compare and contrast AdaFruit's approach verses Arm Keil's approach. https://www.keil.com/pack/doc/mw/USB/html/_u_s_b__descriptors.html
@tulip sleet @pastel panther OK this must be close to a tri-fecta - I was able to write text to an ssd1306 on the M4 under 3.0 with the ssd1306 mounted to my metrowing!!! woohoo! So this tests i2c, framebuf and the metrowing!
and with the ssd1306 module loaded look at the free memory!! ```
from board import *
import busioImport the SSD1306 module.
import adafruit_ssd1306
i2c = busio.I2C(SCL, SDA)
display = adafruit_ssd1306.SSD1306_I2C(128, 32, i2c)
display.text("yowza",0,0)
display.show("yowza",0,0)
display.show()
display.text("yowza",10,0)
display.text("yowza",10,10)
display.show()
import gc
gc.mem_free()
114784
usage question about @ property's:
i'm using a class that has several properties, so you can do:
reading1 = some_class.foo1
reading2 = some_class.foo2
but how can i create a sequence object of properties i'm interested in so i can iterate over them and get their values?
The metro_m4 is under the metrowing! having way too much fun now that i2c is working!
@solar whale So cool!
Wow! running the color wheel demo on a "jewel " (7 neopixels) on the M4 - the update response is so much faster than on the M0!
@hollow tartan yup yup, your comment made me want to look at the HID stuff π
It really is great - I switched to a 16 pixel ring and it loops around about 3 times faster than on the M0
we need a reaction emoticon for speed
Good Lord! There's some massive github activity tonight! π
I2C support was added with 7292984204e7ac28a5b69c23930ff7b8be003faf
Wait a couple of seconds before creating a new filesystem if it appears the current filesystem is non-existent or severely corrupted. This will reduce the chance of erasing the filesystem on jittery power.
@tdicola could you try this? I tested with a CPX and a battery. Before this it was easy to erase the filesystem. Now it takes a lot more effort: I have to be really jittery when plugging in the battery and bobble the connector way beyond what would happen normally. I can lengthen the del...
You'll want @ladyada's input on this because it could slow down production of boards.
@solar whale Are any of the externals you have hooked up RGBW? I couldn't get mine to work.
no - sorry - only RGB's here
Ok. No worries π
@solar whale thanks for all the I2C testing! Glad it's working out. SPI is probably next.
@tulip sleet Thank you for getting it going!
Hm.
Set bpp=4, nothing. Change it to bpp=3 and it does the weird three-quarter-light-wrong-color thing it does when you send RGB data to RGBW.
doesn't affect production, we write directly to the SPI flash :)
@idle owl looks like I managed to sorrupt my FS - How to erase the FS on your M4?
I got it to light up a single color! The issue lies in the animation code.
@solar whale JLinkExe, connect, erase, but then you have to reload the bootloader too. loadbin foo.bin, 0 I believe.
That's what I had to do yesterday because reflashing just the uf2 failed.
ok - thanks
@solar whale if you replace the bootloader and then use the update-bootloader.uf2 to overwrite itself, it should set the BOOTPROT fuse to protect it in the future. Unless JLink erase turns those fuses off. You could also use bossac -e with the M4-compatible bossac.
@solar whale What code did you use for the color wheel on your NeoPixel jewel?
@tulip sleet I don't think erase turns it off. Scott posted a link yesterday with the command to run to turn them off if you need to.
its been too long since I did this - can I upload the update-bootloader.bin with Jlink, or should I jsut use bootloader.bin
@solar whale Thank you!
Both will work with JLink I thought, the update-bootloader is the one that will set protect.
@solar whale Awesome! Glad it's working, at least in part! I should have mkii done later this week
@idle owl Oh, I think you mean the changes/updates are applied very quickly. Can you do the math: Actual verses theoretical maximum for the NeoPixel Strip?
@hollow tartan I have no idea how to do that.
scope measurement and data sheet I think
@tulip sleet @slender iron im taking a break from some horrible linux stuff. is m4 i2c workin and ready for test?
kool yay i also got the feather m4's made if ya feel like making a config for em
@meager fog oh rad!
I ran tests on several I2C devices - ssd1306, mcp9808,bmp280, mpr121 -- all good!
oh yay thanks jerry! thats awesome of you π
@meager fog I can whip it up now if you like. Will have to bail when becca gets home
sure
its committed - use Rev B2
ill test later tonite - i am in some linux stuff i want to get done
It is fantastic to have memory to play with - have 2 temp sensors running and dispolaying on OLED!
or cna do tomorrow, no rush
@meager fog which chip does it have? samd51j19?
g19
just loaded it in kicad π
I'm assuming it's on on the adafruit github yet?
makes sense.
@idle owl @tulip sleet whew! reloade and running again. Thanks for the help. I need to do that more often π
@solar whale You're welcome! I know the feeling.
@meager fog want a feather m4 bin?
uf2 is fine
feather m4 express
swoon
I also claimed 0x8026 for it in the usb doc @meager fog
k
code is here: https://github.com/tannewt/circuitpython/tree/feather_m4
How much space should teh be in CIRCUITPY on the metro-m4?
I'm pretty consistently having eventual USB issues. Which is to say, if I leave it sit for a while and then try to interact with it in Finder or by editing a file in Atom, both freeze and I have to physically reset the board.
@solar whale Finder says 244kb.
@idle owl and how much is free?
I closed the info window before I could check and now it's not mounting. I want to say 190kb.
I have a couple of code files on there, my current main.py has quite a bit in it because I commented out a lot to try different code, and neopixel.py lib is on there.
nevermind - in finder I see 244kb and on;y 7 in use -- confused on linux - I tried to copy entire /lib to it - not good!
Ah, yeah
I'm seeing some funny behavior too, but trying to figure out if it is just me doing silly tings.
219kb free
Thanks - sounds right - and my linux box is happier now after I reconnected it.
I had to plug it into USB2 on Windows again, still reset it about 10 times before it would show up. Changed main.py to something else. Mounted immediately on Mac with USB3.
But it's still acting oddly. I don't have the brain to deal with it tonight though.
I know that feeing - I am about to quit as well.
@solar whale I deleted all the commented out code from main.py, put it in a different file. Seems to be handling being ejected and reset better now.
@solar whale is the flash drive file system on M4 visible and usable? so you can just copy a .py in and run it from REPL?
@hollow tartan Yes. It works like all the M0 CircuitPython boards.
@hollow tartan yes
@idle owl sounds better - I finally think I have thisgs restored. the M4 does not handle running out of space very well
@hollow tartan I doubt it will happen soon if at all. The USB interface to the esp8266 is very different and my understanding is that it cannot be made to work as a flash drive like the m0 and m4.
@solar whale Good to know about running out of space.
I need to get to bed - early moning ahead - Goodnight all!
@solar whale Goodnight!
thanks. nite.
'night @solar whale
@idle owl are you doing a sync immediately after writing the file? That may help.
@tulip sleet No, how and where would I be doing that? I edit in Atom and save files, and sometimes I connect via serial, other times I don't.
I made the changes and pushed.
Just type sync in another terminal window after you write in Atom. That flushes writes to all disk drives.
Ah
Or, edit the file locally, and then do cp /foo/bar/main.py /media/<username>/CIRCUITPY; sync
And you think that will stop it from freezing everything? Or was this in response to a different issue.
If the freezing is due to write delays, it will get rid of that. Scott has pushed several MSC changes recently. If you can pin it down to a specific commit, that would be helpful to him.
I had significantly more code in main.py than I was using.... I'd say a full 2/3 of it was commented out as I was trying different things to get the rainbow animation to work on both an RGB strip and an RGBW ring. I removed all the commented out code, and it's been playing nice for at least the last little bit of time. But it seems like it just happens over time again, that it freezes and doesn't eject, requires physical removal, and then doesn't mount.
for instance, removing all the comments makes the file smaller, and so it may write completely in one go instead of being delayed
See, exactly π
but it could just be length of time...
I'll leave it running, connected to serial overnight and see what happens.
I'm on MacOS at the moment. But I updated the Linux lapatop last night to 17.04.
I'm on 16.04. But not 17.10?
Yeah, I was wondering the same thing. I looked to see if it would let me do 16.04 through the GUI, but it offered 17.04. I just checked the updater to see if it would tell me what version I was running, it says 17.04 and offered to upgrade to 17.10.
So who knows why it wouldn't go straight to 17.10.
So I could run the upgrade to 17.10.
(It was on 16.10)
I hadn't done anything with it in a while.
i usually just stick to the long-term support releases. I did drop unity for cinnamon (the mint UI), because it was kind of non-obstrusive
I'm having filesystem problems with a Gemma M0. According to https://circuitpython.readthedocs.io/en/2.x/docs/troubleshooting.html#valueerror-incompatible-mpy-file I should reflash with a uf2 to erase the CIRCUITPYTHON filesystem, but none of the ones linked seem to load.
Gemma doesn't have SPI flash.
is this on Windows?
do you have Arduino installed?
I just flashed to CircuitPython 2.1.0 and am trying to update the libs for the Gemma 2.0
Yes, I have arduino installed as well.
if you load any Arduino program on the Gemma it will erase the entire flash. Then load CPy again and it will create the filesystem from scratch (empty)
so just load blink or similar
what kinds of errors are you getting?
the filesystem appears to be full, can't save to the fs.
Gemma will fill up if you try to load the entire library bundle.
Did you choose some specific ones and it's still giving you those errors?
I should be specifically running the lib directory from gemma_m0_2.0.0 which is a minimal set of hid, dotstar and neopixel
Ah ok
on the mac, many mac junk files are copied to the filesystem at the same time
I'm trying to find Tony DiCola's writeup of how to clean those up or avoid them in the first place.
Scroll down to "Prevent & Remove Mac OSX Hidden Files".
@coarse barn I would start by loading an Arduino program to your Gemma, reflash CircuitPython, load the new versions of the three libraries, and see if you're still running into issues. If you are, you can use the info in the guide to remove the Mac OSX hidden files.
@tulip sleet Good night
And I need to head out as well. It's late here.
left out the adafruit_hid and got the python code to run, once I removed the instances of Keyboard from all the demo code.
So, been working on trying to get cookiecutter to work, and am getting nowhere. Does it only work on linux?
If so, that really should be mentioned in the instructions
@idle owl thanks for the help!
@floral dagger cookiecutter is written by others so I'm not sure of the windows state. its a step you could skip though
@coarse barn glad you got it going
Hi all, I don't know if this is the right place to drop my question (Mike advice me to look here), but has someone managed a working connection with an ethernet module (for example the WIZ820io) in combination with MicroPython/CircuitPython (for example the Feather Huzzah/Feather M0 Express)? For my project I need to set up a telnet connection <> Uart Tx/Rx. The physical connection isn't the problemen, but it's my lack of driver experience (if any exists).
With kind regards, Jeroen
Hullo, CircuitPython friends. Is anyone else having trouble with tonight's firmware build on Windows? I built the firmware, flashed it, and now I can't talk to the COM port and I don't get CIRCUITPY mounting, regardless of reboots and resets. Just wondering. I'll head off to GitHub and open an issue.
I can't get to the REPL at all now. With Putty I can't open a serial connection to the COM port. I'm going to open a new issue with that problem. I will leave this one open since I don't know if the abovementioned USB issue has fixed this one.
I rebuilt the firmware tonight and flashed my Metro M4 Express. Now I cannot get Putty to open a serial connection to the COM port (I get an "Unable to open connection to COM50 Cannot open serial port" error). Also, CIRCUITPY does not appear when the M4 is connected. This behavior is the same regardless of which USB port I use or whether I connect to a USB hub. Rebooting the laptop doesn't change the behavior (this is Windows 10, by the way). No pattern of resetting the M4 or dropping into th...
@timber mango i just looked on github and there seem to be some relevant projects there. go to the main page and search. Sorry but I have no knowledge of that chip.
@timber mango I'm afraid we haven't gotten the drivers for all the radio and network chips written yet
@drowsy geyser Just did a fresh pull/build on linux box - works ok ```Adafruit CircuitPython 3.0.0-alpha.0-1154-gb4fc464 on 2017-11-08; Metro M4 Express with samd51j19
Hmmmm, thanks @solar whale !
No worries! Yes, I did.
good luck!
I see you havea 3.0.-beta tag - is that something local?
I don't see that tag on the repo.
@tulip sleet @slender iron Just a heads up - not sure if this is somethign to watch. First, I was able to make a 3.0 Bundle - yay! - just made a local tag and then built to it.... Then,I forgot the M4 has only limited Flash space and I tried copying the whole lib/ to it. It did not give me any errors - inidicating it was out of space but ithe FS really got very messed up and eventually I just had to erase the whole thing and reload. It is working now with just the necesary divers loaded. I have not tried to reproduce it. I was just curious if you had any experiece with filling the FS on the M4 yet. Do you want me to explre this and file an issue on it or just chalk it up to alpha testig at this point?
@stuck elbow no problemen, from Mike I hard the samen answer. @hollow tartan I will search on Github. I can't imagine ethernet and python isn't something that's unique ;)
I guess we need someone who would be interested in using all this networks things and willing to work on them. Most of us so far focused on sensors, displays and actuators. I briefly dabbled with the nrf24l01, but I don't currently have a project that would use it.
Generally, the communication stuff is rather hard and complex, and requires domain-specific experience, so it takes longer than, say, neopixels.
@solar whale (@slender iron) Do you have a non-Express M0 board you could try filling up the filesystem on with 2.1 loaded? See what kinds of errors it gives. It could be that the fs code is not as robust in 3.0. In any case, filing an issue would be great. Thanks!
@tulip sleet Yes - I'll try it on a gemma or tinket and sse how it goes. I know I have recieved out of space erros on the trinket in the past. Hopefully I can get some testing on it later today. This day job gets in the way π
I ran into an issue last night when I mistakenly tried to load the whole bundle lib/ onto my Metro-M4 with the current master 3.0 build. There was not enough room, but I did not receive any "out of space" errors. instead, the FS became corrupted and would only mount as read-only. Several files were clearly corrupte (truncated). I eventually erased the whole flash and restored it with only the necessary libraries and it was all working again.
I have seen out of space errors in the past wit...
@drowsy geyser I can confirm that the USB drives are not acting right on Windows. On Win10 build 17025, I see two drives without names. On Win7 I see one device with messed-up properties, and no drives in Explorer. I'll do some bisecting to find the cause. I have some ideas but it could be one of several things.
Thanks, @tulip sleet ! Let me know if you need any data from my system.
all bundle libraries now use readinto instead of read_into
@idle owl how do i play silence with cpx.play_tone() ?
I also see this problem on Windows 10, and a similar problem on Windows 7.
Some testing data with a Metro M4 on various commits. Note that I have a slow Windows 10 box running Windows Insider build 17025. I had to press F5 in the Explorer window to get Windows to update the list of disk drives promptly.
This reverts commit 182a946b0ef12f6f031e846af788cdeb2eecd3a6.
Fixes #422.
I'm collecting sensor data on a Huzzah running Circuit Python. If I do a While True: .... sometimes I can't break in and stop main.py...it just won't. I end up having to erase/reinstall everything. Is there a recommendation for similar to loop() in arduino but with the ability to break? (note: sometimes I can get into repl and os.rename('main.py','foo.py') but not always...then i really don't seem to have any pins left on the Huzzah to insert a button...?
..hmmm...i guess since the sensor thing is publishing mqtt, i'll have it subscribe to a control mqtt message and tell the thing to break out of main.py...
how are you trying to stop it?
@bronze geyser I think adding a sleep() in the loop might help
I was hooking up to serial, opening screen, then ctl-b. Sometimes this worked. But then another time I had a bug in my main.py code, so the code crashed..crashed...kept cycling crashing. I couldn't break in. I thought then it would be great to have a jumper to GND and one of the pins. Then if the pin goes low. ...
thanks @stuck elbow I had a time.sleep()
@stuck elbow I tried ctl-c ...and every other ctl-combo just for giggles.
the thing is, the Huzzah refused to release the serial once main.py got upset.
screaming "get a grip" to main.py didn't work either...
π¨
that might actually be the reason for it being non-responsive, what kind of bug?
not sure if it matters for control-C , but other contol characted have to be the first char in al ine to be recognized. Make sure you have not sent anyhting else ahead of it.
i am not sure what was ultimately wrong. It got late yesterday. So I stopped and started today by wiping the Huzzah and installing everything again. I realize this might have been selfish, but i wanted to feel better about all of this....
@solar whale thanks. I like the hammer idea too though...
@stuck elbow do you know if control-c should be recognised any time or just as first char in a line?
@solar whale it only works when your program is running
good point!
@bronze geyser no worries, but it does look like some kind of more low-level crash than a regular exception
@stuck elbow i think you are right. In the future, is there an action i can take that would benefit circuit python ?
@bronze geyser writing the minimal example program that reproduces the problem and reporting it as a bug
@stuck elbow Thank you. will do.
@bronze geyser another thing you can do is asking someone like @stuck elbow or @solar whale to reproduce it on their huzzah
I'm gonna take a peek at the usb logs for this before approving. I have no idea why this would make a difference.
@slender iron thank you. Good advice.
I have no idea either! I thought it might have been a descriptor issue. Do you want me to take some Windows Beagle USB logs for you with and without the revert?
Ill do it with my windows box
On Wed, Nov 8, 2017 at 9:58 AM Dan Halbert notifications@github.com wrote:
I have no idea either! I thought it might have been a descriptor issue. Do
you want me to take some Windows Beagle USB logs for you with and without
the revert?β
You are receiving this because your review was requested.Reply to this email directly, view it on GitHub
https://github.com/adafruit/circuitpython/pull/424#issuecomment-342901370,
or mute the thread
...
@bronze geyser I'll be happy to give it a try if you have an example.
@solar whale thanks...unfortunately I erased before I put together debugging.
@bronze geyser No problem - it'll come back π anytime.
Yes indeed @solar whale
>>> cpx.play_tone(4000,1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "libraries/drivers/circuitplayground/adafruit_circuitplayground/express.py", line 394, in play_tone
File "libraries/drivers/circuitplayground/adafruit_circuitplayground/express.py", line 421, in start_tone
ValueError: Unsupported playback frequency
anybody know what the supported range is? (having trouble finding it)
appears to be 3500 ?
it'll be dependent on the resolution of the sine wave from the cpx library
@coarse barn You're welcome! I'm glad you got it sorted.
@tidal kiln I was hoping entering a frequency of 0 would work, but it doesn't. I'm not sure how you would use it that way.
@slender iron your link is to core code though, right?
ya
so how would the cpx lib affect the 350000 cut off?
@tulip sleet I found one issue where the inquiry response isn't always aligned
cpx is play a sample of length n at frequency n * frequency I think
@tulip sleet I left the M4 connected overnight, and at some point the serial connection dropped, and when I tried to interact with it in Finder, it froze until I physically removed tfhe M4. I ran into the same Windows 10 errors last night when trying to resolve my issue - 2 unnamed drives - but a bunch of resetting eventually got circuitpy to mount.
@slender iron good detective work. do you know the place to fix yet?
do COMPILER_ALIGNED(4) for inquiry_info and format_capa
I don't think this would cause things to half work like @idle owl is seeing
@idle owl for simple melody playback where a 0 could allow for a pause:
melody = (400, 0, 323, 480, 0, 0, 340)
for n in melody:
cpx.play_tone(n, 0.1)
@tidal kiln It gave me an unsupported frequency error when I tried to do cpx.play_tone(0, 1)
i'm currently doing something like this:
melody = (400, 0, 323, 480, 0, 0, 340)
for n in melody:
if n == 0:
time.sleep(0.1)
else:
cpx.play_tone(n, 0.1)
@idle owl yep, that's why i was asking how to play silence
@tidal kiln I like the second form because its clear its not playing a tone
but i'm also having an issue on the high end, can't play anything above 3500
Is there a theoretical limit for the onboard speaker? Or is that a code issue.
Or actual limit, I guess. Theoretical is probably not the right word for my question.
probably code, like @slender iron pointed out, the resolution of the sine wave in cpx
Makes sense
more resolution = can go higher, but requires more storage
the arduino lib works much differently, it just uses timer interrupts
hardwired to 100:
https://github.com/adafruit/Adafruit_CircuitPython_CircuitPlayground/blob/master/adafruit_circuitplayground/express.py#L385
350000 / 100 = 3500
yeah math
the first parameter for play_tone is frequency, I don't think 4000 hz will work
@slender iron i tried to drill in to the c code starting from here:
http://circuitpython.readthedocs.io/en/2.x/shared-bindings/audioio/AudioOut.html
but github link was stale
@opaque patrol correct. it won't. for software reasons. apparently.
@tidal kiln I linked you to the core code earlier
@slender iron yep. thanks. was pointing out other in case docs are out of date or something.
or maybe that was the wrong place to start looking?
(i was doing that hours ago)
Looks like 4000 should work...
in ports\atmel-samd\common-hal\audioio\AudioOut.c
line 546: common_hal_audioio_audioout_set_frequency
if (frequency == 0 || frequency > 350000) {
mp_raise_ValueError("Unsupported playback frequency");
}
@opaque patrol that's lower level
@tidal kiln I don't know how read the docs creates code links. I usually just search the code for the error message to find where its coming from
@slender iron me too. it wasn't obvious in this case though.
see stack trace above
also confusing as line 421 is a comment line:
https://github.com/adafruit/Adafruit_CircuitPython_CircuitPlayground/blob/master/adafruit_circuitplayground/express.py#L421
(or is that due to mpy?)
I don't know
then i really don't know π
@tidal kiln your .mpy might just be out of date with the source
thought of that too, not sure how to confirm though, it's whatever is in 2.1 bundle
@tulip sleet that's it. just looked at files from previous commit.
the bundle release has links to the version that's included. So look at: https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/tag/20171019. Then you'll see https://github.com/adafruit/Adafruit_CircuitPython_CircuitPlayground/releases/tag/0.8.1. Click on that, then on the page that comes up, click on the little 0.8.1 to the left of the vertical line. Then you can look at the source for the 0.8.1 tag.
@tulip sleet thanks. that's a better way to nav there.
next question would be how to get to the c code from there?
@tulip sleet try a critical section around https://github.com/adafruit/circuitpython/blob/master/ports/atmel-samd/usb_mass_storage.c#L309
@tidal kiln find the code in shared-bindings that matches the module you are using and then find the common-hal code it calls
I think I see the problem...
sine_wave is initialized to None self.sample.frequency = int(len(self.sine_wave) * frequency)
so it might be possible this is multiplying frequency by 0 which equals 0 and would result in the error message "Unsupported playback frequency"
TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'
TypeError: object of type 'NoneType' has no len()
@slender iron critical section fixed it! seems to be ok on windows now
(I was doing some other paperwork.)
does the other mscdf_xer_blocks at line 312 also need guarding. it does a final mscdf_send_csw()
yeah maybe
on the beagle I'm seeing it respond with extra read blocks I think
and that extra read block is sent as a response to something thats not a read
@tidal kiln I think the max value for frequency in start_tone is 3499 , I don't have an express yet to test myself.
NeoPixel on CPX question:
do we have an equivalent of setting pixel colors and then "showing" them all at once like in Arduino when using the express cpx.pixels method?
I'm trying to change all colors at once, instead of w a slight chase effect I'm getting iterating through them
Yes, disable autoupdate when creating the NeoPixel object
@stuck elbow Bingo!
Was just about to....
since I'm doing this w express I'm not explicitly creating the NeoPixel object.
I guess that forces you to create it yourself instead of using cpx
crossed streams :)
I'm doing this for a Learn Guide, and gonna try to keep it as simple as I can
sorry for slow typing, I'm on a screen keyboard
you might be able to disable autoupdate on cpx.pixels
I know i can do cpx.pixels.brightness = 0.2 to change the object
Just look at the source to see how the attribute is called
@split ocean you could try setting the neopixel auto_write to false
@opaque patrol that's what I'd like to do, and then after setting all their colors do a write/show. just need to figure out the syntax!
cpx.pixels.auto_write = False cpx.pixels.show()
thanks @slender iron !!!
pixels is just a NeoPixel object thats already made
I dig it
I made up some all-zero .uf2 files for erasing non-Express boards. Adding for doc for them here, and will also add info to the appropriate Learn guides.
https://github.com/adafruit/Adafruit_Learning_System_Guides/tree/master/uf2_flash_erasers
The current support suggestions are to load some Arduino program or use bossac -e. This is easier.
@tulip sleet thanks for the M4 eraser! It'll be a lot easirer to recover if I can recreate the issue I had last night!
@solar whale I think I found and fixed your issue
I was copying the bundle over and then deleting it to stress test it
just testing it one last time
no rush!
I did get file corruption like you did
@solar whale I tested the erase .uf2's on Gemma, but not on m4. Something not working on m4, so hold on.
@tulip sleet thanks for the warning.
pushed a second commit to https://github.com/adafruit/circuitpython/pull/425
@slender iron it's still pretty flaky on Win7 and Win10. Sometimes doesn't show name, just "Removable Disk". Try it yourself. I had to reboot to clear some bad state. Very slow to appear if at all. Try to compare it with the reverted version from my pull request
btw, I cloned tannewt/circuitpython to build. Surprised that repl said "0.9.0-xxx". Your repo is missing a lot of tags. Maybe do "fetch --tags"?
Can you post some traces? Iβm finishing up lunch
we have to go out in 5 mins or so, I'll be back around 8:30ish ET
kk
Maybe a little off topic, trying to program CPE on arduino. Red led breathing, see cpe on com12, verbose turned on and arduino runs F:\Users\ritas\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0/bossac.exe -i -d --port=COM12 -U true -i -e -w -v F:\Users\ritas\AppData\Local\Temp\arduino_build_274068/cp-blink.ino.bin -R
com12 times out
Tried running bossac from command line with same result
@solar whale ping me if you get a chance to test the pull request
@pulsar bloom try again after double clicking the reset button to put the CPX into bootloader mode. may need to check the com ports in the arduino IDE and re-pick it.
https://learn.adafruit.com/adafruit-circuit-playground-express/set-up-arduino-ide#manually-bootloading
@slender iron I should be available in an hour or so.
ok thanks @solar whale
@slender iron What do you need tested
@tidal kiln tried all possible interations of button clicking, multiple usb cables, multiple usb ports, multiple cpe it all seems to point to bossac not working.....
@slender iron How do I build from something still in a PR?
@pulsar bloom probably best to post in the forums then.
https://forums.adafruit.com/viewforum.php?f=58
Thanks suspect win10 problem
you can add my repo as a remote or I can just post a build for you
Ooh. Build for me. I want to figure out adding yours as a remote but not right now.
My friend is currently sewing neopixels at the moment so I have bit before back to teaching. She wrote her first CircuitPython today! And when she tried just threading them together without fabric, nearly smoked one of the NeoPixels. Been a day filled with firsts! π
metro m4 test
Hello all who flip bits. Kibitzin' again. Amazing stuff. Quick Question? How in the world do you keep from breaking the build? That was sacreligious in my day. Saw developers fired on the spot for breaking the build.
@lofty topaz break in what way? by changing source code?
@tidal kiln By checking in code that does NOT allow the build to perform. You never ever break the build.
A syntax bug.
I always wondered how "open source" kept from breaking the build.
@lofty topaz in general, by forking the working code and modifying that. then merging it back in to working (main) branch is done once reviewed by those who will make sure it doesn't break. hopefully.
@slender iron Hmm. Am I testing the USB issues with this update? Or something else... Because it's still acting weird.
@tidal kiln Sounds like a job for Superman. π
On the mac first. It mounted ~10 times in a row after the reset button was hit, on the next one, didn't want to mount. Physically unplugged it, Finder complained about circuitpy disconnecting (even though it wasn't mounted). Windows USB3, nothing, Windows USB2, still 2 unnamed drives.
@lofty topaz the tools help a lot. also the fact that we are not pushing live code to a mars rover or something.
Curious tho, in this day and age, do your builds take 3 to 4 hours like ours did over night?
@tidal kiln Oh yes, the tools are most helpful. I wish I had the tools back then that we have today.
@idle owl so you are plugging it in and then hitting reset after it shows up? are you ejecting?
@lofty topaz they take 10 -15 minutes and are run by Travis CI
@slender iron Now that's what I call a luxury.
Add smartconfig capability to micropython for esp8266
Create smartconfig python wrapper. An old example is at https://github.com/mianos/micropython/blob/master/esp8266/mod_esp_smartconfig.c
Add the following:
{ MP_ROM_QSTR(MP_QSTR_smartconfig), MP_ROM_PTR(&mp_module_esp_smartconfig) },
@lofty topaz thats slow too. we'd love it to be faster
Works been intense this week, but I plan to upgrade to the latest CP3.0 asap and start poking at sensors and such.
I'm also aiming to get home in time for Show&Tell tonight.
@slender iron Patients, have patients. The time will come when it takes no time at all.
I save to the f: drive and walla, the CPX is running it. In seconds.
And to think I used to wait for 30 minutes while the EEPROM bathed in UV light before dumping hex code into it. Then plugging it into the S100 board and hoping the Z80 based system will run.
Yeah, I'd say things are a tad easier these days.
π I'm happy the iteration cycle is a bit faster now
Nice. I used to compile the kernel for a week on my 386...
Kids have it easy today π
I once esent a 386 to our plant in Mexico and an FBI agent called me and said that technology was too advanced to export. Your under arrest. π
We worked it out but my boss wasn't too happy.
I recently had to file some documents to be able to order an infra-red sensor from mouser
because they are "restricted export" and they wanted to know exactly what it is for
@stuck elbow I can believe it. Do the paperwork. It pays.
funny thing is that Adafruit is selling them on breakout boards and you don't need any documents for that
it was the AMG8833
@slender iron I was ejecting every time.
@stuck elbow did you see the post about the AMG being mis-classified?
I have not
(hmmm maybe that wasn't posted)
@stuck elbow I bought some raw AMG8833s from Digikey and had to do the declaration. I believe that requirement got dropped just after I got them.
nice, good to know
MetroM4 is happily updated to master
thanks, that's interesting
I was trying to imagine what they think you could possibly build with this that would be dangerous, that you couldn't build with a bunch of phototransistors
heat-homing systems come to mind, of course
Also after sitting for a bit, it froze Finder. Trying the second build you sent.
So here's the other thing that happens whne it starts acting odd and doesn't mount: the main.py that's running loads and runs really slowly.
It's a rainbow animation and it goes from zipping along to a really slow fill and slow rotation.
But that's even only 1 in 3 times that it didn't mount. And this time, at least if I reset it again, circuitpy shows up. Before once it did that, it wouldn't show up again at all until it had been physically removed.
I noticed that even on 2.x Trinket M0 runs slower when connected to USB
especially when doing anything cpu-intense
Couple of things that look like errors in dmesg: disk3: media is not present. disk3: media is not present. disk3: media is not present. disk3: media is not present. disk3: media is not present. msdosfs_fat_uninit_vol: error 6 from msdosfs_fat_cache_flush USBMSC Identifier (non-unique): AF8C5FF815E47535020202D473C480FF 0x239a 0x8021 0x100, 1
USB device 239A802114130002 - fConsecutiveResetCount = 1.
disk3s1: device/channel is not attached.
USBMSC Identifier (non-unique): AF8C5FF815E47535020202D473C480FF 0x239a 0x8021 0x100, 1
SandboxViolation: AssetCache(18795) deny(1) file-read-metadata /Volumes
USB device 239A802114130002 - BOT reset completed with kUSBHostReturnPipeStalled.
USB device 239A802114130002 - fConsecutiveResetCount = 1.```
@slender iron I can test it now - unless it has already been done.
Most of the rest of it is the same thing you've told me previously was fine.
@solar whale Test it. I'm still having issues with it. Could be on my end.
@slender iron is it inthe file you posted above or should I download it.
The first uf2 he posted is the one to try first.
@idle owl was the latest uf2 better than the first?
I'm seeing the issues here too
@idle owl and @stuck elbow main gets slowed down by usb interrupts I think
@slender iron The latest was much smoother for me.
hrm, smoother how?
It mounts more consistently, when it stops mounting it at least mounts again after a reset or two, before it didn't. It did freeze Finder once, but mounted immediately again after unplugging it physically.
hrm
@slender iron wa thsi the correct version to test ?? ```Adafruit CircuitPython v1.9.3-1401-g971bd7e9a on 2017-11-08; Metro M4 Express with samd51j19
Oh.
When I plugged it into windows, the onboard NeoPixel went white.
Plugged back into Mac, and the system's been erased. No files.
hrm
Mounted once as circuitpy. On reset: disk was not readable. Took a ton of resetting to get it to mount as circuitpy again, still empty though. Only has boot_out.txt.
are you copying files to it?
@slender iron I just overfilled it and it responded correctly - no space on device - recoved fine
I wasn't at the time of any of this happening. Just ejecting and mounting to it.
INterstingly, the whole lib/ actually fit - had to copy it twice to fill it
hmm, sounds troublesome still
@slender iron why the 1.9.3 tag?
Tried copying another file to it with a main.py already there that wasn't working, Finder is frozen.
its the latest tag (from micropython)
ok - it seems to handle overfilling the FS well - at least for one test
who?
Mounted 20 times, didn't mount one time, but mounted again after reset on that one. Some error in my main.py apparently, but eh.
I think the blinky error code is wrong when main is missing
This seems to be working better than before.
also works fine for me - reported no space on devive - recoved fie when I made space
Oh. Also, it erased the code again.
k, thats with the revert that dan proposed
So there's no main.
was there ever a main?
so far it appears to be automounting much more reliabley on linux.
nevermind - ppushed my luck -- not always automounting, but working fine.
There was before, but it's since been erased.
Lost some new code too, lol. Should have known better.
I try to never edit the code on the board.
Always edit it in the repo on my disk first, and copy over.
Unless it's some trivial experiments, of course
Yeah I'm usually better about it. But I get complacent over time, and every so often, lose something. Then I'm on it for a while again, repeat.
I have learned never to assume any system will come back after a reboot ... too many times
I haven't learned to proofread my typing....
@idle owl waht is the issue you are testing?
@solar whale USB stability. It just also erased my board in the meantime.
π¦ any particular scenario you want me to try to reproduce?
I was just ejecting and then pressing the reset button repeatedly. π
I had one on there at the start.
Then after doing all the resetting, it erased at some point.
Then I added another one.
But there was error status lights when Finder said the board was empty
Is teh issue only on windows machines ?
one eject reset cycle OK on my Mac
I need a medieval break from usb
@slender iron Sound reasoning, good sir.
π
π
@slender iron at least the FS is respnding well to overfilling now. Thanks!
if its ever been solid on usb it'd be good to know what commits it is
both have worked for me - now using Adafruit CircuitPython v1.9.3-1401-g971bd7e9a-dirty on 2017-11-08; Metro M4 Express with samd51j19
I had some funky USB issues last night --- dropped connections and the FS issues - None so far this evening.
this is the code for that last uf2: https://github.com/tannewt/circuitpython/tree/align_usb
is it hte align_usb branch?
yeah
thanks
no problem!
@slender iron is the cache enbale or disabled with the setting to 1?
disabled I believe @solar whale
OK - not intuitive π
I guess its a "disable" flag, not an "enable" flag - sigh...
OK thanks - will take a look ...
Is upgrading circuit python to 2.10 going to wipe flash on CPX?
It shouldn't, but it's always good to backup your code.
Would it be worth re-reading the flash to make sure there is still no file system?
Hrm. also, the install section directs to 2.0... should it direct to 2.1?
Can you post the link please?
@royal ridge weird. that link shows 2.1 for me.
@royal ridge I fixed the download uf2 link
I β€ you @slender iron
Thank you @slender iron
well. if it's fixed, it's fixed. nvmd.
@tannewt Is there any conflict between turning the caches and the errata 1.6 regarding the DSU CRC32 which may fail if NVM caches are disabled? Does this apply?
I don't think we're checking the CRC32 anywhere. We probably should though.
Not with the cache disabled ;-) - Thanks for clarifying - I just wanted to make sure one fix was not going to introduce another latent bug.
Yup, I appreciate the second set of eyes on it.
@slender iron Do you have a link to the schematic for the Metro_M4 board?
@solar whale its not public yet but I have a copy
ah - ok - just curious
do you have a specific question?
After reading the errata, I was wondering if there was an exteranl pullup on the RESET - I see one on the Metro_M0 so I assume it is on the M4.
my board is under my metrowing - so I can't look at it π
thanks - I'll verify next time I take the wing off.
π
ugh - forgot how small the traces are - I'll take your word for it!
really enjoying the RAM on the M4 - I't's great to be able to use the OLED display and be able to runs sensors at the same time! the Metrowing has been a great tool for plugging in boars to test.
yeah, I think the hardware errata is dealt with
we may be able to increase the heap size too
Science cannot move forward without heaps!
I have a test ruunnig with 2 Temp sensors displaying temperatures and gc.mem_free on the OLED - it cycles from > 114K down to 15K as it runs
π
FYI, I just built new firmware and flashed the M4. Still can't get to the REPL and no mass storage mount.
@drowsy geyser from master? did you see my branch go by?
Yessir, from Master. I did not see your branch (sorry). Been in a conference all day.
Just got home and tried the build... π
Ahhh, thank you, Scott!
np
@slender iron just fyi, i closed ads1x15 issue
thanks @tidal kiln !
@slender iron should I try latest from align_usb branch on Windows?
if you like, I still don't think its fixed
been just getting frustrated with it
gonna make this trip a vacation from usb
Understandably.
that's a great idea. The only reason I submitted the PR this morning was to get Windows working again. Maybe if we just take that for now? and you can come back refreshed
yup, thats fine with me
feel free to have other folks give you reviews while I'm travelling
maybe I will add the alignment fixes to that PR, since those are clearly issues, and then leave it at that. I plan to work on the other busio stuff, and that doesn't need merging soon at all. I am ordering a some breakouts for the other protocols to test (e.g. OneWire.) Anything urgent that comes up I will get someone to test and review
kk, sounds good
Go eat dinner and pack and relax before your fliight tomw
π I have chores to do. my mom is staying at our house so I have to do some cleaning. π
Kitties will have a friend though!
catsitter
Works out all around
I had a lot of coding epiphanies while driving home an hour from Palo Alto to Berkeley instead of being poised over the keyboard. And then I did something else entirely, cause I couldn't work from hoem.
Those are great!
actually I hope you forget about it for days or at least hours at a time. bye - happy travels!
I agree with Dan! Have a wonderful time!
thanks all!
@slender iron have a great trip !
Loking ahead to the weekend my goal will be to get a rudimentary debugger running on ATSAMD CP (I was experimenting in the Unix port).
@umbral dagger Nice!
This revert is just to get MSC working on Windows again. There are still known problems. The "Align SCSI responses" commit fixes one, but others fixes are still being debugged.
@tulip sleet I've had the M4 serial connection up, the rainbow animation main.py running a ring and a strip, and main.py open in Atom since before the live streams and they're all still running smoothly. I don't think it made it this long earlier.
I'm going to leave it overnight.
@idle owl You were having mac problems with the m4, right? Is there something that I should/could test on mine?
@pastel panther I was ejecting it and pressing the reset button. Repeatedly. Eventually it won't mount, or in a couple of cases, erased the board. A couple of days ago I managed to corrupt it bad enough that it would only show up as NO_NAME - that took the JLink to recover from. But the issues I had earlier were simply from ejecting and resetting. Finder would freeze completely and I would have to physically remove the plug to get everything to work again.
Then about half the time, when I plugged it back in, it would take resetting 10 times to get the drive to mount.
How fast were you reseting? LIke 1hz or so?
The build I have on there now seems to be much more stable than it was earlier.
Is that the build from Scott's fork
I waited until CIRCUITPY disappeared from Finder before resetting. To give it more of a fighting chance, I would give it a couple of seconds after that for some of the testing.
Yeah, he sent it to me, so it's from his repo.
I don't know what's been committed to master since.
Ok, I'll test it out after I'm done tearing down this TV (yay dumpster gold!)
the commit above is on master and rolls things back a bit so that Windows is usable again, and also includes one obvious fix. When Scott gets back we can try some more stuff.
I wanted to test Scott's latest on Windows but my test Windows box was tied up with an update. Will try again in a a few minutes.
Ooh! Shows up on Windows 10 USB2 and USB3, immediately.
that's good - I'll be back in a minute after rebooting this machine, which also has windows
I need to head out. Goodnight!
gn
align_usb branch is ok too.
<@&356864093652516868> if you wish, try the latest adafruit/circuitpython master, and also https://github.com/tannewt/circuitpython, branch align_usb. Let me know if one seems better than the other and I'll make that one be on master for the next days. @drowsy geyser both seem OK on Windows for now, but only lightly tested
the odd v1.9.3 version you see on the align_usb version is just due to merging from micropython. The version uses the latest tag available. I retagged in master so it's back to 3.0.0-alpha.something
@tulip sleet Maybe I'm doing something wrong (likely), but I did a git pull git submodule update --init --recursive and flashed the new firmware (I did see your new usb module go in). I'm not seeing any behavior change.
So Master is still not working for me.
Do I need to delete and re-clone the repo?
@drowsy geyser Did you also try the align_usb branch from https://github.com/tannewt/circuitpython ? It has one change in it.
@solar whale I haven't been able to get it to build. I get tons of errors on make. I'm pretty sure I built my source tree wrong, but I haven't gone back and tried to fix it yet. I just did a git clone from that repo, followed by a submodule update. The build environment looks totally differnt.
ddi you do git checkout align_usb before submodule update and build?
git clone https://github.com/tannewt/circuitpython
cd circuitpython
git checkout align_usb
git submodule update --init --recursive
cd mpy-cross
make
cd ../ports/atmel-samd
make BOARD=metro_m4_express clean
make BOARD=metro_m4_express
Thanks! Added to my OneNote. π
the alighn_usb branch is just for this test - with mainline repo always checkout master.
Yup! I built them in separate directories.
I finally made separate dirs for master, 2_x- it gets really messy switching between 2.x and master since the layout is differnt.
@solar whale Results: Scott's branch works fine, whereas Master does not. I'm assuming someone will do a merge at some point to get Scott's changes back into Master?
yes @tulip sleet is collecting input - please update him. Great news!
Ok, will do, @solar whale . Thank you again for helping with my newbie build problem!
Glad to help but somehow newbie seems a bit misplaced for you!
LOL. Newbie to GIt! I have to get up to speed since we use it at work for everything....
It rminds me of "learning" emacs -- always seems like I'm just scratching the surface!
Totally with you on that. I'm a dyed in the wool vi guy.
Started using it in '85 and it's just ingrained. I can't tell you how many times I've typed ":w" in Word just from muscle memory....
Dan updated in DM. Now the question is, "do I sleep before the conference, or solder up a BME280 and see if it works on the M4?"
My BMP280 works fine!
Well then, no need to test it. Lessee, what else do I have here?
you will need to regenerate the .mpys in the libraries you use - moy format changed in master
I tried mcp9808 and an OLED ssd1306 - all good
Hmmm, I have a TSL2561 here. I think someone already did the driver for that....
the extra RAM is amazing - nice to have room for drivers and code!
Its in the bundle now - with the extra RAM you may be able to test with the .py insteasd of the .moy
Yeah, I can't wait for these to get into production! I really want to use CircuitPython in my rocket flight controller, but the libraries wouldn't fit in it before. π
THis is the first time I've been able to use an OLED display on CP and still have room for drivers.
Nice! I definitely want to have the OLED on my systems. I use them a lot!
neopixels work too! It's great to have all these new features working on the M4 - the update speed for the neopixels is great!
I have a pile of stuff I need to solder up and there's a NeoPixel ring in the queue. I definitely want to try it on the M4!
I have done a few tests with a 16 pixel ring and it is very nice - the "color wheel" demo I have been using takes 16 secs to go areound the loop on the M0 - about 6 on the M4!
Wow! That's a significant improvement!
@drowsy geyser I got your results. Could you do do git log in your adafruit/circuitpython repo? It should look like this:
commit b82cfcb064e7a01548abcde5983b6d4be6fd9e9c (HEAD -> master, upstream/master)
Merge: b4fc464a4 0e6928b08
Author: Dan Halbert <halbert@halwitz.org>
Date: Wed Nov 8 23:38:13 2017 -0500
Merge pull request #424 from dhalbert/revert_182a946_msc
Revert "atmel-samd: Tweak mass storage code to finish read sooner."
commit 0e6928b087805f95520de34647d2836278fcdbf9 (tag: 3.0.0-alpha2, tag: 3.0.0-alpha.1, origin/revert_182a946_msc, revert_182a946_msc)
Author: Scott Shawcroft <scott.shawcroft@gmail.com>
Date: Wed Nov 8 10:47:22 2017 -0800
atmel-samd: Align SCSI responses.
commit bfe7e055e9b1dac0411fe975fdf2412029f03b33
Author: Dan Halbert <halbert@halwitz.org>
Date: Wed Nov 8 11:17:10 2017 -0500
Revert "atmel-samd: Tweak mass storage code to finish read sooner."
This reverts commit 182a946b0ef12f6f031e846af788cdeb2eecd3a6.
@tulip sleet That's is what it looks like word for word. I can paste it here if you like... (Sorry it took so long to respond; I was fussing with some sensors and didn't notice the message)
Its quiet today....is it like this every thursday?
@opaque patrol in the morning it's usually quiet
@drowsy geyser ok, I'll bring align_usb into master today. I tried the master HEAD on Win10 last night, and it seemed to work OK, but there may be other issues.
@tulip sleet for testing non-master branches, do we need to have the ability to build locally?
@tidal kiln It looks like the pull request builds aren't saved, so yes, you need to be able to build locally. Do you have a setup or do you need a recipe? If the latter, what OS's do you have available?
@tulip sleet thanks. no don't have a setup yet, but was planning on doing that here at some point. i'm on linux, so should be pretty easy. i did build mpy-cross, but that was just a matter of cloning the repo and running make.
@tidal kiln
sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
sudo apt update
sudo apt install gcc-arm-embedded python build-essential
git clone https://github.com/adafruit/circuitpython.git
cd circuitpython/
git submodule update --init --recursive
cd ports/atmel-samd/
make clean BOARD=metro_m4_express ; make BOARD=metro_m4_express # or whichever you want
For Scott's repo and this branch:
git clone https://github.com/tannewt/circuitpython.git tannewt-circuitpython # or wherever you want it
cd tannewt-circuitpython
git checkout align_usb # get to the right branch
git submodule update --init --recursive
[ same as above]
sweet. thanks. why the need for adding the ppa?
to get the arm gcc compiler, and keep it up to date. Better source than downloading manually from ARM.
and the git submodule step just brings in latest of all the submodules, which aren't really part of the main repo?
right - they are in separate repos. For instance, we put asf4 in a separate repo since it might be shared with other projects, and we might want different snapshots of it depending on the progress of a particular port.
neat. pretty straight forward. and the non-main branches are being held in personal repos? that's why the second one comes from scott's?
we do development and bug fixes in our private repos so we don't clutter up the main repo with temporary branches or mess it up by accident. When we're ready for something, we submit a PR and ask for a sanity-check review.
you have to set up your private repo with adafruit/circuitpython as a remote so you can re-sync as necessary. It takes a bit of time to learn the worflow
gotcha. are the ones in the s3 bucket basically the same as what i'd get from the first recipe?
Yes, they're the same
since they're built in travis by cloning adafruit/circuitpython and doing the build pretty much the same way you would
so really only need to build for testing latest from the private / in-work repos, otherwise just grab from s3
yeah, though you have to make sure you have the right commit. Since I'm debugging all the time, I don't bother with the aws repos.
cool. just got a successful build from first recipe.
great! if you have a multi-core processor, you can try make -j4 or however many cores you have. It will speed things up somewhat.
right now a build takes me about 45 seconds for 3.0. 2.x is more like 20-30 secs
@tulip sleet M4 still connected to serial, still running main.py still able to interact with files using Atom, still mounted in finder and not frozen. This is from last night.
yeah. that's about what it looked like. i got a x4 core, so will try that next. i'm going to see if i can build scott's branch...
@idle owl thanks! and that's align_usb, right? I am probably going to bring master up to date with that
How can I tell for sure? I'm pretty sure, yes, but I'd rather be certain.
It hasn't lasted overnight connected like this in days. This is a huge improvement.
what's the git id that's shown in the initial prompt in the repl -g<something>
Adafruit CircuitPython v1.9.3-1401-g971bd7e9a-dirty
that's one commit behind what's in align_usb now: https://github.com/adafruit/circuitpython/pull/425/commits: see what's on the right-hand column
I am using the last thing Scott posted to me last night. I don't have his repo built locally yet so I can't build it myself.
Do you want me to test the current commit?
could you clone his repo and build? see recipe I gave cater above. thanks. I'm not sure about the ef9a87f2 commit. I thought it wasn't working well on Windows, but @drowsy geyser said it worked for him
This commit worked perfectly on Windows for me yesterday. I'll test the current one. (Might still need help, but I'll try the recipe first.)
Only the second thing you sent right? Because I would already have ppa from cloning the master repo?
yep
Thank you
you just enable the ppa and load the arm gcc stuff once. It gets installed in /usr/bin, etc. It's not related to the repo
you don't need to reinstall the tool chain, but that's not part of the repo
great minds think alike
boom. got a build of scott's repo.
I can already build firmware in the circuitpython/ repo... I assume I've done the first recipe before. It was over that weekend when I got the M4, so ... been long enough that I wasn't sure. But realised you hadn't built anything yet, so that's why I verified.
@tulip sleet Why make clean and not make BOARD=etc clean ? I've been running it with the board in the command every time.
do both. clean just deletes everything so you're starting from a known ground zero state.
Ah.
you're right, that's a bug, you have to specify the BOARD for both
I edited the recipe above
make clean without a BOARD spec uses the default board.
thanks. was just about to look in makefile...
if you want to use jlink to look inside and set breakpoints, etc. then DEBUG. Otherwise don't bother, because it's a better test of what will be shipped
Ok, sounds good. I'll do it without.
DEBUG adds some additional info to the compiled program to make life easier for the debugger. In some cases it also changes the optimization level
Makes sense.
compiling without optimization makes debugging easier because the code doesn't get reordered, variables don't get optimized away, etc. But then the code is slower and larger. For M0, it's usually too big to fit in flash
So not a problem here. But it's not an accurate test either.
here's what i get from scott's build:
Adafruit CircuitPython v1.9.3-1402-gef9a7f2 on 2017-11-09; Metro M4 Express with samd51j19
>>>
(or more specifically, my build of scott's latest)
there can be issues @tidal kiln that's good, that's the latest commit on that branch
neat. thanks for getting me running on this.
yw
knowing about that ppa probably would've been half a day of googling
it's confusing; the ppa has gone through several incarnations
Alright. Loaded, mounted immediately, main.py running smoothly. Adafruit CircuitPython v1.9.3-1402-gef9a7f262 on 2017-11-09; Metro M4 Express with samd51j19
weird. slightly more verbose?
I have 2 more digits in the build number.
yeah
Hmm, I closed the window while in the REPL, and now it's acting like it's still connected to the REPL (white onboard LED, main.py not running). I can't reestablish a serial connection.
that string is generated by a git command: git describe --dirty --always --tags
so some OS build environment dependency?
I might have something in .bashrc that's altering my default git stuff. A friend of mine magicked it up for me with some git magic, could be that. Don't know if that would affect it.
could be a bug; is that different from the build you tested overnight? If so add a comment to the PR
git --version
git version 2.14.3
git version 2.7.4
@tulip sleet I don't know if I tried this exact sequence with the other build. But it's consistently repro'd.
Can you link the correct PR please. I had it up yesterday but I don't think I do anymore
Ok. Be a minute.
@tidal kiln I think it was lengthened in later versions: git describe --dirty --always --tags gives me v1.9.3-1402-gef9a7f262
Same thing.
ok, so not a very new problem
I have three more of Scott's builds from yesterday, I'll try those as well
back in a few mins
@tulip sleet yep. that's it. i get:
v1.9.3-1402-gef9a7f2
Same in the third one too.
If it's unrelated to the current PR, should I file an issue instead of commenting on the PR?
The third one froze everything too, so there's still a marked improvement over Scott's earlier commits.
how do you get it to freeze? closing while in REPL?
No, on the earlier commit as soon as I try to interact with CIRCUITPY by clicking on it or attempting to eject it, Finder freezes until I physically remove the M4 from USB.
so this v1.9.3-1402-gef9a7f262 build shouldn't have an issue?
Correct. I tried ejecting and resetting a bunch before leaving it over night, and it didn't freeze while actively testing it, and it was still connected successfully when I checked today.
ah. so i'm late to game and only confirming it's fixed?
Oh! lol. Yes π
cause it seems to be running fine
This build should be working across the board, Linux/Mac/Windows, USB2/3, REPL connect/disconnect, physical power off/onboard reset button.
Theoretically π
problem shows up in current main build though? i'm seeing Dan's comment:
"Let me know if one seems better than the other and I'll make that one be on master for the next days"
Yeah. Master is failing quite a few things.
ok. let me try that.
Even with Scott's last 4 commits, at least for me, the current one was the only one without issues. I can post the ones Scott posted yesterday if you want to test those too. (I definitely don't know how to build from different commits.)
does it matter? or is the only concern comparing scott's latest to current master?
I don't know. I think they wanted to test the few changes Scott made to each other because each of them had one tweak related to stability. I'm not sure though. @tulip sleet Should @tidal kiln test each of Scott's builds from yesterday or just master vs current build?
ok. i'm on current master/g. seems to work ok. got a recipe to break it?
Hmm. For me it was interacting with it by editing my main.py in Atom (it froze Atom pretty consistently) and in the file explorer. Ejecting and reset using onboard reset usually made it pretty unhappy pretty quickly.
By trying to open it or eject it from the file explorer, it would freeze Finder and required physical removal to get it back. Reset using the onboard reset button instead of powering off caused issues.
k. let me try changing blink rate in atom...
Wouldn't even mount to Windows at all. Showed up as 2 unnamed and untouchable drives.
working. for ref, i'm running:
Adafruit CircuitPython 3.0.0-alpha.0-1157-gb82cfcb on 2017-11-09; Metro M4 Express with samd51j19
>>>
I don't know how anyone got it to break on Linux. I updated my Linux machine but haven't set it up for testing yet. I know Dan uses it and he was having issues. I don't know what he did to get them though.
hmmm. ok. will keep punching on it and see if anything odd happens...
discord apparently accepts sed find and replace commands....THIS IS A CARROT
neat
back: so I'm not sure, you're saying the latest on align_usb is the most stable? I did the rollback after a lot of testing on Windows becuase Hukuzutuna said it was broken. As for the REPL bug, yes, a separate issue would be good.
@tulip sleet for me, not seeing an issue with either
linux
yes, linux has been fine. It was Windows that was wonky
:tell_me_something_i_dont_know_emoji:
i'll try both master and align_usb on windows myself. just haven't had time to repeat the experiments. I have slow spare windows box that was updating late last night
For me, align_usb has been the most stable. Carter and I were just figuring out what he should be testing.
@tulip sleet on another note, how about this behavior, i mentioned it before, not sure if it got noticed:
Adafruit CircuitPython 3.0.0-alpha.0-1157-gb82cfcb on 2017-11-09; Metro M4 Express with samd51j19
>>> import time
>>> t1 = time.monotonic(); time.sleep(0.1); t2 = time.monotonic(); t2-t1
0.0991211
>>> t1 = time.monotonic(); time.sleep(0.01); t2 = time.monotonic(); t2-t1
0.00878906
>>> t1 = time.monotonic(); time.sleep(0.001); t2 = time.monotonic(); t2-t1
0.0
>>>
curious about both the accuracy and the apparent lower limit
@tidal kiln each time.monotonic tick is a millisecond. But that's just our implementation - there's no guarantee
that it's any particular unit
is there something higher resolution?
time.sleep also uses msec ticks to count, but hold on a sec ...
you can use microcontroller.delay_us(n), but that does a busy-wait loop, I think. Still looking at the code
yes, it's true
meaning it blocks?
it's just a assembly loop, but it doesn't seem to disable interrupts, I think. The actual routine is about six calls deep.
this is in 2.x. Not sure what is in 3.x (if anything yet).
do you need accurate timing for a driver?
the time to execute a single python statement could be significant and swamp any delay you insert
not yet
ran into the behavior porting some arduino code that had a delay(1) in it. turned that into time.sleep(0.001) but got no delay.
that will actually call the millisecond sleep routine with an argument of 1
ok. then why 0?
no, wait, it could truncate, because it does 1000*0.01, and that gets cast to an int, so if it's less than 1.0, it will truncate to 0.
but 1000*0.001=1.0, so why does it trunc?
4.76837e-07
it's slightly less than one: difference is >0
you could file an issue saying it should round, not truncate
int(round()) instead of int() ?
https://github.com/adafruit/circuitpython/blob/master/shared-bindings/time/__init__.c#L76 calls https://github.com/adafruit/circuitpython/blob/master/ports/atmel-samd/common-hal/time/__init__.c#L37
an implicit cast happens, it looks liek
from 1000 * mp_obj_t -> uint32_t
not mp_obj_t: it gets a float: mp_obj_get_float(seconds_o);
the bottom two bits of the 32-bits indicate whether the value is a pointer, an integer, or a float. we only have 30-bit floats, not 32 bits. ...
right
sad but true
probably a bug; I don't know what other impls do (e.g. the original utime)
if you think bug, i can post an issue, and just use that original example i showed
so time.sleep(0.006) should sleep for a millisecond? or not sleep at all?
Go ahead and file an issue.
should sleep for 6 milliseconds
and if not, time.sleep() documentation should specify lower usable limit
sorry missed a zero: so time.sleep(0.0006) should sleep for a millisecond? or not sleep at all?
good question
CPython defn: https://docs.python.org/2/library/time.html#time.sleep
there was a change in 3.5 to make it sleep at least as long as requested, not shorter in case of interrupt
hmmm. but they make no mention of low end behavior. should it rail to the lower limit (like 1ms) or should it drop to zero?
Python 3.5.2 (default, Sep 14 2017, 22:51:06)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.time()
1510257853.390322
>>> t1 = time.time(); time.sleep(0.1); t2 = time.time(); t2-t1
0.10014939308166504
>>> t1 = time.time(); time.sleep(0.01); t2 = time.time(); t2-t1
0.010099411010742188
>>> t1 = time.time(); time.sleep(0.001); t2 = time.time(); t2-t1
0.0010828971862792969
>>> t1 = time.time(); time.sleep(0.000001); t2 = time.time(); t2-t1
7.939338684082031e-05
micropython utime has sleep(), sleep_ms(), sleep_us(). since some micropythons don't have float, they needed to supply integer args for shorter times. Scott made decision to always have float and to have our libraries more like CPython.
probably not much of an issue in CPython land.
just MCU fun
i'll post the issue so it can at least be documented and discussed
in the arduino code i was porting, the delay(1) was in a very tight/fast loop, so the total expected delay would be approx NSTEPS * 1ms
I looked at the MicroPython impl - it's the same, so the truncation has always been there
which worked there, but in the CP port it became NSTEPS * 0
that's probably a more likely scenario than a tight timing requirement in a driver
and if that does come up in a driver, time to move to c?
well, the low-level neopixel code is in C. You could use microcontroller.delay(us), but again, it might get swamped. I wrote a Char LCD driver that has lots of sub-millisecond delays, cause I didn't know how accurate I had to be. I guess those all went to zero, but it still works.
This shows the behavior which occurs near max resolution:
Adafruit CircuitPython 3.0.0-alpha.0-1157-gb82cfcb on 2017-11-09; Metro M4 Express with samd51j19
>>> import time
>>> t1 = time.monotonic(); time.sleep(0.1); t2 = time.monotonic(); t2-t1
0.0991211
>>> t1 = time.monotonic(); time.sleep(0.01); t2 = time.monotonic(); t2-t1
0.00878906
>>> t1 = time.monotonic(); time.sleep(0.001); t2 = time.monotonic(); t2-t1
0.0
>>>
And some key bits of code are here:
https://gi...
^ fwiw
Roll back to b4fc464a4dd260bae9c2a49f996ffeb96268228d:
git revert -m 1 -n b82cfcb064e7a01548abcde5983b6d4be6fd9e9c
git revert -n 0e6928b087805f95520de34647d2836278fcdbf9
git revert -n bfe7e055e9b1dac0411fe975fdf2412029f03b33
git commit
3.0 issues are still posted to adafruit/circuitpython/issues right?
@idle owl right, though you might preface the title with "3.0:" if it only affects 3.0, and set the milestone to 3.0beta. Somtimes I do a double-take on an issue that turned out to be 3.0-only.
No problem.
@idle owl @tidal kiln @solar whale @drowsy geyser align_usb from tannewt/circuitpython is now on master on adafruit/circuitpython
@tulip sleet Thanks!
@tulip sleet will download and test tomorrow. Thanks!
@timber lion there are a bunch of CPy libraries that need new releases, especially since @fading solstice 's fix for read_into->readinto. I'm unsure of the workflow for libraries that are already wired into travis: should I just create a release that creates its own new tag and the .mpy will be created automatically, or do I need to push a new release tag first?
oh just make a new release in github's releases tab and travis will do the rest
as long as the library was setup on travis' side with the GITHUB_TOKEN variable
most are, if you see releases with a .mpy then they're good to go
one thing though what's the story for people on older versions of bus device? they'll get a failure too unfortunately
something you might consider, keep the old read_into working and have it print a deprecation message
it can just call readinto internally
that's a good way in general to make breaking API changes I think
@timber lion Scott suggested we support read_into I2CDevice for a while, and just change the library. See https://github.com/adafruit/circuitpython/issues/364#issuecomment-342566548. (The whole thread is worth reading.) So the idea is to encourage people to download the bundle.
So, I figured out the problem. If I do a screen -ls after closing the terminal window, there will still be a session running. If I then explicitly terminate that session, I can reestablish the serial connection with the board and when it connects it's still in the REPL. At that point, I can ctrl D and reload the serial connection and it successfully exits the REPL and returns to running main.py. So it leaves the board in the state it was in (ie. connected to the REPL). I don't know if it's an issue with screen, or how it handles the serial connection. I'm thinking it's not necessarily an issue with CircuitPython.
@tulip sleet Should I still file an issue, include the solution and close it? I don't think it's necessarily a CircuitPython issue, but I can't imagine I'm the only one who has ever run into it. Could be though π
@idle owl That sounds like it's working as desired! screen lets you suspend and resume sessions - that's actually the original inspiration for it. I don't use -ls, so I haven't tried resuming.
@tulip sleet Ok, noted. I had to look up -ls. I've never used screen for anything except establishing the serial connection.
I was able to use screen -x or -r or something like that to reestablish the original connection successfully.
so using -ls is new for you? I'm forgetting what the original problem was.
The original problem was that if I closed the terminal window while connected to the REPL the board continued to act like it was connected to the REPL and I couldn't reestablish the serial connection using the original screen connection command.
So I was trying to figure out why and with help found out that it hadn't terminated the screen connection, and it could be reestablished.
if you close the terminal window and do ps -ef, do you still see screen running? I think it may try to survive that. actually I can try that myself.
And if you use screen -X -S <session number> quit to terminate the session, the board still stays in the REPL. But you can then reestablish the screen connection using screen /dev/tty.usbmodemXXXXX 115200, and it pops directly back to the REPL.
Alternately, you can eject the board from finder, do a reset with the onboard button, and it will return to it's base main.py-running state.
Checking ps -ef now
I don't see screen still running. But I almost never close the terminal while screen is running. I do ctrl-A backslash and answer "yes" to close the session
it's muscle memory now, but it was kind of annoying to begin with
I was mounting the board, verifying screen would connect, verifying the REPL, then closing the window, ejecting, and resetting the board. Repeat. For testing USB stability. I happened to notice that if I left it in the REPL, the board remained in the REPL state.
My workaround to get main.py running again was to hard reset the board once more.
in that case I can get back in easily. So there's something odd that happens when you kill screen by closing the terminal instead of exiting gracefully.
Yeah.
So do the ctrl-A \ thing instead and you can go in and out of the REPL without any resetting.
I either need to hard reset, or find the screen session and reconnect, or terminate and reestablish.
well just try what I said now, if you want, it should work
screen ... <type at the repl>. Type ctrl-A, which is the way to get screen to listen to commands. Then \ to close the connection
it will ask you if you really want to quit, and say yes
So from inside the REPL do what you said?
yes, type ctrl-A. That's NOT read by the REPL. instead screen intercepts it and expects you to type a single-chracter command. YOu can type ? to get a list of all the screen commands
Hmm.
did it work?
No...
are you in the repl?
I was. I just reloaded the serial connection to try again.
oh, on the mac, maybe it's cmd-A
It's not, terminal accepts ctrl for terminal commands, cmd-A selects all.
Ahhhhhh
I had to keep ctrl held down, and I had to type A \ quickly
I wasn't doing that.
so type ctrl-A once, then type ? by itself. you don't have to type quickly. hold down ctrl, press a, release ctrl, press ?
Board stays in REPL state, but I can reestablish the serial connection successfully afterwards.
did you see the screen menu of all the commands?
Yeah it worked that time. I don't know what was going on before then.
But if I wait after hitting ctrl-A to type , it doesn't respond.
I have to do ctrl+a+\ altogether it seems like.
Or as long as I keep ctrl held down, I can type \ a little later and it works.
I started up my mac. It's different quit is ctrl-, not plain \ so ctrl-A ctrl-\ then press y to answer the question
it's different between linux and mac
Ah ok.
That makes a little more sense. I see. I can pause between them and then hit ctrl+\ and it worked.
but if you move to linux you will have to remember it's different: annoying but I guess as annoying as ctrl-C vs cmd-C
Yeah, I have alt mapped to cmd on my keyboard hooked up to my mac laptop, and the whole thing is running Synergy with the Windows machine as the server, so I have to remember when I move to a different screen that cmd won't work. Honestly, using terminal regularly which requires all ctrl commands makes it a little less annoying to switch between them because I use control for so much on the mac. But inevitably I'll open "Tools" in some app on Windows at least once before remembering.
I will take leave earlier tonight. kind of burned out last night. gn!
@tulip sleet Have a good night!
This PR adds support for a new single-bank bootloader for the Adafruit nRF52 Feather, and allows SD diversity between S132 v2.0.1 and S132 v5.0.0:
nrfutil (see boards/feather52/README.md).@tulip sleet pulled, built loaded master and it seems to be wrking fine on metro m4 - handles overfilling FS gracefully.
That's from a couple of months ago! But we aren't building spi_flash.c yet on master, so no one ever tried to compile it!
@timber lion @tulip sleet hmm - as warned the update to adafruit_bus_device has broken drivers for 3.0 - it was nice to have I2C for awhile - What needs to be done to fix this for 3.0?
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "oled.py", line 29, in <module>
File "oled.py", line 18, in <module>
File "libraries/drivers/bmp280/adafruit_bmp280.py", line 154, in __init__
File "libraries/drivers/bmp280/adafruit_bmp280.py", line 67, in __init__
File "libraries/drivers/bmp280/adafruit_bmp280.py", line 138, in _read_byte
File "libraries/drivers/bmp280/adafruit_bmp280.py", line 163, in _read_register
File "libraries/drivers/bmp280/adafruit_bmp280.py", line 161, in _read_register
AttributeError: 'I2CDevice' object has no attribute 'readinto'
Is it easy to switch a ESP8266 to Circuit Python and back to Arduino ??
@glad rapids Yes - just reload your sketch via Arduino as normal. - Always fully erase the flash before loading Circuit Python with esptool.
@timber lion Why is there a problem with the attribute readinto? Ii is there in I2CDevice.
@timber lion @tulip sleet never-mind - I just had to RESET the board - all OK now under 3.0. Sorry for the false alarm.
That's the best answer though!
I rebuilt the bundle for 3.0 and copied it over, but I guess a RESET was needed to get everythin propely updated.
Good to know
I spent the whole day breaking things so I should have known better. I think I have gotten back to where I started today - Not much progress, but many lessons learned!
That's always progress
yeah i've noticed you need to reset the board for it to see file updates sometimes
perhaps a bug, not sure if that's by design
in general any time i copy over a new file i soft reset
@tulip sleet Ran into an issue building bundles again ```Deleting existing build.
build-2.1.0/lib/adafruit_register 512
build-2.1.0/lib/adafruit_bus_device 512
build-2.1.0/lib/adafruit_hid 512
build-2.1.0/lib/adafruit_waveform 512
build-2.1.0/lib/adafruit_circuitplayground 512
build-2.1.0/lib/adafruit_pca9685 512
build-2.1.0/lib/adafruit_mpr121 512
build-2.1.0/lib/adafruit_lis3dh 512
build-2.1.0/lib/adafruit_ht16k33 512
build-2.1.0/lib/adafruit_rgb_display 512
build-2.1.0/lib/adafruit_ssd1306 512
build-2.1.0/lib/adafruit_max7219 512
fatal: No names found, cannot describe anything.
Stopping at 'libraries/drivers/ads1x15'; script returned non-zero status.
lib/README.txt 117 512
lib/update_linux.sh 646 1024
@solar whale I often count lessons learned as more progress than actual progress. It often helps more in the long run.
I have some audio recording code, and every so often it gives me a "length mismatch" that I've narrowed down to mic.record. The mismatch seems to be with the bytearray that's used as the buffer for recording, but I'm not sure why.
The code works. It also does the length mismatch every so often.
It's set to 160 in the code, initially using math and a variable, but I changed it to the number. Changing the bytearray to 200 like in the example PDMIn code causes it to crash to safemode. Changing it to 180 causes a spammed constant length mismatch vs the every so many seconds length mismatch.
@idle owl I think I recall you mentioning a guide to writitng CP libraries... I looked around but came up empty.
@umbral dagger Yes! Let me find it.
This may also help, though I'm not sure what your plans are, so it also might not. https://circuitpython.readthedocs.io/en/latest/docs/design_guide.html
Thanks. not an official library at the moment, but I want to make it easy/familiar to use.
@solar whale that library doesn't have travis integration yet. Glad it doesn't break the whole bundle. Thanks. EDIT LATER: now it is itegrated with travis.
@umbral dagger A library for?
@vague monolith The dotstar featherwing. I'll be postiing on my blog very soon.
Ahh cool
I debated whether to publish this so soon after last night's post, but I've been working on it for a while and want to empty the queue. So here it is. https://daveastels.com/2017/11/11/using-the-adafruit-dotstar-featherwing-with-circuitpython/
The length mismatch is an error written into CircuitPython, it's part of audiobusio. I still can't figure out why I'm getting it.
The next question is.... why is the exact same code not working on my other CPX. Still get the length mismatch every so often but I get no lights. LEDs work, I tested putting a pixels.fill in the code elsewhere and it worked. Mic works, I tested it with other recording code and it played back the recorded sample.
I didn't see how the length mismatch issue could have been hardware related, but at this point I was willing to try it anyway, and instead found out the code doesn't work on the second one. π
Probably-obvious question: If I set up a Neopixel string with, say, 10 pixels and run code on it but with only one actual neopixel, it'll still work, right?
Yeah. If it's an animation it just takes longer to get back to 1 if you make it with more than are present.
IE, I set up something to flash each of the 10 pixels on a CPX, and then put that code on a Feather M0 Express, it'll still "Work"
So if I have a strip that I'm running a rainbow on and double the LED number in init, it only shows half the rainbow at a time.
Yep
So, question: Poking around lately, it seems that, effectively, all of the Circuit Python examples for hardware exist. Considering A) I don't want to make two copies of the same thing and B) The CP repo is, well, software, I've been thinking of shifting the focus of the repo's examples from hardware stuff to software stuff. Particularly things like the differences between Arduino code and CP code.
Do you guys think this is a good way to do it, or should I keep my original idea of more hardware-based examples?
The real answer is you do what most interests you. But I agree that duplicating things if that's not your intention isn't the way to go. There's often two drivers, one Arduino and one CircuitPython, but I don't know that there's much comparison of the two. There's one guide written on porting from Arduino to CircuitPython but it assumes a pretty significant amount of knowledge of both on the part of the user. Hardware based examples are nice, especially if you pick up on a way to use it that doesn't already exist, but some stuff has a pretty singular use. I think if you think you'd enjoy embarking on something different, go for it. I really feel it's more about what you want to do, because you should enjoy it.
Well, yes, but it should also be useful.
So far everything you've mentioned is.
I think a lot of the quirks of Python in general need to be brought up. Especially things that Arduino just simply Does Not Allow.
Most of what comes to mind is things with variables.
You can swap a variable for whatever you please in Python.
I don't know much about Arduino. By which I mean basically nothing.
You also don't have to declare them, and when defining functions you don't have to set yourself up for just one variable type. VAriables can be, well, variable.
Yeah
C-variant langauges (Like Arduino) have to have the variables declared as a specific type. Python simply cares not.
Also, man is Python so much easier for working with strings.
I lucked out then. I started with Python.
String manipulation is why Python was my first programming language.
And it was super awesome when I learned that Python was coming to Microcontrollers.
Yeah! Agreed
I learned about CircuitPython before finding out about MicroPython. I was the only person at a conference at the end of July who knew about MicroPython - a guy did a talk on it, and he was so stoked when I talked to him about it afterwards.
Interesting conversations there. Makes me think... Iβm learning Python at the same time Iβm learning Haskell.
I first heard of MicroPython in July of last year, when it was, essentially, just the PyBoard. I fiddled a little when I found it was on the ESP8266, but there wasn't enough going on to make it worthwhile. When I hopped on the Adafruit discord and saw the CircuitPython stuff, I knew I couldn't just sit by and watch anymore
That's great!
@umbral dagger You're learning two languages at once? That seems confusing.
Hmm, CircuitPython having a built-in easily computer-accesible filesystem is also super useful.
Especially for Express boards.
@cunning crypt And they're so very different.
@cunning crypt Haskell doesn't really have "variables"
@cunning crypt Immutability is the rule
@cunning crypt The file system access really makes a huge different.
It opens up so much more on even the most basic CP board that Arduino simply doesn't have
The tradeoff for now is memory limitations. Python has significant overhead compared to C++.
That's why it's on the M0
Even there.
Itβs not feasible on smaller chips.
The M4 makes a huge difference.
Exactly. It's effectively the same thing as the lower-sized Arduino chips
The x20 chips will be amazing for CP. 1M flash & half a M ram.
x20?
The SAMD chips end in a letter & number.