#circuitpython-dev
1 messages Β· Page 382 of 1
just type file something.wav, and it should tell you the sample rate
low_fade.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 22050 Hz
Works on CPX and so on though. Or worked anyway.
I don't know how to change that. I've never made my own wav files, always get them from JP
Do you have some?
that I haven't debugged in detail yet; I was trying to prevent crashes and not playing at all and getting stuck
do you have the sox program?
can install via homebrew
Ok
The implementation of #3454 does not currently behave in an intuitive way when used in conjunction with Deep Sleep. In general, a "sub program" called by supervisor.set_next_file should behave in an identical way to a typical code.py program, so that code examples and copied projects can be used without thinking about whether they've been selected from a menu. However, current programs that use Deep Sleep in conjunction with set_next_file cannot store next file information, since deep s...
@tulip sleet Then what do I do with it? Docs are... lacking.
sox something.wav -r 16000 something-at-16k.wav converts something.wav to 16kHz sampling
Ok thanks
it is a messy CLI program
Brew is doing brew things. So it's taking forever.
π of course.
This is why you never ever ever brew install python.
brew is the opposite of instant iced tea
We'll need to document this limitation on samplerate somewhere or somehow.
Because it means a bunch of files we've used previously won't work.
oh yeah, yeah, we still need to experiment, and it still might be terrible
I've only fixed some things so far
16k is still a bit crunchy. Hmm.
Seems so anyway.
Making 8s.
@tulip sleet So, it seems better than it was? Also weird, they each play once but not again.... Like the whole program stops responding. Or one plays once and then everything stops responding. No LEDs, no HID....
well, I was hoping to fix that π¦
that's one of a number of bugs
I really need to stop assuming things are me.
The vectorio thing is a display rotation issue. It's also not me. π
Testing now.
Adding RP2040 sleep memory is actually kind of tricky because of the way we handle the general RAM during deep sleep. Unlike every other port, the RP2040 is actually incapable of fully shutting down the RAM during deep sleep - even the lowest power settings still retains all data. In an effort to be as close as possible to the other ports, which typically lose all memory when deep sleeping, the RP2040 port currently implements a watchdog reset after deep sleeping, resetting all RAM except f...
Not getting anything from playing the files. I'm supposed to type out a filename in the serial console right? To play it?
just type the number to the left of the files
also those samples are mostly 1 sec. The woman playing the autoharp is slightly longer
Including mine.
I should try your program
~~Hey all, noob here, so apologize if I'm asking the wrong question or in the wrong way. Feel free to direct me to the right place. ~~
Moving to #help-with-circuitpython
@marble sundial This is better suited to the #help-with-circuitpython channel. This is more for dev discussion.
You'll get excellent help there!
upload your program when you re-ask
use the + to the left
Section 2.11.4 of the RP2040 datasheet notes that the memory can be set to a low power state during deep sleep using MEMPOWERDOWN. This is not used in the deep sleep examples given by the demo SDK and the amount of power it saves is not described. As noted in #5081, this still does not result in any data loss, it's just a lower power state and apparently needs a little bit of extra time to start back up.
Kind of a low priority feature but it could be considered by anyone who's interested i...
It's the braille keycaps code. I removed the HID commands from the first two macropad keys to test the wav files without sending HID
You have to update the file names in shortcuts.py if that's unclear
to test other files
@tulip sleet Here's the original files.
No idea if that's helpful but I figured it can't hurt to send them to you.
thanks, I am going to fix the xosc bug first, then I will try those. Could you upload the prog too?
Should be in the zip?
play_file_demo.py
change that to code.py
I had already renamed it to test your code, so I sent the renamed file to you as is.
Did I forget to include it?
Na it's in there.
Uses the BKPSRAM feature. Tested on Feather F405 Express.
oh, ok! I was just going by the name
@slender iron When we switched back to the raspberrypi/pico-sdk, I lost the XOSC oscillator fix by accident, so it's not in alpha.5. It's in there forpico-sdk builds, but we don't use the pico-sdk board files. Where do you think we might put pico-sdk-specific settings for boards? Putting them in sdk_config/pico/config_autogen.h doesn't seem right, but perhaps that could #include some kind of RP-specific config.h for an RP2040 build for us?? I don't know whether you've thought about this.
I can't remember if you have specific board settings for anything right now
that is pico-sdk-specific. I don't really want to #include "mpconfigboard.h" or something into the pico-sdk sources
EDIT: I have an idea about adding a pico.h to our board directories, which will be included by config_autogen.h. I think that's the simplest for now. No comment needed for now. Next step is a PR.
I tested the tone/wav demo, modified to play two wav files, and I'm still running into some crunchy playback, and the program hanging after the playback of one file. Worked with Dan on Discord to try out his demo code, which doesn't hang. I have provided him with the modified version of my demo so he can test the code I was using.
I just noticed a small typo in the opening sentence of the CircuitPython day blog post:
the first date has 2020 instead of 2021. https://blog.adafruit.com/2021/07/12/announcing-circuitpython-day-2021-on-august-6-2021-circuitpythonday2021-circuitpython-python/
Fixed, thanks!
It looks like all of the streams that are planned so far are in the afternoon. 1pm Eastern being the earliest one. I am going to plan on streaming a bit earlier in the day 11am Eastern (10am Central) which is the same time of day that I normally stream on Saturdays.
Added Breadboard-Friendly and Arduino Shield Compatible features.
Breadboard-Friendly is defined as parallel pins with at least one socket open on each side of the board (Assuming single, standard breadboard) and minimal non-critical perpendicular pins. (i.e. 3V3, Vcc, Vusb, GND, En, Reset not perpendicular)
As I worked through the boards, I found some boards definitions missing features and corrected those.
CircuitPython version
Adafruit CircuitPython 7.0.0-alpha.5 on 2021-07-21; Adafruit PyPortal with samd51j20
### Code/REPL
```python
import board
import displayio
import vectorio
main_group = displayio.Group()
board.DISPLAY.rotation = 0
#board.DISPLAY.rotation = 90
#board.DISPLAY.rotation = 180
#board.DISPLAY.rotation = 270
board.DISPLAY.show(main_group)
rect = vectorio.Rectangle(width=50, height=1)
rect_palette = displayio.Palette(2)
rect_palette[0] = ...
The longer xosc delay startup was inadvertently lost when we switched back to the raspberrypi/pico-sdk submodule. So 7.0.0-alpha.5 did not have the XOSC fix for Adafruit boards. This is a regression which can cause a few samples of boards not to work.
Add the fix back, by including a board-specific in the pico-sdk global config file ports/raspberrypi/sdk_config/pico/config_autogen.h.
@WarriorOfWire I'm curious if you have any ideas on cause or potential solutions for supporting rotations other than 0
I have a MacroPad that was getting stuck into a "doing nothing" type state after being unplugged / re-plugged after flashing CircuitPython. I tested a build from this branch on that device and confirmed that this build allows it to be unplugged / re-plugged and continues to work as normal.
@tannewt sounds good, I'll work on some changes to the other MicroMod board definitions to get everything consistently named.
Couple questions:
- OK if I make those changes as part of this PR, or do you want those as a separate PR?
- When is V7 targeted for release?
@slender iron @onyx hinge I started to create a team of "CircuitPython core reviewers", so you could request a review from anyone on the core team. I was going to include @analog bridge and @ionic elk . But it turns out you can't add "outside collaborators" to teams, only team members, and you have to buy a seat for a member. So I gave up on this. You can ignore the invitation to join the (now deleted) team. Nevertheless, perhaps we can add more people as reviewers whenever we do a PR if any of those people could give a review. It's hard to indicate AND vs OR in terms of reviews. We can assume OR unless otherwise specified.
CircuitPython version
7.0.0 alpha 5
7.0.0 alpha 4
7.0.0 alpha 3
6.3.0 Does not have this issue
Code/REPL
No COM/serial presented to OS via USB
Behavior
I flash the mentioned 7.0.0 versions and when I plug the teensy back in, after about 3 minutes, all I get is this USB descriptor:

Description
No response
Additional i...
It looks like the need to update display makes using REPL slower. It may not be relevant for manual usage, but Thonny, for example, uses REPL for management tasks (eg. for querying variables and available modules) and also for running code from the active editor. Because of this, using TrinketM0 in Thonny is much smoother experience compared to CLUE (which contains faster processor, if I'm not mistaken).
What about turning off output mirroring when CircuitPython enters REPL? I assume the R...
I would be interested in seeing the HID report descriptor for your off-the-shelf Japanese keyboard. On the Mac, you can dump it using this tool: https://github.com/todbot/mac-hid-dump. A precompiled version of this is in https://github.com/todbot/mac-hid-dump/releases/tag/0.1, in the zip file. Thanks.
I strongly disagree. It's useful to know things are running and for most boards the display showing errors is extremely helpful. Getting a serial connection to see errors is a big hurdle for some folks.
I agree that it might be useful for debugging purpose, but for this reason i also think it should be disabled by default because most software has disabled debug output unless you really want it.
Instead of using an additional function parameter there might be other solutions like a glob...
@onyx hinge The barometric pressure example on this page: https://learn.adafruit.com/ulab-crunch-numbers-fast-with-circuitpython/filter-example-measuring-barometric-pressure#low-pass-filtering-measuring-barometric-pressure-with-a-bmp280-3057472-1 doesn't seem to run on the CLUE any more, I'm getting pystack exhausted consistently when I try to run it. Truthfully I quite understand all of the math that is occurring, but I noticed if I remove some of the values from the taps array that is able to run successfully again. Do you know if it would be worth making that change in order to get it back to running or does that mess up what it's trying to illustrate?
@lone axle hum that's frustrating.
I tested with 6.3.0 using the original script, and 7.0.0 alpha5 with the updates for new ulab names
try splitting the big list, so arbitrarily break it into 2, 3 or 4 parts: ulab.array([...] + [...] + [...])
that seems to have worked π it runs now. Thank you!
Where did you get the big list of coefficients? I'd like to try filtering other frequencies.
https://en.wikipedia.org/wiki/Window_function#Hann_and_Hamming_windows
If anyone ends up here by google: I've created an example for absolute mouse here: https://gist.github.com/bitboy85/cdcd0e7e04082db414b5f1d23ab09005
@proper zodiac I think I may have generated them with scipy on a host computer: https://docs.scipy.org/doc/scipy-0.19.1/reference/generated/scipy.signal.hamming.html
@onyx hinge on more question related to that example. I noticed that my filtered line seems to be pretty much straight horizontal, it doesn't appear to be "following" the jagged line from what I can tell. I also found in the code this import ulab.filter https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/d83d646233c791fcab25f8888dda4128d819d6fd/ulab_Crunch_Numbers_Fast/cluebarometer.py#L7 that doesn't seem to get used for anything after importing. I didn't see anything analogous to that in the newest version of ulab so I've removed it. But now I'm questioning whether it was actually somehow responsible for making that filtered line get drawn correctly somehow even though it didn't seem to be used (to my untrained eye)
no, I think it was just unused
if you raise or lower the sensor by 3 feet / 1 meter does the line move about 10 seconds later? Based on what I'm remembering/reading that's what you'd want to see.
the reading should be constant if the sensor is stationary and nothing interesting is happening in the weather
I did experiment with raising it up and down a bit and the jagged line does seem to respond to that but the smooth line still stays exactly horizontal to my eye.
that doesn't seem right, if you change it so the average of the jagged line is +.2 from what it was before then the smoothed line should also move up by +.2
it's a very complicated way to compute an average
exactly horizontal seems wrong
during the boxed section I raised it up at arms height for about 10 seconds, and the section after is back on my desk.
yeah it's not working
mind sending me the code as you have it right now? I'll see if I can't fix it.
or figure out more about what's going on
okay, I'll keep going with the ulab rename changes. I did notice the behavior seems the same using the current code on 6.3.0 as it does with my updated / renames and 7.0.0 alpha 5
Maybe just a moving average of the last 10 values will be more "simple" than this big table and using ulab? π
yep, I can do that.
@thorny jay the purpose of the guide is to illustrate ulab, so no π
@lone axle you never know, maybe what was committed never worked
It is a convoluted way to introduce to ulab...
I'm going to accept that as a pun and move on
pun intended
data = np.roll(data, 1)
looks like you have to assign the result of calling roll, it's the same in numpy
perhaps ulab used to be different, and it was fixed to be more compatible
I am humming right now. It's a musical scipy.signal ...
@lone axle ^ maybe this is the answer
yep that seems to be it. The smoothed line does follow the jagged line with about 10 sec delay now. Thank you π. I'll include that fix in my PR.
I think it's likely that it worked at some point because there is an image in the guide that depicts it with the graph following. But maybe it could have come from code that was modified after commit
Do you know if the intended use of the new ulab is not to do import ulab.numpy as numpy and then write the code using numpy.x?
A lot of internet code writes import numpy as np. It is hoped that you can write code for a compatible subset of numpy and ulab by using import ulab.numpy as np. with a try/except clause, the theory is that it'll work on CP, MP, and py3
or maybe it's from ulab import numpy as np due to a MP limitation, I forget
looks like both work.
micropython (I have v1.15 handy) rejects import ulab.numpy as np but accepts from ulab import numpy as np
So that last form is the best I guess.
It is not a goal of a CP guide on learn to be compatible with numpy or micropython, except that I think that guide has a section on numpy/ulab compatibility that needs to be updated
afk
Thanks for the report! I recall this worked in the dim mists of time. Will dig up a uc, set up this computer for development and take a look.
I had the same issue on a imxrt1010_evk
Ran in debug mode and got the following stack:
#0 vsnprintf (str=<optimized out>, size=538972849, fmt=<optimized out>, ap=...) at ../../lib/utils/printf.c:119
#1 0x6002794a in reset_cpu () at supervisor/port.c:313
#2 0x6002859c in reset_into_safe_mode (reason=reason@entry=HARD_CRASH) at ../../supervisor/shared/safe_mode.c:127
#3 0x60027aa8 in HardFault_Handler () at supervisor/port.c:443
#4 <signal handler called>
#5 CLOCK_SwitchOsc (o...
AMA On Reddit this friday alongside the rest of Circuit Python Day https://www.reddit.com/r/Python/comments/ove20j/join_us_for_an_ama_with_the_developers_of_circuit/
Please file an issue here with the contents of your CIRCUITPY drive:
https://education.ti.com/en/customer-support
``` Hey this was a nice gesture by the folks at TI: they fixed the bit where it said to report bugs to
also there are some strings in this file which strongly indicate that code I wrote now ships in TI calculators
At pycon US I got to talk with someone who worked on that project at TI
any tidbits you can share?
Argh if only I could remember his name, but he talked about how much they pulled from circuit python and had to massage into the calculator
Biggest notes were they had to use a subset because all of the I/O pin related features weren't needed, which caused them a ton of headaches in the build because of library issues, but that it worked well once the massaging was done
The guy was a 'I've been using assembly guy' and he worked on the tests there, and wasn't overly fond of the experience, but was darn proud of the team to get it working, and really happy circuit python had put so much into making the code work
it looks strongly like the firmware update for the main calculator (Python.8ek) embeds a UF2-like bitstream for the samd21 coprocessor where circuitpython runs
I'm still working to wrap my head around the lower level of how the circuit python core functions. What would it embedding the bitstream do past keeping it compressed?
I'm guessing that the main calculator CPU can feed the UF2 to the samd21 coprocessor where circuitpython actually runs, but that's not based on actually disassembling anything
that's just how they can update the embedded circuitpython version
That structure does sound like a 'lowest energy' solution to slapping circuit python into an already existing embedded program. That way their years of code and tests are still present and they don't need to build those back up from the ground up
it's tempting to try to extract it from the 8ek file, and put it on a device I have like a qtpy..
So the issue is in the way it's computing the dirty area + a displayio semantic. This works fine, but it has really sharp edges.
main_group = displayio.Group()
display = _get_initialized_display()
display.brightness = 1
#display.rotation = 0
display.rotation = 90
#display.rotation = 180
#display.rotation = 270
display.show(main_group)
rect = vectorio.Rectangle(width=20, height=6)
rect_palette = displayio.Palette(2)
# rect_palette.make_transparent(0) <----------...
Yes, I find it weird that code I wrote can be purchased at Best Buy or Target (not yet CVS)
I'd like to make a breaking change to vectorio palette semantics.
Currently:
To color vectorio shapes correctly you have to pass in a palette with length 2. Palette[0] must be set transparent and palette[1] must be the color you want.
Proposed:
To color vectorio shapes correctly you pass in a palette with length >= 1. Palette[0] will be the color of the shape.
This is a breaking change with previous palette semantic with respect to python code that uses vectorio.
Displayio has breaking changes in cpy 7 for Group's removal of max_size parameter so this is as good a
time as any to break everything.
Currently:
To color vectorio shapes correctly you have to pass in a palette with length 2. Palette[0] must be set transparent and palette[1] must be the color you want.
New:
To color vectorio shapes correctly you pass in a palette with le...
Is this check correct, or does it need to be negated with !?
I'm not sure if this is an enhancement or a simplification, but:
Haven't you made input_pixel be the same for every pixel now? If so, can the conversion to an output_pixel be done above, and the "double-check" becomes "if the output pixel is not opaque, NOTHING is drawn, and the loops can be skipped"? This also moves code out of the inner loop, so that maybe it becomes faster.
I'm not sure why my local feather test harness is working right with that error. I swear I am a professional software developer π€¦
re input_pixel:
Look closer at what displayio_colorconverter_convert can do. This has to be in here (I tested that colorconverter transparency still works).
The perf increase here comes from skipping a function call per pixel that we know is not covered by the shape. We were computing a color that we knew we were never ~going~ supposed to consume.
Thank you. I will try to get the HID report descriptor now.
Got the HID report descriptor, ARCHISS PTR91 is the off-the-shelf one.
I don't know why two are shown, but one is connected.
Here is the URL of the product page in Japanese.
https://archisite.co.jp/products/archiss/progres-touch/retro-tiny-jp/
$ ~/Downloads/mac-hid-dump
mac-hid-dump:
2BE8 0001: ARCHISS - ARCHISS PTR91
DESCRIPTOR:
05 01 09 06 a1 01 05 07 19 e0 29 e7 15 00 25 01
75 01 95 08 81 02 95 01 75 08 81 01 95 05 75 01
05 08 19 ...
@idle owl @tulip sleet pm me if there's any need for another tester for crunchy audio issues on macropad - i've been getting them consistently in alpha5 with my 16 bit signed wav files using macropad.play_file. some files are always crunchy, some are inconsistent. sometimes truncated and sometimes going unresponsive as well. i'm not much help on the code side, but don't mind testing with my sound files.
going to try latest from s3 tomorrow to see if there's any changes.
FWIW this is also affecting the FeatherS2 β and it's a regression from CircuitPython 6.2.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 6.2.0 on 2021-04-05; Adafruit Feather M4 Express with samd51j19
>>> print("foo", flush=True)
foo
Adafruit CircuitPython 7.0.0-alpha.5 on 2021-07-21; FeatherS2 with ESP32S2
>>> print("foo", flush=True)
foo
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 22] ...
Is there a way to deploy assets like .jpg and .wav files into a custom circuitpython build? I am successfully freezing python modules into the build. But I need some read-only assets too.
@cunning galleon we don't do that, as far as I'm aware.
roger roger. I may make byte-arrays for them in frozen python files then.
I don't think that the mp3 decoder will accept anything that isn't a file on flash or sd π
it would be nice if mp3s in particular took any object with a readinto/recvinto method but that has not been implemented yet.
right now I think what you'd have to do is freeze in a block of memory that is a FAT filesystem image, then you can mount that with the storage module..
(if you went "ugh" just now, I agree)
Ugh, but if it works for now!
I wrote this once for image creation but it ended up not being useful to anybody. https://github.com/jepler/mkfatimg
then I think you need to wrap it with an object that implements at least count and readblocks methods; not sure if the other two are needed. The implementation can be in C or in Python. https://github.com/adafruit/circuitpython/blob/98cd989c16ab82bff10002359b09d4027a198a97/shared-bindings/sdcardio/SDCard.c#L176
to have it happen at boot time everytime you could poke it into the supervisor, see filesystem_init -- but I'm not sure what the secondary effects are of wanting a second filesystem
of course you could just make this part of the initial CIRCUITPY filesystem when you program your device, too, and if a user breaks it they break it. This can go in the same uf2 file if you have a unified flash for program & CIRCUITPY (like non-express boards, esp32 boards, and pico boards) or you would need a second step at manufacture to load it...
afk for now
(@idle owl also) I am still debugging my PR that fixes some things. Kattni has a test example that uses macropad that causes it to stop playing. The difference between the MacroPad library and my test program is that the MacroPad library creates and destroys the PWMAudio object on each play: my test was not doing that. Stay tuned.
OK thanks. I'm actually considering using one of the wav/ogg decoder boards if I actually finish this project - but it'll be nice to have it all in one place during development. I'm writing a set of baby/toddler games to entertain my grandkids.
The current version of "adafruit_display_text" has a simple "display_text_simpletest" module. The code raises an exception from Label.py -- "Group full".
which version of CircuitPython are you using?
6
The limitation on group size was removed in 7; the example should not fail, but try 7
I modified the "BaseLabel" in the adafruit_display_text "init.py" to give a large "max_size" to groups. That seems to work.
I'm not sure we can upgrade to 7 yet. But I'll check.
The FREEZE process doesn't seem to pick up .mpy files in the target directory. I only have the version 6 libraries as mpy files (from the bundle).
Is there a link to the source for the version 6 libs?
you can download a source bundle. You can also add the library you want as a git submodule. That is the way the current code is included, and is recommended so you can fix it to a specific version and update it easily.
that's what I was trying when I got the "group full" error
I figured the source was already changed for version 7
the source bundle for 6 and 7 is the same. we don't yet have a mechanism for including different library releases in the 6 and 7 bundles. The only difference is that they are compiled with different mpy-cross versions.
OK. I dragged the "adafruit_display_text" source library from that folder to my board running version 6 circuitpython. I get the "group full" error.
I will modify my copy of that source to add "max_sizes" so we can get going.
The version 6 mpy files of that library work fine. But I can't freeze in mpy files.
are you using the latest versions of the 6 .mpy files? There is no difference between the 6 .mpy and .py files except that they may have been updated recently
do not use the .mpy files just because they work
understood. I don't know how to get the 6 .py files.
they are in the bundle I circled in the image above. But if you have older versions, then that bundle is too new. So you can use an older bundle. Do you have the zip file for the bundle you are using? You can look at its timestamp in the bundle name
or just roll that particular library back
how do i get an older bundle?
for any paritcular library, go to its github release page and find the release you want
so all i can get for version 6 is mpy files
you can look at the PR's for a particular library to find when the group_size stuff was removed
the "py" bundle is the same for 6 and 7
the 6 and 7 .mpy bundles are both generated from the same py sources
Anyone know why my boot_out.txt file is empty? Running yesterdays 7.0.0 on rpi 2040 pico.
there is a known bug: https://github.com/adafruit/circuitpython/issues/5062
Okay thanks.
I woke up this morning and realized you meant something else about the pixel value than what I initially understood. So yeah I agree with you and will update it - I have a larger change baking atm and will wrap it into that.
I ran a traceback, it says StoreProhibited and points to the following line. Looks like out_report_buffer is NULL.
https://github.com/adafruit/circuitpython/blob/98cd989c16ab82bff10002359b09d4027a198a97/shared-module/usb_hid/Device.c#L255
It looks like safe mode is not initializing the HID devices. This maybe the host trying to set the keyboard LEDs or something like that. I'll take a look.
@onyx hinge @analog bridge I tried making a DEBUG=1 ESP32-S2 build, but even if I turn off large modules (e.g. CIRCUITPY_ULAB = 0), I get something like:
[658/658] Generating ld/esp32s2.project.ld
/home/halbert/.espressif/tools/xtensa-esp32s2-elf/esp-2020r3-8.4.0/xtensa-esp32s2-elf/bin/../lib/gcc/xtensa-esp32s2-elf/8.4.0/../../../../xtensa-esp32s2-elf/bin/ld: build-adafruit_metro_esp32s2/firmware.elf section `.dram0.bss' will not fit in region `dram0_0_seg'
/home/halbert/.espressif/tools/xtensa-esp32s2-elf/esp-2020r3-8.4.0/xtensa-esp32s2-elf/bin/../lib/gcc/xtensa-esp32s2-elf/8.4.0/../../../../xtensa-esp32s2-elf/bin/ld: region `dram0_0_seg' overflowed by 2904 bytes
collect2: error: ld returned 1 exit status
do you have a suggestion? Thanks.
Huh that's a ram section and not a flash section. Weird.
Not really, I was in the habit of turning off wifi but I haven't had to do that lately (build with debug)
I did a bisect on this on ESP32-S2, and it's this commit that's causing the empty boot_out.txt:
https://github.com/adafruit/circuitpython/compare/cf97793af^...adafruit:cf97793af (Add supervisor.get_previous_traceback() function.)
installed a simple "blink led" code.py on 7.0.0-alpha-5 and can see that the code is running, even though there is no REPL or CIRCUITPY drive.
Making this change causes boot_out.txt to appear again. A NULL was passed before the commit mentioned above
//bool found_boot = maybe_run_list(boot_py_filenames, &result);
bool found_boot = maybe_run_list(boot_py_filenames, NULL);
Tagging @cwalther for interest and perhaps some insight.
I tried one other thing, which was to insert a one second delay after the filesystem_flush() in run_boot_py(), and that did not help. I thought perhaps the new except...
Hi there Adafruit folks,
I'm running into this similar error with the Funhouse which I think is built on a similar architecture.
https://learn.adafruit.com/creating-funhouse-projects-with-circuitpython/temperature-logger-example
`Traceback (most recent call last):
File "code.py", line 69, in <module>
File "code.py", line 59, in log_data
File "adafruit_portalbase/network.py", line 345, in connect
File "adafruit_portalbase/network.py", line 340, in connect
File "adafruit_po...
I made the tinyusb buffers smaller to get it to fit
I can confirm that something similar happens on the macropad with alpha 5
thanks! I was wondering what was larger with DEBUG=1
it seems like you could write some sort of script that figures out what grows, especially if we know how to get it to fit again right now (by reducing tinyusb buffer size) .. maybe some judicious comparisons of firmware.elf.map would help
I had to turn off almost all of the common-hal modules to get a DEBUG=1 build. Should I re-open the issue with a 7.x.x milestone?
did you see the above about trimming the tinyusb buffers? Maybe tinyusb DEBUG=1 adds a bunch of stuff?
FYI, this was after idf-v4.3 update.
was it exactly after? Or also tinyusb upgrade? I looked through the .ld stuff but could not find anything relevant or anything to adjust, which I was confused about
it is exactly the idf-v4.3 update commit
https://github.com/adafruit/circuitpython/pull/4195/commits/e0eecd2f76b5e77271ee2dd3bb8b14d5bb3efad2
I looked for what DEBUG was doing
I think an issue would be good if we don't already have one
from esp32 forum
Because of some fixed RAM addresses used by the ESP32 ROM, there is a limit on the amount which can be statically allocated at compile time. Much more RAM is available at runtime via the heap (it is, as WiFive says, non-contiguous.)
There are some plans to work around this and allow more static allocation, but no ETA yet.
The best fix for the issue is to find a large statically allocated buffer in your program and change it to allocate dynamically (ie via malloc()).
Espressif ESP32 Official Forum
i just wonder what DEBUG is causing to be allocated statically.
since we don't have the problem on regular builds
I'll re-open #4984
This is happening because debug mode changes optimization flags which in turn makes the firmware much bigger.
I changed the optimization flag for DEBUG to be -Os and still had the same problem, so I wonder what DEBUG is adding to the build besides code size.
Someone tried increasing the dram_0_0seg section but that didn't help.
https://www.esp32.com/viewtopic.php?t=424
Espressif ESP32 Official Forum
I saw https://www.esp32.com/viewtopic.php?t=424 while doing some searching, but didn't see https://esp32.com/viewtopic.php?t=6699 (or didn't read it carefully).
I had to turn off almost all of the common-hal modules to get a DEBUG=1 build.
Also, @tannewt on discord suggested another way to get a debug build is by reducing tinyusb buffer size.
From this esp32 forum post:
Because of some fixed RAM addresses used by the ESP32 ROM, there is a limit on the amount which can be statically allocated at compile time.
Much more RAM is available at runtime via the heap (it is, as WiFive says, non-contigu...
I did some debugging of this over the weekend. The MacroPad library creates and destroys the PWMAudio object on each audio play. At first I thought that was the difference, but it's not. Instead, what I am seeing is that after the second audio play, background tasks are not being run. In particular, the scanning routine for the Keys object is not being called. So button presses don't play anything after the second play. (I am not sure it's consistently the second play, but it seems to be ...
Hm, could be that I broke something there - I probably didnβt check whether NULL had any special meaning beyond βIβm not interested in the resultβ. Iβll take a look.
@DynamoBen sorry for late response, looking at your log, look like rp2040 got suspended after awhile. since currently tinyusb port of rp2040 doesn't distinguish between disconnected vs suspend (doable with a bit of extra code with decent testing). Therefore it will cause an re-enumeration. Unfortunately, the dcd isn't clean up all the previous pending transfer which cause the WARN: starting new transfer on already active ep 4 out. This can probably cause the failed to transfer as you experi...
@hathach I have just noticed USB disconnects randomly while trying to debug some audio playback on RP2040. I am not doing MIDI. USB becomes disconnected, but when I reconnect, everything is fine (no crash). I will try to narrow this down later. Perhaps the USB interrupt handling is being starved or disabled due to some other operations. I am doing some DMA (audio and display), though at the time of the disconnect, there is no audio playing, and the display is not changing.
It could proba...
I've encountered this bug after building the touch deck from John Park's tutorial: https://learn.adafruit.com/touch-deck-diy-tft-customized-control-pad. Power cycling is my workaround.
Adafruit CircuitPython 6.2.0 on 2021-04-05; Adafruit Feather RP2040 with rp2040
Traceback (most recent call last):
File "code.py", line 34, in
File "adafruit_featherwing/tft_featherwing_35.py", line 34, in init
File "adafruit_featherwing/tft_featherwing.py", line 67, in init
...
Could you all try 7.0.0-alpha.5 with this bug? I removed the ability to interrupt an SPI transaction with ctrl-C in #4974, which should be in alpha.5.
check #mods - we are testing there with equal failure
Adafruit CircuitPython 7.0.0-alpha.5 on 2021-07-21; Adafruit Feather RP2040 with rp2040 + Adafruit TFT FeatherWing - 3.5" 480x320 Touchscreen for Feathers PRODUCT ID: 3651
I can now enter the REPL and reload without encountering the STMPE610 error. I can also trigger a reload via filesystem write without error. The display correctly initializes in both cases.
OK, I will close this as fixed by #4974 for now. Please reopen if you still have trouble with alpha.5 or later. Thanks @dgriswo for quick testing!
I can Confirm. @dhalbert beat me to it by about 3 mins π€£
on hn they're discussing the TI calculator with CircuitPython. Predictably, the conversation skews negative, but maybe there's something useful to be gleaned from it.. https://news.ycombinator.com/item?id=28023912
hmmm there's loud work going on outside my house today. If it interferes with the meeting I may have to lean on someone else to be the host.
hopefully in a few hours they'll have moved from the part that is just outside my window to the part that's further down the back yard
<@&356864093652516868> Reminder: our weekly meeting is in about 2 hours in this text channel and in the CircuitPython voice channel. Add your notes to the notes doc, and if you won't be speaking please note that so I can read your notes aloud. We look forward to seeing all of you there! https://docs.google.com/document/d/1fsekWWLvcaMb7w6lfiDHqOjYbM38JgLOOxEjGdwh3A0/edit
CircuitPython Weekly for 2 August 2021 Welcome to the CircuitPython Weekly meeting notes! Feel free to add your Hug Reports and Status Updates early. During the meeting, we go through them as a round robin sorted by username. If you canβt make the meeting and would still like to participate, ad...
Dan's working on it, and apparently it might be something about the MacroPad library itself. Stay tuned π
unfortunately, not the library itself. I replicated it without the library. It's deeper than that
Well that makes me feel a little better. I figured I caused it.
Newbie question.
Was hoping to connect this like a USB memory stick, write jpeg files from the PC and have those changes trigger the posting of file names and sizes to a remote server. Is this possible? Perhaps with some onboard program that might, for example, switch connection of the SD card back and forth between the unit and the PC so the card could take a peek at the new files? Or completely impossible given the current specs? Thanks.
See #2006 and #1764 for why this is hard.
Do we still need this? CircuitPython only includes characters in the error messages in order to minimize memory impact.
I wonder if now that we can free up USB endpoints in boot.py it becomes a little less impossible to have this?
Happily lurking and drinking mid-afternoon coffee, because sleep? Who needs it. β
πͺ this helps with making split β¨οΈ , but it may or may not need some effort to make it work.
@tannewt sounds good, I'll work on some changes to the other MicroMod board definitions to get everything consistently named.
Couple questions:
- OK if I make those changes as part of this PR, or do you want those as a separate PR?
Here is fine.
- When is V7 targeted for release?
No date specifically.
We have a person here doing an estimate on a new AC, potentially plus a furnace. We have no AC at the moment. Sigh.
I can't imagine not having AC anymore, and I'm in a more temperate climate of NJ. Which reminds me more of Florida with its humidity and heat each passing year.
Hopefully it's fixed quickly π
Heh, yeah.
Me too, thanks.
What about turning off output mirroring when CircuitPython enters REPL? I assume the REPL can only be entered via working serial connection (or, at least this is the main way for using it). In this case I find it unlikely that anybody prefers to look the output on a tiny (or smallish) screen instead of her terminal program.
I like that it shows on the REPL. You could have thonny do displayio.release_displays() to turn it off completely. You would need to know how to reinitialize a disp...
@opal crystal Will you be reading off your status update or are you text-only and would like the host to read it off?
Testing code for turning my new @adafruit Macropad into Kruise Control for KiCad. Rotary encoder under thumb for layer, trace width, or grid size. (Obv in use itβs not gonna be sitting up in front of the screen π) (paging @Borgel) https://t.co/TBd0IypHzq
Obi Wan is in my @Arduino Nano RP2040 Connect. Easy to get @CircuitPython running with sound & an @adafruit STEMMA QT gesture sensor. https://t.co/ckcOyGF9PJ
117
I will read them.
Excellent thanks! Simply wanted to make sure since you're lurking for hug reports.
I just have no hug reports because I wasnβt involved this week. π
No worries!
#DC540 #Defcon Tree Of Life Badge #Badgelife OFFICIAL PROMOTIONAL VIDEO https://t.co/WFV3QzKlPO
are you using the app or in a browser?
It had worked in the pastβ¦
hrm
@lone axle I am happy to test that PR too! I'd rather be using vectorio, as it's simpler than displayio.Shape().
Oh hey so about vectorio
I am writing a draw protocol and removing VectorShape from the python-facing api
My understanding of the distinction is community bundle = you intend to support mostly yourself, whereas circuitpython bundle = intended for multiple folks all helping support
Because the ergonomics of the current api are really bad. Iβm hoping to shoot out a draft this evening - having perennial troubles with transposition. Itβs simplifying a ton of stuff though so seems worth
Woo, another quick yet awesome meeting. Thanks all! π
Nice, I'll keep an eye out for that. I'm excited to see improvements coming. I'll aim to work on displayio.Shape examples first and then get some put together for vectorio after the API is settled.
11 pacific
Iβm not hearing anyone but kattni now but I suppose thatβs on my side too.
I.e., you make a Rectangle(pixel_shader=palette, width=10, height=20, x=24, y=42) and just stuck that in your displaygroup
I'm hearing everyone else. So something happened on your end, like you thought.
Ooh, I like that. It took me a bit to figure out the current API with VectorShape at first.
Thanks.
Nice job Jeff π
Yeah vectorshape is bad to expose to python. Itβs very useful in C but no reason to expose it (well, no reason if you have a draw protocol)
I think I figured it out. PR forthcoming.
diff --git a/main.c b/main.c
index c6801dca7..b35c874c0 100755
--- a/main.c
+++ b/main.c
@@ -633,11 +633,13 @@ STATIC void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) {
static const char * const boot_py_filenames[] = STRING_LIST("settings.txt", "settings.py", "boot.py", "boot.txt");
bool skip_boot_output = false;
+ #ifdef CIRCUITPY_BOOT_OUTPUT_FILE
+ FIL file_pointer;
+ #endif
if (o...
A pointer to the FIL structure was kept after it went out of scope. Apparently this happened to work until cf97793 added the result variable that clobbered it.
Tested on ItsyBitsy nRF52840 Express.
Fixes #5062.
How did you all copy the build over? UF2? I suspect the bootloader is failing on images >512k in size (1MB+ uf2 file). https://github.com/adafruit/Adafruit_nRF52_Bootloader/issues/213
I have been using the uf2 bootloader. I just loaded a debug 7.0.0-alpha.5
build on a Feather nrf52840
Express using a jlink connection and it booted correctly. The .uf2 size was
1127936 bytes.
On Mon, Aug 2, 2021 at 5:01 PM Scott Shawcroft @.***>
wrote:
How did you all copy the build over? UF2? I suspect the bootloader is
failing on images >512k in size (1MB+ uf2 file).
adafruit/Adafruit_nRF52_Bootloader#213
https://github.com/adafruit/Adafruit_nRF52_Bootloader/issues/213
...
@kattni Have we finished switching libraries over?
Call supervisor.disable_ble_workflow() and the BLE workflow will
be disabled until the chip is reset.
This also includes a couple fixes:
- Terminals can now be deinit by setting the tilegrid to NULL. This
prevents using the tilegrid before display is init. - Fix BLE serial send amount when sending more than a single packet.
Fixes #5049
a patch for folks who don't want to wait, latest builds fix bitbangio and you can read/write the SD card with SPI!
import os import busio import digitalio import board import storage import adafruit_sdcard import bitbangio # Connect to the card and mount the filesystem. spi = bitbangio.SPI(board.CLK, board.CMD, board.DAT0) cs = digitalio.DigitalInOut(board.DAT3) sdcard = adafruit_sdcard.SDCard(spi, cs) vfs = storag...
With https://github.com/adafruit/circuitpython/issues/5086 am I flashing the hex file on the downloads site wrong since it seems Lady Ada can get the CP drive to show up in relation to https://github.com/adafruit/circuitpython/issues/4020
vectorio: add draw protocol
- Removes VectorShape from user python interactions
- Re-integrates vectorio with displayio behind draw protocol implementations
- Implements draw protocol with VectorShape ...
βοΈ draft pr I mentioned earlier. I struggled with the transposed screen presentations over the weekend and just do not have time to get deep on it this week π
Hi, I see mentioned in this thread that BLE has a lower bound of 7.5 ms latency. Does anyone have any idea what the latency of ESB would be using nrf52840s? We are looking into the use of these modules for robotics applications where latency is critical but throughput not that much (and power is relatively irrelevant).
Version: fails with 7.0.0 main at this time and earlier
RP2040 board builds built with DEBUG=1 don't work: they crash. The crash can be seen with gdb:
(gdb) mon reset
Resetting target
(gdb) c
Continuing.
Program received signal SIGTRAP, Trace/breakpoint trap.
isr_hardfault () at sdk/src/rp2_common/pico_standard_link/crt0.S:99
99 decl_isr_bkpt isr_hardfault
(gdb) bt
#0 isr_hardfault () at sdk/src/rp2_common/pico_standard_link/crt0.S:99
#1
#2 0x1001d160 in port_init (...
the free lunch of flash space on esp32s2 is going to come to an end soon. 1329536 bytes used, 112256 bytes free in flash firmware space out of 1441792 bytes (1408.0kB).
@slender iron Could I talk to you about ticks when you are free?
well this'll be fun -- my new code crashes on esp32-s2, but it requires the camera, which uses the debug pins so I can't use the debugger π
@tulip sleet I should also confess to knowing about ticks (or background tasks, more to the point)
i may ask you next π
@tulip sleet Iβm pretty busy this morning. Meetings at 10 and 1 with a vet appointment at 11:30
I can let you know when I have time
sure; there is some commented out code in RP2040 port.c re ticks. Trying to understand that. There are some other things to look at before that as well.
what's the github setting thing when a group is not showing up as an option for a PR review?
what group, what PR?
you're not seeing CircuitPython Librarians when you expect it?
well...it's an arduino repo TBH π
https://github.com/adafruit/Adafruit_ADXL345
can't add adafruit/arduino-librarians
which repo? I can check on the group settings
i have access too, just can't remember the what/where
did this once long ago when setting up CP libs
looking at the settings...
thanks. yah, i'm comparing to another repo where it works and not seeing any obvious diff.
ah...thanks...that's probably it...the one place i didn't look π
it took me a while to find it π
@tulip sleet thanks. that was it.
@tulip sleet I have some time now
Anyone know why the library bundles on circuitpython.org have not updated since 7/31?
Have there just not been any releases since then?
Distinct possibility. But I'm not sure.
The Bundle repo thinks that's the latest
ok -- just wanted to check -- I know there have been a lot of merged updates, I guess they just have not been released
If any of the CircuitPython Librarians has a moment, here's a quick one. I ran Black, Pylint and Sphinx, and cleaned up as required. https://github.com/adafruit/Adafruit_CircuitPython_IS31FL3741/pull/1
Not everyone knows to make a release or how to make a release. Dylan does weekly releases usually, but she's out of town at the moment and is working sporadically so I think it's not happening as consistently. circuitpython.org/contributing/library-infrastructure-issues says the following libraries have commits since last release: ``` Library has new commits since last release over a month ago
https://github.com/adafruit/Adafruit_CircuitPython_MCP230xx (99 days)
Library has new commits since last release within the last month
https://github.com/adafruit/Adafruit_CircuitPython_Simple_Text_Display (11 days)
Library has new commits since last release within the last week
https://github.com/adafruit/Adafruit_CircuitPython_SCD4X (7 days)
https://github.com/adafruit/Adafruit_CircuitPython_MacroPad (5 days)
https://github.com/adafruit/Adafruit_CircuitPython_SGP40 (5 days)
Looks like Dylan did releases a few hours ago.
So there should be an updated bundle tomorrow in theory.
Thanks!
We highly recommend using pre-commit to vet the code before you commit, if you are not already doing that:
https://learn.adafruit.com/building-circuitpython?view=all#install-pre-commit-3096511-10
https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/check-your-code
We highly recommend using
pre-committo vet the code before you commit, if you are not already doing that:
https://learn.adafruit.com/building-circuitpython?view=all#install-pre-commit-3096511-10
https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/check-your-code
Yeah that definitely did not install correctly when following the instructions on a fresh Ubuntu wsl2. Iβll look at why at some point. If you want people to use this tool it ought to install easily (o...
@tannewt For the most part. Everything else is being tracked within its own repo. This can be closed.
This is weird because this is where the memory is being initialized: https://github.com/adafruit/circuitpython/blob/main/ports/raspberrypi/supervisor/port.c#L97
What are you trying to do overall? It would be ok to have it on and advertise until user code advertises something else. If a device connects before the user code, then the user code can create the HIDService and the central will pick it up.
#5089 does the minimal API to turn it all off. I don't really want to add more complicated APIs until we know what we want to be able to do.
Should be pip3 install pre-commit. Then you must install it (once) per repo with pre-commit install when you are inside the repo. If that did not work, hmm. It also could be other checks that are not part of pre-commit.
If/when we add that detail, I'd put it in _bleio because the detailed control doesn't matter when user code can't control ble. The current disable is meant to be a broad shutoff.
Thanks @DavePutz. Let's consider this fixed.
I wonder if now that we can free up USB endpoints in
boot.pyit becomes a little less impossible to have this?
This is not an issue with endpoint count. USB MSC can have multiple drives over the same endpoints by using a logical unit (LUN) index.
Let's keep this discussion to #3477 since it is still open.
It looks like the shape classes could be backwards compatible if you don't reorder the arguments. Want to do that? I'm a bit worried about cross 6/7 compatibility.
I haven't been getting around to solving this... But my guess would be much less than 7.5 ms. A single successful transmission normally takes a little over 500 us (depending on what you have the auto-retry feature's delay value set to).
If auto-ack feature is off (not recommended), then it would be more like 200 us. Note that turning off auto-ack is really only for OTA backward compatibility with Nordic Semi's older ShockBurst protocol (only used by deprecated nRF24*** radios or some horri...
Hey @hierophect thanks for the punch-list of items to port at the link above. I've pulled those into my port and have started working through them. One question about this item...
Create a board family and SoC folder in stm/peripherals/, with clock setup code brought in from CubeMX, and pin/peripheral/ definitions for the SoC. Pin and peripheral files can be created with the python scripts in tools/.
Specifically on getting clock code from CubeMX, can you elaborate on where I can find...
@idle owl I fixed the keypad scanning problem in your test of macropad audio and pushed that. Now I am back to figuring out the scratchiness, but i have gotten more clues
Excellent!
Step by step.
So it wasn't an issue with the MacroPad library?
Dinner is ready! afk.
no, a bug in the audio code was overwriting the list of keypad scanners, causing scanning to stop. The keypad list happened to be just after an array used by audio to record info about a play in progress, and something wrote past the end of that array, and smashed the keypad scanners list
Huh good to know.
it was an accident it broke keypad as opposed to something else
It looks like the shape classes could be backwards compatible if you don't reorder the arguments. Want to do that? I'm a bit worried about cross 6/7 compatibility.
Thatβs a good idea however I 6/7 migration is going to be a change anyway with yanking VectorShape out. Like, youβre still going to have both your Rectangle and your VectorShape lines in python complain: The latter because itβs no longer newable and the former because it requires a pixel shader argument.
Fair enough. At least we figured it out!
CircuitPython version
recent 7.0.0 versions
Code/REPL
# strange how the sound jumps around at around 1800 and on up
# Tested with CircuitPython 7, not with 6
from time import sleep
from adafruit_macropad import MacroPad
macropad = MacroPad()
for freq in range(200,10000, 50):
print(f"freq: {freq}")
macropad.start_tone(freq)
sleep(.45)
macropad.stop_tone()
sleep(.05)
Behavior
he tone jumps randomly at 1850 and up.
###...
@lesamouraipourpre our drivers on the MicroPython side use the Pico I2C directly, configuring the pins with pull-ups IIRC.
I need to revisit, rebase and rewrite this PR since it's clearly still an issue and I don't think it necessarily hurts to include it. Thank you for weighing in.
I now have a "MacroPad" (and a Hackaday keypad) and having that increase the frustration with poor support for non US QWERTY keyboard. I know this is not an issue of the core and the priority might be to get the 7.0.0 out. But getting a better solution for MacroPad user maybe should be put somewhere not too low in the priority list... if possible. π
what are you looking for exactly ? keyboard layouts for adafruit_hid ?
might I interest you in this ?
https://github.com/Neradoc/Circuitpython_Keyboard_Layouts
I'm trying to get it started, though I want to integrate ways to layout.write "éà ç" etc. maybe the way it's done here: https://github.com/AngainorDev/Adafruit_CircuitPython_HID/blob/layouts/adafruit_hid/keyboard_layout_fr.py
and there's a dvorak layout that was proposed too
I think just defining some classes that are collections of constants, like KeycodeFR, KeycodeDvorak, would be a good start.
the rework proposed in that PR would help I think ? https://github.com/adafruit/Adafruit_CircuitPython_HID/pull/61
My idea was that Adafruit should show the way a localisation should be done, with one example. And then people will be able to follow that and adapt for their own language. There was one PR for French keyboard and one PR for German keyboard. French was just a replacement library (if I remember well) that you use in place of adafruit_hid. German, I don't remember how it was done. But if there is one way, that would be the recommended way to do it, that is not inflating the size of the library (because that was an issue), and other people can provide their propose for their keyboard... then you have valuable input that will not be rejected. I started working on Belgian keyboard 12 or 18 month ago, but I would not invest time in a PR that will be rejected because it is not done in a way that make sense.
The same way other PR have been rejected later.
There was a similar issue with Joycon support.
There was a request from the community to support other Wii device, such as joystic, guitare, name it.
We had to do the PR 3 or 4 time before it got accepted and it was decided on the proper way to extend the libary that was Joycon only.
that's why I made the Circuitpython_Keyboard_Layouts repository, to get all the keyboard layouts in one place, also showing a way to make one, they can be downloaded from the Circuitpython_Keyboard_Layouts bundle, and soon installed individually with circup
I participated at that Wii I2C device effort. I gave up at the 2nd rejection...
Ok, if that is the official way, and is recommended/approuved... then that is fine.
well it's not official by any means
the idea is to add third party bundle support to circup, and maintain the library
maybe once it's solid, move it to the circuitpython org if it can be agreed upon
I love it, the PR has a lot of French discussion. π
Let me dive in before having an opinion. π
the point is to make a repo that people can contribute layouts to, and as a bonus make it easy to install only one at a time
And this can go "in the weed" topic (it was already more than a year ago).
My message to Adafruit CP community was: "Ok, you made the translation a key differentiator of CircuitPython. Once weblate was in place the community was able to contribute, new language came, they get updated. So if you are serious about the language issue, you should also worry about keyboard".
Now my message to Adafruit could be: "Ok, so you made Keyboard thing a big part of your new development and product. That MacroPad in the Adabox is the peak of that evolution (even if Adabox is not shipped to Europe anymore), but if you only have EN-US keyboard support, you are excluding a lot of people (hint: customer). The same way you try to be an inclusive company (race/gender), you cannot be or stay US centric on your keyboard side. (I did fight some US centric learn guide that did temperature in FΒ° too)."
I wonder if I am good at lobbying companies. π
by the way, I want to look into automatically creating layouts (than can then be tweaked/fixed by hand fi needed) from OS layout configuration files, since I find it hard to find online references (like tables with keycodes/letter associations) though that could work too
Yeah, that would be great, I had that in mind because that would automatically deal with most keyboard. But that is too technically challenging for me. Something that use xmodmap(?) files or locale(?) files that describe the keyboard mapping.
Camera-free testing with qr.ppm from qr.zip:
import qrio
with open("qr.pgm", "rb") as f: content = f.read()[-76800:]
d = qrio.QRDecoder(320,240, qrio.PixelPolicy.EVERY_BYTE)
for row in d.decode(content):
print(row)
Also works with OV2640: code.py.txt
This pulls in the quirc library, an adafruit fork of https://github.com/dlbeer/quirc...
@jepler Very cool! I tried this on my Kaluga v1.3 with your example. Works well as lomg as the qr code image was big enough!
BTW, I think the example usage of the button is not working properly, it did not seem to wait for the button press, so I removed it rather then troubleshoot.
Adafruit CircuitPython 7.0.0-alpha.5-98-gbd903f2f0 on 2021-08-04; Kaluga 1 with ESP32S2
>>> import qr
a
a
a
b'http://s.espruino.com'
b'http://s.espruino.com'
b'http://s.espruino.com'
b'http://s.espr...
I could be wrong, but I thought the plan was to create separate libraries for each keyboard layout. The issue is that we can't add more to the HID library at this point in time - it is frozen into certain builds, and there is not enough room. So, creating a separate module for each new layout means that folks who want to use them can, but they are not making it impossible for us to continue with some current situations. We can certainly discuss this in the weeds again. If this is the case, then I am happy to create repositories to get things started. MacroPad, for example, has plenty of space to handle many different layouts, so there's no concern there.
This is something I think Adafruit could also host if you would rather. But I would need to discuss it with the other devs before saying that for certain.
Or something like it anyway.
Just a few questions. Nice work on this!
How are width and height used?
Should this be decode instead of recognize?
i was going to have kattni re-test, but it seems better. I'll re-request reviews. We just got off Zoom watching a relative getting married in Italy
This is ready to test for serious problems. Still looking at "crackly" audio.
My guess is that you'd move the auto-generated code into something like: https://github.com/adafruit/circuitpython/blob/main/ports/stm/peripherals/stm32f7/clocks.c
This is a RayTac NRF52840 module in a USB dongle, with one pushbutton and one LED.
The LED is illuminated by pulling it low rather than high. (Same is true of another RayTac board, as noted in comments.)
@jepler I fixed the build so please take a look.
Just a couple of things. This is getting closer and closer. Thanks for taking it on!
I'd just comment this here that it isn't implemented.
Please put everything below in shared-module. It's easier to read shared bindings if it only does argument validation.
Ok. it looks like there is only one library in the Adafruit bundle that needs updating anyway:
libraries/helpers/displayio_layout/adafruit_displayio_layout/widgets/__init__.py
10:import vectorio
31: ``vectorio.rectangle`` functions
44: when `False` uses :py:func:`~vectorio.Rectangle`
58: rect = vectorio.Rectangle(width, height)
59: vectorio.VectorShape(
libraries/helpers/displayio_layout/adafruit_displayio_layout/widgets/cartesian.py
30:import vectorio
4...
@slender iron FYI, I instrumented the buffer filling by toggling pins, and it's yielding useful info
nice!
first buffer is loaded in the top spikes; second in the lower spikes. This is time spent in the "next block" routine
that gap is concerning
possibly, it's actually quite regular. I could easily turn off GC in that time
to check
and maybe I will add another pin to mark the DMA ISR routine
disabling GC before the play does not change the glitch
so it is something else
it seems to be always at the same time. I need to double-check that. It may be a delay in reading the wav file. I am testing only with wav's at the moment, because that's the realistic test case
I did some testing with raw samples earlier just to vet the data
ah, that would make sense
are you setting the pin for the duration of the block load?
would that include the file system read?
Yes, that was the idea and reason for that solution. But devil is in the details and practical implementation help test the idea and detect flaw or problems.
I think someone need to bootstrap the work and show the first vetted alternate keyboard. Because writing the Nth rejected proposal is not fun. The other will follow. Maybe some keyboard/languages will have challenge, like dead key or diacritics (?).
they are rejected because they are made to the adafruit_hid repository, when the idea was that it should be a repository on its own, there's a guide for that, use cookiecutter, publish your library, do a PR to the community bundle
https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library
Exactly what Neradoc said. We need them submitted as separate libraries. What I'm saying is that I believe Adafruit is willing to host them, so they're "official" libraries, and do not need to be hosted by the author. But again, I would want to verify that.
or join me and contribute to my layout repository π
We'll battle for it! (I'm entirely kidding.) Your repository may end up being the better option in the end. π
wii stuff should still be contributed to the community bundle though
what stuff does the wii stuff encompass?
@tulip sleet I broke sending strings with the MacroPad library when I updated it to generate the HID object when called. I am not sure how to fix it. π
did you compare the old and new versions? Could you send me those or point to them?
Yeah hold on I can do that.
there is adafruit_nunchuk, but I don't think there is guitar hero guitars or other compatible stuff ? My information might be out of date
You're better at this than me.
I am just using that to compare
Here is the notes document for Mondayβs CircuitPython Weekly meeting. It is at the normal time of 11am Pacific / 2pm Eastern here on Discord. 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 weβll read them off during the meeting. Hope to see you there! <@&356864093652516868> https://docs.google.com/document/d/1Q1Oonou_pZY-R81DYkik9YjksRHtEUHWdb5Fd9hVB9M/edit?usp=sharing
CircuitPython Weekly for August 9, 2021 Welcome to the CircuitPython Weekly meeting notes! Feel free to add your Hug Reports and Status Updates early. During the meeting, we go through them as a round robin sorted by username. If you canβt make the meeting and would still like to participate, ...
h/t kattni who reminded me π
oh yeah I'm out of date, that's in the bundle https://github.com/jfurcean/CircuitPython_WiiChuck
@idle owl:
self._keyboard_layout = KeyboardLayoutUS(self._keyboard) line 409 should be indented; it's being created fresh every time, though I don't see why that should break it; it should just slow it down
Awesome, I was going to take a look at the wii balance board after the sgp40 stuff is done, that'll help a lot!
I tried indenting it.... π
I'll try it again.
Nope.
No change.
That was the first thing I tried.
in any case it and the comment should be indented. which test pgm is failing?
It's failing when I import the shortcuts.py file because inside it is macropad.keyboard_layout.write("String")
Traceback (most recent call last):
File "code.py", line 13, in <module>
File "shortcuts.py", line 29, in <module>
AttributeError: 'property' object has no attribute 'write'
Code done running.```
Feels like it's not creating the keyboard_layout object...
But I'm reaching here.
@tulip sleet
That's my drive including libraries. MacroPad code obvs.
macropad.keyboard_layout.write() used to work.
from adafruit_macropad import MacroPad
macropad = MacroPad
should be macropad = MacroPad()
omg.
Yes it should be.
I'm not sure how it ever worked.
Thank you.
Also it typed all of that out immediately. So I was doing it wrong anyway.
Should only contain the string.
@tulip sleet Thank you so much.
yw!
Just an FYI.
https://github.com/adafruit/circup/issues/117
This issue in circup was opened, that was essentially a link back to their own project, but to which they added circup. Its a little spammy\self-linking imo, but I don't know if tldr-pages is a real thing or not... If anyone thinks its spammy and has GH Admin you can delete that issue if you like.
Oi, now this Traceback (most recent call last): File "code.py", line 15, in <module> File "/lib/adafruit_macropad.py", line 113, in __init__ File "/lib/neopixel.py", line 130, in __init__ ValueError: NEOPIXEL in use
(β―Β°β‘Β°οΌβ―οΈ΅ β»ββ»
I think I know why.
yah, you are creating a MacroPad() twice?
yep
@idle wharf it looks like tldr is a real thing, though I hadn't heard of it before. I wouldn't sweat it, though if you had any feedback on the proposed text you could probably suggest to change it.
I have no idea how the Braille Keycaps code is working. I should go check it, it might not be anymore or something.
i don't think its shortcuts.py did anything except define the lookup table
kk. I'm just wary of people using the Adafruit "things" to link to themselves... π
Fair enough.
I noticed that https://github.com/readthedocs/sphinx-autoapi/issues/299 was marked as resolved. Let's see if 1.8.3 fixes the problem, as expected.
@tulip sleet You requested changes on that PR, but thumbsupped it. Did you mean to approve?
Do not eat while reviewing.
Looks like the docs build was successful. π
I hate it when someone gets mustard on my pull requests
lol
This is actually more correct. The change comes from the 1.13 merge where I removed the "pretend to flush" https://github.com/adafruit/circuitpython/pull/1555/files#diff-d10683776c4bfa5c707b7af8a20a136c9d59131e9803ba1bc547020e43fe0704R92.
Basically, the old version was lying to you that it actually flushed. So I propose we leave it as-i...
I can't reproduce this. Jeff, do you want to try it again?
>>> import usb_hid
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'usb_hid'
``` can we enable usb_hid on esp32 for now? makefile comments indicate it was an endpoint shortage problem.
@tulip sleet do you know ^ ?
i'll look, i thought it was there, but the default devices weren't
Ah, the board Kaluga board defs were not revised when dynamic USB was added
@onyx hinge If you are working on a PR anyway, you can remove these lines from both kaluga board mpconfigboard.mks:
# We only have enough endpoints available in hardware to
# enable ONE of these at a time.
CIRCUITPY_USB_MIDI = 1
CIRCUITPY_USB_HID = 0
CIRCUITPY_USB_VENDOR = 0
They should have been removed a while ago. I checked for others, and it's just those (it's also turned off for satellite boards, etc.)
@tulip sleet OK, I can do that
if not, we can just make a regular PR. Not a big deal.
looks like the qr code PR is still open so I tacked it on
tomorrow I need to do & react to reviews, it sounds like
I couldn't make edits on PR #4131, so this is a replacement. Many thanks to @cotdp for all of the prior work.
For this PR, I started with the Saola WROOM (for M and MS) and WROVER (for R and RS) files, customized for the Gravitech boards, bringing in some of the code from @cotdp's commits on #4131.
Tested the R build on a Cucumber R, and the RS build on a Cucumber RS.
Limited testing of the M and MS builds on a Saola WROOM board. I think it's low-risk to merge, easy enough to file a...
From experience, japanese keyboards will be a pain.
I'm not even sure if this is an issue cause it seems so strange so I'll post something here first.
I have a FeatherS2 hooked via stemma to a PM25 air sensor hooked via stemma to an oled .91". in alpha 5 if I go to save the file more then once it resets.
If I disconnect any one device it works fine.
Overall, I am trying to use a nRF52 board with CircuitPyton.
And when powering on the board, I want the Bluetooth transmissions of the board to be off / disabled.
Until the python code in code.py is ready to advertise the intended features of the product.
Catching up on Show&Tell and noticed that the "Fidget mode" from kattni can also be useful for cats. π (I have not put a mention to avoid waking up her)
For cats and/or Kats?
@tulip sleet fyi pre-commit is a sudo install on wsl2 (and maybe other distros idk). It installs happily without sudo and does absolutely nothing. (i.e., command not found, nothing obvious in the site package to put on PATH)
Install it with pip instead of apt
pip install pre-commit
They set the width and height of a buffer internal to the quirc library
It means I can place "CIRCUITPY_WIFI = 0" in makefile (all lowercase) to override the setting. Disabling wifi is usually needed to make debug builds fit.
@low sentinel Yes, WSL2 with Ubuntu should be virtually identical to native Ubuntu. I'm not sure what the apt pre-commit package is. I don't see it at all:
halbert@tuna:~$ apt show pre-commit
N: Unable to locate package pre-commit
N: Unable to locate package pre-commit
E: No packages found
What does apt show pre-commit show on your WSL2 instance?
Add support for MX25L12833F 16MB QSPI flash chip.
Add QSPI activity indicator LED.
Add D15-D19 as aliases for the I2S peripheral pins.
VINA-D51 originally used a 64MB flash chip, but the SAMD51 only supports 16MB in the QSPI pseudo-memory mapping area. And 16MB is really quite a lot, so let's just go with the Macronix MX25L12833F 16 MB chip and simplify. The MX25L12872F chip is actually used on the board, but it is interchangeable with the '33F and they even have the same JEDEC ids as re...
Thanks @tannewt I created a clone of the peripherals for the f4r5 but was struggling to connect the dots based on the code generated by CubeMX. I'll take another look though, I'm sure I'm close to finding the right spot.
Doing this as a draft whilst we wait for final USB-PID's, and to see if all checks pass
@low sentinel https://packages.ubuntu.com/groovy/pre-commit Did you enable "universe"? OTOH I tend to install pre-commit with pip, I didn't even know it was packaged. (it is in debian testing "bullseye", as well)
For the reddit post, are there any cool projects you'd like to share as an example of what can be done with circuit python?
I installed it with pip3 (which aliases pip on my box)
Did I write apt? I didnβt install it via apt, I used pip3 install pre-commit. Sorry for confusion!
and then in the repo you must do pre-commit install for each repo for which you want pre-commit to work.
otherwise nothing will happen
Yeah what Iβm trying to say is:
pip install pre-commit does not install pre-commit in an executable location.
what is in your $PATH?
something like /home/halbert/.local/bin: should be in your path
what does which -a pre-commit say?
$ pip install pre-commit
$ echo $?
0
$ pre-commit
Command not found
$ sudo pip install pre-commit
$ echo $?
0
$ pre-commit
<usage information>
Iβm away from that machine at work, canβt inspect path but iirc it put pre-commit in /use/bin when invoked via sudo.
And /usr/bin is on my path
Sry phone that should say /usr/bin
basically never use sudo pip to install something, because it can mess up the system-installed commands that the system needs for its own purposes.
Yep
there is an automatic way that ~/.local/bin gets added to your path. Let me find it.
this is in your .profile, which is only executed by a login shell:
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi
Oh? I didnβt see that but if thatβs what is supposed to be on path I can easily put that in zshrc
Mm yes
Thanks for your help. I agree thisβll be it
the gotcha is that if you install something with pip for the very first time, it creates ~/.local/bin, but it doesn't get added to your PATH, because that stuff above didn't see ~/.loca/bin when it was run at the beginning. So you have to log out and log back in, and then it's on your path. So it might be that if you exit the WSL2 shell and then go back in, it will just work.
this is very confusing, and has happened to me on fresh installs
Nah this actually persisted across a shut down and a startup.
This is very good to know. I basically never use pip installed tools by name like this
Unfamiliar with pip distribution of executables
it could be that zsh doesn't run .profile?? or maybe you edited .profile. The distinction between login shells and regular shells is not obvious, and i don't know what happens when you create a WSL2 session
i find this all kind of a mess
I didnβt edit profile
pylint and black are also best installed via pip, if you want recent versions. I always look in pip first if I know the thing is python-based
i think you will figure it out when you get home π
Agree
FYI if Actions is stalled (or really slow) for anyone else, "Investigating - We are investigating reports of degraded performance for GitHub Actions.
Aug 5, 14:09 UTC"
Agreed regarding cats! I have one here that I have to close my laptop on my desk or he'll walk on it to get to the window. And, I appreciate your consideration! But, no worries - I don't get notifications over night π
Hmm. There's so many, that's a tough one. Do you mean for getting started with it? Or more complicated than that?
I'm thinking flash LEDs, moving things, that kind of stuff. The stuff that draws the eyes. This'll be for programmers so they're comfortable with the python side of it, but seeing just how much can be done beyond a computer I think will go a long way.
OK I will think on it for a bit and come up with a shortlist.
@onyx hinge I need your brain for a moment. I have to rename a bunch of files that show up in a find search, and I bet you know how to do that not-manually.
okay
you will want to tell git that you are renaming the files, which is the git mv command. You need to run it once for each thing that you find. Do you know, are there spaces in some of the filenames?
or other characters that give shells the willies
All of the file names are main.py. The directories all appear to be letters with _
it looks like in the learn system the filenames are all file for the simple technique, yay
Run it once for each thing? So it's still kinda manual?
There are lots of ways to to this, but here's one way I would do it
git ls-files "**/main.py" | while read fn ; do echo mv $fn ${fn%main.py}.code.py; done (or use your find instead of git ls-files, it's about the same)
this will print a sequence of 'mv' commands. you can either execute them by using copy & paste, or by modifying the line and removing "echo"
I can explain any of it you like, but it may not be worth the trouble; your goal is probably not to become an expert in bash shell
I think I understand what it's doing?
Probably? It's just stuff like, nobody knows until they learn it that "%" is removing a matching suffix from a variable, for instance...
oh except it's wrong
Oops.
So need to run it again against .code.py ?
wait
I can stash and drop
and then rerun it.
sure, that's a great alternative
do you see which "." to remove?
git ls-files "**/main.py" | while read fn ; do echo mv $fn ${fn%main.py}code.py; done
after stash+drop?
oh oops, two mistakes
stash didn't make them untracked.
git ls-files "**/main.py" | while read fn ; do echo git mv $fn ${fn%main.py}code.py; done
remember I said we needed to tell git that we were renaming? I left the git off of git mv
Would this work? git ls-files "**/.code.py" | while read fn ; do echo git mv $fn ${fn%.code.py}code.py; done
no, for a number of reasons
ok
git ls-files doesn't list untracked files
git ls-files -o might
but git mv won't want to move them, because they are untracked
the original main.py files are what stash and drop put back, the untracked .code.py files we just want to delete, which git clean can help with
ah they are back indeed.
OK it's not as bad as I thought then.
How can I use git clean then?
try git clean -n "**/.code.py"
it should say it would remove all those files, change the -n to -f to do it
aren't you glad we automated this and saved time?
ok branch is back to normal.
llol
So back to this? git ls-files "**/main.py" | while read fn ; do echo git mv $fn ${fn%main.py}code.py; done
minus the echo to do it.
The commands look correct at least.
Hey! renamed: the whole lot!
That became the easy part. The hard part is going to be updating all the guides. π
I just do not see what kind of services the board shall advertise while no code is running.
@idle owl OK, onward
Thanks so much!
@tulip sleet How would I go about making wav playback in the MacroPad library be non-blocking? I thought it was blocking by nature, but PhilB indicated it is not, in fact.
don't do "while playing"; that's what's causing it to be blocking. But right now it gets messed up if you try to play something when something else is already playing
Ok, so for now it should stay as is?
for now, yeah, it will just raise more issues until it's fixed
Ok. Thank you.
@slender iron btw I do not see the huge memory consumption when debugging LTO on say, SAMD51. I am using the gdb from the arm download
what versions of gcc and gdb are you using?
$ arm-none-eabi-gdb-py --version
GNU gdb (GNU Arm Embedded Toolchain 10-2020-q4-major) 10.1.90.20201028-git
$ arm-none-eabi-gcc --version
arm-none-eabi-gcc (GNU Arm Embedded Toolchain 10-2020-q4-major) 10.2.1 20201103 (release)
I have gdb 10.2 and gcc 10.3
yeah, you are using the arch ones, I guess, you might try the ARM download
i have seen gdb regress and then get fixed several times (e.g. tab completion has been horribly slow and then got fixed)
the thing about the ARM release is that we know it's vetted
https://sourceware.org/bugzilla/show_bug.cgi?id=27754#c15 So, IIUC, this is a GNU ld bug, fixed in git.
ah, they just updated the ARM download, as of July 29:https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads
nice!
i can try that, but not right now π
I've been using 10.3 so it should be ok to switch to
the previous toolchain is using ld 2.35.1.20201028; the latest there is ld 2.36.1.20210621
ld is fixed in 2.37 according to https://sourceware.org/bugzilla/show_bug.cgi?id=27590
I remember that problem, it was aaggggrrrrriiivvvaaaatiiiinnnggggg
@onyx hinge can you review my PR today please?
@slender iron shoot, yeah
what's -z,max-page-size=0x1000 ?
that changes the section alignment in the elf file
does it have to do with the bootloader problem?
it defaults higher and as a result pyocd was clearing more flash than it should have
and the tilegrid stuff?
I was worried it was writing to uninitialized memory
aha, so maybe not necessary but also not harmful?
since write is called from serial_write
nods
Thanks, and thanks for some quick answers in discord about the change. No problems spotted, but no testing performed.
*may speed things up I think
oh what I wouldn't do for an accurate sense of how fast/slow my C code was π
was there a second thing you mentioned in the CE meeting you were waiting on me for?
"dear sir, I'd like my python code to run as fast as C. k thx bye"
I don't think so
@tulip sleet looks like the ld update worked
great! that is a lot less work than changing your debug workflow
100%
Overall, I am trying to use a nRF52 board with CircuitPyton.
And when powering on the board, I want the Bluetooth radio / transmissions of the board to be off / disabled.
Until the python code in code.py is ready to advertise the intended features of the project / product.
supervisor.disable_ble_workflow() will allow for this. It turns off background advertising and creation of the file transfer service and the nordic uart service for circuitpython serial connectivity. You can st...
@idle owl should I blacken the macropad learning guide scripts?
there is no pre-commit action for the Learning Guide repo
Feel free to join our Discord. We are usually in #circuitpython-dev during the US workday. https://adafru.it/discord
Seems fine, only affects the named board. The CI failures seem to be unrelated; there are no logs to review. GitHub Actions did have some downtime in the past 12h.
Ok, great!
I will try this out first thing tomorrow morning.
I think, I just did not understand what "disable_ble_workflow" would actually do.
I thought, that it will stop all Bluetooth activities until reset.
You can, but it's not necessary. Sometimes it makes it less readable. We haven't enabled it yet.
I will not bother, then, since it will churn the code something fierece.
awwww that's the best use of the camera so far
The AMA is now Live, folks can ask questions ahead of time this way
I think that post should have all the needed info, I'm going to keep track of it throughout the day to make sure things are running smoothly (and asking some questions as I think of them)
Are you around? I have some ideas for guides to post.
Just got a loaf of bread in the fridge, I'm free now
This is an excellent getting started guide that has everything you can do with the Circuit Playground library and CPX and CPB. https://learn.adafruit.com/circuitpython-made-easy-on-circuit-playground-express
This is the CircuitPython LED Animations guide. LED Animations are tons of fun. https://learn.adafruit.com/circuitpython-led-animations
Mind if I just directly use your description for the links?
I can do better for the LED Animations π
The EVSYS is used to generate an interrupt from the event. This
simplifies timing used in pulseio that conflicted with the
auto-reload countdown.
Fixes #3890
Use this: This guide covers much of what you can do with LED Animations in CircuitPython, and makes displaying animations super simple.
Awesome! I'll have to look and see if I can embed an image easily in this as well
Excellent. Let me find a good MacroPad example as well.
That is a really nice quality photo. I haven't played with any of the camera sensors yet but am pleasantly surprised by how that came out. Also quite the majestic kitty.
@ember iris This one is new, and seems like it could be a fun one. Description: "This takes the MacroPad and turns it into a fun Dragon Drop game." https://learn.adafruit.com/dragon-drop-a-circuitpython-game-for-macropad
Anything else you can think of that might be worth including? I could grab a Bluetooth guide. I'll do that. I have one in mind.
I think that covers some of the flashy ideas you were looking for π
Awesome! I think that should offer a variety of projects for users to get a sense of 'why embedded python'
Agreed.
And these capture the flashy side of it super well
So this is definitely a super noob question, but is there a way to track the AMA thread other than refreshing the website? π
Do you like the bluefruit? I've been eyeing it lately and after I'm done updating the VOC algorithm on the SGP40 I was thinking of picking one up
I don't think so?
Maybe not as noob as I thought then.
Usually AMAs are done by setting them up ahead of time, and by the time you stop by there are questions ready, it's not a feed like structure like discord
Ah fair enough.
Yeah reddit has been doing a ton to change their platform and I just can't keep up with everything.
I won't worry about it until tomorrow sometime then. π
Yeah I'll be checking frequently to make sure if there are bad comments, I can remove them before anyone see's them. At least making sure as best I can. Some can slip through but I don't want to let them last long
I should really set up tonight for the stream tomorrow. And not wait until tomorrow morning to find out what isn't working. π
I understand moderating. Thanks for doing that!
Yeah if I didn't have the sgp40 setup by now I wouldn't be able to work on the code for it. My desk is a mess and doing anything more than that code, like streaming, would be crazy right now. I'm looking forward to tomorrows streams!
No problem! I don't know how long I'll be a moderator for, so I'm taking this time as a chance to talk with cool people and use reddit to do interesting things. It's been pretty fun and the python community is not a community that makes moderation stressful thankfully
That's excellent. It's generally pretty reasonable here as well. I joined r/python π I don't do much with Reddit, but figured that would be fine.
This is a fantastic community, I've really enjoyed time on this server and seeing the encouragement and support from everyone. I hope the subreddit says fun and interesting, but the best I can hope for is try my best with judgement calls and field joe and the other mods for perspective when I'm on the fence. Past that I just get to see a ton of cool projects, news, and updates. It's not a bad deal at all
Thanks! I was pleasantly surprised as well. I have the camera on a flexible cable that makes it much easier to point. Adding some light helped the image quality. That cat is well aware of being majestic !
@ember iris I did answer the first q, should i have waited, maybe? Just wanted to show some activity.
Nah I think that's fine! As far as I'm concerned there's no proper way to do it, whatever you're comfortable with.
π thanks!
I just don't want you feeling obligated to stay online constantly. I'd like it to be a minimal time investment unless you're comfortable doing more
i just checked it, was all, and it was a good q. I will drop in the same manner I would in discord. And I might point people to discord or the forums if they need extensive followup
That sounds good to me
Let me double check with Joe before you link to the discord, I want to check on something
yes, I hesitated on that, since there's a subreddit
You're welcome to direct them here, I just don't know if posting a link on reddit, which can easily be scraped, would invite raid spam. I don't want to say go for it and then leave you to deal with spam that I could have prevented
then I would just point to something that points to discord; i understand
So I'm checking with Joe to see if the python discord gets raid spam
I tested this PR using pulsein for a DHT11 on a Metro M0 Express. It consistently failed with too few pulses (between 69 and 73). The protocol is expecting 81 pulses. I will see if I can determine the cause.
That was exactly my thought, "you can find a link to the discord on the circuit python main page"--something like this. Less likely to bring you unwanted spam that way
Joe hasn't seen much of an issue for raids coming from the subreddit. But I'd imagine pointing to something that points to the discord might still be a better idea. I just wouldn't worry too much if you do directly link here
And hereβs my first contribution to CircuitPython: https://github.com/adafruit/Adafruit_CircuitPython_MIDI/pull/38
CircuitPython version
Adafruit CircuitPython 7.0.0-alpha.5 on 2021-07-21; Adafruit Macropad RP2040 with rp2040
Code/REPL
//This is the code from John Park's Ableton learning guide
# SPDX-FileCopyrightText: 2021 John Park for Adafruit Industries
# SPDX-License-Identifier: MIT
# Ableton Live Macropad Launcher
# In Ableton, choose "Launchpad Mini Mk3" as controller with MacroPad 2040 as in and out
# Use empty fifth scene to allow "unlaunching" of tracks...
I'm suspecting this could be Windows 10 related, I'll try testing it too.
Also tested with the simpler code from this project instead
https://learn.adafruit.com/adafruit-macropad-rp2040/macropad-midi
Same issues
I am not able to reproduce the error when testing on Windows 10
This feature does exactly what I was asking for in #5049
Thank you!
I can now call supervisor.disable_ble_workflow() in boot.py and no "strange" devices are appearing anymore after powering on the board.
As soon as the code in for my Bluetooth HID device is ready in code.py the correct advertising starts.
Remains the question: Is one of the initial devices providing the ability for "over-the-air" updates and if so, can the original workflow be reenabled by CiruitPytho...
I checked this again on my ItysBitsy nRF52840 after installing:
Adafruit CircuitPython 7.0.0-alpha.5-105-gf0e489f51 on 2021-08-05; Adafruit ItsyBitsy nRF52840 Express with nRF52840
and I can not reproduce the problem anymore.
But note: I am calling now supervisor.disable_ble_workflow() in ```boot.py``
Change the "Unknown" manufacturer to the actual maker of the board.
https://github.com/WeActTC/MiniSTM32F4x1
This should just be a cosmetic change.
Have asked WeAct about PIDs for the STM32F401 blackpills, holding off on my PR to add the board definitions until I hear back from them.
@deshipu or anyone interested in sample code: Now that the prerequisites (supervisor.set_next_code_file() and supervisor.get_previous_traceback()) have landed, here is my work in progress on a menu for the PewPew M4 that makes use of them: cwalther/game-m4-menu:supervisor (diff). I am not currently working on this, so if anyone wants to take it an...
I chatted with @ATMakersBill last night about the details of this, and gave him some more recent builds to try, which did not help. It does sound like #4190. I have seen #4190-like symptoms on Ubuntu Linux 20.04 without using MIDI at all, with a quiescent connection, while doing some audio testing.
It is merely the connection that is broken. I can reconnect CDC and resume where I left off.
@jedgarpark Try https://www.onlinemusictools.com/webmiditest/ as Bill did and leave it quiescent ...
Hi all,
I am using {Adafruit Metro M0 Express + Serial communication + Adafruit Shileld Motor Shield V2 + Stepper motor}, and I'm programming it with Circuit Python.
I want to receive command transmitted from the computer to which the Metro is connected via USB. Then I can execute the right command and activate motors.
CircuitPython Code:
import time
import board
from adafruit_motor import stepper
from adafruit_motorkit import MotorKit
import supervisor
kit = MotorKi...
Try reversing the \r and \n. The input() function might be looking for the windows terminator convention "\r\n"
So... perhaps this will help - I think this might be an interaction problem between the CP code (or maybe TinyUSB) and the Dell hardware/firmware/drivers. I noticed on #4190 that the user was on a Dell XPS. I am testing on my Dell Inspiron 7506 2n1 and getting the issue consistently. On the same machine, I tested a Behringer Control Surface (hardware MIDI device) and it ran continually all night without problem. I also moved the Macropad to my wife's MSI laptop and IT ran all night cont...
Nope @dastels it does not solve the issue.
Might the issue is located here : command = value.decode('utf-8')
I do even know how to debug it.
Try printing the data that you are receiving, and make sure that the COM port is correct.
We don't do this kind of support via GitHub, as it is not a bug or enhancement request, but a support issue. Too many people get email each time a comment is made here. We can move this to discord: https://adafru.it/discord or to the forums: https://forums.adafruit.com/viewforum.php?f=60. Let us know which you choose. I am closing this issue for now.
Yeah. I dug through the related code and it is looking for "\n" as the line terminator.
I've had success using sys.stdin.read(1) to get one character at a time from the serial/usb connection.
I see you have already posted in the forums: https://forums.adafruit.com/viewtopic.php?f=60&t=182014. Let's continue the discussion there.
@dhalbert I left it quiescent for 10 minutes on a Windows 10 PC (not a Dell, my son's DIY gaming rig) without problems. I also left it overnight on my MacBook Pro without any problems.
@tannewt ready for your re-review!
It looks like the issue is that the line:
RTC->MODE0.COMP[0].reg = target;
in port_interrupt_after_ticks() is taking about 100us to complete. Since the pulses coming in from a DHT11 can be as short as
24us there can be more than one pulse counted as a single pulse. port_interrupt_after_ticks() looks to be getting called about every 525us, so in a ~4ms sequence of incoming pulses there will be several combined values, causing the inaccurate number of pulses. This looks like the same i...
BLE provides functionality via services. A device can advertise different services at different times and provide different services at different times. Advertising only influences when something chooses to connect to another device. It doesn't limit what services are available once a connection is established.
If you want the BLE workflow stuff, then leave it enabled. The advertisements the core does shouldn't prevent HID from working because the HID advertisement will replace the first one.
Why does the duration of setting interrupt after tick matter? It should be interruptable by the pulsein code.
what's the etiquette with the reddit AMA ? somebody asks for "any known fun-facts about where CircuitPython and MicroPython is used?" and I wanted to link to the PyCubed satellite thing
Go for it! You can definitely participate as well!
anyone can answer π
I can also tag you as a part of it if you like as a Circuit Python Community Member in the post itself
Looks good! Thank you for the extra docs and reorg.
For transferring text files to and from the SD card, you can use Thonny (and maybe other editors, eg Mu, but I haven't tried)
Once code.py has run and mounted the SD card, the /sd/ directory shows up when you try to read or write a file to the CircuitPython device. I don't understand how it actually works but it does.
I don't think this can be used for transferring binary files but someone might be able to figure out something.
@stiff pelican Did you notice Scott's comment about using board.ID to store our usable name to link to the download page? I was curious if you understood his comment about the potential conflict with an "ID" pin. that didn't make sense to me.
https://github.com/adafruit/circup/issues/113#issuecomment-892838973
Oh.. if a board has a pin mapped to "ID" ...
We can look for that I bet
I don't understand what you want to do with the board module anyway
I'd like there to be someway for circup to direct a user to the board specific download page when there is a new version of CP available.
yeah, but that has nothing to do with board modules or os.uname
I assume he is allowing for the possibility of board having an ID pin or object but I don't know of one offhand.
we can't make circup connect to the board's serial REPL, interrupt the code, run print(board.ID) or anything
We're trying to find a place to that value... board.ID was suggested... as was os.uname() as was boot_out.txt
that's way too complicated (just finding the right serial port, if it even exists) and intrusive
If its defined in board.ID can the boot_out.txt generator (?) read it and write it ...
So its available both ways ?
it can in any case, it's a matter of having a define
There was also a comment from Scott
I like the idea of making the board id available from CircuitPython. I did that somewhere once.... I'd like to see it available to Python code as well, not just boot_out.txt.
yeah sorry, I guess I just found it weird to have that conversation about board in a circup issue
I was assuming it would get added to board and then to boot_out.txt ...
Does that sound like a workable solution ?
for me the process would be to add the board ID somewhere as a define in the core, whether automatically generated or manually, then add it to the boot_out.txt which is as simple as adding the define name to this line: https://github.com/adafruit/circuitpython/blob/be2342f32f80a0a2ba6839333847b1fdb495b439/py/makeversionhdr.py#L110
adding it to board or uname is a completely independent process in my eye
That makes sense ..
I was just going looking for that boot_out stuff, thanks!
Not being able to search on GH is a pain .
ah the file says "This file was generated by py/makeversionhdr.py" I should have a look at that, it must be filling in the %s for the target before building
yeah I use silversearcher locally
what am I saying, I AM looking at makeversionhdr.py, I meant I should look how to add the board id to it π
Another angle is to enforce that MICROPY_HW_BOARD_NAME is the download URL path ...
https://circuitpython.org/board/unexpectedmaker_feathers2_prerelease/
cat /Volumes/CIRCUITPY/boot_out.txt
Adafruit CircuitPython 7.0.0-alpha.3-433-g5a4a80336 on 2021-06-25; FeatherS2 PreRelease with ESP32S2
it's supposed to be human readable like #define MICROPY_HW_BOARD_NAME "Adafruit ItsyBitsy RP2040"'
It could human readable and the URL is just replace spaces with underscores
Need more GUIDs ..
how do you like my new boot_out.txt ?
Adafruit CircuitPython 7.0.0-alpha.5-117-gbe2342f32-dirty on 2021-08-07; Adafruit QT Py M0 Haxpress with samd21e18
BOARD ID: qtpy_m0_haxpress
boot.py output:
Oooooo so lovely !
So the URL path is the port path ..
circuitpython/ports/atmel-samd/boards/qtpy_m0_haxpress/
circuitpython/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/
I didn't realize that ...
Test sample of 2 ... might not be true
That does not appear to be guaranteed ... unless board id in the directions equates to the folder name in the path ...
https://github.com/adafruit/circuitpython-org#readme
To add a new board to the site:
Duplicate template.md to _board/<board id>.md.
Edit _board/<board id>.md according to the template's instructions.
It must mean the folder name ... there is not other value in the files in
circuitpython/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/
which has that value they're using in the url path
as far as I know the only exceptions are alias boards as I mentioned in the issue
Got it !
As discussed in the Circup repo https://github.com/adafruit/circup/issues/113
Having a way for circup to determine a link to the CP.org page would allow circup to direct users where exactly to go when there is a newer version of CP detected for their board.
As per Neradoc "the process would be to add the board ID somewhere as a define in the core, whether automatically generated or manually, then add it to the boot_out.txt which is as simple as adding the define name to this line:"
...
Can u use hx711 with circuitpython?
I don't have experience with that device specifically so I can't be certian. But I don't believe there is a helper library written for that chip currently. It may be possible to use lower level communication techniques to make it work but it would be more complex / advanced than many of the examples / hardware that does have helper libraries.
looks like adafruit_proxlight_trinkey_m0 build is overflowing by just 8 bytes
By storing "count of words by length", the long wends table can be replaced with a short wlencount table. This saves flash storage space.
Extend the range of string lengths that can be in the dictionary. Originally it was to 2 to 9; at one point it was changed to 3 to 9.
Putting the lower bound back at 2 has a positive impact on the French translation (a bunch of them, such as "ch", "\r\n", "%q", are used). Increasing the maximum length gets 'mpossible', ' doit Γͺtre ', and 'CircuitPy...
I wasn't going to work today, was I
I'd have suspected german would fail before french.
Nonsense, donβt you know the French surrendering is a classic joke π
technical words in german are usually a mouthful
I know I was trying to be funny
Thank you! Looks fine, so I enabled the CI to run and we'll see what the result is.
Thanks! These irregularities in the bdf file apparently don't bother the tools we use to build CircuitPython, but it would still be nice if this was a valid bdf file. As you noted, the remaining problem is of a mismatch between the count of STARTCHAR blocks and the number on the CHARS line. Probably increasing CHARS to match what is actually present is the thing to do. Do you mind adding that change to this PR?
While pcf files are often smaller than bdf files, it is apparently not alwa...
Looks like CI found some problems. One problem:
Boards for job "build-xtensa" not sorted. Must be:
- "adafruit_feather_esp32s2_nopsram"
- "adafruit_feather_esp32s2_tftback_nopsram"
- "adafruit_funhouse"
- "adafruit_magtag_2.9_grayscale"
- "adafruit_metro_esp32s2"
- "artisense_rd00"
- "atmegazero_esp32s2"
- "electroniccats_bastwifi"
- "espressif_kaluga_1"
- "espressif_kaluga_1.3"
- "espres...
Does Metro 328 work with circuitpython?
No. Here are the boards that do work with CircuitPython: https://circuitpython.org/downloads
Thanks
@solid blade hey, have you hacked a wii balance board over the uart? I see you worked on wiiuse
I implemented the following instead of doing it in MP_SATE_VM
// main.c
#if CIRCUITPY_ATEXIT
atexit_gc_collect();
#endif
// shared-module/atexit/__init__.c
void atexit_gc_collect(void) {
gc_collect_ptr(callback);
}
We now have CPython compatible traceback module implemented. Adding format_exception() is the next step.

i don't know what to tell you about pre-commit. It seems pretty weak at checking for mundane issues before commit.
i don't know what to tell you about pre-commit. It seems pretty weak at checking for mundane issues before commit.
@WarriorOfWire looks like your local pre-commit is failing at finding and fixing formatting issues.
- The most likely reason is that your
uncrustifyversion is wrong,uncrustify>=0.71is needed. - By default
Ubuntu 20.04installs0.69,0.71can be obtained fromppa:pybricks/ppa. Following is howCIinstalls it.
sudo apt-add-repository -y -u ppa:pyb...
I am working on a project where 12 processor pins are used on an nRF52840 and I am running into the problem that these pins can not be used as pins for ending light sleep.
It would be helpful if already initialized / in use pins could be added to alarm.light_sleep_until_alarms().
I fear, deinitializing all 12 pins (which I use to detect user input) before "going to sleep" and reinitializing them after "wake up" takes too long and will result in losing user input events.
Or, can I i...
are there specific versions of the pip requirements from requirements-dev.txt to build the core? I'm noticing that today I'm getting this error when I try to build:
ModuleNotFoundError: No module named 'click._bashcomplete'
make: *** [../../supervisor/supervisor.mk:68: build-pyportal/genhdr/devices.h] Error 1
I just made a build a week or so ago and it went successful. I don't think I've changed anything in between but not 100%
yeah, it requires typer, which requires click 7.1.2, click 8 breaks compatibility with the completion, and circup switched to click 8
so if you updated circup to test the auto PR, and don't build Circuitpython in a virtual env, you need to do that and install click 7
Ah, I see. Thank you
that's my guess
I wonder if there are plans to change the core build to work with click 8 or if we should make that line click==7.1.2 int he requirements file
and yep, you are right. Downgraded to 7.1.2 and have successful build now.
yeah it's a long standing issue, typer does require click==7.1.2 but the requirement is not passed along when installing apparently, so some people get a lower version, so that was added to the build guide: pip3 install --upgrade click==7.1.2
on a side note, I would love a way to install a tool like circup in a virtual env, while still available from the path in any shell
You should be able to create an alias using the full path to circup. Then you can run it without activating the virtual env.
>>> import traceback
>>> try:
... 1/0
... except Exception as e:
... ee = e
>>> traceback.print_exception(type(ee), ee, None)
ZeroDivisionError: division by zero
>>> traceback.format_exception(type(ee), ee, None)
'ZeroDivisionError: division by zero\n'
(I wasn't sure how to get a traceback object for printing, as sys.exc_info didn't seem to be available, so I didn't test this. Is there an alternative way?)
This also improves mp_printf so that it can p...
@onyx hinge the traceback PR added Exception.__traceback__
I overlooked that
As far as I know https://pypi.org/project/pipx/ does just that (I havenβt used it).
ah nice thanks π
@tulip sleet @idle owl @onyx hinge thanks for the CP chat on friday... just finished watching, and it's great to put faces to the names.
I would like to volunteer to take a look at adding this :-)
does anyone know of a spot in the core, or any other example code that would show to create a list and append things to it? Specifically I'm looking to append another list that contains ints representing x,y pixel locations.
Fumbling through it a bit I found mp_obj_list_t and I think this might be what I need but I'm not sure how to properly append things to it, and then append it to another list.
CircuitPython version
Adafruit CircuitPython 7.0.0-alpha.5-140-g9a6b11806 on 2021-08-08; Adafruit Grand Central M4 Express with samd51p20
Code/REPL
import board
from digitalio import DigitalInOut, Direction
led = DigitalInOut(board.LED)
Behavior
The following error is displayed:
AttributeError: 'module' object has no attribute 'LED'
Description
No response
Additional information
No response
The Learn Guide (https://learn.adafruit.com/adafruit-grand-central/pinouts) points out that the silk for the user LED for D13 is L, but there is not a board.L either that I can see (https://github.com/adafruit/circuitpython/blob/main/ports/atmel-samd/boards/grandcentral_m4_express/pins.c).
Thanks for the information @anecdata and file reference. Since it looks like it should be a one-liner I will take the liberty of creating a MR myself.
It looks to me like the Metro M0 and Metro M4 devices are in the same boat as this without LED or L
I'm going to take a shot at adding it to those devices.
You can mp_obj_t list = mp_obj_new_list(0, NULL); and add stuff to it. This method adds tuples from a backing array.
Thank you!
np. Btw do consider just doing 0, NULL to start with. You'll segfault if you pass in the wrong length and then try to use it in python π¬
Hi, I've built circuit python for a custom board and have it working. I'm curious about Arduino though; are Arduino files created at the same time when you build CircuitPython? I think I remember reading somewhere that if you add a board to the CircuitPython repo, it'll have both CircuitPython and Arduino configs created for it.
I only discovered the Adafruit Monster Mask today - gets mentioned briefly in A CircuitPython Board Tour with Ladyada #CircuitPythonDay2021 (YouTube).
I have just seen your reply @FoamyGuy! Thank you both for such quick replies :-)
I have already created a MR for the GCM4: https://github.com/adafruit/circuitpython/pull/5112 if anybody has time to take a look.
@crimson ferry do you happen to know if LED or L is preferred as a name for that pin? Or maybe both of them should be available?
I think both... I believe we always want to match the silk for ease of use, and board.LED has recently become a standardized expectation iirc
actually, I'm not sure how I missed it in both, but the Metro M0 and M4 do already have them.
Anyhow, thanks for adding that to the Grand Central build.
Tested on a GCM4 by running the following code from the REPL.
import board
from digitalio import DigitalInOut, Direction
led = DigitalInOut(board.LED)
led.direction = Direction.OUTPUT
led.value = True
PyPortal is a good example, it had L originally, but LED was added more recently https://github.com/adafruit/circuitpython/blob/main/ports/atmel-samd/boards/pyportal/pins.c
so now there are three ways to address the LED
Nice, I missed it on my first look, but Metro M0 and M4 do have LED already, I'll add one for L
I tested the M0 build with:
import board
import time
from digitalio import DigitalInOut, Direction
led = DigitalInOut(board.L)
led.direction = Direction.OUTPUT
led.value = True
while True:
time.sleep(0.1)
led.value = not led.value
pass
I have not tested the M4 build.
Hi everyone... been absent for a while focusing on hardware production. So the neopixel library and it's use of the NEOPIXEL_POWER pin - and IO locking....
How is a user supposed to have control of the power of the neopixel, or if a user already has control of it, how is the lib supposed to work, when the IO is "in use" ?
All of my boards have the explicit ability for user control on the "thing" that enables or disables power for the RGB LED - but this IO locking thing prevents this from working, or if the IO is assigned by the user already, it prevents the lib from working.
I'm failing to understand how this is all supposed to work now that power control has been added to the neopixel library - I know it was done a little while ago, but it's causing code breaking changes for me π¦
is there a way to check if an IO is "in use" ? an attribute?
This is all with 7 alpha 5
Traceback (most recent call last):
File "code.py", line 8, in <module>
File "neopixel.py", line 123, in __init__
ValueError: NEOPIXEL_POWER in use```
or is it reasonable to add a try/exception NEOPIXEL_POWER in use in the neopixel library to allow it to bypass the power pin control if the IO is already in use?
LGTM, didn't test (I don't have an M4 version either)
Thanks for doing this, but we are trying to standardize on board.LED, not board.L. I added a bunch of board.LED`'s in #5066. (I missed Grand Central M4 somehow.)
@crimson ferry @lone axle As I mentioned, we don't really want to have both board.L and board.LED. board.LED is canonical. I won't remove the board.L's right now, but I don't want to add more either (despite the silk). (We don't have board.MO and board.MI either.)
Thanks for doing this. I missed it in my big sweep in #5066.
Please move this up to where D13 is defined, and put blank lines around D13 and LED, to indicate that it's a pair of aliases. Thanks.
@lone axle sorry I steered you wrong, I thought the silk was a stronger signal
np, this isn't really written down
no worries here. I'm happy to get the practice modifying things and building the core.
yo @analog bridge thanks for the tip on uncrustify, that was the issue.
I've worked out that I can get the length of a list in core code by having it set into a variable by mp_obj_list_get() is there a way to get the length without specifically getting an item out of the list? or is that the best way? Also is there any sort of resource to learn things like this about working in core code at this point or is looking around at existing core code the best thing to do to pick up things?
mp_obj_list_get doesn't get items out of the list. It just gives you a pointer to the raw vector of items and the length of that vector. That's the right way to get the length; it costs 1 extraneous pointer write though. You could add a function:
size_t mp_obj_list_get_length(mp_obj_t self_in) {
mp_obj_list_t *self = mp_obj_cast_to_native_base(self_in, &mp_type_list);
return self->len;
}
(untested)
Ah, I need to probably read up some more on pointers honestly. I don't have any real prior experience with C or any other languages where they are not hidden to a larger degree. I used code like this to do what feels like getting an item out of the list (and the length):
mp_obj_t *current_point;
size_t list_length = 0;
mp_obj_list_get(fill_area, &list_length, ¤t_point);
mp_obj_print(current_point[0], PRINT_STR);
Thank you for pointing me toward Polygon inside of vectorio btw. I've only taken baby steps but even those I would not have been able to manage without that help.
@tannewt I added a .location property and I think the validation messages are tipping some builds over the edge. Should we disable those builds or remove, say, the x and y properties and hope for the best?
so you're printing fill_area[0] with that code. I think you should rename current_point to fill_area_content or something if fill_area_content[0] is actually the current_point but idk what this code actually is doing so maybe it makes sense :-p
Anyway good luck! Pointers are good.
Thank you. I do think some renaming is in order. fill_area is a name left over from the python implementation that I am trying to move into the core. It's a "paint bucket" style fill into a bitmap.