#circuitpython-dev
1 messages ยท Page 276 of 1
kk
I could make it smaller, but we have 1MB flash.
ya, not worried about that
I was thinking of storing it as json to get going quickly: ineffeccient, but easy to parse
hmm, now I'm confused about placement; let me look at this again
no, not really, there are some variable length things. Basically we need a dictionary, but the lookup could be inefficient
hmm, in the old case, the filesystem was just below the botloader, so why did I think it wasn't??
fatfs is: ```
hex(0xad000 + 0x40000)
'0xed000'
the microcontroller.nvm region was carved out of something, I have to go look (See, this is why I changed all this, it was really confusing)
ya, totally
the new code is much better
we should add an assert to verify the location of the filesystem
or not
it'd be good to have a test somehow
good idea, and same in atmel; I can verify it's a certain fixed location for SAMD21 and SAMD51. I can do that at build time
do you want to check at run-time? build is probably good enough
could be #error or #warning
ya, build is fine
ok, I'll push another commit to the PR after figuring this out and putting in a check. I still don't know why the current internal filesystems on the nrf are so broken. But they seem to work with a debug build, so could it be the nrf flash write alignment bug, or maybe it's timing?? have to debug this
I'll pull in jepler's latest PR and check again
lets not wait for a fix for this pr
no, no, not worth it, just trying to understand.
๐
As discussed on Discord. Please add a hard coded check to make sure the location of the filesystem is preserved.
I pointed the data files to the pyportal download for now. When the next CP releases, it will automatically have its own download.
@slender iron ok, fyi, nrf microcontroller.nvm was trimmed off the top of the internal filesystem. It was always 4K. The internal filesystem allocation was always present even if it was not used (because we have so much flash). We always used nrf52840_1M_256k.ld, which defined the FLASH_FATS as 100kB, starting at 0x019000. And so the internal filesystem was really 96kB, which is ... not that big
ok, it's worse
we could change it for nrf. its only atmel internal fs I'm worried about
FLASH_FATFS (r) : ORIGIN = 0x000E7000, LENGTH = 0x019000 /* File system 100 KiB */
>> 0x000E7000 + 0x019000
1048576
>>> hex(0x000E7000 + 0x019000)
'0x100000'
>>>
i.e. the filesystem overlapped with the bootloader, and the nvm is at the top of flash, also where the bootloader config is, which is also wrong
fuuuuun
!!
that may explain the issues
ugh, ok, I'll rationalize this
thanks!
it doesn't explain why it's breaking in the new builds based on my PR, but I think it's breaking differently
its ok to break nrf internal fses
ya, and they currently don't work well
yes, I would rather not preserve a damaged filesystem
@slender iron I was looking at the wrong .ld file, nrf flash layout is @slender iron not so bad, 256kB at a fixed location, but the microcontroller.nvm region is still 4kB carved out of the top of that. So I'll move the filesystem to just under the bootloader and we can grow BLE and nvm down from there.
and we will have more space available on Express boards anyway
Does anyone have a simple code for the accelerometer on the new Circuit Playground Bluefruit nrf52840?
@makermelissa I have this one if you want to use it

I started to change this, but I ended up adding a number of explanatory comments. It really has to be page-aligned, and that's ensured by the compile-time tests in mpconfigport.h.
@hathach if VBUS isn't actually required to connect and disconnect, why is it even a part of the self-powered devices spec for USB at all? Just power savings, I guess? The pullup resistor they mention in that appnote I linked above?
I am not sure either, I will do more testing when getting the actual hardware. The issue
https://github.com/hathach/tinyusb/issues/209 can partly contribute to this cause as well. Will try to implement it in the next week after fixing my other issue with Ard...
In atmel-samd, the filesystem is currently below nvm and the USB clock calibration region. So the location of the filesystem depends on the board's choice for those region sizes, which can vary. So there is no absolute location to check against, unless I put that value in every mpconfigboard file.
I can make nrf be more consistent (just below the bootloader), though it still depends on the filesystem size.
-
I tested this through completion of uploading to AWS S3. The last test run of this workflow can be reviewed here. I tried to make my S3 public, but it doesn't want to be accessible. The file does upload successfully.
-
Scheduled to run daily at 04:45 Eastern (15 minutes prior to the nightly site build).
-
Requires the following repository secrets to be add...
Awesome @siddacious. Would it be possible to get a photo in good lighting without the hand? I often just use a sheet of printer paper behind my photos. Thanks.
Should have been closed via #2364.
While working on the mp3 player project, I encountered behavior that makes it look like "resume()" doesn't set "paused" back to False, at least while playing MP3s. Investigate further and fix if necessary.
hm you can't stuff the pygamer into your pocket and not hit all the controls ... needs a 3d printed belt clip or flip cover case.
scope creep
When a playing mp3 is deinitted, it's possible to reach get_buffer, but all the internal pointers are NULL. This would lead to a hard fault. Avoid it by returning GET_BUFFER_ERROR instead.
Testing performed: Before this change, I regularly saw hardfaults with my mp3player app. After, I don't.
@makermelissa I took that photo at SuperCon but give me a few to set up my lightbox
I don't know what to expect, but a 350mA battery is enough to play back the whole "science is real" mp3 format album (40 minutes, give or take). One song was truncated, I need to verify whether the problem is in the original or a playback glitch.
this is with the LCD backlight on full, I dunno what is the major power draw of a pygamer.. CPU, screen, headphone driving...?
'night
oh I almost forgot to drop this in here: https://github.com/jepler/pyrockout/tree/master
@makermelissa actually it appears that I packed my shIRtty away somewhere while reorganizing my office. If I find it I'll take a decent picture
@uncut mural check out the code for the Snow Globe as the accelerometer is used in that code. It will be in the learn guides.
A flag variable, sd_flash_operation_status, used to check when an internal flash operation was done was not volatile, so it could not reliably be checked.
STATIC sd_flash_operation_status_t sd_flash_operation_wait_until_done(void) {
while (sd_flash_operation_status == SD_FLASH_OPERATION_IN_PROGRESS) {
sd_app_evt_wait();
}
return sd_flash_operation_status;
}
Fixes #2339, I believe.
I'm not sure why this ever worked at all.
@solar whale re #2376 ^^, here's a test uf2
By the way, the underlying routine doing the writing raises Python exceptions when it encounters errors, but it could hit errors when Python code is not running (when CIRCUITPY is being mounted, for instance, I think). So what would happen to those raises? @tannewt, do you know? Maybe it will fault and go into safe mode? Not sure how to handle the non-Python errors. (It's too late for me to check up on this further.)
Hi @makermelissa - and thanks @siddacious for jumping on this.
I am in France at the moment, without any of the boards with me. But I have added 3 pictures to the repo I had on my phone:



Maybe @chrisgervang can help too.
@danh#1614 tried the pca10059-volatile-file.uf2 from discord -- its is "better" but still has issues -- I was able to do a storage.erase_filesystem() but it still has some odd behaviors -- If I run my "blinky" code then control-C to stop then do control-D to soft reboot, it terminates the screen session and appears to reset. More troublesome is that after a few attempts at soft reboots, it "hung" my linux box as before -- had to reboot the linux box to get it back! However, the PCA10059 su...
@tulip sleet tried the pca10059 uf2 -- posted notes to the PR2376 -- works better, but still some issues.
Adding a port for Teknikio Bluebird https://www.teknikio.com/pages/bluebird. About finished with the port, just need a new VID/PID
Thanks!
@uncut mural You'll need to load some libraries on your board, but here is an example using the Circuit Playground library. ```python
from adafruit_circuitplayground.bluefruit import cpb
while True:
x, y, z = cpb.acceleration
print(x, y, z)```
yay after a night to sleep on it, I found the mp3 stereo problem on samd pretty quickly.
pointers r hard
And the truncated track plays the same in vlc
Testing performed: stereo plays back properly now
@solar whale here's another one, with the volatile fix combined with PR #2371, which reorganizes the storage layout. CIRCUITPY will be at a different place in flash, so it will get re-created, so save its contents first if you need it. Than you for testing!
@tulip sleet works -- but same issues with soft reboot after exception causing hard reset
@solar whale aha, I see that; it may not be filesystem-related. tnx
maybe two different bugs
two bugs -- no waiting ๐
ok, i see this problem on CPB too, so it's not internal-filesystem-related:
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.0.0-beta.1-32-g817632513-dirty on 2019-12-12; Adafruit Circuit Playground Bluefruit with nRF52840
>>>
>>> adkfanfasf
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'adkfanfasf' is not defined
>>>
soft reboot
FATAL: read zero bytes from port
term_exitfunc: reset failed for dev UNKNOWN: Input/output error
๐ฎ wow -- never ran into it -- is it introduce as part fo the changes in your PR
i'm checking beta.1 to see
yup, it's broken in beta.1 also!
ok, different bug, I'll file an issue for that
back in 40 mins
doesn't happen for me with beta1
I'm also AFK for an hour or so....
@tulip sleet that is on CPB, does not happen for me with beta1
@onyx hinge pointers. grrrr. ๐
Pointers are fun!
like stubbing all your toes at the same time.. ๐ and then stepping on some Legos
@tulip sleet @slender iron how do you like to manage updating tinyusb? Any special considerations? I need the latest commit for VBUS on the Meowbit
@gentle bronze what's the test program you use to get those great USB debugging images on Github?
they look incredibly handy
@solar whale here is CPB with beta.1 with no code.py:
halbert@salmonx:~$ repl
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.0.0-beta.1 on 2019-12-10; Adafruit Circuit Playground Bluefruit with nRF52840
>>> [ctrl-d]
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.0.0-beta.1 on 2019-12-10; Adafruit Circuit Playground Bluefruit with nRF52840
>>> asdf
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'asdf' is not defined
>>> [ctrl-d]
soft reboot
FATAL: read zero bytes from port
term_exitfunc: reset failed for dev UNKNOWN: Input/output error
Hmm. Iโll try again in an hour or so.
ouch! it shouldn't do that
This is not nrf-specific:
halbert@salmonx:~/repos/circuitpython/ports/nrf$ repl
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.0.0-beta.1 on 2019-12-10; Adafruit Metro M4 Express with samd51j19
>>>
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.0.0-beta.1 on 2019-12-10; Adafruit Metro M4 Express with samd51j19
>>> asdf
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'asdf' is not defined
>>>
FATAL: read zero bytes from port
term_exitfunc: reset failed for dev UNKNOWN: Input/output error
Can you try control-c on an executing program then soft reboot
Same result on CPB, so it's not port-specific:
$ repl
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.0.0-beta.1 on 2019-12-10; Adafruit Metro M4 Express with samd51j19
>>> [ctrl-d]
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython...
$ repl
Hello World!
Hello World!
Hello World!
Hello World!
Traceback (most recent call last):
File "code.py", line 4, in <module>
KeyboardInterrupt:
Code done running. Waiting for reload.
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.0.0-beta.1 on 2019-12-10; Adafruit Metro M4 Express with samd51j19
>>> [ctrl-d]
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Hello World!
Hello World!
Traceback (most recent call last):
File "code.py", line 4, in <module>
KeyboardInterrupt:
Press any key to enter the REPL. Use CTRL-D to reload.
no problem. code.py is just a while True hello world with a 1-sec delay
Ok - but I think that caused hard reset on nrf dongle. Will retest when I get back home.
@ionic elk I'd just cd lib/tinyusb; git checkout master;git pull (maybe that's obvious). Then I need to do some kind of smoke test on each platform.
yah
just some kind of smoke test - do you get CIRCUITPY and can you talk to the REPL?
Hmm it's probably past due for me to pick one of each up, I've just got atmel rn
Should I just post a PR and request assistance testing for now?
good idea, but don't let that hold you back on updating; others can check
frankly, I just got a spresense too, and haven't had time to load anything on it
are there any restrictions on what feathers work with circuitpython?
there's quite a lot of them it seems like, do they all work or just a few?
pick an express. But I would say pick up Metro M0 and M4, as they have the SWD connectors.
I don't see the Bluefruit LE on the boards list for example
And Feather nRF52840 because it has or you can add SWD connector
Looks like we're out of stock on the express feathers
metro is better for dev
also can get acrylic baseplate and a half-size breadboard
if you want to jumper things to it
I'll probably just use it mostly for smoke tests, to be fair
blefruit LE is nrf52832; old; no CPy
glad I asked. Looks like adafruit doesn't stock nrf metros. Where do you get them?
we don't have them yet (I have a proto ๐ )
get Metro M0 and M4; Feather nRF528480
I'm not sure there's anything in the ada store that's actually circuitpython enabled other than the particles right now, from what I can see!
Feather 52840 is not listed??
out of stock
CPB?
also out of stock; the perils of Black Friday
Digikey has Feather 52840's
add notifications for the out of stock items so you can make an order when they come back in
Excellent @sarfata. I'm going to crop down the middle image and use that for now.
@tulip sleet what is CPB
Circuit Playground Bluefruit
if you need something now, don't feel bad about ordering from DIgiKey. Your time is worth more. (I checked Cambridge Micro Center, but no nRF52840)
or Mouser
Yeah it's fine! Good thing digikey is too intimidating for holiday shoppers haha
I needed to get a F405 Discovery anyway
Author provided a better photo.
what changes are needed to make bare dev board to undertsand python , for example , if I want to make Arduino understand python . While Iam aware already aware already some dev boards available for that , Iam a beginner just for my understaning and clarity
This PR updates to the latest version of TinyUSB to access manual VBUS enabling for STM32 microcontrollers. Currently, it compiles on all ports but NRF, which has some renamed structures.
I'd appreciate any help in testing across ports and boards since I don't currently have most of them on hand! Edits of any kind are welcome.
@quasi pulsar only arduinos with 32bit microcontrollers can run circuitpython. (not unos which are 8bit)
@tulip sleet new PR up for tusb - NRF was the only thing that broke at the compile stage
@slender iron what are the changes u need to make for arduinos with 32bit microcontroller so that it could run circuit python ,.. on a high level for me to just understand the process
I cannot reproduce this
on my CPB
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.0.0-beta.1 on 2019-12-10; Adafruit Circuit Playground Bluefruit with nRF52840
>>>
>>>
>>> adasdsa
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'adasdsa' is not defined
>>>
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
Press any key to enter the REPL. Use CT...
metro m4 express and nrf52840 feathers are my go-tos. both ship with SWD connectors.
but yeah stock is tricky and holidays make it harder
@quasi pulsar as a beginner, you should pick a board that already works with circuitpython. When you do that, your steps are short: First, install the uf2 bootloader if necessary. second, install circuitpython as a uf2 image. To adapt a new board, you'll need more in-depth knowledge
later if you want to go back to arduino, it's also easy to do that. Typically you just click the reset button twice and then "upload" your sketch. It'll erase circuitpython in the process.
you can ask more in #help-with-circuitpython
@onyx hinge yeah I'm all set I found everything I need on Digikey
Should be able to help out with nrf/cxd/atmel crosstesting as soon as they come in
๐
We have first contact on MIMXRT1062 ๐ > https://twitter.com/arturo182/status/1200182802202976257
IMXRT1062 sound like a thing?
were the imx a Kinetis thing? I didn't realize
@onyx hinge , Thank you
I'm trying to pylint an example for a Raspberry Pi (blinka) program using a circuitpyhton library -- In the program I need to use RPi.GPIO but pylint keeps complaining ```examples/rfm69_interrupt.py:57:0: E1101: Module 'RPi.GPIO' has no 'setmode' member (no-member)
examples/rfm69_interrupt.py:57:11: E1101: Module 'RPi.GPIO' has no 'BCM' member (no-member)
examples/rfm69_interrupt.py:59:0: E1101: Module 'RPi.GPIO' has no 'setup' member (no-member)
examples/rfm69_interrupt.py:59:19: E1101: Module 'RPi.GPIO' has no 'IN' member (no-member)
examples/rfm69_interrupt.py:59:38: E1101: Module 'RPi.GPIO' has no 'PUD_DOWN' member (no-member)
examples/rfm69_interrupt.py:60:0: E1101: Module 'RPi.GPIO' has no 'add_event_detect' member (no-member)
examples/rfm69_interrupt.py:60:29: E1101: Module 'RPi.GPIO' has no 'RISING' member (no-member)
examples/rfm69_interrupt.py:61:0: E1101: Module 'RPi.GPIO' has no 'add_event_callback' member (no-member)
Unless something has changed, that my understanding was that all 3 were supposed to be provided. The large one is used when you are viewing the board details, the small one is used on the screen that displays all the boards and the original is supposed to be used as a fallback if the other images aren't available.
We could probably get away with adding the large and small only at this point in time. It would be nice if there were automatic resizing and caching of the resized images.
oh wait i see the diff doesnt remove the files - it looked like they were deleted...all good!
Locally I built with gcc9 and gcc7. I reproduce this with 9, but not with 7.
@dhalbert has already identified one specific place where code changed and made a problem (volatile is now needed to get the same result); this may be some other thing.
Perhaps we should consider reverting to the older compiler at this time. @tannewt thoughts?
Has anyone reproduced this under GDB? I wouldn't rollback the compiler unless we can't figure it out.
Locally I built with gcc9 and gcc7. I reproduce this with 9, but not with 7.
@dhalbert has already identified one specific place where code changed and made a problem (volatile is now needed to get the same result); this may be some other thing.
Perhaps we should consider reverting to the older compiler at this time. @tannewt thoughts?
interesting -- That explains why my CPB experience is different. It was build with the old compiler.
@rhooper Please PR what you think is appropriate. Thanks!
Shouldn't this go after the peripheral is turned on below?
@onyx hinge I got the MIMXRT1010 eval kit for $10 the other day. How alike are the MIMXRT1062 and MIMXRT1010 ? I realized that getting circutpython onto it was the only way I'm going to be able to use that board. I don't know any C.... ๐ฆ
@dhalbert Raising an exception when the VM isn't running causes an ALLOC_OUTSIDE_VM (iirc) safe mode.
For @jerryneedell's problem we have #2378 now.
It actually really ticks me off that you can't prohibit deleting files during a merge with git. Is it really so crazy that you'd want to split up work with a new branch? https://stackoverflow.com/questions/1407638/git-merge-removing-files-i-want-to-keep
@shell falcon @indigo wedge has it going but hasn't released the code yet. We do have TinyUSB support for it now
the whole mimxrt10xx family is quite similar, i have CPY working on both 1011 and 1062, i'm actually working on the code right now ๐
currently working on the uf2 port for it, i now have separate bootloader and "app" memory space and the bootloader verifies the app before jumping to it, i can reboot to the bootloader from CPY with on_next_boot, working on double reset to reboot into bootloader, on the uf2 side i can readout the whole flash with current.uf, now just need to implement uf2 -> flash which shouldn't be that bad, i already use the external flash as shared XIP and storage
the uf2 port i made is actually based on tinyusb with minimal changes which i think is quite promising cause it means in the future we could move all the uf2 ports to tinyusb
I was thinking it'd be cool to have split uf2s, one for circuitpython and one for the default fs
@indigo wedge yes! I've wanted to have that
cause for example tinyusb already supports stm32 so if we have a uf2 port for tinyusb then we get a lot for free, "just" need to implement flash read/write and few hw details
totally
@slender iron do you have a link perchance? I'm not totally up to speed on the i.MX numbering
don't want to get the wrong thing
welp
i will have a rev 2 early january and if that one is all good then i hope to start selling them on Tindie ~shortly after
darn, the price difference is drastic
yep
should I get that one or the 15? or both
@slender iron for sure we could have multiple uf2 files, i never looked into the format before but it's quite cool, not sure if the spec "allows" to have more than the current.uf2 file but we can fix that
https://www.avnet.com/shop/us/products/nxp/mimxrt1010-evk-3074457345641870731/ I got mine from AVNET
Buy NXP MIMXRT1010-EVK in Avnet Americas. View Substitutes & Alternatives along with datasheets, stock, pricing and search for other Evaluation & Development Kits products.
I mean I'm cool just waiting for the feather if there's no rush, too
But if you want me for crosstesting I'm happy to grab whatever you think would be good
https://octopart.com/mimxrt1010-evk-nxp+semiconductors-104793580?r=sp shows places with stock
@ionic elk pick one of them up for good measure
k
@indigo wedge I thiiiink the uf2 format blocks contain their offset
yes they do so you can easily have many without overlapping
i have the 1010-evk but didnt want to dish out $100+ for the 1060 so just made a feather for it and crossed my fingers, luckily it worked out ๐
WOW!
ok, back to the coding cave ๐
Good luck!
thanks ๐
@solar whale I would add RPi.GPIO to the ignored-modules list in the .pylintrc file. It's in the [TYPECHECK] section.
wowie Avnet's website sucks. Anyway picked up a 1010
I am willing to try to figure this out. It probably reflects a real bug. Importantly, we should note these fixes in MicroPython for gcc 9 issues:
https://github.com/micropython/micropython/issues/4844
https://github.com/micropython/micropython/pull/5008
Ok, I reproduced it with an optimized build on nRF. The stack trace isn't helpful:
Breakpoint 1, 0x000292fa in reset_into_safe_mode ()
(gdb) bt
#0 0x000292fa in reset_into_safe_mode ()
#1 0x0002a3fc in softdevice_assert_handler ()
#2 0x00024a44 in ?? ()
I'm cherry picking the commits from https://github.com/micropython/micropython/pull/5008 now.
Thanks to @dpgeorge for the fixes upstream. Thanks to @jerryneedell for finding the issue and @dhalbert for finding the related topics upstream.
Fixes #2378
@slender iron I'll merge as soon as the tests pass
Woohoo! Fast bug to fix (big thanks to @dpgeorge).
nrf_nvm_safe_flash_page_write()was throwing Python exceptions, though it could be called from a non-Python context. Have it return success/failure and have the callers handle the error.- Add
FLASH_WRITE_FAILto possible reasons to go into safe mode. - Whiled adding
FLASH_WRITE_FAIL, redidprint_safe_mode_message()so it uses case statements and reduces the length of the messages.
@jepler I have moved to audio analog output for now until I get the noise resolved. (I think boards came in yesterday.) That works great, so far.
I tried playing from a microSD card (both mounted and not mounted), but I keep getting an error right after play():
Traceback (most recent call last): File "main.py", line 43, in <module> OSError: [Errno 5] Input/output error
I don't know if this is a corrupted microSD card or an MP3 concern, so I thought I'd mention it.
@tulip sleet yay! pca10059 seems OK
that was with gcc7 -- now trying gcc9
also works with gcc9!! Well played!
@jepler Oh, and with SD the USB drive & serial are lost to the host right after the error message and the REPL message. The error line number still flashes. The board does not boot in safe-mode after the next reset, so I'm caught in a cycle. So, this is a nasty error, for me.
If you'd like Microphone to be there, there were several boards with this.
@tulip sleet looks like I just messed up your large PR by merging the error cleanup. ๐
merged again, all set ๐
๐
Ok, looks good! Lets make sure and warn folks to back up their files on non-Express boards with the next release.
Crashing hard after an exception may be #2378, which I think is fixed now at the tip of master. There are uf2 images to help you format the flash storage, that may be necessary if you can't get into python safe mode in this circumstance.
I was able to nimbly reset and click to squeeze in a new main.py.
From an MP3 file on the flash drive, playing analog, I get garbage forever when I use two output channels.
After catching the exception (try) from attempting to play from an MP3 file on the microSD and then playing analog from the file on the flash drive, I get garbage forever, even just using one channel.
Has anybody played native MP3 from an SD card?
@slender iron It looks like you are able to reproduce the apple notification error (softdevice error) does it happen for all builds or just some?
@jepler By "garbage forever", I mean a radar-like banging sound with noise that goes on until I do something, at a time later than when the play should have ended.
@solar whale I am. Its for the library with the default scan response
you can remove the complete_name from the advertisement and it may work
though I changed the way to interact with it so I think the example needs to be updated too
@slender iron While I'm ordering things, should I grab any of the other stuff in the Micropython stm32 port? Espruino Pico, Hydrabus, CERB40, NadHat PYB405, Olimex E407?
The espruino pico seems like a no brainer given that it's in the Adafruit store, I'd never noticed it
ya, I think @meager fog wants as many stm boards as we can find
@solar whale https://github.com/adafruit/Adafruit_CircuitPython_BLE/pull/45 at your leisure
goes climbing
@slender iron It works on feather_nrf52840 -- cooll! Enjoy your climb!
tested on feather_nrf52840_express -- works!
sorry -- entered comment to the wrong PR -- deleted.
There was a bug that causes analog stereo mp3 on m4 to have static in the right channel all the time. This is fixed in #2375.
@ionic elk @slender iron yep add whatver boards ya find!
@onyx hinge hihi we'd like to try out JEPlayer
what cpy build should i plop onto this pybadge, latest S3?
@meager fog hi! Yes, I think latest s3 has the important bugfixes
let me head back to my desk and try it with that instead of my local builds
oki
my mp3 files say they are: 01_-_Science_Is_Real.mp3: Audio file with ID3 version 2.3.0, contains:MPEG ADTS, layer III, v1, 192 kbps, 44.1 kHz, JntStereo
SD card is some 4GB'er of unknown origin
copied all those libs and the .py files to flash
("JEplayer" is clever, I like it)
plays fine on the internal speaker, let me make sure both channels are in the headphones
ok, it's all working like I expect here, let me know if you run into trouble
@onyx hinge huh ok could not parse mp3
hmph, that's not what I want to hear!
ok, let me snag it
"MP3 V0"?
I found that it DID work with most of the lame-encoded VBR files but there could sure be exceptions still
needs make translate, otherwise looks great, and tested with the BLE fix.
I also get "failed to parse"
my usual parsing tool on linux thinks it looks very much like the other file: bartlebeats - Frequency - 01 Idea3.mp3: Audio file with ID3 version 2.3.0, contains:MPEG ADTS, layer III, v1, 128 kbps, 44.1 kHz, JntStereo
@meager fog how inconvenient a gear switch would it be to try that file against the arduino version?
(I never actually did anything with the arduino version besides make sure it still seemed to build)
on both "MP3 V0" and "MP3 320" format downloads I get the same "parse" error ๐ฆ ๐ฆ
argh why do my mp3s work but these don't
@meager fog I removed the id3 tags with commandline program "id3v2 -D *.mp3" on Linux and now it plays for me
there was a note on the original arduino library that id3 tags could cause problems, but I hadn't experienced it for myself.
the version with id3s removed
does anyone know the circuit python lib to grab images from bluefruit? there is a packet for colors and buttons, but not images
@meager fog no but the code is supposed to skip past it by looking for a 11-bit sequence that indicates the start of an MP3 frame
I'll look into it but for now can you try grabbing that zip above ^^ ?
i will yes!
scrolling down in the file list gets stuck at some point...
npnp
@meager fog stepping away, I'll look into this parsing issue and we can talk again tomorrow. I have a potluck to go to ๐ฅ
@tulip sleet Sometimes, on new boards, my circuitpython drive is called NO NAME, and the lib folder isn't built for me. Do you know what might be up with that?
@onyx hinge no rush!
But I'm excited about the project!
Working with these crashes is like walking upstream in a river of molasses.
Here are some hints:
play() for your (@jepler) cbr voice test file on the flash drive takes 6 ms
play() for my file on mounted SD takes 19 ms
play() for my file on unmounted SD takes 23 ms
The exception occurs for the SD files at about 120-121 ms after the end of play()
If the difference between the first two is the time to fill your buffer, then filling that takes 12 ms longer with the SD.
My files ar...
@ionic elk that sounds like a damaged filesystem. Try import storage; storage.erase_filesystem(). Do you mean on new stm32 boards or others?
@tulip sleet getting it with the Meowbit. I think I've had it come up before but I'm not sure what the circumstances were. Right now it happens all the time for this one particular board.
Yeah, this was a tricky one to track down.
@Dar-Scott the info about your setup and program has become scattered over a lot of messages. It sounds like you have something that is 100% crashing and my own test setup is different enough that I'm not seeing it. It would be helpful to me if you can distill it down into a fresh issue hopefully with enough info in one place for me to reproduce it.
There are some pretty bad issues with 5.0alpha0 with stereo on samd, and with crashes following exceptions. If you go to circuitpython.org ...
With the OLED, is there a way to suppress the Blinka (due to limited real estate and potential burn-in), or would it be best to just always force a terminalio.Terminal() instead of the default CircuitPython terminal?
@crimson ferry I don't know of a way, would be interested to hear of it if there is one
nrf build break since it requires nrfx update to version 2.x to support new mcu nrf52833 and nrf5340. @dhalbert is there any issue upgrading nrfx to v2, I can help to do that as well.
@hierophect you need to explicitly enable VBUS for board that doesn't define BOARD_NO_VBUS as well. Since that code is removed from dcd_synopsys. As Scott mention, this must be after the __HAL_RCC_USB_OTG_FS_CLK_ENABLE()
// Enable VBUS hardware sensing, enable pullup, enable peripheral.
#ifdef USB_OTG_GCCFG_VBDEN
USB_OTG_FS->GCCFG |= USB_OTG_GCCFG_VBDEN;
#else
USB_OTG_FS->GCCFG |= USB_OTG_GCCFG_VBUSBSEN;
#endif
@hathach There is probably not an issue upgrading to nrfx 2.x, but I already made changes to 1.x which will need to be merged (make uninit() routines be callable more than once: https://github.com/adafruit/nrfx/pull/1).
@hathach There is probably not an issue upgrading to nrfx 2.x, but I already made changes to 1.x which will need to be merged (make
uninit()routines be callable more than once: adafruit/nrfx#1).
Got it, I will help to submit PR to update our nrfx folk to v2 & cpython. It has an API changes to require even single module e.g NRF_USBD must be passed to driver function as well.
I am having problems in playing MP3 from SD cards.
Earlier I talked about a problem with I2S. I will get back to that, but right now I'm using analog audio.
I am using analog audio on A0 and A1 connected to a TPA2016 and speakers. The amplifier does not have I2C hooked up yet; I'm using the default settings. This sounds nice. (I am using 20191212-10183d5.uf2.)
I am passing no parameters when creating a playable beyond the file handle.
Both files from your mp3 corpus and from my se...
hm something's grumpy on github. I can't comment on an issue. some services are "degraded" https://www.githubstatus.com/
Welcome to GitHub's home for real-time and historical data on system performance.
Superficially that setup seems similar to mine that is working -- I am using pygamer, and the SD card reader is integrated, but they are both samd51 chips and both are using DAC.
I can think of two things to try to exclude as the cause. First, try with the TPA2016 disconnected/unpowered. This would exclude the amplifier drawing so much power that it is causing some sort of glitch in the rest of the system. I don't think this is likely.
Second, write a pure circuitpython program to ju...
Superficially that setup seems similar to mine that is working -- I am using pygamer, and the SD card reader is integrated, but they are both samd51 chips and both are using DAC.
I can think of two things to try to exclude as the cause. First, try with the TPA2016 disconnected/unpowered. This would exclude the amplifier drawing so much power that it is causing some sort of glitch in the rest of the system. I don't think this is likely.
Second, write a pure circuitpython program to ju...
Ballpark, how fast should I expect to be able to download data over an airlift with circuitpython? is it in the realm of possibility to, say, do a pyportal podcast player that streams mp3s ? The first random podcast I looked at is 160kbit/s = 20kB/s which doesn't feel like a lot..
I wonder how many other missing pieces there are to parse rss feeds and so forth
RSS processing would be really cool
I've never tested Airlift bandwidth, but have the truncated response body issues been resolved?
A comment https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI/issues/9#issuecomment-477935099 in one of the ESP32SPI issues indicates bandwidth ~160KB/s (default ESP32SPI SPI baudrate=8000000)
@tulip sleet Let me know when you're around and have some time to walk me through the Circuit Playground Library update. Thanks.
I think the way that MP3File works it has to be an oofatfs file, that limitation would have to be lifted..
@onyx hinge i did an mp3 streaming demo in arduino - worked fine
@ladayada OK with those same original files that had id3 tags? I'll go back to the arduino player source and see what secret I missed!
@onyx hinge havent had a chacne to test them sorry
i did download the zip tho
let me find that streamer code
ahah I understand now
scarfed those streaming arduino sketches for later, will work on the mp3 parsing problems first
@tannewt while working on this approach, I was partly successful.
In instance_subscr i fetched subobj[0] to get the type, then called subobj_type->subscr(self_in, index, value).
For some of the _subscr implementations I used mp_instance_cast_to_native_base, for example, in list_subscr which appeared to work, and satisfied the test suite... But when it came to bytes_subscr which is used by both str and bytes, I couldn't find a straightforward solution that didn't break the t...
@tidal kiln I tagged you as a reviewer on the NeoPixel_SPI PyPI setup PR. Been a while since I did it, so we need to verify I remembered right and make sure it deploys after release.
wait I need to update the README maybe.
Nope it was updated already.
should be ready to merge.
@idle owl seems OK? yah. and requirements look OK.
Only thing I did was add the creds.
not sure i ever went through a pypi setup all the way before. so not sure everything needed to be checked.
want me to just merge and release?
Yes please. And then check Travis to verify it deploys.
Or if you haven't checked that before, let me know, and I'll check it
or show you how to be sure.
You have to click an arrow to uncollapse a section at the end to be certain.
@idle owl looks like it failed to deploy
https://travis-ci.com/adafruit/Adafruit_CircuitPython_NeoPixel_SPI/builds/140999245#L384
Getting the subobj directly in bytes_subscr didn't work? Wouldn't that be the equivalent of what it's doing now?
And failed. Um.
I ended up with crashes. I'm wary of significantly modifying the code here without fully understanding it.
https://github.com/adafruit/circuitpython/blob/master/py/objstr.c#L443
@tidal kiln I deleted the release and tag, and created a new one. To see if it's that weird failure where it gets caught somewhere in limbo with a release. I'm guessing it's not, and it's something else going on.
Yeah. Failed again.
something's not building properly.
I found something it might be
@tidal kiln https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel_SPI/blob/295cccd9ec3df4cec69e05aa689f06c9dc3b4d78/.travis.yml#L42 adafruit-circuitpython-neopixel-spi ?
not adafruit-circuitpython-neopixel_spi
maybe. i think i remember copy pasting that syntax from something.
remember wondering about it.
I checked another .travis.yml of one with extra words in the repo name, and it's all -
Adafruit_CircuitPython_RGB_Display is what I checked.
Want me to edit the file?
yah. just make that edit and see what happen
i can't remember where i got that syntax from, but i do remember going "really? that seems odd, why not just a dash?"
The fun of troubleshooting deployment issues.
ยฏ_(ใ)_/ยฏ
@tidal kiln ready to merge
Now for another release...
@tidal kiln do you want me to do the release or are you
Is the change anywhere? I'd be happy to poke at it. Was it tests that were crashing?
sigh.
Is it failing because the example file is empty? I feel like that's not it because we've had plenty that have been empty... but maybe it is?
It's failing to create the assets it seems like.
There aren't any assets on the lib releases either.
That's what's failing.
I'm not sure how to fix it.
The format of that line matches NeoPixel.
Except for the . being on a different line, but that shouldn't matter.
how are the release assets created?
circuitpython-built-bundles I thought.
Perhaps.
even though it looks likes it:
https://travis-ci.com/adafruit/Adafruit_CircuitPython_NeoPixel_SPI/builds/141001875#L332
Adding a docstring.
to the example?
it's building some of the assets
The source code always attaches. It's not adding the bundled assets to the release.
wait, now it's failing on a different asset
now it's failing on the .py bundle.
I'm grasping here.
Thing is The command "circuitpython-build-bundles --filename_prefix adafruit-circuitpython-neopixel-spi --library_location ." exited with 0. it succeeds.
right, but why aren't they on the release page?
I don't know.
trying to figure out how that part works...
Does Adabot have permission to upload release assets to https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel_SPI/
It's possible the 404 is because it doesn't have permission.
```/home/travis/.rvm/gems/ruby-2.4.5/gems/octokit-4.6.2/lib/octokit/response/raise_error.rb:16:in `on_complete': POST https://uploads.github.com/repos/adafruit/Adafruit_CircuitPython_NeoPixel_SPI/releases/22219495/assets?name=adafruit-circuitpython-neopixel-spi-examples-0.2.2.zip: 404 - Not Found // See: https://developer.github.com/v3 (Octokit::NotFound)
hmmm. not sure. maybe not. if that's something that needs to be explicitly done after creating the repo.
I imagine it would be. possibly as a collaborator or via secrets and deploy keys?
api_key: "$GITHUB_TOKEN"
file_glob: true
file: "$TRAVIS_BUILD_DIR/bundles/*"
skip_cleanup: true
overwrite: true
on:
tags: true
``` looks to be the relevant magic
so the account to which the token belongs needs to be able to write write to the releases.
@tidal kiln CircuitPython Librarians needs to be write.
yep. changed and trying again.
Yah restarted the build.
(โฏยฐโกยฐ๏ผโฏ๏ธต โปโโป
it worked.
And deployed to PyPI https://travis-ci.com/adafruit/Adafruit_CircuitPython_NeoPixel_SPI/builds/141004260#L526
Travis CI enables your team to test and ship your apps with confidence. Easily sync your projects with Travis CI and you'll be testing your code in minutes.
@ruby atlas awesome. thanks. looks like that was it.
you're welcome
@ruby atlas i was getting a bit lost looking through the script, since it looks like that step happens via something that's boiler plate on travis side? so it's entirely setup via those lines in the travis.yml file?
correct. the key was in the error message, not the traceback. It told us it was a failed POST to github release files.
yep. i was just lost trying to figure out what was even doing that post.
@idle owl I am back
@tulip sleet Perfect timing, just finished with something else.
anyhow, back to being invisible.
so we want to be able to do from adafruit_circuitplayground import cp and have it do cpb or cpx as appropriate?
@ruby atlas thanks again!
@tulip sleet yes. and have the from adafruit_circuitplayground.bluefruit import cpb and .express import cpx still work as well separately.
and both of those work fine now, right?
yes.
ok, hold on a bit and I'll try some things
ok
ooh by skipping past the id3v2 header I got that file to play!
@idle owl:
__init__.py:
import sys
if sys.platform == 'nRF52840':
from .bluefruit import cpb as cp
elif sys.platform == 'Atmel SAMD21':
from .express import cpx as cp
Got it, thanks.
Works on CPB. I'll do a CPX build with it now.
@tulip sleet Traceback (most recent call last): File "code.py", line 1, in <module> File "adafruit_circuitplayground/__init__.py", line 27, in <module> File "adafruit_circuitplayground/express.py", line 75, in <module> File "adafruit_circuitplayground/express.py", line 72, in __init__ File "adafruit_circuitplayground/circuit_playground_base.py", line 109, in __init__ File "adafruit_lis3dh.py", line 318, in __init__ File "adafruit_bus_device/i2c_device.py", line 31, in <module> RuntimeError: maximum recursion depth exceeded
On CPX.
@idle owl are you doing from adafruit_circuitplayground import cp
Yes
I built it with an updated version frozen in
did it fit with bluefruit.py??
i'll try the same thing.
There's a pretty significant difference without bluefruit.py though.
And bluefruit.py is only going to get larger.
yah, like try make BOARD=circuitplayground_express TRANSLATION=zh_Latn_pinyin
1000 bytes difference between the two en builds.
could you drop code.py? This works for me in the REPL:
Adafruit CircuitPython 5.0.0-beta.1-50-g6c3d555b8-dirty on 2019-12-13; Adafruit CircuitPlayground Express with samd21g18
>>> from adafruit_circuitplayground import cp
>>>
wondering if my failure is unrelated, like maybe something else didn't get updated in the submodule sync or something
I get the error in the REPL too
that code was already on the board commented out because I was using it for testing other things. so I used what was there and updated it to test this.
But it's failing in the REPL too.
I could delete and reclone CircuitPython and start again
>>> from adafruit_circuitplayground import cp
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "adafruit_circuitplayground/__init__.py", line 27, in <module>
File "adafruit_circuitplayground/express.py", line 75, in <module>
File "adafruit_circuitplayground/express.py", line 72, in __init__
File "adafruit_circuitplayground/circuit_playground_base.py", line 109, in __init__
File "adafruit_lis3dh.py", line 318, in __init__
File "adafruit_bus_device/i2c_device.py", line 31, in <module>
RuntimeError: maximum recursion depth exceeded
>>>```
same commit hash.
hold on a sec
holding.
do you have an adafruit_circuitplayground directory in / in CIRCUITPY?
this is the .uf2 I built, updating the frozen lib
i'll nuke the clone and make a new one next time i need to build.
the commit # is ok, let's look at the frozen dir
hmm I didn't replace the whole directory, only added __init__.py
maybe there was an update.
did you put it in adafruit_circuitplayground/ ?
yes
isn't that where it goes?
I have what appears to be the most up to date version of the lib locally. Just did a git pull to be sure.
$ cd ~/repos/adafruit/circuitpython/frozen/Adafruit_CircuitPython_CircuitPlayground
halbert@salmonx:~/repos/adafruit/circuitpython/frozen/Adafruit_CircuitPython_CircuitPlayground$ git log -1
commit d87ea261c40ecbc6d893d72d337beefbea1cf932 (HEAD, tag: 2.1.4)
Merge: d7f8814 e27707a
Author: Kattni <kattni@adafruit.com>
Date: Wed Sep 11 12:44:31 2019 -0400
Merge pull request #69 from caternuson/iss68
Fix temperature example filenames
what does git log -1 show in that dir
commit d87ea261c40ecbc6d893d72d337beefbea1cf932 (HEAD, tag: 2.1.4)
Merge: d7f8814 e27707a
Author: Kattni <kattni@adafruit.com>
Date: Wed Sep 11 12:44:31 2019 -0400
Merge pull request #69 from caternuson/iss68
Fix temperature example filenames```
hmm, I didn't pull yet, rebuilding...
ok ,now I get the error, so it appears the stack is not quite deep enough for the restructured library
increasing the stack size a bit and rebuilding to verify...
ok
stack size was 4096; increased to 4500 and it works :/
I wish it had been that my build was broken.
I'll look to see if there's anything that can be done to reduce the call nesting on import.
ok
It could be compiler differences, gcc9 behaving differently again?
we are doing a little more nested calling on import. I think it's just that the 4096 stack size on SAMD21 is not adequate
ah
it works with the old library; this library does more work on import
why because of the separate base class?
that and the code in __init__.py`
oh.
i mean there were no functional changes to the lib for express... i guess i thought it would behave the same.
but it makes sense.
i'm trying different stack sizes...
4500 works, 4400 doesn't. I lucked out trying 4500 the first time.
there's nothing wrong structuring the cp library the way you did, with a subclass. this boils down to the tight space in the SAMD21's. Increasing stack size to about 4500 bytes from 4096 is only 10%, maybe we just need to do it. Have you encountered "max recursion depth" errors on cpx code in the past?
the lis3dh initialization could be deferred until .accelerometer is called the first time, that would save stack space.
@tulip sleet I've not run into this before that I remember, but who knows.
I might not remember
wouldn't it end up initing it every time it's called in the loop though? or how would that work?
no, we'd just check for something null. I'm going to try a little reordering of some code
<@&356864093652516868> PSA: Adabot's nightly bundle job failed on its initial GitHub Actions run. I'm working it...
@raven canopy thanks.
@raven canopy okie dokie; let me know if you need any help
could it be related to the permissions issue on the NeoPixel_SPI repo? @idle owl @raven canopy
@tidal kiln did you call show() ?
nope. its a Redis DB failure.
I just noticed that I can't open many of the recent schematic files in Eagle on my Mac -- I tried PyPortal and PyPadge and CPB. It is the .sch files that fail -- can others open these? for example https://github.com/adafruit/Adafruit-Circuit-Playground-Bluefruit-PCB
Ok, thanks @raven canopy
@solar whale what version of Eagle are you using?
7.7.0
I'm running 9.4.1 and I'm not entirely up to date.
I can open the files. Maybe they've stopped working with that version?
hmm -- ok -- i'll see if I can update -- using the "free version"
Right. Yeah see if there's an update to it that still lets you use it etc.
This set of fixes makes "bartlebeats - Frequency" in "MP3 v0" format play on my pygamer.
It also fixes a problem with the sample "reset" method that went unnoticed when converted to protocols, and makes a minor change to default optimizations on samd when debugging.
if not, it was fun while it lasted ๐
free version is still available for 9.x
yup -- just found it -- I thought I updated it recently...
ah --- I have multiple version installed....cleaning up
@idle owl this has stack size 4504 (divisible by 8, which is slightly a good idea for us). It works for me now. I'd like to talk to Scott about it a bit. I think increasing the stack size is OK for 5.0.0, we only lose 500 bytes of heap. For 4.1.0 it's not an issue becaue we wouldn't update the frozen libs for 4.x. We could do some contortionist stuff in the CP library to avoid this, but I'd rather not.
i have to start cooking mac and cheese and will be going out for a while around 6pm
new eagle works -- thanks
@solar whale excellent
well this is a revolting new development. While working on jeplayer I've just had a few hangs. I got a stack like this:```Program received signal SIGTRAP, Trace/breakpoint trap.
0x0000cd28 in shared_dma_transfer ()
(gdb) where
#0 0x0000cd28 in shared_dma_transfer ()
#1 0x0000ce60 in common_hal_busio_spi_write.part ()
#2 0x0001c3bc in _refresh_display ()
#3 0x0001ddd0 in supervisor_run_background_tasks_if_tick ()
#4 0x0003ab7e in mp_execute_bytecode ()
swear this wasn't happening yesterday...!
0x0000cd28 <+200>: lsls r7, r0, #30
0x0000cd2a <+202>: beq.n 0xcd26 <shared_dma_transfer+198>
some HW bit is never becoming happy. ```(gdb) p/x $r6
$3 = 0x4100a070
@solar whale I've had good luck opening adafruit eagle files with kicad too
redis error resolved. only introduced one new error in the process... PR imminent.
@slender iron if you look above, you'll see that the CP library with a base class now overflows the CPX 4kB stack when we add an __init__.py, due to a rather deep stack on initialization. Increasing the stack by 10% fixes the problem. Do you think it's fine to do this for CPX? We could do it just for CPX or all SAMD21 boards.
I think its ok to increase the default stack size. it can be changed through supervisor if needed
this is due to implmenting from adafruit_circuitplayground import cp
ok, sounds ok, and easiest to do for all boards. 400 bytes less of heap is not terrible.
@ladyada I think if you grab the artifact from this build you can play those MP3s you tried yesterday
what's the difference in these two travis jobs?
i'd say nothing. i think its showing up like that due to the UI changes related to GitHub Actions/Checks. the bottom one is a direct link to travis, whereas the top one goes to the Checks page.
thanks. thought it might be related to that. seems to have shown up about same time.
@tidal kiln oh wait! one is on .com and the other is on .org.
so that repo is enabled on both sides...
noticed it after trying to match the job numbers.
so..two jobs running?
yeah. just need someone with the credentials to goto travis-ci.org, and turn that one off.
and possibly remove the webhook in the repo settings.
or...just wait until dylan gets it migrated to Actions (and deletes the .travis.yml). ๐
reminds me...we need to update cookiecutter with the new actions stuff.
issue filed.
So the crash thing is not as bad as it sounds. The class_store_class test was just throwing an exception that subscr wasn't supported. I've fixed it here: https://github.com/rhooper/circuitpython/pull/2
I don't think there is much you need to change actually. Most of the native subscr methods are called directly rather than through instance_subscr. instance_subscr only comes into play with native class when they are subclassed. Most native objects don't work correctly when subclassed so th...
A couple questions. Good otherwise.
Why 8? Below you read the first 10 bytes.
What is -Og? Do SAMD21 builds still fit?
-Og is "optimizations that don't impede debugging". We had added it on nrf awhile back.
Actually, this makes the build with DEBUG=1 BOARD=trinket_m0 fail, but not due to size.
../../py/vm.c: In function 'mp_execute_bytecode':
../../supervisor/shared/translate.c:98:66: error: inlining failed in call to always_inline 'translate': optimization level attribute mismatch
inline __attribute__((always_inline)) const compressed_string_t* translate(const char* original) {
...
Is anyone else having trouble with the TFTGizmo in Adabox 14?
looking over and over, I can find nothing definitive to indicate which way it aligns on the Bluefruit
aligning the printing (same side up), I'm getting nothing on its screen
found the Gizmo page, which confirms I mounted it the right way. is there no Gizmo demo preinstalled on the Bluefruit?
no, they seem to ship with just a neopixel test and not the TFT gizmo demo
@ionic elk I used the Lecroy software. However you will need to use it with their usb analyzer hardware. I am using their mercury T2 which is very portable https://teledynelecroy.com/protocolanalyzer/usb/mercury-t2
Teledyne LeCroy is a leading provider of oscilloscopes, protocol analyzers and related test and measurement solutions that enable companies across a wide range of industries to design and test electronic devices of all types.
<@&356864093652516868> Here is the notes document for Mondayโs CircuitPython Weekly meeting. Everyone is encouraged to attend! Please add your hug reports and status updates even if youโll be attending the meeting - itโs super helpful! If you are unable to attend but would still like to include updates, feel free to include them in the notes and Iโll read them off during the meeting. Hope to see you there! https://docs.google.com/document/d/1WG4RMTHSsxIt83lNolH3N_VqmTNL9aVJKs76dfqmlhQ/edit#
tested and yes now works nicely with the modern id3 tags :)
tested artifact, not stylistic approval
hi - dont reuse the Feather nRF52840 (or anyone elses :) USB VID/PID, it's used for uniquely identifying boards
Teknikio Bluebird VID 0x239A PID 0x006F # bootloader
PID 0x806F # arduino
PID 0x8070 # circuitpython
@idle owl Wow! the animator demo is great!!! Nice job!
@solar whale Thank you!
I am having a great time with it. ๐
We just covered the Xmas tree in neopixels. I'll have to get a video if possible. We added more to the Animation library since with the goal of the tree bring epic. :)
the sparkle animation is great if you shake the remote!
these CPB's are really nice -- it's so great to see all the work on BLE coming into play.
@idle owl just a heads up -- I tried using my CPB + Gizmo as the Animator -- just had it handy -- it works fine as long as program is code.py or really as long as nothing that has the REPL display being sent to the TFT. If the REPL is on the TFT, then there is a lot of delay. It still works, but it is very sluggish. I just wanted to let you know in case it comes up. Lots of folks have the CPB+Gizmo now. It only makes sense to run it as code.py but just in case someone stumbles into this ....
sorry -- it was as the Neopixel Animator that I ran into the sluggish behavior -- probably either way since it is continuously writing to the console and that is much slower to the TFT.
It is really nice to just plug a JST 3pin Neopixel string into the Gizmo
This has got to be one of the best projects ever released ---

Looks like the community is a couple stars away from 1,500! Please stop on by and star up CircuitPython! https://github.com/adafruit/circuitpython
Hi, I'm trying to get one of these OLEDs https://www.amazon.com/MakerFocus-Display-SSD1306-3-3V-5V-Arduino/dp/B079BN2J8V/ref=pd_sbs_263_t_0/146-7505350-8634301?_encoding=UTF8&pd_rd_i=B079BN2J8V&pd_rd_r=5317892a-2880-4dfc-8f0f-7ab17c57edc0&pd_rd_w=mADHh&pd_rd_wg=F9fQr&pf_rd_p=5cfcfe89-300f-47d2-b1ad-a4e27203a02a&pf_rd_r=Z0Q6WBNXWQGHGF6TTR30&psc=1&refRID=Z0Q6WBNXWQGHGF6TTR30 working wtih the feather M0 express running circuit python 5.0 Beta.
I thought the instructions from here https://learn.adafruit.com/monochrome-oled-breakouts/circuitpython-usage would have worked, but there is a RESET pin that's defined (reset=board.D9). This pin isn't available on the OLED I got. Any pointers on how to eliminate the need for the reset in code? Not sure if that's possible with the SSD1306 or displayio library.
The display works because I was able to verify it with an Arduino UNO and the u8glib library. I also have 4.7k ohm pull-ups connected on the M0 express SCL. SDA. Thanks.
the reset pin is optional, you can just skip it
display_bus = displayio.I2CDisplay(i2c, device_address=0x3c, reset=None)
is that ok?
I thought I saw that as an option digging into the code.
I tried without as well, but no luck. The i2c address is 0x3c which is the default in the example, so should be ok there.
I don't think you want to use I2CDisplay directly, you probably want to use the SSD1306 library: https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_SSD1306
@quasi fjord thanks for the replies. No luck with https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_SSD1306/blob/master/examples/displayio_ssd1306_featherwing.py I dropped this example into Mu, but nothing on the screen. Definitely have 3.3V going to the oled.
Is it physically connected to anything right now? It's probably an active low pin, so tie it to 3.3 V.
@timber mango not following. Tie the D9 reset pin to 3.3v?
Probably, yeah. I don't know anything about this board but often reset pins need to be held high to not reset. (Although on the other hand, floating should normally not be a problem...)
the schematic on the amazon page shows that reset is held high. at least, i think its showing that. ๐
no luck. I think there's something fundamental in the SSD1306 library preventing it from working.
@raven canopy ah ok, thanks for looking it up. So i guess it has an internal pull-up, that's what i meant: not "floating" but not connected (which then isn't a problem because of the pull-up). @barren peak Alas! Good luck tinkering ๐
Trinket m0 inside
@timber mango @raven canopy I was able to fix the issues with the display not working. I did not have the adafruit_display_text library installed. https://learn.adafruit.com/adafruit-oled-featherwing/python-usage featherwing.py worked as-is with the OLED I referenced earlier. Thanks for chiming in to try and help earlier.
Thanks @jepler ! That failed with an i/o error immediately.
Good news for me is that it doesn't create a nasty crash. However, it may mean that either audio or mp3 is not handling the error very well in playing and I get a crash. However, it might be the size of read that can make an impact and I have not read an evil number of bytes in new testing, and that problem is in the SD library.
Your test seems to work when reading less than 1024 bytes. At 1024, the error comes on the third rea...
Hi, we have updated with new VID/PID pairs, they are as:
XinaBox CC03 โ (0x04D8, 0xEC72)
XinaBox CS11 โ (0x04D8, 0xEC75)
Thanks
@solar whale Thanks for the comments on my project! ๐ Given that there are a lot of display Gizmos out there, it might be worth making the prints optional. Good to know though, in case anyone reports that behavior.
@idle owl You are most welcome!
@onyx hinge You alive?
@idle owl good morning, what's up?
There's an audio thing I either don't understand or is broken.
OK, I'd be happy to try and help!
This example - line 37, loop=True does nothing. The sample doesn't loop. Which I guess makes sense to me because it shouldn't keep looping, there's no loop in the code. However, add it to a while loop, and it repeats whether or not loop=False or True, so... what am I missing here, or is loop in this case totally pointless? https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/master/Introducing_CircuitPlaygroundExpress/CircuitPlaygroundExpress_AudioSine.py
A user filed an issue for it, and I'm finding the same results they are. loop appears to do nothing.
okay, that sounds fishy. There is a bug about how "loop" works with RawSample on nRF, right now it always acts as if loop=True was passed.
What loop=True means is, roughly, "whenever the sound finishes playing, call play() with it again"
but you would still have to have a while something: sleep loop in Python to keep your program from ending
That's what I thought
if you reach the end of your whole program, circuitpython stops the sounds and waits for reboot. I would have guessed that was the same on samd an nrf
but at that point, if loop is False, it would keep going right?
For more info, see the discussion at the tail of #2337 from @dar-scott. One possible way to try reproducing the problem would be to simply pop out the SD card during mp3 playback. My guess is that having an exception propagate out of the background tasks causes the internal "background tasks are running" flag to remain set, and as such the fix might involve arranging to catch possible exceptions within the background tasks.
Hmm
so your user is telling you that this does NOT play the audio for 1s then stop? audio.play(sine_wave_sample, loop=True) # Keep playing the sample over and over time.sleep(1) # until... audio.stop() # We tell the board to stop
if so that's a different bug than I thought it was
wait... yes. it does. They are expecting it to continue looping forever because of the comment.
#2078 says that even if you omitted loop=True you would get the same result
But if loop=False, it does the same thing.
or yeah put loop=False. False is the default.
the user is right to see that something is hinky with loop=
but eventually there will be a bugfix for loop=False and if they didn't put loop=True then they'd just get a short burst of sound and then silence for .98 seconds
hmm
this is probably not very helpful for you to resolve the reported issue ๐
what if the comment said ```# Keep playing the sample continuously
until...
we tell the board to stop
though .. over and over and continuously are the same
the problem is the dual meaning of "loop" but you can't fix that since it's in the code, not the comment
yeah
I am putting myself in the user's mind and see why you would say "wait, what happens if loop=False" and you see no difference and it is confusing as heck
so I totally agree with where they're coming from, but .. it's just a known bug in the code I wrote that I haven't been back around to fix
Ok
(actually I tried to fix it for about 2 hours once and couldn't figure it out. ๐ฆ ๐ฆ )
@onyx hinge This plays for 1 second. python audio.play(sine_wave_sample, loop=False) # Keep playing the sample over and over time.sleep(1) # until... audio.stop() # We tell the board to stop
on CPB
right, on nRF it does, because of that issue #2078. on samd, it would give a very short chirp and stop, and that's what it should do on nRF except .. bugs
of course
if it's troubling users, I should potentially make it higher priority to look at it again.
since you're lucky if 1 of 10 people speak up
I'll see what Limor says. She assigned the issue to me, and I'll reply to it. And find out what she wants done.
I'll link that issue.
OK, just so I know if the importance of that bug should be escalated
Yep. I'll let you know
Coffee!
I hope my cream hasn't gone bad
ttyl, always happy to help you with something, even when it means admitting to the bugs of my own making ๐ 
@onyx hinge Later, thanks for the help!
I just lost my serial connection with a Cntrl-D at REPL on a CPB running 5.0.0-beta.1 - has anyone else seen that happen?
You are running in safe mode which means something unanticipated happened. - the plot thickens
@simple pulsar yeah it's a bug we fixed soon after beta.1 ๐ฆ
good news is, the latest build should have it fixed. https://github.com/adafruit/circuitpython/pull/2380
Glad to hear this is fixed, I just noticed it on Adafruit CircuitPython 5.0.0-beta.1 on 2019-12-10; Adafruit Circuit Playground Bluefruit with nRF52840
I've been playing wave files ok using cpb.play_file(). The standard sample code reproduces this in REPL on my CPB:
import time
import array
import math
import board
import digitalio
from audiocore import RawSample
from audiopwmio import PWMAudioOut as AudioOut
speaker_enable = digitalio.DigitalInOut(board.SPEAKER_ENABLE)
speaker_enable.direction = digitalio.Direction.OUTPUT
speaker_enable.value = True
audio = AudioOut(board.SPEAKER)
length = 8000 // 440
print(8000 ...
@idle owl @onyx hinge I just tried out that loop=False thing and it's straightforward to produce/reproduce on a CPB.
Yep ๐
thanks, it's good to have another set of eyes on it
๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐
why is there an october function in circuitpython, but not a december function?
hmph, my working theory was that display update was what was making me crash during mp3 playback, but I just gone one and I thought display was not being updated in my current WIP version
Is this typical of how fast an image (bmp) should load from SD? The file itself off just 48kb.. it takes seconds and seconds!
my display group is a large text with this image under it
That is too slow. Try an older version of CPy to see how it works. Is this a .bmp?
yes, it's a bmp file
I think I should probably also try it without the text there
it is weird that it is filling from right to left, isn't a bmp organized from top to bottom or bottom to top, typically?
@onyx hinge https://github.com/adafruit/Adafruit_Learning_System_Guides/pull/971 Good?
@idle owl I think the explanation can't hurt, but users will remain puzzled until I fix my bug
Right, I'm not including the bug in the comment.
I included a reference to it in the issue
and I don't think you should put a comment about the bug, that is not typical of how guides are .. right?
It should be fixable, I just haven't found the right mind to be in to fix it
Right, that's my point
BMP 125x128 125x128+0+0 8-bit sRGB 48266B 0.000u 0:00.000
it's pretty slow in 4.1.0 too
try it with the simple slideshow demo: https://learn.adafruit.com/creating-slideshows-in-circuitpython/load-the-software
I tried with this code: https://learn.adafruit.com/circuitpython-display-support-using-displayio/display-a-bitmap
it looks like they both use a TileGrid
4.0.0 Beta 2 replaces Sprite with TileGrid so use either.
self._sprite_class = getattr(displayio, "Sprite", displayio.TileGrid)
i'm trying it on a pyportal, but have to reload some stuff
using the files from display-a-bitmap and my code based on display-a-bitmap it's just as slow
i'll be back in a few mins after testing
the pygamer's screen is rotation 270
I bet it's just fine / not so bad on pyportal
yes, it is fine on the pyportal
If I transpose the image it's fast..ish
My hypothesis is, it's drawing in an order that is good for the display but is really bad for reading from SD
if you read from CIRCUITPY instead of the SD card, how is it?
i see the same thing as you with other bitmaps on the PyGamer
scott idly said the other day how slow OnDiskBitmap was
time to file an issue ๐
will do
On pygamer, which has a screen with rotation 270, displaying a fullscreen bitmap from SD takes about 20 seconds.
How to reproduce:
- stick an SD card in a pygamer
- put 001.bmp from 160.zip at /sd/001.bmp
- run a test program to display just the bitmap
import busio, board, digitalio, storage, adafruit_sdcard
def mount_sd():
spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)
cs = digitalio.DigitalInOut(board.SD_CS)
sdcard = adafruit_sdcard.SDCard(sp...
OK that's what I know.
I wonder what to do for workaround. copy each bmp to internal flash?
.. as I use it
I was able to reproduce this as well. It was also reported by a user with regards to Circuit Playground Express code used on the Circuit Playground Bluefruit: https://github.com/adafruit/Adafruit_Learning_System_Guides/issues/970
@solar whale Do you think it's worth updating my code to comment out the print statements and make them optional so it's faster with a Gizmo?
I can leave the single event prints in there (i.e. when the switch is changed, etc), but comment out the color stream.
@idle owl I have nat tried that yet, have you? just want to make sure that is all it would take -- if so, I think it might good. I'll try it now
With it being BLE, people aren't that likely to be connected to the REPL anyway. It's meant to be wireless.
@solar whale That would be great if you could test it
ok -- will take few minutes
Excellent
Adds a BUILDING.md document to the repo to help newcomers and long-timers alike remember commands they don't use often.
@gilded cradle Thanks for pinning that.
You're Welcome. I didn't want it to get lost. ๐
@gilded cradle Speaking of which, are you good to take notes today?
Sure
Brilliant, thanks!
@idle owl ```jerryneedell@Ubuntu-Macmini:~/projects/circuitplayground_bluefruit/ble$ diff NeoPixel_Animator.py ~/projects/adafruit_github/Adafruit_Learning_System_Guides/Circuit_Playground_Bluefruit_NeoPixel_Controller/
86c86
< #print("Color:", packet.color)
print("Color:", packet.color)
90c90
< #print("Color:", animation_color)
print("Color:", animation_color)
@solar whale Thanks! I'll update the code then.
Thanks!
I've seen this with internal flash as well. If the load isn't in on-disk order then it is super slow.
With the pixel loading code I tried to ensure it always loads from the source bitmap by row. The code to do it is here: https://github.com/adafruit/circuitpython/blob/master/shared-module/displayio/TileGrid.c#L429
@jepler Please bump this up the priority list. Spend this week looking into it. If it turns out to take longer than that, we'll move it to a long-term bug list at that point. Thanks!
@onyx hinge Go ahead and bump the nRF issue up and look at it this week ๐
@idle owl aye aye!
@fierce girder Yep!
What's going on in the UK?
Please let us know if you're lurking.
Text only today.
We're finishing up another meeting. Be there soon!
lurking today
In the studio today, so text-only.
@simple pulsar just family visit
@idle owl lurking for hug reports . Just status today
click away!
Twitch-ish?
lurking
lurking
lurking
Lurking
fire alarm... i'll be back.
that happened to us last week live on air
@raven canopy oh nose, stay safe!
I'm having audio issues, there was some Discord software update.
** hug report Cedar Grove's test of a PyPanel https://youtu.be/_X66NmhzMXI
Test of PyPanel concept with PyBadge, Crickit, and Stemma-connected DAC
Uses standard Adafruit CircuitPython libraries: adafruit_crickit, adafruit_pybadger
@turbid radish are you using the browser or app
app
@errant grail is a supah staaaah!
1,500 thanks CircuitPython stars!
https://github.com/adafruit/circuitpython
I'm hearing now :\
good
CircuitBrains Deluxe, CircuitPython castellated module package
https://kevinneubauer.com/portfolio/circuitbrains-deluxe/
Serpente is back and the family has expanded
https://www.tindie.com/products/arturo182/serpente-a-tiny-circuitpython-prototyping-board/
Introducing programming using CircuitPython course
https://drive.google.com/drive/folders/1om9P_u7ZVymkK_MpM91CnwvmUGanmrN3
30,000,000 Raspberry Pi units sold
https://blog.adafruit.com/2019/12/15/30000000-raspberry-pi-sold-latest-market-share-and-more-raspberry_pi-raspberrypi/
CircuitPython at PyConf Hyderabad, and slides
https://anweshadas.in/circuit-python-at-pyconf-hyd/
https://slides.com/dascommunity/my-diwali-with-circuit-python
Take Flight with Feather - Hackaday and Digi-Key
https://hackaday.io/contest/168107-take-flight-with-feather
working up stats for end of year... (included at bottom of notes)...
231 GUIDES | 1892 PAGES
https://learn.adafruit.com/category/circuitpython
# of products on adafruit.com circuitpython related, about 2,400
https://www.adafruit.com/?q=circuitpython
# of forum posts in forums.adafruit.com, about 6,792
https://forums.adafruit.com/search.php?keywords=circuitpython
Adafruit Industries, Unique & fun DIY electronics and kits : - Tools Gift Certificates Arduino Cables Sensors LEDs Books Breakout Boards Power EL Wire/Tape/Panel Components & Parts LCDs & Displays Wearables Prototyping Raspberry Pi Wireless Young Engineers 3D printing NeoPix...
of boards, about 89
https://circuitpython.org/downloads
CircuitPython Organization
random idea: issue stats could include how many "good first issue"s we have.
๐จ
easily done. but the info is only as good as the source. @onyx hinge, feel free to add an issue to adabot's repo. 
@raven canopy yes, I hope it would prompt us to tag more issues that way!
"what is measured, gets done?" ๐
well said!
Goodhart's Law.
nice to have Blinka in the mix now ๐
thank you @gilded cradle !
@gilded cradle thanks for the update
yeah, i mangled the quote. exactly the reference though @drowsy geyser
i am lurking today
You're Welcome. It was precipitated by a flurry of updates last week.
I think we want to do this so that we're not hammering developer.arm.com with every build!
Thanks to LadyAda for being patient with my botched issue creation and to Melissa for taking time to look at the displayio bug(?) I reported. ๐
lurketty lurk
lizzurkitty-twerk
OK. Trying something new here. My wife says I need local friends so I donโt have to wait for tech conferences and fly somewhere to see like-minded people. If any of you are in the Omaha, NE area, come to a 3H meetup. https://t.co/ADy22lTd3g
@onyx hinge ๐ you too! its been wierd schedule-wise lately.
thanks drew! I should have had the link ready
Added support for the Teknikio Bluebird https://www.teknikio.com/pages/bluebird
I got these for storing SMD parts and have been very happy with it: https://www.amazon.com/gp/product/B008GDSGTK/
And apparently there is an updated version with a color screen:
https://www.amazon.com/Brother-PC-Connectable-PTD600-High-Resolution-Printing/dp/B00OCEKCB2/ref=sr_1_4?keywords=brother+PT-D450&qid=1576525829&sr=8-4
kattni is scrolling...
For now, it's used to detect Stemma-attached devices from a short list of possible devices. Establishes instances, tests, and shares found device information to the calling code. The configurator process may be expanded to support device classes connected to GPIO pins, as well.
;D
And use these to organize most of my SMD stuff on strips:
https://www.eevblog.com/product/usleeve/
And use these to store all of my bulk parts/jellybeans like 10uF caps, 10K resistors, and AP-2112s:
https://www.adafruit.com/product/430
ohh. new @errant grail lasered panels? ๐
@raven canopy Oh yeah. Will be the first time. Fingers crossed.
belated hug report to @tulip sleet for reading all the micropython issues
@pastel panther the box storage is similar to the storage boxes. just for a lot of them
wow, that doesn't make that much sense
lol
I think the individual boxes are much pricier than the 12x12 box of them
ya, I prefer the modular approach because I can size it to my needs and organize them to my whim with things of different sizes
like my jellybean box is about the size of a paperback
i only did initial 'style' review, needs to pass CI before merging
All Adafruit, all the time.
@slender iron interesting ya, looking at the pix it's not that big ๐ค
Status: job hunting and reviewing issues for bits I can help with. Contemplating porting Sphero RVR SDK to CircuitPython.
@ionic elk, I thought it would be fun to get CP running on the NumWorks calculator , which uses an STM32.
I saw that! That'd be lots of fun
@errant grail I have a huge bag of SD card boxes, they stack very well
The earlier version uses an STM32F4 and the second uses an STM32F7
Ah gotcha I was about to ask
@stuck elbow oh, excellent idea.
I saw the second one I think and kinda wrote it off
lol jeplayer
The one I got from Adafruit was the earlier version.
@errant grail just get ones without any guides inside
If you need the schematic, I have it for the first one.
So I'll check it out. Does it have good options for reprogramming? That's the issue I've kind of had with the Meowbit
i was pronouncing jay epplayer, in jepler fashion. ๐
I took the french-ish approach of j'player
The important things are to either have configurable boot pins, accessible SWD/JTAG pins, or both
@ionic elk I think it has 10-pin jtag
@onyx hinge I used a shift register for my keyboard
@slender iron can't see your reference banana; must be huge ๐
Gotta drop. Another call.
bye @drowsy geyser
Add PWMOut to BeagleBone (Black/Green/etc)
https://github.com/adafruit/Adafruit_Blinka/pull/201

Does anyone know anything about the new Bluefruit-Plaground App -- can't find it on the App store -- the guide is out
@solar whale Still in review. Will be out soon.
ah -- great --- saw the guide, so I thought it was out
6 - DFU mode button(use for toggle firmware or for Bring up the menu in Makecode Arcade mode)
@ionic elk, you could solder a 10-pin header on the area that says Cortex Debug.
@gilded cradle unfortunately mine doesn't have that (1.2.1)
@onyx hinge is that going to be a split or just printing in two pieces? Are you making it for an existing pcb or making a custom one?
Ok, gotcha. I didn't realize you had one already.
@pastel panther It's in two parts for printing, it's a regular (non-split) keyboard. Wiring is all point-to-point, like https://www.thingiverse.com/make:728072
(that's my make of someone else's design, now I'm making my own design ๐ )
ah, nice
@onyx hinge in case you missed it:
https://twitter.com/siddacious/status/1182090844716728320
omg super cute @pastel panther
thanks ๐
need to spin another rev to fix some bugs, then start working on the full-sized version
gotta drop off. ๐ everyone...
@pastel panther what design sw?
eagle
is battery life enough to make having bluetooth worth it?
don't know yet!
for this one at least I only need a few hours of runtime because I can plug it into one of the many micro-usbs on my desk between uses. I'll have to re-consider things for the full size version
27th is a no-go for me too
skip them
skipping is fine with me
The CircuitPython Newsletters will still be going out is my understanding
let's do that
@turbid radish if you have a second can you take a look at that draft blog post I sent you a link about on Friday? If not, nbd, just a gentle ping in case it was missed.
Thanks! Happy Holidays everyone!
๐
Discord's andyleer and I both recently noticed that it is not possible to set the rotation property of a
display. This is inconvenient if you want to change the rotation, as you have to copy the initialization from core C code into Python. Since e.g., the Pynt's blurb on adafruit.com says
Rotate it 90 degrees, itโs a web-connected conference badge #badgelife.
we should probably make it easy.
This lightly tested change does that, including resizing the terminal when you do. If ...
this is weird, i've seen it twice now in actions builds: 2019-12-16T21:25:39.5936738Z make: Entering directory '/home/runner/work/circuitpython/circuitpython/ports/unix' 2019-12-16T21:25:39.5937333Z Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity. 2019-12-16T21:25:39.6995598Z msgfmt: error while opening "build/genhdr/en_US.mo" for writing: No such file or directory 2019-12-16T21:25:39.7316682Z ../../py/py.mk:321: recipe for target 'build/genhdr/en_US.mo' failed 2019-12-16T21:25:39.7317286Z make: *** [build/genhdr/en_US.mo] Error 1 2019-12-16T21:25:39.7317764Z make: Leaving directory '/home/runner/work/circuitpython/circuitpython/ports/unix' 2019-12-16T21:25:39.7326590Z ##[error]Process completed with exit code 2.
aha
By having an order-only dependency on the directory itself, the directory
is sure to be created before the rule to create a .mo file is.
This fixes a low-freqency error on github actions such as
msgfmt: error while opening "build/genhdr/en_US.mo" for writing: No such file or directory
This can be reproduced 100% (rather than as a rare race condition) by running in ports/unix: rm -rf build; make build/genhdr/en_US.mo
@jepler I moved from the 4GB card with no name to an 8GB SanDisk card. Reading 1901 bytes repeatedly works. Average speed is about the same. Yay!
At this point I don't know if the original card is broken, flakey, or in an unusual corner of the specs.
Encountered this when updating the Circuit Playground library to be able to detect board type. The stack size on the CPX is no longer large enough to handle the restructured Circuit Playground library. @dhalbert tested and found increasing the stack size to 4504 from 4096 resolved the issue. @tannewt agreed increasing the stack size was acceptable.
This needs to be done on both 5.x and 4.x as we are updating the Circuit Playground examples to use the new import mechanism. Updating 4.x shou...
If you're unstuck now, that's good news. If you want to pursue the behavior of the 4GB card further, I recommend taking it to https://github.com/adafruit/Adafruit_CircuitPython_SD and if you have problems with mp3s otherwise you can pursue it with a fresh issue here.
The restructured CP library with code in __init__.py and a subclass structure overflows the stack on import. Increase CPX stack size slightly (4096 -> 4504).
This change may also be needed on 4.x.
@jepler Thanks! That just the info I need.
I'll report separately on what happens when I attempt to play a .wav as a .mp3.
I'm unstuck! I will put aside the SD card problem. I will also put aside the I2S problem, for now, very probably mine.
I am also able to play from an unmounted microSD card.
@jepler behavior with bad mp3 file
When I try to play a .wav as a .mp3, I no longer get the weird memory exception, but no exception at all is raised. Also audio.playing is True for about 25 ms. I would hope to get either an exception or a False. I can readily work around.
I have not tried a garbage file or an empty file.
ill let @dhalbert or @tannewt do secondary review/merge. note the internal filesystem on the nrf52840 is not working very well at this time!
remove period at end of url
@tannewt I think you have the mojo to do the s3 upload, let me know if you want me to do the pr part for some reason
It'll be my focus starting tomorrow, I ended up working in displayio stuff today
thanx - leaving for others to do final review but seemed ok in my review
Type checks like this are prevalent in display io code. At least investigate whether converting to type safe protocols makes sense. It may also be a good opportunity to hoist type checks out of loops.
if (MP_OBJ_IS_TYPE(self->bitmap, &displayio_bitmap_type)) {
input_pixel.pixel = common_hal_displayio_bitmap_get_pixel(self->bitmap, input_pixel.tile_x, input_pixel.tile_y);
} else if (MP_OBJ_IS_TYPE(self->bitmap, &displayio_shape_type)) {
...