#circuitpython-dev
1 messages · Page 56 of 1
Oh, ok. I'm using the breakout. Could be the diff.
Anyway, thanks. I now have some more things to try.
sure thing!
if the hardware is different I would also maybe check if any I/O polarity like reset or so might be setup differently
Gonna try wiring a 2.4" featherwing v2 first just to make sure nothing strange is going on
These are board definitions for these older ESP32 devkits from Espressif:
https://www.digikey.ca/en/products/detail/espressif-systems/ESP32-DEVKITC-VE/12091812
(ESP32, 8MB SPI flash, 8MB SPIRAM) which I have, and
https://www.adafruit.com/product/3269
(ESP32, 4MB SPI flash, no SPIRAM) which I don't have. (Same board, different modules.) Built and tested ...
I am very impressed with how the USB host keyboard works. For my CNC project, I `ve to added the ability to work with the function keys f1-f12, ctrl-left, ctrl-right, ctrl-up, ctrl-down, page down, page up, insert, delete, pause in the format of command VT 100. Offer my modified code "supervisor/shared/usb/host_keyboard.c"
Still interested in a PR if you have time.
I think we could do this for "light sleep", and make light sleep be a deeper sleep.
This sounds at first hearing like obsolete DNs entries being cached on the host computers or the routers, but given the non-response to mDNS packets, Iam not so sure.
If you wipe the flash on the C3 and the reinstall CircuitPython and the test setup, does it work again?
@jepler When will this ship? I think this was merged to main but not to the 8.2.x branch.
Circuitpython 9.0.0-alpha.6 gave me the RuntimeError: All state machines in use error on my Raspberry Pico W. After building circuitpython based on the diff provided above, I was able to get things working.
Does anyone know if there a known limit to the number of characters that may be sent via the UART mode of the Bluefruit LE Connect app. Using the latest version of the IOS and McOS Desktop app, I can only send 20 characters max (18 + 2 EOL characters) With an old version of the MacOS desktop app, I am able to send longer messages. It does not throw any error and it echoes the long messages, but it does not seem to send them. I was just wondering if others are seeing the same thing.
I see you opened an issue -- thanks. The app was updated last month but the changes are actually from March or so.
Ah OK -- Are you seeing the same behavior?
Yikes, that is tough code to read through....
I did not try it - I'll take your word for it 🙂
I just put one of these together and stumbled across it https://learn.adafruit.com/bluetooth-controlled-matrix-led-sign-using-bluefruit-connect using the new nrf52840 matrix featherwing
This code works on 8.2.9 but not on 9.0.0:
use_arial = True
bg_rect = vectorio.Rectangle(pixel_shader=px, x=0, y=0, width=display.width, height=display.height)
group.append(bg_rect)
from terminalio import FONT
label = Label(FONT, text=os.uname().version, color=0, x=12, y=24)
group.append(label)
if use_arial:
Arial12 = load_font("/fonts/Arial-12.pcf")
label2 = Label(Arial14, text="Arial-12.pcf", color=0, x=12 ,y=48)
group.append(label2)
display.root_group = ...
Do the ESP chips actually expose a vref pin? Or is the value passed here fixed for each chip variant? If it is fixed, then this should be done internally.
This sounds good, as long as I can still set
supervisor.runtime.displayin board init code to the display that got initialized there.
Yup, that'd be the idea.
I wonder, though if we don't want to make
release_displays()dosupervisor.runtime.display.deinit()for compatibility reasons, possibly with a warning?
That would be good idea for the transition release.
Please test with an "absolute newest" build.
Please run pre-commit over your code: https://learn.adafruit.com/improve-your-code-with-pylint/check-your-code-with-pre-commit It should automatically fix these issue before commit.
Thanks for the improvements! Just a couple suggestions.
It is already available in 9.x alphas. They are pretty stable so I'd suggest using them.
Please post a picture. The video file is corrupt.
I don't think we need to change anything internally. The wrapper libraries already make it easier to use.
If anyone has something concrete to do, please follow up and I'll reopen this.
I think you'll need to fill out a form instead of making a PR to that repo.
You'll want to run pre-commit over your changes: https://learn.adafruit.com/improve-your-code-with-pylint/check-your-code-with-pre-commit
hi, just awaiting your testing with I2SOut.
I saw the form, however it requires company info and stuff.
And since I'm not the board manufacturer I can't do that.
I'm at least hopeful it can be done with a PR, since there have been others added like that.
Do the ESP chips actually expose a vref pin?
No.. I have never seen an exposed vref pin on any esp module or chip.
I did a quick sanity check on the esp32 wroom module datasheet and there is none.
Or is the value passed here fixed for each chip variant?
As far as I can tell, every variant has a different vref. So yes, the value set in this would be different for each variant to have a correct 0-65535 value.
If it is fixed, then this should be done internally.
I would re...
>>> sys.version
'3.4.0; Adafruit CircuitPython 9.0.0-alpha.6-25-g6bdf06c9e5-dirty on 2024-01-17; M5Stack Timer Camera X with ESP32'
Same string as pyexec_friendly_repl. This is also a great way to get the board info during runtime all at once!
Fixes #8802
For context: I came across this request / issue as a KMK maintainer.
Any time you want to use keypad without an essentially random input delay, really. The request for "better", i.e. faster, debouncing comes up in the mechanical keyboard scene ever so often, and there are key switches and arcade buttons with significant bounce that could benefit from a more responsive algorithm.
In general the current solution works fine. Once there are strict timing constraints, as in video games, or mul...
Could you submit a draft PR with your suggested change, including inline documentation additions and maybe some sample code and explanations.? As long as it's upward compatible, I think this should be OK.
I don't know exactly what you mean by debounce_cycles. Do you mean additional intervals that are skipped after a transition? So that, for instance, does interval=0.02 and debounce_cycles=3 means waiting 0.02*3 seconds after a transition, or do you mean something else? And is this ...
This seems OK to me. In CPython, it's something like this:
>>> sys.version
'3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]'
so including all the info above is not out of line with that. In CPython sys.version doesn't have the build target info, but that's OK. Ultimately platform is the more modern way of doing this.
Could you try changing
#define MICROPY_BANNER_NAME_AND_VERSION "MicroPython " MICROPY_GIT_TAG " on " MICROPY_BUILD_DATE
in py/mpconfig.h as w...
Don't remove the const. Let's figure out what's going on first. Do a local pre-commit check or compile.
I put it back. It's just that locally it builds and runs fine.
I can't repro the CI failure.
I'll look at it in more detail a little later, since this is not urgent.
Same here. I will try building in a container tomorrow.
I think the question is: at what layer of abstraction should the API operate?
At the lowest level internally, I believe all Espressif chips use ~1.1v as VREF (going back to ESP8266 days), ± some per-chip variance that's (mostly?) calibrated out in software. ESP8266 users were warned not to put more than 1.1v on the ADC pin.
Espressif chips are 3.3v devices, and we've chosen 11dB attenuation to give a natural voltage range for ADC (whether or not the particular variant is fully capable...
Is there a way at runtime to get the MicroPython version that's merged? I thought there was once, but I can't find anything.
within a git checkout you can ```~/src/circuitpython$ git describe --tags --match "v1.*"
v1.21.0-19942-g7a4e7c36cd
Is this the correct place to come for some hints about compiling CP ?
I can compile for the Trinket M0 no problems. When I try to remove built-in modules to make space for something else, I get the following error: (I am following the instructions on the Adafruit page)
undefined reference to `usb_midi_module'
When I am using this in the .mk file for the Trinky:
CIRCUITPY_USB_MIDI = 0
remember to do make clean
jedgar@jedgar-linux-imac:~/Documents/circuitpython/compiler/source/circuitpython/ports/atmel-samd$ make clean BOARD=trinket_m0
- Verbosity options: any combination of "steps commands rules", as
make V=...or env var BUILD_VERBOSE
rm -rf build-trinket_m0
Same output. And I know from maybe two years ago, this was working for me. But a new install, etc.
It also failed with some other modules like neopixel_write, rainbowio, etc
the dependencies between modules are not automatically resolved, if there is another module that depends on usb_midi, you will need to disable it too
the line of the error may give you a hint about what module that is
Understood.
No line numbers, just undefined reference, so I think maybe something is not in the right place. But I can compile without that line and works fine. Who knows?
Looking or that now 🙂
for
Miracle of miracles, it just started working. Huh.
If it starts to fail I may come back with more information 🙂
Thank you for your help, sir.
thanks tannewt and jepler, I was thinking along the lines of our sys.version string, which indicates a nominal CPython version (and sys.implementation includes , _mpy=262)
did you see https://github.com/adafruit/circuitpython/pull/8808; of any interest or use to you?
micropython added the platform module, which we haven't enabled yet
but it is merged in
so maybe just wait for yet
if you see something helpful that would be added by platform, that would be an incentive to make it work sooner
right now version-y stuff is spread out between sys.version*, os.uname(), and something else I forget
or maybe nothing else
just looked at it, the platform string is board-specific, which we could truncate, but I was just thinking of a user-code way to know the main ancestors of the currently running code... versions of CircuitPython, MicroPython, CPython, mpy-cross
not critical at all, just could be informative
sys.implementation might be the 3rd you were thinling of
yes, now I scrolled back here
Sorry about that - now realize I forgot to figure out/request VID and PID. I'll do that.
macOS Sonoma 12.3RC out today, same problem.
Feedback filed, new set of ids to reference is FB13547720 FB13528351 FB13513401 FB13469123 FB13468526 FB13269327 FB13428357 FB13416096 FB13226668 FB13306896
Hi,
Sorry, it takes a while to test it.
I tested the I2SOut and it's working.
Here is a screenshot from the video on this page:
Let me know if I can provide more help :)
Hi,
Could you help add this new board?
https://www.cytron.io/p-edu-project-and-innovation-kits-for-pico-w
Thank you.
In case I was the only one that had to look it up, please address those
cards and letters to:
https://www.apple.com/feedback/macos.html
Feedback area: Desktop/ Finder/ Filesystems
(As a former OS guy, those three things have nothing in common, but, hey,
I'm just playing along.)
Feedback seems to be limited to 800 bytes, so you really can't include much
useful data. I added the oldest (ooops) of John's Buganizer entries (thank
you, John, Tod, Dan!) and the URL of this issues thre...
Thank you for the suggestion
- About HID_KEY_F1. I
ve changed it to going t0 VT100 CSI standards. if its important to leave compatibility with xerox 820 keyboard I can change
to the previous version. - About HID_KEY_ARROW_RIGHT, HID_KEY_ARROW_UP. I spent a couple of hours
getting the arrows to work with ctr and without ctrl, and this option
worked. Perhaps the cause of the error was resolved by the code below. I
can return everything back and test again.
if (!(mapper->flags & FLAG...
So looks like i also want to use this sensor and have found no library...
So looks like i also want to use this sensor and have found no library...
https://github.com/n-elia/MAX30102-MicroPython-driver
I ported the driver. You will need to compute hr rate and spo2 on you own tho. Feel free to post your hints or solutions using the issue section.
Running Circuitpython 8.2.9 on Itsybitsy M4:
This code:
import board, pwmio
M1A = pwmio.PWMOut(board.D13, frequency=1000)
M1B = pwmio.PWMOut(board.D10, frequency=1000)
M2A = pwmio.PWMOut(board.D4, frequency=1000)
M2B = pwmio.PWMOut(board.D7, frequency=1000)
Throws the error:
ValueError: All timers for this pin are in use
While this code:
M2A = pwmio.PWMOut(board.D4, frequency=1000)
M2B = pwmio.PWMOut(board.D7, frequency=1000)
M1A = pwmio.PWMOut(board.D13, frequency=1000)
M...
. if it`s important to leave compatibility with xerox 820 keyboard I can change to the previous version.
No, this is not a priority for me.
I'm more accustomed to the style where bit masks are combined with "|" instead of "+" and would prefer it that way here.
I suspect this change doesn't have the desired effect.
When ctrl+c is pressed, the result needs to be the interrupt character with value 3.
This happens through the keycode mapper element { HID_KEY_A, HID_KEY_Z, 'a', 0, NULL}, which does not have FLAG_CTRL set, so the initial code is the ASCII value 'c'. Then this is modified (at line 258 before this change) with a bitmask:
if (ctrl) {
code &= 0x1f;
}
I believe, but did...
[Just a note for myself: yes there really is a code defined for the printscreen key! xterm and rxvt-unicode both use this value]
When USB keycodes are consecutive, which F1..F12 and RIGHT...UP are, it saves a small amount (maybe 8 bytes per entry) of flash storage to use the form which accommodates multiple strings within one entry, { HID_KEY_ARROW_RIGHT, HID_KEY_ARROW_UP, 0, FLAG_STRING, CURSOR_RIGHT SEP CURSOR_LEFT SEP CURSOR_DOWN SEP CURSOR_UP },
This is done somewhat inconsistently in the original (for instance, INSERT..ARROW_UP are consecutive but the table does not use this fact) but it would be nice if it w...
Sadly, not really consistent with anything, but nothing is consistent with anything else anyway.
I can rename anything in particular if you have a specific request.
- "solarize": this is the standard name for this algorithm
- "morph": this is the name of the routine in openmv. the parameters are compatible or almost-compatible. imagemagick calls this "convert -morphology" so at least it's partially the same (there's also "convert -morph" which is NOT the same, that's some kind of ima...
I added some named tuple types for this purpose, and improved the documentation
This will end up useful in implementing UVC, but it's also easy to pull out into its own pull request
I think it's worth asking @hathach if updating to latest master is worthwhile, since there have been a number of fixes after 0.16.0.
This is my working build of circuit python for the M5 stack cardputer.
I have updated the USB parameters per https://github.com/espressif/usb-pids
Thanks for your time and for making this pretty easy to get going, your docs are fabulous!
not sure what was up with the .pot file change... I can remake without that...
Is str.partition() currently not enabled for all boards as the docs say? Relatedly (or alternatively), does anyone know if the GPS library is currently only viable for larger boards anyway?
that's right, we were saving space on non-Express SAMD21 boards
if the library uses partition(), then it's never been used on tiny boards. It's a pretty big library
I don't see a call to partition() in the library
It would be added as part of an PR, so it sounds like it would then become an issue
Sounds good, thanks!
I have some small comments & changes requested. The new functionality is exciting.
I know we discussed this at length on discord, I hope it's right.
// CIRCUITY-CHANGEs here will help
:+1: for factoring things like this out
What's the consequence of making this a warning in 9 and an error in 10? Maybe something like this but less horribly verbose.
warnings_warn(&mp_type_FutureWarning, MP_ERROR_TEXT(
"Mount point missing. "
"This will be an error in CircuitPython 10. "
"This prevents file from being available via web & bluetooth workflow. "
"Create an empty directory (maybe via USB) first");
Also is it important that the placeholder be a directory, which is a requirement on Unix-...
Yes, please remove the .pot file too. It will be autoupdated separately. Thanks for the new board def!
These look like the values for a different board. Please update.
Looks good. We can always update again if we want something from master. (or a newer release.)
Running Circuitpython 8.2.9 on Itsybitsy M4:
Please file a new issue. This issue is about the RP2040. Not the SAMD51 "M4".
Hi @crude blaze. I got the display working on the 2.4". It turns out the filename of my overlay had characters it didn't like. I wasn't able to get touch working though. Was there some trick to it?
Something that could alternatively be done is having an "internal percentage calculator".
Please let me know what you think would work best.
It isn't clear to me what issue this PR solves to justify changing the behavior. There isn't a clear bug here that I can see.
The mpconfigboard.mk and sdkconfig files are in CircuitPython 8.x.x style. Take a look at some ESP32-S3 board definitions in the latest main. We have added some settings to mpconfigboard.mk and made the sdkconfig files simpler.
Running Circuitpython 8.2.9 on Itsybitsy M4:
This code:
import board, pwmio
M1A = pwmio.PWMOut(board.D13, frequency=1000)
M1B = pwmio.PWMOut(board.D10, frequency=1000)
M2A = pwmio.PWMOut(board.D4, frequency=1000)
M2B = pwmio.PWMOut(board.D7, frequency=1000)
Throws the error:
ValueError: All timers for this pin are in use
While this code:
M2A = pwmio.PWMOut(board.D4, frequency=1000)
M2B = pwmio.PWMOut(board.D7, frequency=1000)
M1A = pwmio.PWMOut(board.D13, freq...
Just a couple more things. Thanks!
This info would be really useful to have in the function docs. :-)
I'd enforce using the named tuples because we're using the code space to make them possible. Otherwise code can use the less readable sequence version.
This is because the SAMD51 (and other SAMD chips) have rather arbitrary assignments of function to pins. There is not a crossbar. A given pin is connectable to a few timers. Another pin may be connectable to a subset of those timers, plus some others. So the order will make a difference due to the choice the code makes in the earlier assignments. There is not an optimal order.
If it is a warning, then the parent directory won't list the mount point. So navigating into the mount wouldn't work.
Removed callback to BACKGROUND_TASKS.
The bug is that CP has no way to internally handle different vrefs properly.
But I agree this PR isn't the solution needed.
I'm not feeling like pursuing this any further in the core.
I will make a module that handles the math for every mcu automatically.
I didn't enforce this but I changed the docs to list the specific types instead of Sequence[int].
@desert yarrow let's move here. I think ideally the microusb port would work as OTG where it can detect host or device use
that'd allow the CIRCUITPY use case to work still
@slender iron - Sorry about the faux pas there. 🙂
No because support was just added recently added that support the FTDI chips in there (very similar to a normal CDC device, but they require some special tweaks internally)
I created this in an effort to create a small RP2040-native USB library... if it can work, I'd like to see if I can access it from CP or MP or whatever possible.
- if (!(mapper->flags & FLAG_CTRL) && ctrl) {
continue;
} *
Without this, CTRL- UP, DOWN, LEFT, RIGHT do not work.
But you are right about
*{ HID_KEY_A, HID_KEY_Z, 'a', 0, NULL} *
...
if (ctrl) {
- code &= 0x1f;
}*
that may work badly. I need some time to change the code and test it again.
I think the best way is for a..z not to use that construction.
About binary Or (|) you are right, I`ll correct it.
About F1 ......
I like TinyUSB, but it's been very hard to get running what we need (simple USB Host support for FTDI based USB Devices).
in CP we'll only support TinyUSB
I know, that's why I can't use it (yet?).
that way the work applies across all ports
Does CP allow for external libraries/modules, though?
For example, could I pull in custom code into CP through an import?
Or does CP have TinyUSB embedded always (ie - and you can't run it without TinyUSB)?
you could maintain your own fork and not call it CP
you can run it without tinyusb but you really shouldn't
I see, ok.
get it work with tinyusb host and you can use esp32-Sx chips then too
they do otg as well
Ok, sounds good. Ha Thach has done a great job with TinyUSB and the latest releases do support what I needed. They just hadn't been fully percolated through the other libraries yet. If the latest TinyUSB v0.16.0+ makes it's way into CP, then that support should just "show up" (for free-ish).
Is there a timeline when TinyUSB v0.16+ will be in CP (maybe already?)
there is a 0.16 PR open right now
HOLY SMOKES@
That would be the solution... v0.15.x did not support the FTDI chips as needed... but v0.16.x does!
CP doesn't use the CDC level of host support though
we expose the lower level instead
Ok
This patch has support for the 0xCD18 product id from vendor 0x0403 (FTDI)...
Hrm...
the expectation is that you'd write a driver in python
Is there a reason why not, if it's there alongside HID?
we use native hid host internally to input serial into CP
Or... can I use the low-level USB Control transfer messages to talk to the device directly?
Ah, there we go. The issue before was that the FTDI devices were simply ignored and they could never even enumerate, so I was dead in the water.
though it could be interesting to make a pyserial api
Now... they at least enumerate... and thus, I should be able to at least "talk to" them
yup
54 minutes ago: https://github.com/adafruit/circuitpython/pull/8809
you don't need it for the low level stuff though
it's only a change to the cdc host driver
MERGED! Wow!
@onyx hinge uploading multiple files to SD card via web workflow doesn't work because we stop the VM immediately and then do the reload wait
The important thing is that at least, now, the device will be enumerated!!! Before it was just ignoring it because it didn't recognize the VID/PID or Class information. Whatever the reason, the device was just being ignored. Now, it should be recognized.
I think it'd enumerate with older versions. It just wouldn't work with the native cdc host driver
@slender iron - Now that it's landed, will a "current" build of CP include it, or is there a release date when it will be included. Or, can I build a new version right now? Or, should I wait for a nightly release?
you can build now. absolute newest will have it once the CI runs
Phenomenal! Thanks
Wow, between v0.16.0 and today, there are 4,143 additions and 1,665 deletions.
https://github.com/hathach/tinyusb/compare/1eb6ce784ca9b8acbbe43dba9f1d9c26c2e80eb0...master
OTG isn't a priority for us because you can't use USB to edit code when using it as a host
Is there a wifi-based editor for CP, so you wouldn't need the USB port?
It is this? ==> https://code.circuitpython.org/ <==
that works for BLE
you do http://circuitpython.local/ for local wifi
assuming you have mdns support in your os and router
otherwise you can use the ip address
that's awesome
👍
btw, it's kinda fun watching the USB chatter back and forth between host and device... beautiful to see the little dance between the two! I'll checkout CP later when the CI build includes the latest goods.
Ok, I've made some fixes and tested over WiFi and BLE. Please look again.
Is there example code that uses plain sequences?
A couple typos and one suggestion. Thanks!
//| If ``weights`` is a `ChannelMixerOffset`
Instead of explaining what number in each position does, it would be better to give examples when it is useful. The tuple has the individual number doc.
//| """Create a "solarization" effect on an image
there is code in the tests that should be revised.
The computation fix does look interesting but I don't think it is critical. I think the main question is if we want to spend the time on the merge now or after 9.0.
This works ok for me on a metro s3 with main and 8.2.9. Please retest with an "absolute newest" 9.x build and 8.2.9.
I went ahead and made it require the correct types, and fixed the tests.
Thank you! Well explained.
nice!
@ touch, does it throw an error during boot in dmesg?
In the latest Kernel the driver should at least be available but things like rotation etc. will not work as that requires the driver changes I had submitted to Pi.
my overlay is currently assuming those changes to be in place but I think none of them should prevent the driver from loading at all
Yeah, I think the issue is because I was trying to use the one in your PR and it is expecting the driver changes.
ah yes, the ti-x-plate property is required by the old driver but I depricated that
if thats added it should work
Oh right. Well, I'm going through and seeing what overlays I can get working for now. I got one for resistive 2.8 and capacitive 2.8 and display is working, but having issues with touch working intermittantly.
Ah, yeah. I think that's what the dmesg error indicated.
ah you figured it out, nice
Hm yea thats interesting you also saw that. What I observed were some display artifacts when touch was sending data. I figured likely EMI issues of my current messy jumper cable setup.
Do you have that on a proper HAT or are you also using jumper wires atm?
I'm using a proper hat
does touch just bork out now and then or do you also get any sorts of weird display artifacts?
I'm not sure if I was seeing two seperate issue. Touch was def. a bit weird overall but I think there might also be a bug in wayfire there
A little of both.
ah okay interesting
libinput was still showing the touch data coming in just fine but the window manager was just not reacting at times
Interestingly, if I use the MIPI driver and the overlay at https://github.com/adafruit/Raspberry-Pi-Installer-Scripts/blob/main/overlays/touch-ft6236.dts it works perfectly.
Possibly it's a conflict with the ili9341 driver or something. I haven't tested that.
ah wait, are you using a TSC2007 or a focaltech cap touch display?
Oh, for the TSC2007, I'm using a breadboard setup, but I'm also adding other PiTFTs and using HATs for all those.
ah okay! Yea then I wonder if it might actually be an EMI issue on the TSC2007 end. I did not have such issues with DSI displays that used focaltech cap touch
maybe worth waiting for the updated HAT then
Oh, I never got touch working on the tsc2007. I switched over to the HATs and I did have issues on those.
ooh I see, then I misunderstood earlier
No worries. Just trying to clarify.
so you had weird display glitches on those HATs too?
yeah
huh!
Well, not the display itself so much. Just the touch input. Like it sometimes leaves a tiny selection box before the cursor disappears.
ah, yea that I also experienced. That is definitely a bug in Wayfire but haven't been able to really reproduce to report to Pi Kernel
Do you have any of the HATs like the capacitive one?
no unfortunately not. I only have DSI displays here with cap touch
If so, here's an overlay that's doing that behavior:
eh RGB I mean, the ones for that upcoming DSI to RGB adapter
a bunch if not most of these sorta ones:
https://www.adafruit.com/product/5792
This is what I was using: https://www.adafruit.com/product/2423
Yeah, I have a bunch of the RGB displays as well for when I was getting the Qualia up and going.
ah yea no those I don't have around.
But yea if its mostly the Desktop behaving weirdly, I'm fairly certain that is something being buggy in Wayfire
Probably
I also looked at this again and agree it didn't seem as crucial. I thinks this could wait until 9.later.
Adjust Report Count for the LED field of the Keyboard Report Descriptor to be consistent with the number of usages.
Fixes #8789.
Thanks - this now matches the report descriptor here: https://www.usb.org/sites/default/files/hid1_11.pdf#page=79
Solved: user error.
I had set the settings.toml keywords incorrectly. e.g.
CIRCUITPYTHON_WIFI_SSID = "redacted"
CIRCUITPYTHON_WIFI_PASSWORD = "redacted"
which kills the web workflow at
circuitpython/supervisor/shared/web_workflow/web_workflow.c line 269
Today, I reflashed 9.0.0-alpha.6, it worked well. But when I switched to 8.2.9, bug occurred.
Idk why the 9.0.0-alpha.6 version works today, the hardware and flash methods are same as before.
If I find this bug again, I'll post here and reopen this issue. Thanks for your hard work.
Youre right! Ive changed to
if (!(mapper->flags & FLAG_CTRL) && ctrl && (mapper->flags & FLAG_STRING)) {
continue;
}
and it wors fine.
The best way would be to set a range of special keys, but no idea if that's possible or not.
Would love to see this library ported to Circuitpython:
https://github.com/tuupola/micropython-mpu6886/blob/master/mpu6886.py
This MPU is present in M5Stack devices such as this one
https://www.adafruit.com/product/4177
I've tested on my pico by code bellow. Look like good.
import microcontroller
#microcontroller.cpu.frequency = 120000000
print(microcontroller.cpu.frequency)
import time
import sys
import board
import usb_host
import supervisor
pp=usb_host.Port(board.GP26, board.GP27)
while True:
try:
proceedCh=''
while supervisor.runtime.serial_bytes_available:
proceedCh += sys.stdin.read(1)
if proceedCh!='':
print('proceedCh:',proceedCh,[ord(res...
@lone axle submitted a PR to CircuitPython_SoftKeyboard. Got a little bit done today. 🙂
Nice! Thank you. That is merged 🎉
CircuitPython version
Adafruit CircuitPython 8.2.6 on 2023-09-12; Raspberry Pi Pico with rp2040
Adafruit CircuitPython 9.0.0-alpha.6-20-g4b92a4a9fa-dirty on 2024-01-18; Raspberry Pi Pico with rp2040
Code/REPL
import board
import digitalio
import storage
import adafruit_sdcard
import busio
#import bitbangio as busio
spi = busio.SPI(board.GP2, MOSI=board.GP3, MISO=board.GP4)
cs = digitalio.DigitalInOut(board.GP1)
sdcard = adafruit_sdcard.SDCard...
Not exactly CircuitPython but still cool to see. Linux kernel is getting support for seesaw gamepads built-in https://www.phoronix.com/news/Linux-6.8-Adafruit-Seesaw
I tried reproducing this with a Pi Pico running 8.2.9, using the same breakout and pins as you. The card is an 8GB from Micro Center. I formatted it freshly to FAT32 with gparted on Linux.
By any chance is there already an /sd directory or file on CIRCUITPY before you try running the above?
I'd say try these things:
storage.erase_filesystem()on the Pico to make sure there's nothing corrupt about CIRCUITPY- Reformat the card externally (and say what you used if it still doesn...
Can someone enlighten me as to where to put .py files I want compiled into my Trinket M0 custom firmware?
A very small function that I would like embedded to save some "disk" space.
you "freeze" modules that you are adding: https://learn.adafruit.com/building-circuitpython/adding-frozen-modules
Note that recent changes increased the available space on CIRCUITPY on main: https://github.com/adafruit/circuitpython/pull/8567
I reduced this to:
def f(a):
pass
print("Here Start")
#f(a=2, *()) # TypeError: unexpected keyword argument ''
f(a=f, *()) # Safe mode: Hard fault
print("Here End")
So it's not super() or anything like that. It has to do with the * arg.
If the *() arg is removed, it works fine.
If the first call to f() is used it doesn't crash, but gets the indicated keyword arg error.
If the second call to f() is used, it crashes with a hard fault.
I suspect ...
We have https://github.com/adafruit/circuitpython/pull/8752 and https://github.com/adafruit/circuitpython/pull/8306. Do these help? You can test the 9.0.0-alpha releases.
I am using some frozen modules, per the Adafruit instructions. I have a custom .py file I need to have compiled into the build.
@slender iron I picked up a 7.3" Inky Frame. I think you added support for the 5.x" version. Is the 7.3" version supported now? If not, how difficult is it to add support for it since the other one works? I have never touched display stuff in the core.
Testing with MicroPython v1.21.0 and v1.22.1 on a Feather M0 Express: In the above program, I get TypeError: unexpected keyword argument (note no '') on both calls to f().
Testing with MicroPython v1.22.1 on a PyBoard: As with CircuitPython, uncommenting the second call to f() causes a hard crash. I'll open an issue for MicroPython.
I think there is a pr open to add it. If not, then you’ll need to copy the init code from the python driver for it
Hi, I just tested pre-build CP firmware ver 8.2.9 and 9.0.0 Alpha 6 on nucleo-h743zi2. This problem still exists.
I understand the reason why it is lacking the support from Adafruit, but I think you should remove the download page or the download button at least on CP website if it is no longer working. Doing so to prevent someone like me who wants to purchased a more powerful "supported" board and realized it is actually not later. As suggested above, I will try the Blinka on MicroPython ...
Hi, any updates on that topic?
Ah! Ok I'll look into it once I have it in hand. Thanks!
In my application, bitmaptools.draw_polygon would be very useful if it accepted a large (>200) list of integers instead of a ReadableBuffer object. For now, it's iterating through the list and using draw_line instead.
The simpletest example shows converting a list to a byte array, but that doesn't allow coordinate values larger than 127. Using struct or a ulab.numpy array allows larger values up to 16-bits. However, ulab isn't available for all boards and struct is only pract...
Thank you Dan. I am going to test it.
I've been reading the raspberrypi SDK documentation and I'm not 100% confident about this but it looks like there's no exposed API for querying the DHCP server that's started in AP mode, only to start and stop the server. That said, this is C and it may be possible to extract this from the internal data structures that the DHCP server exposes, which would work but obviously be a horrible coding practice and likely to break without warning with an SDK update.
To be able to easily use the entire polygon x-y coordinate range, please consider changing from a ReadableBuffer data type to an integer list.
From https://github.com/adafruit/circuitpython/pull/7471:
In my application,
bitmaptools.draw_polygonwould be very useful if it accepted a large (>200) list of integers instead of a ReadableBuffer object. For now, the application is iterating through a list and usingdraw_lineinstead.
The simpletest example shows converting a list to a...
@romkey Could you paste a sample Feedback report here? I would also like to submit one as a rep of Adafruit? Thanks.
@dhalbert That would be awesome!
Here's what I've been posting. I'm happy for any refinements or corrections to it y'all might suggest. I put the actual URLs in for the two links; Github is helpfully condensing them to page titles...
macOS 14.3 should be released within the next few days, so it may help if we can all chime in with feedback reports.
All versions of macOS Sonoma improperly delay metadata writes to small FAT filesystems. This causes errors when writing files to device...
pre-commit-ci/lite-action does not actually push the change, so it doesn't really help.
Submitted FB13554680 via the Feedback Assistant. (@robertlipe you submitted by the webform, but you can also use the Feedback Assistant directly in macOS).
Userspace FAT filesystem delays writes to small FAT disk drives 8MB or smaller
I work for Adafruit. Adafruit has a a number of products which present as USB devices with small FAT filesystems, notably CircuitPython and UF2 boot loaders. These products are widely used in educational environments.
Since Sonoma, macOS 14...
I've been doing some CircuitPython builds and noticed something odd I wanted to check in about
When I build from main I see __dict__ when I tab to autocomplete from an object in the REPL:
Adafruit CircuitPython 9.0.0-alpha.6-26-g84c4f62278 on 2024-01-21; Raspberry Pi Pico W with rp2040
>>> import wifi
>>> wifi.
AuthMode Monitor Network Packet
Radio __dict__ radio
When I build 9.0.0-alpha.6 I don't see that
Adafruit CircuitPython 9.0.0-alpha.6 on 2024-01-21; Raspberry Pi Pico W with rp2040
>>> import wifi
>>> wifi.
AuthMode Monitor Network Packet
Radio radio
is that a debugging thing enabled between releases or something unintentional? (I understand what __dict__ is, just surprised to see it visible here)
I did some websearching around "fskit", and found this:
https://news.ycombinator.com/item?id=38775579, which references:
https://github.com/apple-oss-distributions/msdosfs
and see
https://github.com/apple-oss-distributions/msdosfs/blob/main/msdos_appex/msdosFileSystem.m
@eightycc maybe this is the code we were looking for?
You can remove the commented-out pins, and then put them in a logical order, like COL 0, 1, 2, 3, ... etc. That will make it a bit easier to read to see what pins are available. dir(board) I think may also print them in that order.
If a conventional USB drive, 8MB or smaller, is removed before the write is finished, it will be corrupted.
This submission seems to be missing the most serious things: the write errors in MacOS, and that it can be corrupted even if you don't remove it.
This submission seems to be missing the most serious things: the write errors in MacOS, and that it can be corrupted even if you don't remove it.
I have been unable to duplicate the write errors (I/O Error) consistently, even when using the same examples that others have used. I started to include it but it seemed like a digression. It probably is worth a separate report. The cause may be the same base cause.
I'm going to put this into draft mode so we don't merge it too soon. Take it out of draft mode when you're ready -- thanks.
Addressing issue 8790. I did this for fun and to learn more about CP internals, hope I'm not stepping on anyone's toes and am fine ignoring this if you'd prefer.
Added a new property max_stations_ap to the Radio object, which returns the maximum number of stations the device supports in AP mode
Added a new property stations_ap to the Radio object, which returns a list of dicts that report the MAC address, RSSI and IPv4 add...
I posted a PR which implements a new property returning a list of associated stations, and another new property that returns the maximum number of stations that can be associated with the device. It works with Espressif CPUs and (with some limitations) the Pi Pico W.
I have updated the pins file per your request.
I'm still trying some things out, so I think leaving this in draft for another week is probably a good idea, thanks!
just a proof of concept at this point: UVC 'video camera' support is made possible by recent contributions to TinyUSB, and I got the very most rudimentary level of support working at the same time as circuitpython.
Try to control an E-S MOTOR 37SG-3650BL motor with PWM. It seems that the required voltage is 12 VDC. It runs regardless immediately without pwm. The PWMIO when set to True turns it off. Any ideas why?
Monday, January 22, 2024. 1h38 PM GMT
Board: Adafruit Feather ESP32-S3 TFT
Flashed with:
Adafruit CircuitPython 9.0.0-alpha.6-29-g5f318c37bb on 2024-01-19; Adafruit Feather ESP32-S2 TFT with ESP32S2
IDE: Mu 1.2.0
The REPL output below shows that the board, connected to the in house WiFi,
receives the UPD multicast data packets that X-Plane 12 was set for to transmit.
a) REPL output of manual test to see with attributes socketpool.SocketPool has now (with the latest version of ...
I'm in the planning stages for a podcast episode all about CircuitPython 9. Looking at the release notes for MicroPython 1.20 and 1.21 that have been merged into CP9, is it fair to say these are "under the hood" improvements that most end users won't notice? Or is there a big feature or update I'm missing?
What we took are mostly fixes to the Python VM. Any board-level changes reflected in those release notes are not in code we use.
The "split heap" code from MicroPython now enables us to use heap allocation outside the VM, which was very awkward before: any dynamic storage allocation could only be done once, before the VM started. The heap then used the remaining RAM. Now there is an "outside" heap which can be used while the VM is running, and that storage will not be GC'd. So various storage allocations that used to be static can now be dynamic, such as stuff needed for USB setup.
We also removed the "long-lived storage" scheme that was added a long time ago to reduce fragmentation. In that scheme, storage that we expected to live a very long time (mostly allocations for compiled bytecode) was allocated at one end of the heap, and shorter-lived storage (like the temp storage used during compilation) was allocated at the other end. Part of the scheme involved moving allocated objects and adjusting pointers. The moving caused some inherent but obscure problems where objects' identities seemed to change.
Now long-lived storage is gone, because it was not very compatible with the split-heap scheme. This may cause some projects on small-RAM boards like SAMD21 not to work any more due to increaed fragmentation. We have some ideas for doing something like long-lived storage in a different way that wouldn't involve moving objects, but that won't be in 9.
Thank you Dan! I really appreciate it
Scott and I can talk about this more if you need more background.
sounds good, I'll let you know if I have any follow-up questions
Correction: Board: Adafruit Feather ESP32-S2 TFT
Thanks for working on this!
You could use a list of namedtuples instead of a dict, or even create a new native class with appropriate attributes.
If a value isn't available, like rssi or an unknown IP address, None is appropriate and canonical in Python.
Using the internal data structures is probably not bad if that's the only way. It may just stop working later. A PR to the appropriate upstream repo to add an API for that info might make sense. You could see if there's already a...
There's no existing support for "YUV" images in CircuitPython displayio is there?
not that i see
the top half of the frame was set to red by assigning to a memoryview from Python
CircuitPython version
dafruit CircuitPython 9.0.0-alpha.6-19-g99b19a5860-dirty on 2024-01-22; SAP6 (including Seeed XIAO nRF52840 Sense with nRF52840
Code/REPL
# create a source bitmap of size (100,100)
# create a destination bitmap of size (10,10)
bitmaptools.blit(dest, source, 0,0, 30,30,35,35)
Behavior
this raises a value error stating X1 should be in the range 0..9
Description
No response
Additional information
No response
I tested back to MicroPython 1.11 and it works. In CircuitPython, this stopped working properly a long time ago:
class D(dict):
def __setitem__(self, k, v):
super().__setitem__(k, v)
d = D()
d[2] = 3
print(d[2])
- starting with 5.00-beta.5:
RuntimeError: maximum recursion depth exceeded - starting with 5.00-beta.3:
Key Error: 2 - 5.0.0-beta.1 and before: [no error]
The Key Error version gives surprising results:
Adafruit CircuitPython 5.0.0-...
Hello everyone and particularly <@&356864093652516868> -- we'll have our weekly meeting in a little over 75 minutes from now. Please take time to make sure the notes document is up to date, then join us in the CircuitPython voice channel at 11am Pacific / 2pm US Eastern if you can.
Notes doc: https://docs.google.com/document/d/1hvExFQWMsV78bORs1uBxon_bncchrHPV96r4cAWEhcA/edit?usp=sharing
i'm going to sit out the meeting today to power thru some guide tasks but wanted to extend a group hug
@drath42 if not a PR could you just provide a diff? Thanks.
Sorry for not replying earlier. I was hoping to find time for this last weekend. A diff is easier:
diff --git a/supervisor/shared/usb/usb_msc_flash.c b/supervisor/shared/usb/usb_msc_flash.c
index f212d55270..2ded6de2b2 100644
--- a/supervisor/shared/usb/usb_msc_flash.c
+++ b/supervisor/shared/usb/usb_msc_flash.c
@@ -171,10 +171,16 @@ bool tud_msc_is_writable_cb(uint8_t lun) {
// Copy disk's data to buffer (up t...
Hi @idle owl !
Do send your tidbits to cpnews@adafruit.com, they really help
Yep, I can read the Blinka section
am good to go for libraries 👍
600+ revisions now
@idle owl always nice to see you 
noted!
hope you are ari are doing better this week ❤️
Also, if somebody needs me to work on native languages from your country, I'd be happy to. (US is kinda complex as it has way to many, but maybe I can sort it out by lang family)
This would be part of the unicode CLDR standard, so it should work without extra hardware, but native in Windows, MacOS, Linux, Android, etc.
amazing updates Jepler. that sounds really amazing.
@lone axle cardboard? If you give me some dimensions I can design a 3D print for you.
There was an amazing luthier in the US, Dr Carleen Hutchins, that de-mystified violin making, and also created a family of 8 sizes of violins that is way better than a typical string quartet. A group that plays them is the "Hutchins Consort" (.org), if you live in the US I urge you a lot to find a concert and go (or at least to watch them in youtube).
Since they are custom sizes, nobody makes strings for them anymore, so this family of instruments might go extinct. So I'm currently ordering materials and building a CNC for winding the flatwounds.
So sure, if you have a weird size instrument, or maybe you need lighter or heavier strings that you find commercially, even if it's a guitar/bass/ukulele, let me know and I'll to my best.
Thank you, I'm excited to do cardboard for this one though. I've got a steady source of boxes from a regular purchase that I'm looking to build into projects.
The final dimensions will be in the guide along with the files for my decals if folks want to use the same size box and re-use the decals, or design a new enclosure for it. Would be great if anyone wants to design and share different variations of it.
Cardboard is a great media to use especially for learn guides as everyone has some and might not have a 3D printer.
I like the idea for a unifying method that is consistent no matter what the board or connection method is.
I think it makes sense to release it in the different libraries all at once (and update the frozen ones in the core as well).
@onyx hinge I have another obligation in a bit here. I'd appreciate it if you could pull in my topic next, and then go back to Justin for their second topic.
Is the amount of psram specified in the board config or is that just flash storage?
Does OnDiskBitmap need to store it in RAM?
The Inkyframe does have an SD card I think though
you can also make the image smaller and scale it x2 or x3
sdcard is a much better storage idea to get around the low storage on the pico.
yeah no speed peformance but you'll have a ton more storage to work with
Speed isn't really an issue for e-ink 😄
pimoroni does have some micropython samples here: https://github.com/pimoroni/pimoroni-pico/tree/main/micropython/examples/inky_frame it won't work with circuitpython or displayio but maybe some good inspiration.
Good luck Kattni! Keep us updated.
What would be a good m0 + airlift example to make sure I'm good on space for ConnectionManager?
large e-inks sounds great for calendars, good project.
i think most m0 with airlifts at the time were M0 feathers with Airlift featherwings?
was the original pyportal m0 or m4?
Honestly I wouldn't worry too much about m0 + airlift. I don't think there are any projects with it (it would really tough to squeeze it in). M4 + airlift would be my primary concern on the airlift side. To make sure that pyportals and matrix portals continue to work as expected.
the m4 + airlift and the m4 matrixpanel are my current low-end test boards
yeah at this point it's a little unrealistic to expect an m0 with airlift to have enough since the language has grown so much. m4 does seem like a better least common denominator.
Thank you for waiting, Justin!
fwiw I believe the stubs can work with VSCode as well (Anecdotally I think there may be more VSCode users than PyCharm in the community)
How/where would the stubs be hosted?
yup, that's what I was thinking
if/elif x 400
They're hosted in Pypi so installable via pip install commands. We have existing ones there today but it just doesn't cover board specifically today.
ah that would be nice
Yep, I would be in favor of the default being a combination of all possible pins, then if they want they can run the command (or set env variable) to a specific one.
for devs that have a lot of boards and change multiple boards daily it would be nice to have a quick way to switch between stubs per board.
I need to head out. Thanks again, all! Appreciate the tips.
and needs to be updatable for adding new boards that are released. pip upgrade sounds like an easy way to do that.
that would be nice. i do use nvm for an api project to store a token. knowing how much nvm is available is useful.
Thanks for hosting Jeff. Hope everyone has a nice week!
Thank you @onyx hinge for hosting and everyone for participating.
Thank you!
Thank you everyone!
thanks for hosting jeff!
It's a good time 🙂 I don't even stress out about it anymore.
Amazing
I'd do a minimal set. Otherwise people will expect it to work on their board
I'm not sure a minimal set would end up containing anything though. Since someboards use board.GPIO#, some board.D# and board.A#, and some board.IO#. I think there may not be any pin names that are actually shared and valid across every device. I can't say that I've actually crosschecked it though.
ya, true
Could leave the default with nothing...
or a SET_BOARD_ENV or something
I wonder what would happen if you raised an exception in the stub
Oh wow! It looks amazing. Easy virtual monitor! I will absolutely work that into ljinux once my display stack is finalized and this is merged.
i think there's a regression in the 9.x bundle? i can't get macropad examples that use the display to work anymore. macropad_simpletest_display.py fails somewhere deep in adafruit_display_text/bitmap_label.py
Also if this worked on espressif we could use it with espcamera for an easy webcam
CircuitPython webcam anyone?
If you're on github as well can you open an issue on the macropad library please? If you have the stack trace handy you can post it along with the issue. I can try to reproduce and dig into it a bit later this week if no one beats me to it.
i think it's a change to the coordinate validators in bitmaptools, actually. i'll try to open an issue with a stack trace
should i open an issue against circuitpython or the macropad library?
I would start with the macropad library since it's the highest level thing trying to use it. It can always be moved after the fact as appropriate.
Earlier I noticed this PR in the core: https://github.com/adafruit/circuitpython/pull/8823 that is dealing with bitmaptools validation. If you've got the opportunity to it might be worth testing the build from this PR to see if it happens to be the same issue / fix.
@FoamyGuy pointed me at this PR. Tested this fix successfully against a failing macropad demo (see adafruit/Adafruit_CircuitPython_MacroPad#53). Thanks!
So I'll try more again later this week, but I can't get another pyi to import into the base boards stub. Even excluding using an env. Tried:
importlib.import_module("boards.board_other")
from boards.board_other import *
import boards.board_other
And I added the file boards/board_other/__init__py
Doing import board.boards.board_other as board works fine (so I know the file is good)
well drat 😕
I'll still play with it. Will need to dig into pyi more first
Here is the notes document for next Monday’s CircuitPython Weekly Meeting. It is at the normal time of 11am Pacific / 2pm US Eastern here on Discord. Add your hug reports and status updates to the document before the meeting. If you are unable to attend but would still like to contribute, feel free to add your notes and we’ll read them off during the meeting. Hope to see you there! <@&356864093652516868> https://docs.google.com/document/d/1UgruSyeclpC_fzDze8qYEjEB7RMIq15InBfu18dC9Es/edit?usp=sharing
also, 9.x on macropad sometimes crashes to safe mode with a hard fault after disconnecting from within tio, etc. not sure how reproducible this is yet
https://typing.readthedocs.io/en/latest/source/stubs.html#version-and-platform-checks maybe only version checking conditions are supported, not that you'd gotten to the stage of trying the conditional parts
im no expert, at all... but afaik .pyi aren't actually imported but tools like mypy, IDEs and whatnot scan for info in file.pyi before file.py when they see import file
it might be a matter of how <whatever tool you are using> is handling relative imports or whatever... and thus maybe a manner of configuration, and not actual code (?)
https://typing.readthedocs.io/en/latest/source/stubs.html#imports 'from ... import *' syntax is supposed to be explicitly supported though ('re-exported'). Less surprising that __import__ or importlib.import_module would not be.
so re-writing a single board.pyi stubs file is seeming more likely as the workable solution. you could just write it directly into the project directory and it would take precedence, right?
import specific_board as board
else:
import board
```otherwise maybe you go down the road of writing this or similar in code.py, though I'm not enthused
if import_module doesn't work, then it would be a huge if/elif block. And that's not scalable (IMO). I think either:
- telling users to do the
import specific_board as boardabove - a command line method to replace
board_stub/__init__.pyiwith a specific one
giant if block is ok if it is autogenerated
is it true that env variables can change its behavior?
Not certain yet. Was focusing on importing first
CircuitPython version
Adafruit CircuitPython 9.0.0-alpha.6-33-g9f016796e0-dirty on 2024-01-22; Adafruit Macropad RP2040 with rp2040
Code/REPL
# N/A; also happens with freshly reformatted CIRCUITPY drive
Behavior
soft reboot
Auto-reload is off.
Running in safe mode! Not running saved code.
You are in safe mode because:
CircuitPython core code crashed hard. Whoops!
Hard fault: memory access or instruction error.
Please file an is...
And when I had them in there, it found them anyway. I had tried:
import os
if os.getenv("board_id", None):
if os.getenv("board_id") == "board_a":
AA: microcontroller.Pin
elif os.getenv("board_id") == "board_b":
BB: microcontroller.Pin
and both AA and BB were defined, so switched to the loading of files first
Also apparently happens with
Adafruit CircuitPython 8.2.9 on 2023-12-06; Adafruit Macropad RP2040 with rp2040
so possibly not a new bug?
I asked a q about .pyi in stackoverflow which might be relevant here. The replies corrected some misimpressions I had about .pyi: https://stackoverflow.com/questions/71106529/cannot-import-pyi-file-in-stubs-package
Ahh, so we might not be able to import a sub-pyi file
yes, that was my impression -- thinking that the file is going to be executed by a type-checker is wrong, apparnetly
So what @onyx hinge said with:
if STATIC_TYPING:
import specific_board as board
else:
import board
might be what we can do
That, or a shell command:
set_board_stub specific_board
Does not happen with nRF52840:
Adafruit CircuitPython 8.2.9 on 2023-12-06; Adafruit ItsyBitsy nRF52840 Express with nRF52840
(it was a board that I conveniently already soldered a debug harness to)
I'm not sure I have a an RP2040 board with easily accessible SWD traces to hook up a debugger to.
This fixes a bug in the previous nrfx implementation that failed to fully shut down the UART. This lead to a
sleep current consumption of ~1mA.
My initial attempt to fix this #8089 somehow broke the USB as described in #8391, so it was reverted.
This takes code from a later version of the nrfx firmware.
From the weekly meeting notes:
@eightycc (text only)
- I’ve been a bit under the weather for the last couple of weeks.
- Continuing work on _bleio for RP2. Sorry this is taking so long, every bug I get past seems to have a dozen more hiding behind it. No idea how much longer this will take, but I am in it for the long haul.
This isn't easy work folks. Please ...
Happens after some random number of serial disconnects, either at the REPL or at the "code done running" prompt.
What is causing these disconnects?
It may be easiest to debug this using the UNIX CP build and writing a test for it.
We do slightly different native subclassing stuff and lookup so a diff in the py directory might be enough too. (IIRC this is for native subclassing and better property support.)
I'm causing the disconnects by exiting tio by using Ctrl-T Q. That shouldn't cause a hard fault in CircuitPython.
Fixed by #8823. Thanks @furbrain
I think you want array.array. You can give it integer size and it looks like the bitmaptools code will respect it. https://docs.python.org/3/library/array.html
Thanks for the improvements! Just a couple suggestions.
I understand the reason why it is lacking the support from Adafruit, but I think you should remove the download page or the download button at least on CP website if it is no longer working. Doing so to prevent someone like me who wants to purchased a more powerful "supported" board and realized it is actually not later. As suggested above, I will try the Blinka on MicroPython for now.
Please file an issue here: https://github.com/adafruit/circuitpython-org I don't agree that it should b...
Tested with test from #8391. Works -- Does not exhibit the problem described there.
Thanks!
I can try
@slender iron, well maybe....
👍
Dang it. even in a py it still imports if it's in an if block. So the full logic is still not there
I'm guessing since it's typing it's trying to be as complete as possible
I think this might be the closest we can come:
It could also be a good first step...
Hopefully this will pass. Please push back if I'm being too aggressive with these errors. I'm not sure how else to make more space.
There was a lot of work done for 5.0.0-beta.3 for _pixelbuf that involved handling subclasses of native classes. There were a few more changes in 5.0.0-beta.5. There may be such changes missing from objdict.c, or there is some fundamental issue in how it was done. For instance, I will try the same thing for a subclass of list, which does have the changes.
Thanks guys for the update, I assure we are buckled in 💯
then, I'd like to hear how community members plan to use _bleio and if possible give me code samples to work with. It's fine to use this issue to communicate with me.
I'd love to see adafruit_ble_apple_notification_center working on the Pico
not sure whoelse besides @mortal kernel is working on ble for the pico w, but i found this and I hope it might be of some inspiration/help https://www.youtube.com/watch?v=RnpVAqOmc8E
This video introduces the use of tinyusb HID host and BTstack HID device on Raspberry Pi Pico W to convert a wired USB keyboard into a Bluetooth wireless keyborad. Test Bluetooth wireless keyboard input on desktop PC and cell phone.
Custom Bluetooth HID keypad:
https://youtu.be/XO2e0KP2YLk
I'm just catching up here, I have a love/hate relationship with .pyi files for all of these reasons. Have stub-only packages been discussed? If you make their generation and PyPI upload automated, you could make it so that each virtual environment could download the typing stub for a single board.
i think there was worry about 500 packages, one for each baord
You're limited to one per environment since the type checker will try to find a single match for board, but you could just pip install the typesheds
That makes sense. The lack of logic functionality in typesheds is both understandable and frustrating.
@eightycc It's immensely appreciated that you're tackling it, truly! No worries on time. My own C/C++ chops are mediocre, but I can ask around in the ZMK discord if anyone wants to pitch in. Some incredible devs there, many with BLE experience.
I know that for the CircuitPython VS Code extension you explicitly set the board, so I assume it works like the proposed environment variable that was mentioned prior in that context. I don't remember how much that setting affects things though (type checking? importable modules?).
Sorry if I'm going over treaded territory
So making them all would be easy, there are 2 downsides:
- would pypi rate-limit us?
- if you wanted to see if your code worked for 2 different boards, you would need to uninstall one stub and install the other
Not sure about the rate limiting, it is weird that the answer isn't in an FAQ though I suppose there isn't a usual need to upload like this.
I see this as more something that might be done in the editor extension rather than just by installing packages. Also, for instance, suppose you want to write generic code rather than for a specific board, or for a set of boards. It seems like a lot of work when you just want to check the pin names or supported features for a board
I wonder if the validation should be pushed down into disk_read() or what it calls: mp_vfs_blockdev_read(). That makes those routines safer to call from elsewhere.
@drath42 I don't immediately see the reason for this change:
- if (vfs->fatfs.ssize == MSC_FLASH_BLOCK_SIZE) {
+ if (vfs->ssize == MSC_FLASH_BLOCK_SIZE) {
I could probably figure it out, but I'll ask you instead :slightly_smiling_face:
I wonder if the validation should be pushed down into
disk_read()or what it calls:mp_vfs_blockdev_read(). That makes those routines safer to call from elsewhere.
I took some notes on the callstack up to the point where it crashes, but I didn't spend too much time figuring out how this code is used outside of my immediate problem. I'll look into it later (I hope).
@drath42 I don't immediately see the reason for this change:
...
I could probably figure it out, but I...
Do we have any thoughts about how long the timeout should be? Maybe calculate how long the transfer should take, then double it? and then add say 5ms for shorter transfers?
The main point of the timeout is to catch a bus that's hanging. I don't think we need to calculate anything. So 1 second is probably more than enough, as @ladyada mentioned above.
I loaded the latest artifact from #8699 up on a Feather ESP32-S3 and I'm still seeing web workflow issues. If the file browser screen is accessed the REPL appears to hang, refreshing the file browser screen releases the REPL for a few seconds and then it freezes again, after several minutes the REPL does become responsive again at least until the web workflow file browser screen is refreshed again.
Renameing or deleting a file from the web workflow file browser when the REPL is frozen wil...
Perhaps #8690 should be separated from this PR so it doesn't hold it up?
interesting to see CP 8 was released at the start of february 2023
Along with file delete/rename/uploads changing the current folder (going into the SD folder for example) through the web workflow file browser also releases a hung REPL.
Uploading a file causes the code.py to stop for an auto-reload soft reboot, after which the code.py starts and runs normally however the web workflow page no longer responds. Other Circuit Python devices still show the device, however the link doesn't work.and evenually times out with a "this site can't be reached" messa...
I'd thought about using a class like the Monitor class but it felt heavy for such a simple call. I'm happy to rewrite it to do that if you'd prefer, though.
I'll change the code to return None for the IP address DHCP lease for the station.
If I'm understanding correctly, namedtuples would be immutable, unlike the dict? Maybe that would be preferable.
I'll take a closer look at the Pi Pico SDK re: the DHCP server. I'm much more familiar with Espressif's.
I'm not at all understand...
something like that, I have a bunch of questions too about native subclassing. could not figure out what was going on in that issue. Are you going to eat lunch soon? I have some links to fix in a Learn Guide, that will take 10-15 minutes
yup, gonna eat now and then I'll be free
great, ping me when you're back
This also happens on:
Adafruit CircuitPython 8.2.9 on 2023-12-06; Adafruit KB2040 with rp2040
so I'm guessing it's generally true of the RP2040 port.
@tulip sleet done eating. are you ready?
yes, finished the link surgery
Looking at the code, maximum data that can be transferred in "one go" is 65k - at 100kHz and assuming 10 bits per byte (covers ACK etc), this would take 6.5s. So a 1s timeout may incorrectly fail.
Choices would be to have a computed timeout, or reduce the chunk size to say 1k - I'd be inclined to go with the latter
This PR fixes #2253 and #8093.
Explanation
This works by creating the nrfx_twim device with a callback (twim_event_handler).
When the callback is triggered it marks that the transfer has finished and records any error/success code in the twim_peripheral data structure.
We replace the nrfx_twim_xfer function with our _twim_xfer_with_timeout which make a note of the start time, and waits until either the callback has triggered or 1s has elapsed.
If the timeout is triggered i...
It also reduces the amount of data sent in one transaction to 1024 bytes. Longer transfers will still happen, they are just chunked.
Should be set I think. One thing: I specified 'qio' for the SPI mode of flash and psram but I am not 100% sure that is correct (or if it matters) for the ESP32. I think you folks know what is best?
Indeed it was respected. It also dropped memory usage dramatically and improved performance slightly. Perhaps the simpletest code should be changed from byte() to array.array() to help folks like me.
You helped me to peel back another layer of the Python onion. I have some other code that will likely benefit, as well.
Thank you!
@dhalbert and I debugged this today. It is caused by CircuitPython passing subclass instances into native code. The setitem impl would then read the type and lookup what to call. The type from the instance is still the subclass which causes the recursion. PR incoming.
The get, set and del item methods didn't correctly lookup the value from the parent native instance because the functions took the type from the instance.
Fixes #8758
Should be set I think. One thing: I specified 'qio' for the SPI mode of flash and psram but I am not 100% sure that is correct (or if it matters) for the ESP32. I think you folks know what is best?
That is usually right. Did you confirm it works?
Not sure who is best to ask, so will just throw it into the ether...
I have a laundry list of things that I would enjoy doing with/for CP.
Things like:
- Connection manager
- Adding things to cookiecutter (tox related)
- Creating and updating some libraries (OAuth, generic time fetcher, config library, etc)
- adding test coverage to libraries
- and more!
Although I can ask random questions here or take up the next 10 weeks of in-the-weeds...
I thought I'd ask if there is a better way?
I will give as much to this as I can, and that is accepted. Right now it's kinda a thing at a time and would love to super-power that.
Let me know.
Asking questions here is probably the most expedient way of going about it
Sounds good. Was hoping for something that might be a little faster. And didn't annoy people with constant questions of "Do you want this"
I'd much rather you ask before doing something than just doing it
🙂
gotta run now. thanks for your help!
Oh I agree - don't want to waste anybody's time. Just trying to adjust my personal time and how much I can give to working on Adafruit work, vs other stuff
I have the same thing - I don't want helping to be a burden 😉
So my issue is more that I have time to give, and Adafuit is the first bucket I want to give it too. But if I can't pre-fill that with a task-list, it will go elsewhere. I have a bunch of ideas and partial libraries I've written for my own things and just trying to figure out what to do.
Should be set I think. One thing: I specified 'qio' for the SPI mode of flash and psram but I am not 100% sure that is correct (or if it matters) for the ESP32. I think you folks know what is best?
That is usually right. Did you confirm it works?
Works on the WROVER board, but I do not have the other board to try.
Back to the stubs thing. Although not sure why they come up double... but this is pretty cool (IMO)
If I had an easy way to do a video, I'd show code errors when switching boards. I like the idea of an env var, but this super quick switching is super cool...
And when I made the comments on the call yesterday about adding things into the doc-string? This is why
Not pulling Frozen Modules and Avalible, but would....
Maybe ReadableBuffer is not the clearest type annotation. The documentation should explain that 16-bit values are possible.
I think this may be fixed by https://github.com/adafruit/Adafruit_CircuitPython_HID/pull/118 and https://github.com/adafruit/Adafruit_CircuitPython_HID/pull/122, which now cause HID device lookups to be delayed until USB is ready. But I don't have the hardware that produces the problem to retest.
I think I will close this for now, especially as memory consumption is even more confusing with 9.0.0 due to the dynamic heap growth.
Closing for now based on PaintYourDragon's testing, etc.
@Flashton91 Did you ever get this working?
Did you tie the grounds of the two boards together? That's necessary for electrical reasons.
Closing as I think the discussion is complete.
Add Sipeed Lichee Pi 4A SBC, recently added to PlatformDetect and Blinka
Closing to continue discussion in #8713.
@rgov What was the host operating system you were using, and how were you copying the files over?
The minimum advertising interval is 20ms. I want to use a smaller interval time. Is there any way to support for high duty cycle connected direct advertising?
The 20ms minimum is enforced by the underlying nRF software, and is part of the the BLE standard.
I first encountered the ReadableBuffer data type when working with synthio.waveform objects -- and was initially confused. The examples and related learning guide code used dtype=ulab.numpy.int16 which helped me to understand that those were int16 arrays as well.
Thank you! I think you're the first person besides myself to add a Blinka board here.
macOS Sonoma, which as mentioned may delay writes.
Still interested in a PR if you have time.
Could you I submit a PR with this modification?
The 20ms minimum is enforced by the underlying nRF software, and is part of the the BLE standard.
In this file, it seems to be supported
I tested the patch with a MacroPad RP2040 and a simple keypad program on Ubuntu 22.04, and it did not wake up the computer. Will debug.
It turns out this is a Linux issue. The MacroPad worked fine to wake up macOS and Windows. See https://github.com/adafruit/circuitpython/issues/5380#issuecomment-925044500 for how to determine which USB devices are enabled for wakeup. See also https://askubuntu.com/questions/848698/wake-up-from-suspend-using-wireless-usb-keyboard-or-mouse-for-any-linux-distro/874701 for details on how to change these settings. I would have thought there was an easier way, and maybe there is for some Linux dis...
- Fixes #8774.
- Fixes #5380.
Thanks very much to @meesokim for code to enable usb_hid to wake a sleeping host computer, and to @hathach for implementing this ability in TinyUSB in the past.
Tested successfully with MacroPad RP2040, Feather nRF52840, and Circuit Playground Express on Windows and macOS.
On Linux not all HID devices are automatically enabled to do wakeup. See @hathach's comment. See also...
This enables rudimentary UVC support. Tested on Adafruit MacroPad RP2040. This is not the final form of the API, which will ultimately be usable as a displayio display. Instead, this is intended as a preview for folks who are interested in testing basic functionality now.
-
Configure boot.py for UVC:
import uvc uvc.enable_framebuffer(128, 96) -
put RGB565_SWAPPED content in
uvc.bitmapat runtime. This code shows a horizontally scrolling test pattern:
...
ya, looks neat!
Do we feel this is the way to go then?
A few ru builds don't fit anymore. @tannewt's upcoming error message shrinking should fix this, so we can ignore those failures.
A recent PR run complained:
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-python@v4, actions/cache@v3, actions/upload-artifact@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
We may be able to depend on these actions being updated, or we may need to bump ...
good question. the try except is a bit clunky. the env variable didn't work though right?
Let me try that
Not in a way that I can get it to. I also tried:
from typing import TYPE_CHECKING
if TYPE_CHECKING:
import board.matrixportal_m4 as board
else:
import board
And TYPE_CHECKING is False in the editor
it doesn't work with os.env?
- Fixes #8832.
checkout@v4 has a new progress: true|false option that allows suppressing progress lines, which can make a log a lot longer. Sounded good to me, so I added progress:false everywhere it was used.
upload-artifact@v4 and download-artifact@v4 have been completely rewritten, with some upward incompatibilities. I think they should still work for us, though.
One comment request. Thanks for doing this!
We should probably change the function description to note that wakeup drops a report.
Perhaps #8690 should be separated from this PR so it doesn't hold it up?
I don't want to mess with this PR anymore. I'd like to get it merged since it is ready.
Perhaps #8690 should be separated from this PR so it doesn't hold it up?
I don't want to mess with this PR anymore. I'd like to get it merged since it is ready.
That's what I was thinking too :grin:, merge this but remove the link to #8690 or re-open it after this is merged.
Let me try again. I couldn't get the editor to pick up the value. Since it would be more of a run time thing...
@tannewt I added documentation.
Nope. Even with ones that I know exist like Path it won't work. Realizes that the if TYPE_CHECKING works (think my editor got confused, after restarting it it worked - did try restarting for getenv), but that errors on a board...
kk. Don't use pycharm so don't have experience with it
does it work in VS Code?
I don't use vs code either
Mu?
sublime text
ahhhh. I do a lot in UltraEdit. sometimes simple is good
This is an early board revision, changes are anticipated up until release. However, main parts of functionality check out.
https://www.tomshardware.com/raspberry-pi/adafruit-designs-raspberry-pi-rp2040-floppy-drive-emulator
@slender iron - do you feel we can move forward with creating the stub board files and figure out how best to use them in each IDE while that's moving along?
I think you should do what's best for you
Do we want to add them to circuitpython-stubs?
Looks like this is due to the limited internal memory on the S2. With the new split heap we allocated to internal memory for small heap splits and then PSRAM after. The old code only used SPIRAM for CP. The fix is to allocate to SPIRAM first before trying internal memory.
This leaves internal memory for FreeRTOS and other IDF buffers.
Fixes #8682
That's ok with me
Do we want a larger default heap? This seems like a pretty specific case to change a default for.
Please comment if this still happens and we'll reopen.
Cool
If you're doing one for VS Code, check out the CircuitPython extension for VS Code. For what it's worth I believe it already grabs board definitions and bubble library info. Not sure how its capabilities align with your goal, but I think I remember seeing it open source and also permissively licensed (MIT, I think) if you decide to do something else.
I use VS Code, but more as tracking multiple projects and more like a text editor. Does it also support stubs?
the doc build error:
Error: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run
It is now an error for two different steps to upload artifacts with the same name. Some people do it on purpose, though I do not know whether we do or not. I imagine the change was made out of belief that it was an error that should be diagnosed.
the silabs error is the usual spurious build error, which remai...
I opened this issue: https://github.com/carlosperate/arm-none-eabi-gcc-action/issues/49 to ask for that action to be updated. We could submit a PR too.
I may also make the -j4 change here too: https://github.blog/2024-01-17-github-hosted-runners-double-the-power-for-open-source/
It is now an error for two different steps to upload artifacts with the same name.
I fixed this, now it builds doc-html and doc-latexpdf, instead of two docs.
I took out the PARALLEL stuff in tools/build_release_files.py because it wasn't actually used anywhere.
Support for the PicoMo board. The Product ID has already been allocated by Raspberry Pi.
Yes, it support stubs, but I don't remember exactly how the extension does it, but you basically select which board you're using, and I believe it updates its autocomplete for board pin definitions
I can look into that though, to make sure that selecteing the board really does change pin definitions and it isn't just a general catch-all selection of pins
CircuitPython version
Adafruit CircuitPython 8.2.9 on 2023-12-06; Raspberry Pi Pico with rp2040
Code/REPL
>>> print(f'{63456:,}')
63,456
>>> print(f'{63456:b}')
1111011111100000
>>> print(f'{63456:_b}')
Traceback (most recent call last):
File "", line 1, in
ValueError: invalid format specifier
>>>
Behavior
print(f'{63456:,}')
63,456
print(f'{63456:b}')
1111011111100000
print(f'{63456:_b}')
Traceback (most recent call l...
I went ahead and marked this as an enhancement request, but I also implemented it and offered it to upstream at https://github.com/micropython/micropython/pull/13516 -- I think this could be very useful and would like to see it added.
Thanks, Jeff. A small thing, but makes life simpler.
Cheers
Turns out the I2C bus that is mapped to the silkscreen is not correct and is instead the same as CAM_I2C.
Tested now with the camera, the pmic (these 2 are internally connected) and an ssd1306 (which was connected to the SDA and SCL pins of the silkscreen).
I don't even know why I was using IO3.
But in either case, it's now correct.
Thanks! Are you associated with the project?
Could you prepare a PR for https://github.com/adafruit/circuitpython-org as well? Guidance is here: https://learn.adafruit.com/how-to-add-a-new-board-to-the-circuitpython-org-website
Tried to build on my arch machine, however there is a compile error.
../../shared-module/uvc/__init__.c: In function 'shared_module_uvc_enable':
../../shared-module/uvc/__init__.c:61:27: error: cast increases required alignment of target type [-Werror=cast-align]
61 | uvc_bitmap_obj.data = (uint32_t *)frame_buffer_rgb565;
| ^
Could be that my gcc is too new. gcc (GCC) 13.2.1 20230801
If you have time, that would be great
previously the only way to display a circuit python display to OBS was with the Pico DVI. Hopefully UVC will allow live streaming of a display with displayio to OBS? FoamyGuy could output the display instead of having a webcam pointed at the display. I know it's really early but the prospect of the capability is really exciting.
yup! it is exciting
@onyx hinge please re-review: https://github.com/adafruit/circuitpython/pull/8699
Otherwise it will be freed during a collect and potentially overwritten. This is a bug in 8.x but isn't seen as early as in 9.x because 9.x will collect before expanding the split heap further.
Fixes #8793
This cast would be an undetected error if we had any other block device implementations (micropython has several) but we control them all it's probably OK.
I found one item for possible future improvement, but if it fits let's put it in and get some testing!
suggest merging these constants since I think there was nothing but error message generation that cared about the distinction.
Would you like me to add native ioctl implementations for others with native read/write? Or what?
@slender iron no, not asking for specific action around the flash ioctl thing. but we would end up with crashy-crashy problems if we took a flash implementation from micropython without modifying it, and sadly the compiler won't give us an error to help out
thanks for doing the review!
I found one item for possible future improvement, but if it fits let's put it in and get some testing!
Done since it makes sense here.
It will then run the next script.
Fixes #8148
It isn't init yet. Fixes #8761
@onyx hinge build is green after consolidating the enum
thanks for implementing that change
Looks good! You'll want to merge to get the file size reductions.
I believe this is still an issue.
// Microphone pins
{ MP_ROM_QSTR(MP_QSTR_MIC_DATA), MP_ROM_PTR(&pin_GPIO46) },
{ MP_ROM_QSTR(MP_QSTR_MIC_CLK), MP_ROM_PTR(&pin_GPIO43) },
@jamesjnadeau Here are the lines for microphone support in pins.c
very cool!
colors are swapped but I know where that is
@slender iron or are those colors right? The blue looks quite blue but the purple's correct.
it looks ok to me. try the display ruler 🙂
and choosing the opposite "swap bytes in word" setting is clearly wrong (green blinka)
hrm, only the big one has the test colors
oh, okay
well boo. it works on macropad but on qtpy esp32s3 it fails to start if I have the UVC-configuring line in boot.py.
well I guess I'll be getting out the big debug guns tomorrow 🙂
Hello Dan.
Thank you for approving my request.
I am a professor at a technical university (see my home page
https://jacques.supcik.isc.heia-fr.ch/) and the hardware of this board
has been developed by my colleagues in the electrical engineering
department. This board will be given to young people during exhibitions to
attract them to technical studies. I am in the computer science department
and my role is to write software for this board and to promote it on
open-source platfor...
@supcik Excellent! Pleased to hear about this board and your work on it.
This doesn't work on my espressif testing board (adafruit qtpy esp32s3) yet, I'll sort that out soon. rp2040 seems to be good.
Could you prepare a PR for https://github.com/adafruit/circuitpython-org as well? Guidance is here: https://learn.adafruit.com/how-to-add-a-new-board-to-the-circuitpython-org-website
Thank you for the link. I will prepare a PR
On esp32s3, having the UVC-configuring line alone causes a hard-fault at startup. However, disabling some other USB devices allows it to boot and run code.py:
import uvc
import usb_hid
import usb_midi
usb_hid.disable()
usb_midi.disable()
uvc.enable_framebuffer(64, 64)
however, as far as I can tell within qv4l2, the device never actually transmits a frame of data (received frame count never increases). I have not yet analyzed this failure in further detail.
very curious if imx works too
Backport of #8839:
Otherwise it will be freed during a collect and potentially overwritten. This is a bug in 8.x but isn't seen as early as in 9.x because 9.x will collect before expanding the split heap further.
Fixes #8793
@jepler want to close this?
@furbrain I was going to test this, and first tried to reproduce the old problem from #2253. However, I can't seem to get the test suggestions there to work: unpowered LSM9DS1 on an Arduino Nano 33 BLE, or an unpowered LIS3DH attached to a Feather nRF52840 with a resistor between SCL and SDA. In both cases CircuitPython 8.2.9 complains that SCL/SDA pull-ups are missing.
Did you test this against some hw configuration you knew would cause the problem? Thanks.
Here is the description for the PicoMo board developed at the School of Engineering and Architecture of Fribourg.
Never mind -- I should have read your OP more carefully! I need to apply and then remove power.
I tested it against my current use case - i2c device is on the board, but is powered by a dedicated pin. I'd you turn the pin on and then connect the bus, everything works fine until you unpower the bus and it crashes
This is also the case if you are running an I2C display on separate per and later remove the power. Because the display gets repurposed as a console it is never properly shut down and you get a hang when you try to turn off the power to it
Yes, the extension does handle pin definitions
Just tested my code in the PR on stock 9.0.0-alpha.6-34 and it still hangs
It generates stubs for them upon building the extension and supplying them with it. The build CI parses the C file pin defs and generates pyi files for each board.
The extension allows you to select different boards, and doing so changes Pylance (Python analysis) to use those generated and supplied stub files, as well as other things like giving the CircuitPython std lib modules that it also parses precedence over CPython's ones.
In summary, stubs are built when the extension is built on GitHub, and selecting the board reorganizes the order of where autocomplete looks to give precedence to those stubs.
I tested with a Feather nRF52840 and an LIS3DH. I started collecting data from the LIS3DH and then disconnected its power. Before this fix, CircuitPython hangs. After the fix, I get an ETIMEDOUT, as expected.
Thanks very much for the fix. Using the callback is cleaner than having to modify nrfx.
For what it's worth, if my understanding is correct about the process, it means that pin stubs are not generated regularly but only on extension updates. The library autocomplete works with the same Pylance method, but instead downloads the most recent bundle from within the extension, so that IS up to date.
Cool. I'll take a look. I'm also building from pins.c and other places
@slender iron @onyx hinge I need 28 bytes in ru translations for a couple of M0 basic boards that use a lot of pins. There's not much left to squeeze, HOWEVER, if I turn on MICROPY_ERROR_REPORTING_TERSE, which shortens a bunch of messages in py/, then I gain back about 1300 bytes. These terser messages are not bad: they mostly leave out ancillary stuff, like number of values expected instead of just wrong number, or an additional type name for explication.
just to give you an idea of other headroom, trinket m0 ru has <300 bytes free, because it has many fewer pins.
These builds have already been pruned to an inch of their life. I checked for accidental double precision, etc.
these terse messages are already in the translation files, they just might not have been used previously
I think it's worth considering
i will do this in the morning; it needs a little extra mechanism to control from the Makefiles
FYI - I just optimized part of my JPEG decoder for the ESP32-S3's SIMD instructions. It gets a 20-40% speedup depending on the image and options. It's not an official release yet, but you can clone it and try.
Question: I am using an Adafruit Feather ESP32-S2 TFT flashed with CPY v9.... (see below). I tried to follow the move of board.DISPLAY to displaybus.DisplayBus, however I can't set root_group. See the REPL trial below: Adafruit CircuitPython 9.0.0-alpha.6-29-g5f318c37bb on 2024-01-19; Adafruit Feather ESP32-S2 TFT with ESP32S2. See image of REPL output https://imgur.com/a/RzygVaL
you are trying to set it on a class, you need an instance
Thank you. I defined: display2 = busdisplay.BusDisplay. Next defined a displayio.Group(), then couldn't set display2.root_group.
yes, display2 is a class, you never created an instance of it
by the way, it's better to ask this kind of questions in #help-with-circuitpython
ok, thanks
@stuck elbow I flashed the latest. Used board.DISPLAY. It runs OK
If anybody has a moment to look at this draft PR: https://github.com/adafruit/Adafruit_CircuitPython_Requests/pull/152 which stems from this issue: https://github.com/adafruit/Adafruit_CircuitPython_AdafruitIO/issues/115.
Just want to make sure the method is sound before I add tests
I'd suggest un-marking it as draft if you want a review. I tend to ignore them
Make error messages terse when CIRCUITPY_FULL_BUILD = 0. This saves about 100 bytes on the en_US build and 1200 bytes on the ru build, which was overflowing.
Done
Adafruit CircuitPython 9.0.0-alpha.6-46-gd7716de968 on 2024-01-25; Raspberry Pi Pico with rp2040
Fix validated. Thanks!
@slender iron I am going to make draft release notes for a 9.0.0 alpha or beta release, which brings up the question, alpha or beta?
maybe we are ready for beta
beta works for me
for next 9.0.0-something release
CircuitPython version
Adafruit CircuitPython 8.2.9 on 2023-12-06; Adafruit MatrixPortal S3 with ESP32S3
Code/REPL
import displayio
import board
import rgbmatrix
import framebufferio
displayio.release_displays()
DISPLAY_WIDTH = 320
DISPLAY_HEIGHT = 160
DISPLAY_ROTATION = 0
BIT_DEPTH = 3
AUTO_REFRESH = False
matrix = rgbmatrix.RGBMatrix(
width=DISPLAY_WIDTH, height=DISPLAY_HEIGHT, bit_depth=BIT_DEPTH,
rgb_pins=[
board.MTX_R1...
I talked with @identifystation and @DJDevon3 on discord about this. The error is from the FrameBufferDisplay checking the RGBMatrix framebuffer size and finding that it doesn't match the size it's expecting. I don't know whether there's an unreported allocation failure in RGBMatrix or there's some size-computation issue.
Seeing as how it would require at least 20 panels to replicate this issue there will have to be a way to emulate the buffer data required to throw that error. That is definitely dev territory and way over my head.
I have not encountered that issue with 12 panels and according to the dimensions listed @identifystation could successfully get up to 15 panels. Even if it's a framebuffer size limitation or miscalculation I have my doubts that a single Matrix Portal S3 will have the signal str...
Since RGBMatrix is "write-only" we can try virtual large numbers of panels without actually connecting up any panels.
Sounds you like ran out of endpoints on the ESP32-S3. UVC should start out disabled, like MIDI. Or is that already true? https://learn.adafruit.com/customizing-usb-devices-in-circuitpython/how-many-usb-devices-can-i-have
Hi, How can the wifi be used on RPi zero w?
I figured out the esp32s3 crashing bug (I was not counting the correct sort of endpoint) but the frame data still never transferred. @hathach said he was working on esp32s3 uvc in arduino, so if there's a library level problem with esp32s3 it will be exposed that way. I don't know what that means for whether/when we merge this PR. It does seem to work well on rp2040 (at least the one board I tested).
Closes: #8846 if my analysis is correct
Looks like cough someone cough assumed the size of the rgbmatrix framebuffer would fit in 16 bits: uint16_t bufsize, width;
@onyx hinge are you working on any near-term fixes that I might put into beta.0? I think I could hold off on the terse messages because the beta.0 build might just fit due to the version string being shorter. Or we'll just have a couple of broken ru builds
@tulip sleet there's the initially mistitled and still untested https://github.com/adafruit/circuitpython/pull/8847 for rgbmatrix. I don't think floppsy board support or uvc are important right this second.
that's easy to test, and we can give the one user a personal build for their project
I wasn't intending to do much work today so I won't be testing it right now
ok, so not urgent. I think I will just do beta.0 this morning.
that will get rid of a large backlog. Can do 8.2.10 in a week or two or less
great, and thank you!
and yes, uvc always defaults to off; don't want to go allocating the framebuffer if it's not going to be used.
Here's an RP2040 PIO implementation that does not use interrupts. It requires emptying the fifo to read the latest value.
Examples of TERSE vs NORMAL messages. The messages are still quite understandable; you just have to look at the context more carefully
"__init__() should return None"
"__init__() should return None, not '%s'"
"name not defined"
"name '%q' is not defined"
"cannot create instance"
"cannot create '%q' instances"
"unsupported type for operator"
"unsupported type for %q: '%s'"
"wrong number of values to unpack"
"need more than %d values to unpack"
"object not callable...
@identifystation Please try this build (unzip to get the UF2):
https://github.com/adafruit/circuitpython/actions/runs/7679441384/artifacts/1199728584
@jepler changed the buffer size variable to be 32 bits from 16 bits in #8847. I tested with the program in the first post and it does not give an error.
Will there be an 8.2.10 release? I saw the PR into 9 for Fix subclassing dict which would force code to support 9+ if they wanted to use that
There will be an 8.2.10. I don't think we will backport the subclassing dict fix because it's large. The bug has been present since 5.something, so it's not been a huge blocker. It does prevent microdot from being ported to 8.x, I think.
Okay. There are a few things I personally have that I've had to do some crazy work-arounds to get to work. Was there more than 1 pr? because it looked pretty small...
though one could always wrap dict.
we are hoping to get 9.0.0 final out relatively soon
You can wrap it, but dict(wrapped_dict_class) doesn't work
I think you could target your connectionmanager to 9.0.0
i mean you make a duck-type dict-ish thing
connectionmanager doesn't need it. I have a slew of other things sitting on a back burner. The main one is a Config library that loads from json files, and it works in the most part by exposing things like __getitem__, but there is strange behavior around passing it into a dict constructor.
I'll try it on the new 9.0.0 beta and see if it works
The change itself clearly does what it intends to do.
I think that as a practical matter we are going to have to do something about our most flash-constrained boards. Personally, I think this is a reasonable step to take, so that they don't hold back our overall progress.
Automated website update for release 9.0.0-beta.0 by Blinka.
New boards:
- columbia-dsl-sensor
- cytron_edu_pico_w
- espressif_esp32_devkitc_v4_wroom_32e
- espressif_esp32_devkitc_v4_wrover
- heiafr_picomo_v2
- lilygo_ttgo_tdisplay_esp32_4m
In runs of .github/workflows/create-website-pr.yml, this may happen.
Run python3 build_board_info.py
Logged in as adafruit-adabot
unable to create branch
{"message":"Not Found","documentation_url":"https://docs.github.com/rest/git/refs#create-a-reference"}
That step is reported as succeeding, though it clearly has not. (The reason for the failure is that adafruit-adabot/circuitpython-org needs to be updated.)
See for example (until it disappears): https://github.com/adaf...
Hmm, I see what you mean. I'll take a look. Right now if you can do builds yourself you could just remove the range check and see if it works. If you could write a simple example for testing that would be great.
@tulip sleet should I open a bug for this:
class Test:
def __init__(self, data={}):
self._data = data
def __repr__(self):
if hasattr(self._data, "__repr__"):
return self._data.__repr__()
# dict.__repr__ does not exist in CircutPython
return str(self._data)
def __delitem__(self, key):
if key not in self._data:
raise KeyError(key)
del self._data[key]
def __getitem__(self, key):
if key not in self._data:
raise KeyError(key)
return self._data[key]
def __setitem__(self, key, value):
self._data[key] = value
def items(self):
return self._data.items()
def keys(self):
return self._data.keys()
In CPython this works:
In [26]: x = Test()
In [27]: x['a'] = 1
In [28]: x
Out[28]: {'a': 1}
In [29]: dict(x)
Out[29]: {'a': 1}
In CP 9.0.0-beta.0 it doesn't (also doesn't in 8.2.9):
>>> x = Test()
>>> x['a'] = 1
>>> x
{'a': 1}
>>> dict(x)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 19, in __getitem__
KeyError: 0
When adding logging CPython it calls keys and iterates over those. in CP it seems to start at 0 and work up from there
Try it in MicroPython also
Will do shortly
@tulip sleet looks like it happens in both micropython 1.21.0 and 1.22.1
not necessarily covered in https://docs.micropython.org/en/latest/genrst/index.html#, or it may just be a bug. I'd search the MicroPython issues and open a new one if necessary.
subclassing builtin types is known to be flaky in a number of ways; whether this is a real bug or just a limitation I am not sure
since you can subclass dict in CP9, I can replace all the self._data with super() calls. But then of course it doesn't work on 8.x
Does Adafruit have anything like LTS for versions?
When we do a GA release, the last n-1 release is still available, and we give a pointer to the last bundle for the n-1 release. There may be some overlap when the n release is released as well.
Gotcha. Makes sense
we have talked about version-specific bundles where the library versions included are specific to a particular release, like 1.1.0 for 8.x and 2.0.0 for 9.x, but we haven't done that
Oh that would be cool. (Could even match the CP version...)
so for now we just write version checking code in the lib itself if it's needed and take it out later
Makes sense. Would be cool if mpy-cross could automatically leave out the other bits
CircuitPython version
MicroPython 9.0.0-alpha.6-49-gb704452f70 on 2024-01-27; linux [GCC 11.4.0] version
Code/REPL
class MyDict(dict):
def __init__(self, initial_dict=None):
super().__init__(initial_dict)
d = dict({'foo': 'bar', 'a': 123})
print(d.keys()) # keys is correct
d = MyDict({'foo': 'bar', 'a': 123})
print(d.keys()) # keys is empty
Behavior
When running the above example, the base dictionary is not initialized corre...
- Fixes #8850.
I think that there are still other things about subclassing dict that will not always work, such as trying to override other operations. However, this fixes a clear bug.
I made #8851, which I think fixes this.
set up CIRCUITPY.IMG as /dev/loop0
mounted /org/freedesktop/UDisks2/block_devices/loop0 on /media/jepler/CIRCUITPY
jepler@bert:~/src/circuitpython/ports/posix$ cat /media/jepler/CIRCUITPY/boot_out.txt
Adafruit CircuitPython 9.0.0-alpha.6-48-ga17d2ac0db-dirty on 2024-01-27; posix with amd64
Board ID:default
I considered whether POSIX CircuitPython would use FAT or POSIX VFS implementation; I still think doing POSIX VFS would be good (access files directly on the hosting computer) but FAT was easy..
so, now, it arbitrarily allocates a 512KiB file "CIRCUITPY.IMG" which can be "loop mounted" on supporting operating systems like linux.
one reason I want to switch to POSIX VFS is because I want to run tests from this thing, not upstream's 'unix' port.
because it will not be such a hack to enable stuff in shared-modules for this port, meaning we can test more of it
Thanks! I can confirm that your fix addresses the problem, and I do not have any more failures in my microdot test suite related to my dict subclass. :tada:
Great! Thanks for testing so thoroughly.
Tested by @miguelgrinberg as reported in #8850.
Failing builds are a couple of ru builds that don't quite fit, as before.
Got the LED_PWR IO wrong, and incorrectly named the I2S AMP IO and I2S MIC IO.
Got the LED_PWR IO wrong, and incorrectly named the I2S AMP IO and I2S MIC IO.
@mikelaw881 which raspberry pi have you tried to compile the c driver on? I see that they've tested on a pi 3 already and am curious if you've at least had success there.
Thanks @wtuemura and @andibing !
I saw the form, however it requires company info and stuff. And since I'm not the board manufacturer I can't do that. I'm at least hopeful it can be done with a PR, since there have been others added like that.
that seems to be on the main RP repo, not circuitpython?
Thanks! I fixed a few small items, see the commit messages. Now good to merge, assuming the CI comes up green.
that seems to be on the main RP repo, not circuitpython?
Yes, that PR is directed towards RP, for a product id (PID) from their vendor id (VID, 0x2E8A).
For a proper CircuitPython port we need to have a unique VID:PID for every board that exposes USB.
ah okay, that makes sense
Thanks! I have comliled and double checked on my Raspberry pico. All work fine!!
Concerns / resolves #8777
Slight difference to the implementation mentioned in #8777: I "upgraded" to an integration based algorithm because the simple scanning timeout still gave me issues on some anoyingly bouncy keys and for better filtering of potential noise/EMI (which I did not encounter, but hey, it's basically free).
Summary:
- keypad state transitions happen after their cumulative average crosses an adjustable threshold,
keypad.currently_pressedhas been converted hold the ...
You are correct, that is how debounce_cycles worked. I had to tweak the algorithm though, so that doesn't apply anymore. The PR took longer than expected, because the CP repo keeps breaking on my side for some reason.
As we discussed earlier and I think you confirmed here, I think a "scan" here means elapsed time of one interval. Is that indeed what you mean? So is 1 the same as the previous algorithm? I would think that 0 would mean no debouncing then.
I would change scans on average to intervals on average, assuming that's what you mean. It's not so obvious that a scan occurs once per interval, and in the future, ...
You will need to bring your local branch up to date. Some help on that is here: https://learn.adafruit.com/contribute-to-circuitpython-with-git-and-github/staying-up-to-date
So for your excessively bouncy switches, how is making the interval be (old)interval * debounce_threshold less satisfactory? Does it introduce too much latency? But I would think the integration algorithm also introduces similar latency with the threshold set to to some multiple of the interval.
"scan" means elapsed time of one interval, yes. The reason why I changed the name from "interval" to "threshold" is that it's not a fixed interval (i.e. constant time) anymore. The "threshold" seemed to be more accurate a description when dealing with the integrating that depends on physical bounciness.
"intervals on average" is a good suggestion. Tbh, I struggled a bit with the doc string. Not easy to convey what exactly the parameter does without laying out the low level algorithm.
You will need to bring your local branch up to date. Some help on that is here: https://learn.adafruit.com/contribute-to-circuitpython-with-git-and-github/staying-up-to-date
I based it on the 8.2.x branch because I want to actively use it. Once we're satisfied with the code and doc conceptually I'll port it to main, no problem.
I based it on the 8.2.x branch because I want to actively use it. Once we're satisfied with the code and doc conceptually I'll port it to
main, no problem.
Ok, you need to make the PR against 8.2.x, then. Go up to the top and hit "Edit" to the right of the title and you can change the base branch you are PR'ing against from main to8.2.x.
So for your excessively bouncy switches, how is making the interval be
(old)interval * debounce_thresholdless satisfactory? Does it introduce too much latency? But I would think the integration algorithm also introduces similar latency with the threshold set to to some multiple of the interval.
Basically, yes. The integration algorithm has a similar latency (strictly at least equal, sometimes slightly longer) -- the thing that improved is that this algorithm has a seesaw-like characte...
Thanks for the comments. So my remaining question is
So is 1 the same as the previous algorithm? I would think that 0 would mean no debouncing then.
I am a little confused by your saying that 1 is no debouncing, instead of the (disallowed) 0.
CircuitPython version
Using adafruit-circuitpython-raspberry_pi_pico-en_US-9.0.0-beta.0 and adafruit-circuitpython-raspberry_pi_pico-en_US-8.2.9:
Code/REPL
PS D:\> ls
Directory: D:\
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 01.01.2020 00:00 .fseventsd
d----- 01.01.2020 00:00 lib
-a---- 01.01.2020 00:00 ...
Thanks for the comments. So my remaining question is
So is 1 the same as the previous algorithm? I would think that 0 would mean no debouncing then.
I am a little confused by your saying that
1is no debouncing, instead of the (disallowed)0.
I can take another look at that. I think the constant offset of at least 1 is necessary to encode and distinguish pressed/released states. Offsetting the argument by one is a possibility, although that would introduce an awkwar...
My thoughts were also: You have to measure pressed/released for at least
threshold(>=1) intervals for an event. Measuring for0intervals didn't make sense in that regard.
I understand that 0 doesn't make sense, but I was confused that your doc string said 1 means NO debouncing. I thought it waits for one interval, so it is at least doing one interval of debouncing.
If you have Samsung Disk Magician or some other utility programs installed on Windows, it can cause disconnect-behavior. Or your CIRCUITPY drive may be corrupted, though that usually does not cause disconnects. Try erasing all of flash with the "nuke" UF2, as described here: https://learn.adafruit.com/getting-started-with-raspberry-pi-pico-circuitpython/circuitpython#flash-resetting-uf2-3083182.
Good point, I think I see what you mean. 1 does mean "no" debouncing, or current behavior. Do you have a suggestion how to rephrase the doc, or what would be a good resolution to avoid this confusion?
Nuking did not solve the issue.
I would not describe the current behavior (before your code) as "no debouncing". It debounces fine for bounces that resolve in less than interval, because it collects state-transition info across two (consecutive) interval times.
I tested the current code a bunch with keyboards, etc. We have not gotten complaints of bouncing when the current keypad is used in keyboard projects.
I have seen some tactile switches that have really long bounce settle times, like 50 msecs.
could you ask in discord? https://adafru.it/discord, channel #help-with-circuitpython. This may require some interactive debugging. There is something unusual about your setup or your board(s).
I agree, up to 50ms works for most mechanical keyboard switches. There are some buttons that only barely work consistently with that scan rate, but that's not really my incentive. I also didn't mean to call the current implementation "no debouncing", that's why I put the "no" in parentheses; I apologize if that came across the wrong way. The rate limiting does work in most cases, no arguing about that.
It's not the absolute delay that the scan rate limiting introduces that can is perceived a...
i whipped this up as a short term solution; you are welcome to any and all of this code, most of it was translated from the micropython implementation:
import board
import busio
import time
class MPU6886:
# MPU6886 Register Addresses and Configuration Constants
_CONFIG = 0x1a
_GYRO_CONFIG = 0x1b
_ACCEL_CONFIG = 0x1c
_ACCEL_CONFIG2 = 0x1d
_ACCEL_XOUT_H = 0x3b
_ACCEL_XOUT_L = 0x3c
_ACCEL_YOUT_H = 0x3d
_ACCEL_YOUT_L = 0x3e
_ACCEL_ZOU...
I will be doing an 8.2.10, probably in a little more than a week.
Thanks for the quick merge - yes, I saw there was going to be an 8.2.10, so got this one out quickly.
Cheers :)
is this actually resolved though?
Just as a data point, qmk uses 5ms as the default debounce time. They describe many other aspects of their algorithm in https://github.com/qmk/qmk_firmware/blob/master/docs/feature_debounce_type.md
CircuitPython version
Adafruit CircuitPython 8.2.9 on 2023-12-06; ESP32-S3-DevKitC-1-N8 with ESP32S3
Code/REPL
def wget(url, local_filename, chunk_size=1024):
try:
with requests.get(url, stream=True) as response:
with open(local_filename, 'wb') as f:
for chunk in response.iter_content(chunk_size=chunk_size):
f.write(chunk)
print(".", end="")
except Exception as e:
...
CircuitPython version
Adafruit CircuitPython 8.2.9 on 2023-12-06; Raspberry Pi Pico W with rp2040
Board ID:raspberry_pi_pico_w
UID:E6616407E353582C
MAC:28:CD:C1:07:71:81
Code/REPL
import time
import wifi
wifi.Radio.enabled: True
radio = wifi.radio
radio.stop_station()
#setting up ssid, password, channel and authmode
ssid = 'RPPW'
password = 'RPPW1234'
channel = 1
authmode = (wifi.AuthMode.WPA2, wifi.AuthMode.PSK)
print('activating access po...
The problem persists in CP 9.0b0.
I wonder why is this issue in the "Long term" milestone? Is it too hard to be handled sooner or is it considered low priority?
Along with some pure Python functions to build the 4096-entry look up table, this should allow most photo editing layer blend modes to be implemented.
This is a almost a superset of bitmaptools.alphablend except that only RGB565_SWAPPED is supported and instead of having a skip index there is an optional mask bitmap; we should decide what to do about this. Part of that would include benchmarking the alternatives.
Oof. I'm trying to copy files to a Pico W, running 9 beta 0. I already nuked it and tried installing CP again. I can copy .mpy files fine, but anything else fails with an I/O error, both using Finder and cp via command line. Anything else being a .bmp, or a .py file. I also can't save code.py evidently.
Going to try 8.
are you on Sonoma and using the remount script?
@onyx hinge I'm interested in getting CP running in an arm cortex simulator environment too
Oh right. Bleach. I thought that only applied to writing updates to files. I am on Sonoma, yes, not using the remount script. Will go find it.
todbot's update works well as you can pass it an arguement to it: https://github.com/adafruit/circuitpython/issues/8449#issuecomment-1874682118
Oh nice. Thank you!
Ok, now it tells me I don't have enough free space.
This is the bmp that comes with the simpletest file for the display library.
I can edit code.py at least.
be sure to do dotclean /Volumes/CIRCUITPY every once in a while, because it seems like dot-files are back now. Those can take up space
I wonder how much flash space we'd save if we split dict tables into keys followed by values
Still an issue in beta.0
Adafruit CircuitPython 9.0.0-beta.0 on 2024-01-27; Raspberry Pi Pico W with rp2040.
<details>
<summary>Test Code...</summary>
import time
import os
import wifi
import traceback
AP_SSID = "Bob"
AP_PASSWORD = "YourUncle"
ITERATIONS = 5
DELAY = 3
time.sleep(3) # wait for serial
print("="*25)
def connect():
while not wifi.radio.connected:
try:
wifi.radio.connect(os.getenv("WIFI_SSID"), os.getenv("WIFI_PASSWORD")...
right now QSTR only dicts store a two black bytes for each 16bit qstr key
A number of changes have been made to wifi AP code since 8.2.9. Can you test with 9.0.0-beta.0?
(fixed link above, hope you don't mind)
Is your board the N8 version, without PSRAM? Speed also has an N8R8 version (and perhaps others). I wouldn't expect that to make a difference here, but just making sure.
Can you try to narrow it down more... for example, does it happen without the file writes?
I switched to trying to use the SD card, but it says Mount point directory missing. The pin for CS is correct, as well as SPI. I have no idea how to troubleshoot SD cards.
Docs mention if two things are using SPI, do the card first. It already was first. Code isn't even getting to init'ing the display right now.
The MicroPython example to use the SD card looks about the same as my code, so it's not that I'm doing that part wrong, I would think.
Maybe the card is formatted wrong? I did FAT. I remember there being some SD card formatter app, but I can't find it now.
You need to make a directory where you want to mount the SD card
I just changed this so it's a breaking change in 9.0
Hah ok. Like mkdir from command line on CIRCUITPY?
ya, or just in finder
Finder isn't playing nice. But, understood. Thank you!
Huzzah!
It's upside down, but it displayed the image!
wahoo
that'd be cool
I was looking at renode a little bit for this. I think zephyr is using it for their testing
Oof. The PR is too old to have build artifacts anymore. I guess I'll pull it and build my own to test it.
<@&356864093652516868> Just a last minute reminder that our meeting is in just over ten minutes in the CircuitPython voice chat. I look forward to chatting with you all!
I totally got distracted, thanks for the ping 🙂
lurking today, no notes
We’ve gotten a couple of #CircuitPython2024 posts so far! Thank you all! It’s not too late to post your own. Please post yours by January 31st and email circuitpython2024@adafruit.com t…
CircuitPython UVC Preliminary Support
I'm just working on a PR to add a placeholder CIRUCITPY/sd because I think that'll help folks
I've worked with ones that were maybe 1/4 of that size, which required full PCs to drive the display. To see it that large and driven by a microcontroller is insane
Liz that's pretty cool. If you are curious, you should look at https://github.com/boxpet/pygeomag, it's a project I did to adjust for magnetic declination
Thanks all!
ohh very cool!
thank you scott!
Thanks
thanks for hosting @slender iron
Thanks for hosting Scott! Have a great week everyone!
Please do get your #CircuitPython2024 contributions in
Thanks all! Have a great week everyone!
Feel fee to ask any questions. It's an area I'm passionate about
@slender iron what #ifdef turns on ble workflow? is it just CIRCUITPY_BLEIO?
@anecdata We need to pick up our local cyw43-driver fork since we're waiting for the fix to be integrated upstream.
Oh, I saw that fork change but thought it would be included with main. Is there a way to release with the driver fork, until the upstream change is accepted?
@dhalbert I'm moving this out of draft as it's confirmed working by others and we've sussed out the peripherals.
sd/placeholder.txt (uses 1 sector):
This placeholder file allows mounting an SD card at /sd
settings.toml (539 bytes, so 2 sectors, if all features enabled):
# Settings in this file can be retrieved via os.getenv()
# Certain settings starting with CIRCUITPY_ are also used by CircuitPython.
### Core settings
# CIRCUIPY_HEAP_START_SIZE = 8192
# CIRCUITPY_PYSTACK_SIZE = 1536
### Wifi settings
# CIRCUITPY_WIFI_SSID = "wifi network name"
# CIRCUITPY_WIFI_PASSWORD...
Wheeeeeee building CP for the first time on this machine. -j22 That was the fastest build I've ever done.
How fast did it build?
I didn't think to time it until after the fact, but it was probably 30-40 seconds?
CP usually takes 30-45 seconds on my Intel MBP with 8GB of RAM
I'm terrible at timing, tbh.
Could have been less.
I have... an embarrassing amount of RAM in this thing.
I have 64GB of RAM in my desktop lol
I rarely do anything that justifies that amount haha
I tanked the entire thing, and it still took as long as yours. That's odd to me. I wonder what's slowing it down.
Same. This is the first time I've tanked any of it.
Tbf, building in macOS terminal seems to go pretty faster for me in a lot of areas where it’s just slow on windows
Ok, so the build loaded, the display works. I have no idea how I'm supposed to use these objects for the LEDs and buttons, though....
Aside from random things like forgetting to export a path
Fair enough
objects can usually be accessed through the board class
Right. That's where they are. But I don't understand what to do with them.
Is this a board you designed?
I think the buttons are using a shift register.... I guess the keyboard shared module does that?
No, it's the Pimoroni Inky Frame 7.3". I got this board def from an existing PR.
Oh okay
I'm testing it to see if it's working so I can get it updated and the CP folks can move forward with it
I would assume the keyboard shared module should handle button presses
Ok, I'll see if the pins match what that module wants.
👍🏻
I hear ya there lol… it’s been so long since I’ve contributed to circuitpython. These days I just use the eval board builds for circuitpython if I hadn’t already submitted a board before lol
So it's reading them as buttons 7-3, but hey it's a start!
Here is the notes document for next Monday’s CircuitPython Weekly Meeting. It is at the normal time of 11am Pacific / 2pm US Eastern here on Discord. Add your hug reports and status updates to the document before the meeting. If you are unable to attend but would still like to contribute, feel free to add your notes and we’ll read them off during the meeting. Hope to see you there! <@&356864093652516868> https://docs.google.com/document/d/1TwKXc8VJyR-Zju5QWouz7psBYjrVBhrkBT4DtXMLVlQ/edit?usp=sharing
I've lit up an LED!

So two things. At least right this moment. One: The display needs to be rotated. Two: The buttons are reading weird numbers. I don't know how to go about fixing either.