#circuitpython-dev
1 messages · Page 88 of 1
Hello @dhalbert , thanks for the feedback.
This code is only useful in this context, so I feel like using a submodule will only bring more overhead for you and me.
👋 Hi folks, I'm back working while the baby is napping (~2 hours a day). Feel free to ping me here, on issues or PRs and I'll get back to you when I can.
lvfontio.OnDiskFont is the way to go for this. Regular bitmap fonts don't require them to be monospace. Terminal only works with monospace though.
Closing this because there is another option besides terminalio.FONT. Please open a new issue for the size problem.
Please post the version that fails and the backtrace of the exception. It may simply be running out of memory.
Some internal allocations require that they occur in internal memory instead of PSRAM. I bet that's what is happening here.
How big is section_size?
I think it may be a more general issue with version 3 of nina-fw. I have tested a feather RP2350 + Airlift featherwing now and found that I see the same issues there as on the Fruit Jam with the C6. I've also now downgraded the Airlift featherwing to version 2 nina-fw and am getting consistently successful requests.
I do think the slowness mentioned in my original message was unrelated. That turned out to be display related. The terminal showing caused it to slow down considerably and was further exacerbated by debug=True, and additional prints that I had added. If I stop showing the terminal before running request it iterates at a much faster pace.
Strangely the slowness induced by the display actually seems to have been helping the network issue though. With terminal hidden and faster iteration now the request frequently fails with Timed out waiting for SPI char. Chunk size no longer seems to matter all sizes frequently fail with the same exception.
I'm going to test a little more and try with a different port to see if it's rp2350 specific and then I'll make an issue with my findings on nina-fw.
I noticed under the releases of nina-fw repo there is are debug builds of the bin files. Would those potentially output any more useful info? and if so does it just come out of serial or need something external hooked up?
@tannewt loading the same font with adafruit_bitmap_font modified to print the section_size shows these 3 values in succession:
section size: 700
section size: 28168
section size: 186776
Thanks for the followup. Now that this is merged, could you make a PR to https://github.com/adafruit/circuitpython-org to add a board description? See https://learn.adafruit.com/how-to-add-a-new-board-to-the-circuitpython-org-website.
I dont' remember, but yes, it probably comes out of TXD0.
But there are multiple debug logging options. I had to turn on mbedtls or lwip separately to debug something or other. Try a couple of different webservers, and if you can, also try an http vs https server, to see if there's some slowdown due to encryption.
@tannewt - @FoamyGuy and I figured out how to write an LVGL font to the screen and then we have explored using that font in a Terminal. My application: A CP437 font in a Terminal for MSDOS emulation. Tim's been doing an IRC client.
The size issue is secondary, fixed with a larger font for now.
Below is a decent Terminal program using such a font. It's very basic but works.
# SPDX-FileCopyrightText: Copyright (c) 2025 Tim C for Adafruit Industries
# SPDX-FileCopyrightText: Copyright (c)...
I will leave this one just to cover my bases for the future or for different revs. I have historically dealt with parts that haven't fully moved between API revs, so would like to keep this one even if it's not relevant right now for the MAX32690.
Makes sense! I'll distinguish here and use the "Invalid state" message. Seems that "BAD_STATE" in this case resembles the peripheral itself being busy or the API believes it's in the middle of a transaction. I could create another message for "Peripheral is busy" if that's better, but I feel like "Invalid state" does cover that, although perhaps it's more of a reach. To keep size down, I'll still opt to reuse the existing message because it seems sufficient to me.
I would reckon this was more of a "to be safe" thing in my head. I see the flow control case, but perhaps the proper behavior in a case like that would be to not have a write timeout. In any case, to be consistent with the API as documented, I removed the write timeout.
Sure thing, I appreciate the thorough feedback :) latest round should be cleaned up now.
I had similar issues and looked into this a bit more in detail. It's working for me if I set a short device name on the BLERadio.name property only and use that name in scanning (I use the service UUID in addition).
Some findings:
- A too big BLE advertising packet creates issues (AI says 31 bytes max)
If I put in a too long name, or populate both the name and local name in a way that the total packet size get's too big, I run into different types of issues depending on the scanning softwa...
This is a memory version on the Metro Rp2350 without PSRAM. It works fine on Fruit Jam.
I'd like to see this example expanded to a full screen bitmap to we can use escape codes to go to any location on screen and write a character or characters in the CP437 font.
I'm not sure what you mean by full screen bitmap. It looks to me like the terminal should be as big as the screen. Terminal should already support escape codes to move the cursor: https://docs.circuitpython.org/en/latest/shared-bindings/terminalio/index.html#terminalio.Terminal
That seems like where it is coming from. We should check to see if the file read is allocating to internal memory only.
is there anyway to suppress the I2C pull up check in CP?
only by changing a compilation option
does bitbangio do the check also? 🤔
no, doesn't look like it
Currently I can use escape codes to write at the bottom of the display. The move to x, y code only tends to move horizontally, not vertically.
Would you happen to have a more comprehensive example of using Terminalio.Terminal?
Adafruit CircuitPython 9.2.8 on 2025-05-28; Adafruit QT Py RP2040 with rp2040
>>> import board
>>> import bitbangio
>>> i2c = bitbangio.I2C(board.SCL, board.SDA)
>>>
indeed
thanks!
There are many calls to f_read(), and a handful to allocate_memory() inside of the font parsing code here: https://github.com/adafruit/circuitpython/blob/main/shared-module/lvfontio/OnDiskFont.c
I'm not sure how to tell if they are allocating to internal or not though.
@TheKitty adding these lines just before the main loop of the example code in your previous message will move the cursor and then write a string at the new location:
move_cursor = chr(27) + "[10;10H"
terminal.write(f"{move_cursor}Moved to somewhere else")
I am not 100% certain of the arguments, I think it's x/y starting from top left of the terminal, so this is 10 characters in from left, and 10 down from top after it moves. But I have not experimented with other values to validate.
Most of my time yesterday evening was getting extended characters working.
Then I tried to write them at (50,20) and it did the horizontal but not the
vertical motion. I tried the fullscreen code with no effect
Anne Barela
Engineer, Adafruit Industries
@.***
On Fri, Jul 11, 2025, 12:10 PM foamyguy @.***> wrote:
FoamyGuy left a comment (adafruit/circuitpython#10448)
https://github.com/adafruit/circuitpython/issues/10448#issuecomment-3063091966@TheKitty...
Just begin updating my stack.
Affects S3 too on current latest commit (10.0.0-alpha.8-5-ge80c92cfaf).
maxlen < 129 causes the error, while larger values work.
Additional note: When using more than one, there is a new error: espidf.IDFError: Requested resource not found
I think it may actually be y,x instead of the other way around. "[50;20H" stays at the bottom of the screen because 50 is larger than the number of rows in the terminal.
"[20;50H" moves the cursor to this position:
<img width="778" height="471" alt="Image" src="https://github.com/user-attachments/assets/1fc5aa16-5ca0-4aea-9f07-3041df8976fb" />
This patch reverts #10397. See #10466.
I don't think the code the feature can be kept.
Ideally the underlying code could try to do it and fallback to the old behavior if it explodes,
but that would also require a good bit of documentation and testing for when and how it works.
(i.e. only first PulseIn object, only if maxlen > 128, on these chips)
Likely so, thanks, I'll test
On Fri, Jul 11, 2025 at 1:23 PM foamyguy @.***> wrote:
FoamyGuy left a comment (adafruit/circuitpython#10448)
https://github.com/adafruit/circuitpython/issues/10448#issuecomment-3063298712I think it may actually be y,x instead of the other way around. "[50;20H"
stays at the bottom of the screen because 50 is larger than the number of
rows in the terminal."[20;50H" moves the cursor to this position:
image.png (view on web...
CircuitPython version and board name
Adafruit CircuitPython 9.2.7 on 2025-04-01; Adafruit Feather ESP32-S3 Reverse TFT with ESP32S3
Code/REPL
import board
import busio
uart = busio.UART(board.TX, board.RX, baudrate=1200)
#string being sent is "\n"
while True:
line = uart.readline()
if line:
print("Received line:", line.decode().strip())
num_bytes = uart.in_waiting
if num_bytes > 0:
print(f"{num_bytes} bytes waiting")
...
Yay it works
# SPDX-FileCopyrightText: Copyright (c) 2025 Tim C for Adafruit Industries
# SPDX-FileCopyrightText: Copyright (c) 2025 Anne Barela for Adafruit Industries
#
# SPDX-License-Identifier: MIT
#
import gc
from terminalio import Terminal
import displayio
from lvfontio import OnDiskFont
from adafruit_fruitjam.peripherals import request_display_config
import supervisor
def draw_box(width, height, color_box, x, y):
top_left = '\xDA' # CP437 characters for single line drawing...
Yes feel free to revert until I have time to address the issues. I agree the limitations need to be documented.
However, the changes to supervisor/port.c were a genuine, unrelated bug fix by @dhalbert which just happened to be part of the PR and this fix might not be ideal to also revert.
Alright, re-applied the respective commit. I'll test on S3 (that's all I have access to right now) and report how it goes.
CircuitPython version and board name
Adafruit CircuitPython 10.0.0-alpha.8-10-g8f54e33437 on 2025-07-11; LILYGO T-Deck (Plus) with ESP32S3
Code/REPL
>>> import microcontroller
>>> microcontroller.cpu.frequency
240000000
>>> microcontroller.cpu.frequency = 80000000
Traceback (most recent call last):
File "", line 1, in
AttributeError: can't set attribute 'frequency'
>>>
Behavior
This worked, what happened?
The code all looks fine, as it was. Some...
Just a guess but this code didn't fit for all esp variants back then. I was advised to only enable settable frequency for 8MB builds (and maybe some 4MB builds) if I remember correctly.
Maybe this got lost in the recent updates of the partition layout with the removal of OTA.
I think settable frequency should now fit for all variants.
16MB board, so it doesn't apply.
And I'm pretty sure it wasn't limited on specific flash variants.
I'll check tomorrow morning, thanks!
I have some Lolin S2 Minis and can try this out next week.
If you haven't done anything yet, I might try and come up with a "DMA mode when maxlen>128" fix this weekend.
Feel free, I don't have time until end of next week. But then I'll try out what you come up with :)
FWIW, Today I updated an Airlift ESP32 breakout board with the 3.0.0 firmware and after that I was unable to make any successful http requests. I downgraded back to 1.7.7 and things were fine again. Plan to try 2.0.0 once I get back home.
Turns out that one of the main culprits in my use case was frequent calls to time.monotonic_ns(), which returns a long long int (and therefore causes an allocation which must be collected, as opposed to regular CircuitPython int/float values). When I swapped those out for calls to time.monotonic() (which returns a float without triggering an allocation) my calls to gc.collect() became significantly faster (from an average of ~350 down to ~70 milliseconds).
If gc.collect()...
On a RP2040 it also creates the SD card reader, but it cannot be accessed, configured, or discovered what GPIO pins it is connected to.
It isn't initialized to any pins internally. Instead use the native sdcardio library and then it'll be made available over USB. https://docs.circuitpython.org/en/latest/shared-bindings/sdcardio/index.html
I think these settings will apply after a restart but not a reload. We only init the display on startup. Can you confirm it works after a restart?
Closing in favor of #10454 where I explain how to utilize the second drive.
Note, the Zephyr port has more minimal TOML board definitions by relying mostly on zephyr's own board definitions. See https://github.com/adafruit/circuitpython/blob/main/ports/zephyr-cp/boards/nordic/nrf5340dk/circuitpython.toml as an example.
I agree that 3 and 4 would be good.
Yes, it's best to think of it as row, column with row 1 column 1 in the top left. I'm changing my code to reflect that.
I believe https://github.com/adafruit/circuitpython/blob/main/ports/zephyr-cp/cptools/update_board_info.py can be used directly to update the files without fully building each board.
I can, would you be more specific as to what is a restart vs what is a
reload?
On Fri, Jul 11, 2025 at 4:07 PM Scott Shawcroft @.***>
wrote:
tannewt left a comment (adafruit/circuitpython#10450)
https://github.com/adafruit/circuitpython/issues/10450#issuecomment-3063834624I think these settings will apply after a restart but not a reload. We
only init the display on startup. Can you confirm it works after a restart?—
Reply to this email directly, vie...
Both the 720x400 and 640x480 modes can be run inside the 800x625 geometry as a possible 'alternative video timing' option flag to consider?
How would we do this exactly? I was experimenting with the porch values but don't remember having any success with it.
I will be doing a MicroPython merge soon so I think I will wait on this a bit.
Can we finish this now since the merges are complete?
What code did you try to use when talking to the semtech? How did it error?
CircuitPython version and board name
Adafruit CircuitPython 10.0.0-alpha.8 on 2025-07-08; Adafruit Fruit Jam with rp2350b
Code/REPL
None
Behavior
See Description
Description
On https://docs.circuitpython.org/en/latest/shared-bindings/terminalio/
The text under terminalio..Terminal seems to look to use Markdown but the bullets and table are smushed together rather than tidy. It makes it difficult to decipher/read... I went in to edit terminal...
When I was implementing the collect optimization I was using C-level pin high and low toggles to use my logic analyzer to measure collect performance. It is about as low overhead as you can get I think.
You may be able help things by finding temporary allocations that can be manually freed.
What microcontroller are you on?
I think we disable gc.threshold() because it isn't in CPython's gc: https://docs.python.org/3/library/gc.html
@dhalbert,
There is no native SD card on the Pico W. So where do I stick the SD card?
I am not inclined to go through the PITA to setup and compile custom versions of CP.
I bet 99% of the CP users are also not inclined.
Bruce
How would we do this exactly? I was experimenting with the porch values but don't remember having any success with it.
I've mostly kept maximally forgiving monitors and video capture devices so I don't have one of the 'picky' one mentioned above at hand at the moment, but broadly I've always increased only the 'back porch' values arbitrarily. If needed I'll reduce the 'front porch' and 'sync width' values to "Reduced Blanking v2" values (8 h. front porch, 32 h. pulse width), and always (th...
The Rasperry Pi Pico, based on the RP2040, has a register that maintains the status of I2C interrupt flags called IC_INTR_STAT. The bits of this register are set by hardware and cleared by software. Before this commit, the I2CTarget library did not clear the restart bit (R_RESTART_DET) in this register after an I2C transaction ended, causing the is_restart field of the i2ctarget_i2c_target_request_obj_t struct to always be true after the first I2C transaction. This commit causes the restart a...
TL;DR - It would be useful to have some functionality provided by the standard Python inspect module in CircuitPython, especially
- basic stack frame inspection (i.e. walk up the call stack from within a function)
- simple callable signature inspection (parameter names required positional / optional positional / keyword counts)
There are a number of useful Python patterns which rely on the ability to get information about the "caller" from with a function/method (i.e. walk back up t...
Added CP support for EdgeS3D, a new reusable ESP32-S3 module by Unexpected Maker
https://esp32s3.com/edges3d.html
@b-blake
I'm not sure if this is a bug or simply a problem of expectations/documentation.
The current CP-alpha creates a second drive ("SD-card reader" as you call it) on the host for a potentially later added SD-card, even if no hardware is attached/configured (this is /dev/sdb on my computer, on Windows it is similar). I have a Pico with an externally attached SD-card breakout. As soon as I mount this breakout from within my CP program (same code as with CP9), I can not only access the ...
The toplevel pathname within gcc-arm-none-eabi.tar.xz was changed by the maintainers. This PR fixes the link created by the script.
@bablokb,
I have not been able to replicate your success. Can you post your code so I can give it a try?
Your reference to /dev/sdb and /dev/sdb1 sounds like you are using a Linux PC. I am using a Windows PC.
I say SD card reader because when I click on it from File Manager I get "Please insert a disk into USB Drive (M:)".
This is the same message I get when I plug in an empty USB SD card reader into my PC.
Bruce
I think we disable
gc.threshold()because it isn't in CPython'sgc: https://docs.python.org/3/library/gc.html
It's still in the CircuitPython gc docs though. It's not a big deal for me at the moment because I'm running under gc.disable() and manually calling gc.collect(), but I could see it being useful.
CircuitPython version and board name
Adafruit CircuitPython 10.0.0-alpha.8 on 2025-07-08; Adafruit Fruit Jam with rp2350b
Board ID:adafruit_fruit_jam
UID:1AE156A36397E861
Code/REPL
# SPDX-FileCopyrightText: Copyright (c) 2025 Tim C for Adafruit Industries
# SPDX-FileCopyrightText: Copyright (c) 2025 Anne Barela for Adafruit Industries
#
# SPDX-License-Identifier: MIT
#
import gc
from terminalio import Terminal
import displayio
from lvfontio import OnDiskFo...
When I was implementing the collect optimization I was using C-level pin high and low toggles to use my logic analyzer to measure collect performance. It is about as low overhead as you can get I think.
I don't recall the exact numbers, but I saw some major improvements when I switched from 9.x to the "latest build" 10.0.alpha with the new optimizations.
I'm measuring gc.collect() time with before/after calls to time.monotonic(). That adds a little overhead, but shouldn't be signific...
Yes, I am using Linux and the naming is of course different to Windows but the behavior is similar. When I plug in the Pico the logs tell me that I have a drive with "media removed". As soon as I mount from within my CP program, the system detects that I "inserted" the SD card.
My code from within CP is fairly boilerplate, you will find similar code in many tutorials/learning guides. The SD-card breakout is connected to four pins for SPI including chip-select.
import board
import busio
...
I believe that the current behavior is intentional and not really a bug, though it does differ from standard terminal behavior in other computer environment. Support for color codes was added here: https://github.com/adafruit/circuitpython/pull/10105 and it's always been setting the color of all the text at once rather than ranges of text enclosed in the escape sequences.
The new https://github.com/adafruit/Adafruit_CircuitPython_Color_Terminal offers an extended terminal class that does su...
@bablokb,
I am getting different results with the same code you are using. It could be a Windows thing vs a Linux thing.
The boot_out.txt shows:
Adafruit CircuitPython 10.0.0-alpha.8 on 2025-07-08; Raspberry Pi Pico W with rp2040
Board ID:raspberry_pi_pico_w
UID:E6614103E719A637
MAC:28:CD:C1:00:6B:08
Bruce's code:
**import board
import busio
import sdcardio
import storage
SD_SCK = board.GP18
SD_MISO = board.GP16
SD_MOSI = board.GP19
SD_CS = board.GP17
spi_bus = busio.SPI(SD_SCK,SD_M...
I don't think this needs to be reverted completely. I would conditionalize using DMA by checking for SOC_RMT_SUPPORT_DMA ( https://github.com/adafruit/circuitpython/issues/10466#issuecomment-3053886875). If DMA is available, then I think one could always use DMA, without a length limit.
If DMA is not available (e.g. on ESP32-S2), then the length should be validated to be <=128 (or is it <128?). We would then document the length limits in a LImitations section in the shared-bindings...
Using small values (<128) doesn't work with the DMA logic even on s3. This broke all existing code.
And using more than one instance is also broken.
So yea, conditions would need to be checked, or a try-except logic should be applied, trying DMA then the original logic.
However when requesting >128 and DMA is unavailable, a new error would have to be shown.
In either case, since the reversion is not wanted, I'll be closing this.
@tannewt, if you have time to review the above, on the clock, would you suggest I use the color terminal library or perhaps the alternative Tim discusses would be better? I'm not looking to do major changes, but at the very least the behavior for terminalio.Terminal should be documented.
OK, sorry, I missed the report in https://github.com/adafruit/circuitpython/issues/10466#issuecomment-3063247593 specifically. So a mostly-revert could be in order, but keeping my f999afd fix.
The "more than one instance" is also an issue, and I don't know wether the "only channels 3 and 7" is a thing
I'm not quite sure where this is supposed to be at this point, but below are the changes I made in my build.
Specifically, take note of .mem_block_symbols = useDMA ? self->raw_symbols_size : SOC_RMT_MEM_WORDS_PER_CHANNEL,. The meaning of mem_block_symbols changes based on whether or not .flags.with_dma is set. (search for DMA backend is enabled in RMT API reference
I'm not sur...
Just to make sure: the code I posted is only the part that does the mount. You would still need a while True: pass loop at the end (or anything else that keeps the program running). I would even suggest something like this:
import board
import busio
import sdcardio
import storage
import os
SD_SCK = board.GP18
SD_MISO = board.GP16
SD_MOSI = board.GP19
SD_CS = board.GP17
spi_bus = busio.SPI(SD_SCK,SD_MOSI,SD_MISO)
sdcard = sdcardio.SDCard(spi_bus,SD_CS,1_000_000)
vfs = storage.VfsFat(s...
Thank you for your feedback. As you suggested, I changed the module name to wiznet and added the PIO SPI functionality.
However, while my local build does not exceed the flash size for the wiznet_w55rp20_evb_pico board, the pre-commit workflow fails with a "region FLASH_FIRMWARE overflowed" error.
Could you please let me know why this is happening? Is there anything specific I should do to pass the pre-commit workflow?
Linux and Windows dual system, the same problem under Windows
I used a different model of USB HUB and it worked fine. Maybe the front panel of this computer, this USB HUB and CircuitPython triggered a magical bug.
Just for context, when I added the color support I had always intended to work on implementing the standard ANSI character implementation (as well as a blinking cursor) rather than the current full screen color but tilepalettemapper wasn't complete yet and @bill88t mentioned he had some thoughts on implementing ANSI support so I put it aside. The current implementation hasn't been around long enough that I would worry about maintaining the full screen behavior if there is a character based ap...
I tried a couple ways to fix this with no luck, I probably should have opened an issue at the time sorry and thanks @TheKitty :grin:
The text is located in shared-bindings/terminalio/Terminal.c
reload = ctrl-D (and I think supervisor.reload())
restart = Press Reset or power cycle board (and I think microcontroller.reset())
Thanks @RetiredWizard. You've helped fill in the gaps.
Terminal ANSI implementation is incomplete due to when it was added. Likely the documentation should be changed noting full screen color behavior and noting adafruit)color_terminal for a more complete ANSI implementation.
With trying to get 10.0.0 out, core work on terminalio can be pushed out, I would think as there is an alternative, functional library.
I can document all this behavior in the guide I hope to finally get out this week.
I suggest the documentation be adjusted to include this information and then this issue can be closed.
<@&356864093652516868> the (currently) Bi-Weekly meeting will occur today here on discord and the normally scheduled time of 11am US Pacific / 2pm US Eastern. About 2 hours from now. Fill in your notes and status updates to the shared document any time: https://docs.google.com/document/d/1tNfH3S0mIj57cCBzMRyaPH49nARgvj3ZDp2TbR1Nd4o/edit?tab=t.0 We look forward to hearing from all attendees.
CircuitPython Weekly Meeting for July 14, 2025 Welcome to the CircuitPython Weekly meeting notes! Feel free to add your Hug Reports and Status Updates before the meeting, alphabetically by your username. During the meeting, we go through them in order. If you can’t make the meeting and would st...
@sick pier That is enough random gif / emotes. This is not really on topic in this channel and pushes other messages further back in history even though it's not as directly problematic as some types of spam.
@lone axle could you read my input for the meeting? I heard nearly all of the previous meeting but my earbuds went out. Tnx
Yep, will do.
Just listening.
Lorraine hacks a Bluetooth-controlled LEGO train in this week’s episode of element14 Presents, mounting a track system to the ceiling of her home. She integrates CircuitPython, a Seeed XIAO board, NeoPixels, and a spinning LIDAR sensor to detect walls and control the train’s movement. Lorraine's pro
What is the model of the USB hub?
220 ms sounds about right to me. I did some testing with my improvement here: https://blog.adafruit.com/2025/04/28/improving-garbage-collection-time-in-circuitpython/
You may also be able to find more buffers that don't need to be scanned during collect.
What do you mean by 'manually freed'?
I was mainly thinking about allocations used internally for things like kwargs. Once in a while you can also make changes from python land to help too. For example enumerate() will do a temporary t...
Please move this into is_addressed. There is no need for a separate function because it is used in one place and the return value is ignored.
Thank you for the fix! One request before we merge it.
Thank you @lone axle
Great Job @lone axle and Thanks!!!
Thank you, Have a great week everyone 👋
Here is the notes document for the next CircuitPython Weekly Meeting. It is on Monday 7/28/25 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/1ncUmb1lkvktAE-wOGZbF_OMUQQu0iEHk9b1R_t55Rmg/edit?usp=sharing
CircuitPython Weekly Meeting for July 28, 2025 Welcome to the CircuitPython Weekly meeting notes! Feel free to add your Hug Reports and Status Updates before the meeting, alphabetically by your username. During the meeting, we go through them in order. If you can’t make the meeting and would st...
OK, this looks like the wanted revert, preserving the port_malloc() bug fix. I'll merge this and we can consider a respin of #10397.
The pre-commit errors have to do with formatting style changes: https://github.com/adafruit/circuitpython/actions/runs/16258353450/job/45898635679?pr=10440#logs. If you install pre-commit locally, pre-commit will check locally and fix up the source. See https://learn.adafruit.com/building-circuitpython/build-circuitpython#install-pre-commit-3096511 for details.
The size issue is for certain builds. Some languages are larger than others. en_US, which you are building, fits, but some other...
@lone axle If you have time to approve https://github.com/adafruit/circuitpython/pull/10468, I would be grateful. Scott already approved it, but there was a minor merge conflict in one board file that I fixed, so it needs a re-review. Then I can proceed with making the changes to update which TinyUF2 to use everywhere.
@lone axle tyvm!
Yep, you're welcome
Should support for the functionality of importlib.reload (possibly under a different name) be added to CircuitPython?
There is no importlib module for CircuitPython, therefore "normal" python reloading is not available. I have a pure-python (no firmware/C level changes required) working proof-of-concept implementation here
...
Question:
Do you know if this comment is still valid?
Adafruit_CircuitPython_BLE/adafruit_ble/services/standard/hid.py
Line: 159 # Output reports not currently implemented (e.g. LEDs on keyboard)
I am trying to receive HID output reports over BLE, but the _characteristic.value of ReportOut object stays unchanged.
IOS is "seeing" my device and also connects, but I do not see any output data coming.
The same device connected via usb_hid with the same report descriptor works fine!
Hi - you and I talked about this here: https://github.com/adafruit/Adafruit_CircuitPython_BLE/issues/207. There hasn't been any further progress.
This is not a core issue -- it's a library issue, so I'm going to move this issue, but then mark it as a duplicate of https://github.com/adafruit/Adafruit_CircuitPython_BLE/issues/207.
For CircuitPython 10, the ESP32-S2 and ESP32-S3 flash partition layouts have changed, to increase the size of the firmware partition. These changes are upward-compatible with CircuitPython 9.1.0 and up. All the builds have now been updated to assume the new partition layout.
- Bump the TinyUF2 version for
esp32s2andesp32s3to 0.3.50. - Update and rewrite the Espressif bootloader install/update section, to make it clearer and point to external references.
Here is a screenshot of ...
Closing this since we have the "OPEN INSTALLER" button now.
ports/raspberrypi/common-hal/picodvi/init.c does a query to see if there is a valid monitor I2C EDID connection on init. This is queried to provide some monitor resolution availability information.
In discussions this week, testing of Adafruit and non-Adafruit HDMI displays was discussed.
I suggest that the EDID resolution information be available to CircuitPython such that programs which may want specific resolutions or utility programs looking at a connected monitor may check the pert...
I can confirm some of this behavior intermittently, if it's the same as my issue. On LVGL font load programs I have there are times I hit run and I get a memory allocation error early on. If I run the program again immediately after the error it typically runs ok.
Perhams picodvi.monitor or picodvi.EDID could return a list of resolutions?
The REPL does not fully cleanup memory after starting again with CTRL-D. You need a hard reset for that. So the behavior you see is normal.
Also keep in mind that not only the amount of memory is important, but also if the memory is fragmented or not.
I'd rather not add this to the core. CircuitPython code should be able to do the same query the core does. It'd be a good library/driver.
I wouldn't mind having it in the core but I'd want to to be faithful to the CPython API and behavior.
Otherwise, a community library would be good.
Maybe for external displays we should encourage people to initialize them in boot.py and set them onto supervisor.runtime.display That would do a few things that I think are positive:
- more closely mimic the core behavior with init display once on boot up then keep it around without releasing
- lead to more portable
code.pysince display initialization with pins / different types of displays etc.. all live outside ofcode.py - make the project code run faster since it won't be releasing and re-initialzing the display every time it runs.
Automated website update for release 10.0.0-beta.0 by Blinka.
New boards:
- elecrow_crowpanel_3.5
- omnimo_nrf52840
- unexpectedmaker_edges3d
- weenoisemakers_noisenugget
I'm not sure if this is the right place for this so forgive me if it isn't.
I was trying to import from micropython import const into my code.py and am getting Import "micropython" could not be resolved. I have circuitpython-stubs installed and other circuitpython specific libraries are all getting typed correctly so I believe I have everything setup correct.
Would it be possible to add micropython.const to this typing library to get the type hint? I'd be happy to open a PR myself...
@dunkmann00 moved to core repo now. I also raised the question about static stubs in the weeds during this weeks meeting and we are good with moving forward on that idea. In the top level of the repo in a new stubs folder was the suggested place to put them.
Along with adding static .pyi files there, I think we'll need to update the make stubs command to pull in those files during the stubs build.
I will try to test the process out.
I'm not the best library writer but this CircuitPython code seems to work well and demonstrated getting the data one might want to have:
# SPDX-FileCopyrightText: Copyright (c) 2025 Anne Barela for Adafruit Industries
#
# SPDX-License-Identifier: MIT
#
import sys
import board
import busio
def parse_established_timings(edid):
"""Parse established timings from EDID bytes 35-37"""
modes = []
# Byte 35 (established timings I)
if edid[35] & 0x80:
modes.append("7...
https://blog.adafruit.com/2025/07/15/circuitpython-10-0-0-beta-0-released/
Highlights of this release
- Increase the firmware partition size for ESP32-S2 boards with 4MB flash, allowing more features to be included. This change was made for 4MB flash ESP32-S3 boards in previous releases. Starting with this release, you must now update the TinyUF2 bootloader on all 4MB flash ESP32-S2 and ESP32-S3 boards. See the release notes for details.
- Fix Espressif
pulseio.PulseInregression.
The "OPEN INSTALLER" button on the CircuitPython.org board pages is now updated to install the new bootloader
The one big downside is that errors aren't sent directly over usb. couldn't we check the state of s.r.d before releasing displays to achieve the same thing?
checking before releasing would prevent the re-initialization, but not help make the project code portable since it will still have the display initialization inside of there.
I did not consider the errors not going out though and that is unfortunate for this because it would make troubleshooting issues with the init more confusing since people will need to know to look in boot_out, assuming they would go to there.
I guess there really is no need to use boot.py as I think more about it. Instead of encourage setting up the display in there projects could set it up in a seperate file display.py or whatever and then in code.py check for the display and if it's None then call the function from display.py to initialize it.
Stubs are mostly generated from modules in shared-bindings. But in order to generate the stub the c code has to be commented with the appropriate type hints. If a module is located somewhere else (like micropython.const) and/or there are not the appropriate doc comments, no stub is generated for it. For these occassions we can create static stubs in the stubs directory that can be used in circuitpython-stubs.
This also creates a stub for micropython.const and adds the static stubs ...
Thanks for moving it and for bringing it up @FoamyGuy! I took a look at it and submitted a PR for it.
Thank you for your helpful feedback. I have made the changes according to your suggestions.
Could you please review them again?
Model: Z-TEK ZK033A
I might try to capture the packet and analyze it with wireshark
I looked into the docs build error. It's root cause is that now it's trying to pull from multiple different places for the micropython module.
I've tested the following solution locally and it appears to be working:
- Delete: https://github.com/adafruit/circuitpython/blob/main/docs/library/micropython.rst. Sphinx will pull from the stubs for anything that it can, so it no longer needs this static rst file it will pull from the new static .pyi file. Which in hindsight is actually kind...
Just for your info:
Only slightly modified code works fine under CP 10.0.0.-beta.0
import sys
import time
import supervisor
import adafruit_ble
from adafruit_ble.advertising.standard import ProvideServicesAdvertisement
from adafruit_ble.services.standard.hid import HIDService
from adafruit_ble.services.standard.device_info import DeviceInfoService
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS
# Create HID and Device Info service...
adding IR pin to fruit jam board def
Okay I tried out what you described and locally got it building and it seems good...but the only problem is it is now putting micropython as a module in Core Modules, which we don't want.
Do other ports use this file too? Are you concerned about having different root certs on different ports?
Ok! Follow up on this issue if you do.
The raspberrypi and zephyr-cp ports would still use the lib/certificates/data/roots.pem. It's a question of firmware space about whether we could switch to the the same list as espressif, and I plan to look at that (I'll open issues.) But I am not concerned about that: the difference is less of an issue than Espressif users having to deal with the previous limited root list.
I think having it pulled in via stubs makes the docs assume that it is inside of shared-bindings. I just noticed also the URL that the micropython docs ends up at is different:
Currently live:
/docs/library/micropython.html
With this PR change:
/shared-bindings/micropython/index.html
I'm not sure how to fix it. I think that it's getting picked up by this autodoc https://github.com/adafruit/circuitpython/blob/main/shared-bindings/index.rst?plain=1#L24-L28 but I d...
CircuitPython version and board name
Raspberry Pi Pico, Circuit Python 9.2.8
Code/REPL
(See code in description)
Behavior
Editor crashes, erasing the serial window and it's debug messages.
Description
Found that these line of code will work,
import board
import rotaryio
tuning = rotaryio.IncrementalEncoder(board.GP1, board.GP2, divisor=4)
But these line cause everything to crash,
import board
import rotaryio
tuning = ...
Done for Espressif in #10354. Is there room in the Pico W build?
Okay cool. I kind of was at the same place as you with not really sure how to get it to replicate the current site layout. But if you are okay with it being in Core modules then that works for me!
I looked at this. It's easy to remove the ability to pass an open file. But internally, it just opens the file, and never closes it. There is currently no context manager support: no deinit() or __del__() to close the file. Ideally that should be done.
- Fixes #10394
The arguments to heap_caps_malloc() were in the wrong order. Thanks @sola85 for spotting this.
Tested. Jumpered A0 and A1 on a QT Py ESP32-S3:
>>> import pwmio, frequencyio, board
>>> a0 = pwmio.PWMOut(board.A0, frequency=123456)
>>> a0.duty_cycle=32768
>>> a1 = frequencyio.FrequencyIn(board.A1)
>>> a1.value
123450
Note that it also "worked" before this fix, but the size allocation was all wrong.
Also fails in the same way with usb_cdc.console.read(), so no need to set up in boot.py to test.
I have a very simple replicator for this. I think it has to do with problems expanding the initial heap.
Adafruit CircuitPython 10.0.0-beta.0 on 2025-07-15; Adafruit QT Py RP2040 with rp2040
>>> l = [0]*7937
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
MemoryError: memory allocation failed, allocating 31748 bytes
>>>
[hard reset or ctrl-D]
```
Adafruit CircuitPython 10.0.0-beta.0 on 2025-07-15; Adafruit QT Py RP2040 with rp2040
>>> l = [0]*7936
>>> l = [0]*7...
This appears to be the same problem as #10451, so I'll make this a dupe of that.
This is a follow-on to #10264.
There are a number of places where m_new() is called to create byte or string buffers, etc., which contain no collectible objects. An example is py/vstr.c. Change these to m_malloc_without_collect()
CircuitPython version and board name
Adafruit CircuitPython 9.2.5 on 2025-03-19; Adafruit Feather RP2040 USB Host with rp2040
Code/REPL
import usb.core
import time
time.sleep(5) # needed for USB to settle? I don't think so, but whatev.
print("Looking for midi devices")
while True:
i = 0
for device in usb.core.find(find_all=True):
print("Found a device")
i += 1
print(f"Found {i} devices; going around again...")
time.sleep(1)
Behav...
- Fixes #10472.
Restore settable microcontroller.cpu.frequency. I accidentally disabled this while cleaning up mpconfigboard.mk. It is now turned off only for 2MB flash boards, as it takes space to leave on.
Is restart vs reload described in the doc somewhere?
Suggestion to explicate restart and reload a bit.
How about something like this?
CircuitPython will also read the environment to configure its behavior. Some keys are read at
startup once and others are read on reload (ctrl-D in the REPL). If a reload doesn't change things, then try a restart (a power cycle or pressing the reset button).
Other keys are ignored by CircuitPython. Here are the keys it uses:
The last commit adds a redirect from the old location to the new, so dead links shouldn't be a problem.
This should be fixed by #10470. I didn't have a Lolin S2 Mini to test on, but I tested on a Metro ESP32-S2 with the identical test from the original post.
is it worth mentioning microcontroller reset() as a form of restart? Do we pretty universally refer to a reset as a restart?
Hi All, I am having an issue with MQTT that might be related to this. My hardware is an ESP32-S3 Feather running
Adafruit CircuitPython 9.2.1 on 2024-11-20. I have the latest MiniMQTT library installed.I am sending discovery packets to Home Assistant. The packets can be different lengths depending on the composition of the MQTT device I am describing. Have noticed that after a...
Please try the latest 10 version to see if it does the same. Thanks!
Ya, I'll make it consistent and say "reset".
Hi Thanks for your time.
I downloaded 10.0.0.0-beta.0 and the very, very latest time stamped: 2025-07-17T11:26:36.000Z.
They both have the same behavior.... Pico cashes hard and USB is lost, only way to recover is to manually edit the "code.py" file back into a proper state. i.e. Sequential pins on the incremental encoder statement.
CircuitPython version and board name
n/a; M5Stack Dial
Code/REPL
n/a
Behavior
file note found at https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/m5stack_dial/tinyuf2-m5stack_dial-0.35.0-combined.bin
NoSuchKey
The specified key does not exist.
bootloaders/esp32/m5stack_dial/tinyuf2-m5stack_dial-0.35.0-combined.bin
72H3P2CEBHJY9JF6
x0dDo+1+LIr0f8PEepejXh+yu2500mFsxVpT+5+L5mFoUQC5zzpY2ohUj+omVr/Q8PokZIQHUQU=
Descr...
Bug Report: alarm.pin.PinAlarm Mis-maps to Incorrect Pins on ESP32 Feather
Description
alarm.pin.PinAlarm consistently fails to wake the board on the configured pin. Instead, it wakes up on a completely different, incorrect, and seemingly random pin. This behavior has been observed with multiple confirmed RTC-capable GPIOs and appears to be a fundamental bug in the core alarm module's handling of the PinAlarm configuration.
Board Information
Board Name: Adafruit Feather HUZZAH32 with ESP32...
I think the documentation is very explicit on this behavior (https://docs.circuitpython.org/en/latest/shared-bindings/alarm/index.html#alarm.exit_and_deep_sleep_until_alarms):
After restart, an alarm equivalent to the one that caused the wake-up will be available as alarm.wake_alarm. Its type and/or attributes may not correspond exactly to the original alarm.
Congrats on the release!
Oh, I missed this, thanks Scott :)
Oh, thank you. I will look into this!
On Fri, Jul 18, 2025, 12:25 AM bablokb @.***> wrote:
bablokb left a comment (adafruit/circuitpython#10498)
https://github.com/adafruit/circuitpython/issues/10498#issuecomment-3087206588I think the documentation is very explicit on this behavior (
https://docs.circuitpython.org/en/latest/shared-bindings/alarm/index.html#alarm.exit_and_deep_sleep_until_alarms
):After restart, an alarm equivalent to the one that cau...
@keen101 You are not seeing Pretending to deep sleep until alarm, CTRL-C or file write., right? On an ESP32 it should not do fake deep sleep, because there is no USB.
Have you tried this test with an ESP32-S2 or ESP32-S3, if you have those boards? I would be interested to know if you get different pin results. I probably tested this with S2 or S3, but at the time, we may not have even had an ESP32 build.
@bablokb It was not our intention to give incorrect pin numbers. I wrote that line t...
@keen101 as a workaround for now, if the wakeup signal persists, you could check the .value of the wakeup pins to see which one has the wakeup signal.
@bablokb It was not our intention to give incorrect pin numbers. I wrote that line to caution against expecting exactly the same alarm, and even before pin alarms were implemented. It may have been a caution against expecting the same time interval (I think we can't remember the time interval). I will try to make that more precise.
At least for the RP2xxx the code does not record any pin-number:
alarm->base.type = &alarm_pin_pinalarm_type;
// TODO:...
As a side note, this old comment claims there is a fix in progress that only needs testing. I would be happy to test it if you make your changes available.
@eightycc picked this up as part of doing RP2350 sleep, which is still in progress. I can't find a fix that I personally did, so maybe that comment was about a fix he was testing. But I don't remember!
FYI
We (Dan, TonyC and I) may have found the culprit.
The issue shows up on Windows 10 Version 22H2, and Windows 11 Version 23H2.
The issue does not show up on Windows 11 Version 24H2.
No bets on 25H2 when ever it arrives.
IMHO Windows 10 will be around for a while.
I have three good machines that will not upgrade to Windows 11.
There are probably many people with machines like my three.
This Forum thread shows the discovery process.
[https://forums.adafruit.com/viewtopic.php?t=219232]...
Hello Dan, (and others),
Thank you for the quick replies and for looking into this. I'm a beginner with CircuitPython and am still learning the ins and outs, so I really appreciate your help. Yes, just trying to test out early deep sleep code with the esp32 with the goal of emulating some of the work being done at Colorado State University with environmental / agriculture sensors and IOT.
From what I can tell, I don't seem to be getting the "Pretending to deep sleep" message. My board's ser...
This is a second attempt at allowing longer pulse sequences to be recorded using pulseio.PulseIn on espressif ports using the DMA backend of the RMT hardware.
This is essentially the same code as in the original PR https://github.com/adafruit/circuitpython/pull/10397, but the new logic is now only activated in cases where the existing logic didn't work, i.e. if maxlen > 128. I believe this fixes all issues raised in https://github.com/adafruit/circuitpython/issues/10466 and https://git...
I'm new at this. A month or so ago I got a library for an AS7343 light sensor accepted to the community bundle. Now I need to fix and issue, but I'm not sure how to do that and stay connected to the community bundle. I read that I should make the changes to my personal repo for the library and then change the version tag and magically it will go into the community bundle, but I'm not finding much that actually makes sense for this process.
the bundle picks up the latest release (tag) on github, so you make your changes, commit, push, and in GitHub you go to releases and make one with a tag that's a valid version number (a.b.c), and tonight the bundle release script will pick it up
@jaunty juniper Thanks. I'll try this in a few days when I get the issue fixed.
CircuitPython version and board name
Adafruit CircuitPython 9.2.8 on 2025-05-28; M5Stack Cardputer with ESP32S3
Code/REPL
with open("/test.txt", "rb") as f:
print(f.readlines())
Behavior
No errors or crashes are produced, but if the code is run while the board is not plugged into a computer, it will hang until the board is plugged into a computer again.
If the code is run while the board is plugged into a computer, the code runs as expected witho...
infuriatingly, i can't seem to reproduce this anymore after shuffling my imports, so something else is at play here.
i tracked down this issue through trying to use bitmap_font with fonts stored in the flash (which gets mounted when the board is plugged into a computer). the program still exhibits the same behaviour with fonts, each time a new font or glyph needs to be loaded, it hangs until plugged in, even if i can no longer reproduce it with just an open.
Could you upload test.txt in a .zip file, so we get it exactly as it is? It may have to do with line endings.
I thave a hypothesis about this. This cardputer-specific code overrides board_serial_attached(), which by default returns false.
https://github.com/adafruit/circuitpython/blob/3512e668913437482dba78c23a920fc76b96457a/ports/espressif/boards/m5stack_cardputer/cardputer_keyboard.c#L130-L133
So it will normally return true, even when USB is not connected, because the cardputer keyboard input is set up when CircuitPython starts. This causes this serial_connected() to return true, even if USB ...
i'd like to focus away from the test file at the moment since I can't seem to reproduce the issue at all with just a simple file anymore. this is a simplified program i've managed to reliably reproduce the issue with:
import board
from displayio import TileGrid, Palette, Group
from adafruit_bitmap_font import bitmap_font
from adafruit_display_text import bitmap_label
palette = Palette(2)
palette[0] = 0xffffff
palette[1] = 0x000000
font_file = "fonts/Arial.bdf"
font = bitmap_font.l...
after much experimentation and plugging and unplugging of USB cables, this is the minimal reproducible program i can find:
from adafruit_display_text import bitmap_label
with open("/test.txt", "rb") as f:
print(f.readlines())
while True:
pass
opening the file for read in text mode rather than binary does not exhibit the issue. any imports other than bitmap_label don't seem to exhibit the issue. the contents of test.txt don't seem to affect readlines at all, whether t...
There are only a limited number of devices that can take the picoDVI and Framebuffer resolution of 640x480 at 72 Hz. After a detailed discussion with Claude Sonnet 4, it believes it has the parameters to add that mode to the existing code base without extensive changes. A sample Framebuffer setup:
import board
import picodvi
# 60Hz for capture card compatibility
fb = picodvi.Framebuffer(640, 480,
clk_dp=board.CKP, clk_dn=board.CKN,
red_dp=board.D0P, red_dn=board.D0N,
green_dp...
Here is code for implementing the 800x480 @65Hz for the Adafruit 2260 display
``
/*
- CircuitPython RP2350 PicoDVI 800x480 Support
- This code adds 800x480@65Hz resolution support to CircuitPython's picodvi implementation
- for RP2350 microcontrollers with PSRAM.
- Timing calculations for 800x480@65Hz:
-
- Pixel clock: 32.5 MHz
-
- TMDS clock: 325 MHz
-
- Horizontal total: 1000 pixels (800 + 40 + 80 + 80)
-
- Vertical total: 500 lines (480 + 1 + 3 + 16)
-
- Refresh rate: 6...
This sounds like it's closely related to #10242
<@&356864093652516868> Meeting in just over an hour at US ET 2pm. Add your notes to https://docs.google.com/document/d/1ncUmb1lkvktAE-wOGZbF_OMUQQu0iEHk9b1R_t55Rmg/edit?usp=sharing
@tulip sleet i thought the meeting was next week (28th)?
Same, that is what I mentioned at the end of last week meeting and set up the doc for.
<@&356864093652516868> SORRY - it's next week. I was looking at the wrong week.
Please open PRs for code changes. They are much easier to review.
Please open PRs for code changes. They are much easier to review.
These three files plus the documentation below constitute adding two new display resolutions to the picoDVI only for RP2350. It was made through Claude 4 Sonnet conversation https://claude.ai/chat/9d9fd6af-629a-4c5f-be60-deca6dc5c798.
This should not interfere with RP2040 implementation. It does add a scanning frequency kwarg to differentiate between, say, 640x480 @72Hz (existing) vs. 640x480 @60Hz (new).
I do NOT have a CircuitPython build environment so this PR is untested. It is subm...
looks like this might have been a regression introduced in 9.2.0, CircuitPython version 9.1.4 is the latest stable i can confirm which runs the code without issues
might also be a good time to note that none of the 10.0.0 versions (up to the current beta) boot on the cardputer at all, they simply bootloop
I have a cardputer on order for debugging.
You might not regret the cardputer acquisition, it is really tiny but feel like a full computer (without mouse).
The kind of portable programming device we were having with pocket calculator (HP / TI / Sharp).
I don't think it is really usable as you need small fingers, and the screen is super small, but there are a lot of interesting details.
You can make it thin by removing the extended battery, you can attach that to lego technics.
I need to make better use of that gem, that currently stay protected in the provided box.
Agreed that it’s so small as to be almost unusable. But as a test platform for WiFi, screen, I2S audio, & sd card, it’s pretty good. I have it in my set of remotely-accessible CirPy boards for that reason
the most useful thing i did with it so far (which is the project i was working on with bitmap fonts) was for it to work as a replacement for the app to run a bluetooth label printer
the other thing i did with it was microdrummo https://www.reddit.com/r/M5Stack/comments/1lfw5gl/microdrummo_a_drum_machine_sequencer_for_cardputer/
That is cool! nice job fitting that into such a small display.
You'll have to tell me more about "set of remotely-accessible CirPy board"... do you have some sort of online machine with CircuitPython gizmo USB connected to it, and you ssh or else to that machine?
Now, I was thinking the cardputer was coming with a nice protective box... but maybe not, if it is not the case, then the case I use is a Pimoroni plastic box. https://shop.pimoroni.com/products/pirate-brand-plastic-loot-box?variant=21803682693203
My cardputer was moving a bit in there, so I added a tissue and then it was tight in. I am not sure if I used the Small or Large version. Large: 145x90x40mm vs Small: 90x66x30mm.
The reason I don't know is that it is so small that I could not locate my cardputer at home for the moment. That is the problem of beeing too small.
Small it is, I just checked:
Small Pimoroni box: 90x66x30mm
Cardputer: 84.0 x 54.0 x 19.7 mm
So with just a little bit of padding, it is well protected and not moving into the box. Almost a perfect fit.
Just noticed the v1.0 of the cardputer is EOL, and the v1.1 has a small difference in the StampS3 it use some power management. Let's assume the same version of CircuitPython works on both v1.0 and v1.1 and that Dan will have the new version.
I might get a v1.1 in addition to my v1.0 (that is hard to find right now), just to check.
- Please change the files to minimize the diff. There is a lot of extraneous changes that are unnecessary.
- Please also make changes to fix the build. Once the CI is green, you'll get a build you can test on the device.
Submitting untested, uncompiled code isn't helpful and wastes time. Please ensure you do 1 before submitting a build. The diff is shown when proposing the PR. Ideally 2 would be done as well before submitting.
It's just exactly like you describe: a Raspberry Pi with a powered 7-port USB hub and various CircuitPython devices (currently: Lolin S2 mini, QTPy m0, Trinkey of some sort, cardputer, Pico, M4 pyportal)
I ssh into the Pi, use "discotool" to find the serial port & mount point of each device, use "microcontroller.on_next_reboot(microcontroller.RunMode.{UF2,BOOTLOADER})" to try out new CirPy builds or UF2 bootloaders. The USB hub also is controllable via uhubctl so I can powercycle a specific hub port if needed
CircuitPython version and board name
main (raw SPI, or SPIDevice):
Adafruit CircuitPython 9.2.8 on 2025-05-28; Adafruit Feather M4 Express with samd51j19
Adafruit CircuitPython 10.0.0-beta.0 on 2025-07-15; Adafruit Feather M4 Express with samd51j19
Adafruit CircuitPython 10.0.0-beta.0 on 2025-07-15; Adafruit Feather RP2040 with rp2040
secondary (I2CTarget):
Adafruit CircuitPython 9.2.8 on 2025-05-28; Adafruit Feather M4 Express with samd51j19
Adafruit CircuitPython 10.0.0-beta...
SSD1680 won't respond to the IL0373 status command (0x71) so use it to detect which display is on the MagTag and init accordingly.
It also looks like when some non-[0, 0] values are written from the main to the SPITarget, it messes up the values written back to the main.
Here's example print output with 2-byte buffers on both ends, where the main writes various values (and the secondary is also set to write back predictable values instead of ADC):
<img width="1046" height="226" alt="Image" src="https://github.com/user-attachments/assets/97d3d7b7-225a-44c2-8f18-f50af8b12086" />
(note that as mentioned earlier, in the ...
Thanks. Given the CI, I think I will close this and it can be looked at again later.
CircuitPython version and board name
Adafruit CircuitPython 9.2.8 on 2025-05-28; Raspberry Pi Pico with rp2040
(In reality a custom Pi Pico clone designed by me)
Code/REPL
No specific code
Behavior
I'm trying to copy source files to my board, but it fails if a file with the same name doesn't already exist:
mpremote connect id:E464D431C33D2021 fs cp communication.py :
cp communication.py :
mpremote: Error with transport:
Traceback (m...
I checked the code, and for the copy it uses open(xxx,'wb'), and that is nothing extraordinary.
I maintain a similar project (cp-shell), that also uses this call and I don't have problems with this.
To debug, you have to manipulate the mpremote code and make sure it prints the complete error-stack on the device side. (mpremote is Python, so that is not the problem).
Not related to this issue, but relevant: why do you use mpremote after all? The Pico has native usb, so you could just mou...
See this new comment: https://github.com/micropython/micropython/issues/17752#issuecomment-3106890866
Two ways to fix this are:
CircuitPython adds the errno name to the output, eg OSError: [Errno 2] ENOENT No such file/directory: ....
mpremote adds support for the form OSError: [Errno <id>]
Not related to this issue, but relevant: why do you use mpremote after all? The Pico has native usb, so you could just mount the device and use the copy command of your OS. Should be more reliable, faster and stable.
I'm building a test rig that handles 8 circuitpython devices at the same time. They are hot swapped during operation, and test code is temporarily pushed to each unit to test the hardware. Then the actual "production" code is written to then to make them ready for shipping.
I...
See this new comment: micropython#17752 (comment)
Two ways to fix this are:
CircuitPython adds the errno name to the output, eg OSError: [Errno 2] ENOENT No such file/directory: ....
mpremote adds support for the form OSError: [Errno ]
Thank you. I don't know how ideas like these are synchronized between mp/cp though - how and who would decide what course to take (if any)?
I also posted this in the (closed) micropython issue: https://github.com/micropython/micropython/issues/17752#issuecomment-3108736502
The CircuitPython/MicroPython difference in how to print
OSErrorexceptions happened a long time ago. We added printing a filename about five years ago in some cases.CircuitPython:
>>> open("foo") Traceback (most recent call last): File "<stdin>", line 1, in <module> OSError: [Errno 2] No such file/directory: fooCPython doe...
I'm sure there are other solutions to my issues, but I have got the impression that CircuitPython aims to be compatible with mpremote - hence the bug report.
We don't actively try to keep mpremote working, because we don't use it ourselves. But when it doesn't, it has sometimes been due to a bug on our side.
Thank you. I don't know how ideas like these are synchronized between mp/cp though - how and who would decide what course to take (if any)?
Someone (you, if you're interested) cou...
@dhalbert
We don't actively try to keep mpremote working, because we don't use it ourselves.
Thank you for clarifying. So is cpshell to be considered the official tool for syncing files between a local git repo and cp boards, or is there a third option?
Someone (you, if you're interested) could submit a PR to micropython to handle the CircuitPython case.
I'd love to, but I'm afraid my C skills are terribly lacking 😅
I'd love to, but I'm afraid my C skills are terribly lacking 😅
Oh, nevermind that. I didn't realize mpremote is written in python. I might look into it then and see if I can understand the problem.
Hey @FoamyGuy, just wanted to check in to see if you've gotten a chance to look at the changes I made?
This looks good to me, I tested both make html and make stubs locally, and confirmed the redirect is working for the old URL to bring you to the new page.
@dunkmann00 sorry, this one slipped off my radar. Thanks for the reminder. Also thanks for working on this improvement for the stubs and bearing through the unforeseen problems that arose from the static files.
So is
cpshellto be considered the official tool for syncing files between a local git repo and cp boards, or is there a third option?
No, cpshell is not official. I wrote it only for boards that don't have native usb and where the web-workflow fails. It is very slow on these boards, but the web-workflow always fails for me. And if it would work, I would still look for a script-based solution.
On the Pico, I use a mount/rsync/umount-script to synchronize my local git-repos with my CP-bo...
@FoamyGuy No problem at all! Every circuitpython repo I check out I see your name there so I'm sure you've got a lot on your plate. Happy to have been able to improve the typing even if just a little bit!
- Fixes #10488
- Fixes #10489
Change the raspberrypi and zephyr-cp wifi builds to use the full Mozilla certificate bundle from https://github.com/adafruit/certificates. Now all our wifi builds use the full bundle.
This update required https://github.com/adafruit/certificates/pull/10 to work. When i was testing this, the RP2 builds mysteriously did not work for an https://api.github.com HTTPS fetch. This was because the Comodo "AAA Certificate Sevices" root had recently been remov...
@Randall-Scharpf Would you mind taking a look at this issue, see if I'm missing something?
https://github.com/adafruit/circuitpython/issues/10504
So is
cpshellto be considered the official tool for syncing files between a local git repo and cp boards, or is there a third option?
For all my CircuitPython projects, I use make and rsync to sync .py code files and .mpy library files from a local git repo to my CIRCUITPY drive over USB mass storage. That approach has been working great for me.
One caveat is that I typically only have one CIRCUITPY device connected at a time. So, my Makefile rules wouldn't work for you unless ...
Description
This pull request adds support for the Waveshare ESP32-S3-LCD-1.47 board to CircuitPython. The implementation includes board-specific configurations, pin definitions, and initialization code for the onboard 1.47-inch LCD display (ST7789 driver, 172x320 resolution), TF card slot, RGB LED, and other peripherals. The changes are based on the official Waveshare documentation: ESP32-S3-LCD-1.47 Wiki.
Changes
- A...
My rsync uses some more args which I think are useful:
--delete --inplace \
--no-owner --no-group --modify-window=2
If there is not much free space on flash, the rsync will fail without --inplace because without you have a copy-delete-move operation thus you need two times the space for every file (and for e.g. fonts this can be critical).
--delete will make sure the files on the device are in sync with the files in your repo in case you deleted something. But watch out, yo...
I'm going to remove this because it is the default.
Looks great! I'm making one small change.
Thanks! Could you now submit a PR to https://github.com/adafruit/circuitpython-org to add the board to circuitpython.org? A guide is here: https://learn.adafruit.com/how-to-add-a-new-board-to-the-circuitpython-org-website
Here's a simpler example. Ignore the data flowing back from the secondary to the main, main concern is how the data written from the main gets changed at the SPITarget secondary depending on the values sent.
SPITarget code is the same as in the docs example, except for timing, renaming the secondary-to-main buffer, and printing only that buffer after the transaction:
import time ####
import board
import analogio
from spitarget import SPITarget
time.sleep(3) # wait for serial after r...
One question that should probably be answered in a code comment.
What optimization level were they before? Why change them?
The default in Makefile is -O3, which liberally trades code size for speed. This board no longer fit. There are a lot of frozen libraries. -O2 should still be fine, and we are far from needing to go to -O or -Os.
I am kind of amazed we are still getting away with -O3 on nearly all the RP2040 boards.
@tannewt could not reproduce, some time ago.
@FoamyGuy COuld you retest? Maybe this has already been retested in the course of your recent work.
@tannewt Here is a scenario where automount does not seem to do the locking I would expect. Tested on a PyPortal with 10.0.0-beta.0.
Run this program (I imported it in the REPL)
import board
import os
import random
import sdcardio
import storage
import time
spi = board.SPI()
cs = board.SD_CS
sdcard = sdcardio.SDCard(spi, cs)
vfs = storage.VfsFat(sdcard)
storage.mount(vfs, "/sd")
while True:
filename = f"/sd/{random.randint(0,10000)}"
print("Trying to create", filename)
f ...
I tested this again on a Feather RP2040 USB Host running 10.0.0-beta.0.
This keyboard: https://www.adafruit.com/product/857 still does not work if it is connected when the device boots up, but does after unplug / re-plug.
This more recent keyboard: https://www.adafruit.com/product/1736 does work correctly if connected when the device boots up though. As does a logictech wireless keyboard that I use.
I believe the miniature keyboard (product 857) is the one I was using when I originall...
The code here: https://github.com/adafruit/Adafruit_CircuitPython_PIOASM/blob/main/examples/pioasm_hello.py#L30 which is embedded in this guide page: https://learn.adafruit.com/intro-to-rp2040-pio-with-circuitpython/using-pio-to-turn-an-led-on-and-off
Creates a StateMachine with frequency 2000. When I run this code on a Pico w/ 10.0.0-beta.0 it raises this error: ValueError: frequency out of range
In testing a few values it seems that 4000 is the minimum accepted value.
I can update...
In the PIO hardware, the clock rate is created by applying a divisor to the CPU clock (microcontroller.Processor.frequency). So there is not a fixed lower bound, it depends on the system clock. Also, the lower bound is not exactly 2kHz or 4kHz.
The maximum divisor is 0x1_0000 (65536). For the original non-overclocked RP2040 at the default frequency of 125MHz, this meant ...
Okay, thank you for confirming and the pointer to docs. I'll close this and submit a PR to update the example code.
Thanks also for the guide and it's many examples. I'm just starting to look closer into PIO and it's been quite helpful.
The cause of this seems to be the same condition as #10298: an error while paste mode is in use. If you paste code into the REPL in the Mu serial window with middle-button on Linux or similar, it goes into Paste Mode. If an exception is raised while running the pasted code, then on the next ctrl-D to >>>, CircuitPython will crash hard and go into safe mode.
It does not always happen: short inputs don't seem to provoke this, but the code above does.
#10298 appeared to be specified to RISCV...
@Hagtronics to be clear, are you seeing this crash when running this code in, say, code.py, or only when you paste the code into the Serial window? That is how I was able to reproduce the crash. How exactly are you pasting the code?
@lone axle did you turn on the "no reset" in the web serial tool?
i haven't checked the pins
you could just load the passthrough and then try esptool.py from the shell, like just chip_id
it is on. I didn't explicitly flip the switch though, it loads for me in this position
that looks right. maybe limor wrote a passthrough already?
esptool.py does the same thing on the neopixel and outputs this:
esptool v5.0.1
Serial port /dev/ttyACM0:
Connecting......................................
A fatal error occurred: Failed to connect to Espressif device: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
my best guess is that either Serial1 or SPI are incorrect, but I'm not sure how to tell exactly. Serial1 seems to match as defined here: https://github.com/earlephilhower/arduino-pico/blob/cdf25b45b8b5926b8cfbd1544608484069abf3e1/variants/adafruit_fruitjam/pins_arduino.h#L46-L47, SPI is more ambiguous because there are both SPI1 and SPI0 defined here: https://github.com/earlephilhower/arduino-pico/blob/cdf25b45b8b5926b8cfbd1544608484069abf3e1/variants/adafruit_fruitjam/pins_arduino.h#L52-L62. Looking at the pin diagram I believe SPI1 is correct, but it's unclear to me which just SPI is, I tried using SPI1 and SPI2 in the code as well though and neither of this behaved any different.
I'd expect CP to hold the lock between file open and close. If USB enumerates outside of that time, then it should grab the lock and be read-write. If inside that time, USB should appear read-only.
Aha, the problem here is that ESP32 supports only RTC_GPIO for pin wakeups, and it's numbering the pins according to the RTC_GPIO numbering scheme, which confusingly numbers the pins differently from regular GPIO. In that scheme, RTC_GPIO17 is regular GPIO27, which is exactly the mismatch I see when I run a simplified version of your test program. Now I know what to fix.
https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/peripherals/gpio.html
Thanks for submitting a pull request to CircuitPython! Remove these instructions before submitting.
See https://learn.adafruit.com/contribute-to-circuitpython-with-git-and-github for detailed instructions.
- Consider whether to submit this PR against
mainor against (if it exists) the branch for the current stable release or an upcoming minor release. The branch will be namedi.j.x, for example,9.2.x. Bug fixes and minor enhancements can be submitted against the stable relea...
- Fixes #10498
On ESP32, alarm.wake_alarm.pin was wrong, because it was return the RTC_GPIO pin number, not the regular GPIO. On ESP32 only (at present), the RTC_GPIO numbers do not line up with the regular GPIO numbers. There is no direct mapping function or table to go from RTC_GPIO to GPIO, so I just wrote a search loop to find the right pin, using the supplied mapping function the other way.
Tested on Feather ESP32 V2, and tested that there was no regression on a Feather TFT ESP32...
Hi dhhalbert - I am not pasting code at all.
To reproduce, type this into the editor window the location is a PICO board code.py file.
import board
import rotaryio
tuning = rotaryio.IncrementalEncoder(board.GP1, board.GP2, divisor=4)
print('all is good....')
Then run the code - all is good the serial window shows the result
Then change the 'tuning' line to,
tuning = rotaryio.IncrementalEncoder(board.GP1, board.GP11, divisor=4)
Then run the code - the code causes the USB serial connect...
I don't have the 857 keyboard, will order one next to test with this issue.
Hello devs. I'm looking for @gilded cradle to see if she would like to discuss some PRs for code.circuitpython.org and maybe working together on some future changes: https://github.com/circuitpython/web-editor/pulls
CircuitPython version and board name
ESP32 Feather HUZZAH32 in CircuitPython 10.x.x Beta/Nightly
Code/REPL
N/A as any code cannot be uploaded. Any code in a code.py file is fine to test with for this bug.
Behavior
not able to Serial File Transfer (Mu/ampy) Broken on ESP32 Feather HUZZAH32. Since this board does not have native USB support for file transfer, this becomes a critical issue for this type of board.
Description
Issue Description:
...
Hi, I tried 10.0.0 beta 0 and latest on a feather Huzzah with Mu and Thonny and was able to transfer files to the board.
- Do you have access to the serial REPL when the file transfer doesn't work ?
- Did you do a full flash erase when installing the bin to the board ?
- Have you pressed reset on the board after installing ?
- Have you tried with Thonny ?
https://code.circuitpython.org worked for me on ESP32 10.0.0-beta.0 boards. You could use that as a workaround for now.
Another tool to use is https://github.com/bablokb/cp-shell, which is meant for CircuitPython specifically.
Thanks @Neradoc,
That is disappointing that you were not able to replicate the issue.
Perhaps it is just this EzSBC clone that has the issue? A Linux specific
bug? As for accessing the REPL on MU after the US-10.0.0-alpha.8 was just
uploaded i get pretty much no characters at all. Nothing seems to be
printed. After a couple tries of resetting or unplugging the usb cable and
trying again I got two instances where I got a partial text message and
some corrupted characters. and both are...
In addition, @dhalbert,
I tried the link you sent for the workaround, and the USB option hangs with
the circuitpython going around in infinite loop and the ESP32 physically
starts flashing the red and green leds over and over again, indicating a
major fault of some sort.
the installer tool on
https://circuitpython.org/board/adafruit_feather_huzzah32/ when I try to
use it to update the wifi credentials hangs and the ESP32 physically starts
flashing the red and green leds over and o...
I tested with the 10.0.0-beta.0 firmware on an Adafruit Feather Huzzah 32, as @Neradoc did. I erased the flash with esptool.py and uploaded that version with esptool.py. This is on Ubuntu 24.04.
I also found that the "OPEN INSTALLER" on the board page didn't work, so I used esptool.py instead.
I then used Mu 1.20 in ESP MicroPython mode. I did have to reset the board to get the Files window to work. I wrote a blink program which I got to run:
<img width="1080" height="272" alt="Image" src=...
If all else fails I wrote a utility that takes a slightly different approach and has worked for me as a last resort. The utility pushes a tiny program over to the micro-controller and then uses that to help with the file transfers. The User Interface is bizarre but since there are so many options for transferring files to micro-controllers I didn't feel it was worth any polish. The serial port is also hard coded so you'll have to update it with the appropriate port name as described in the re...
From what I read about this board, the red and green LEDs show serial transmission. I don't know if there are hardware differences with the feather, since it looks like it's the same module.
ets Jul 29 2019 12:21:44��� D D@ ���
That looks like what you get when it's not using the right baud rate for the serial transmission.
For example if I use 9600 instead of 115200 in screen, I get that kind of things:
...
@RetiredWizard
If all else fails I wrote a utility that takes a slightly different approach and has worked for me as a last resort.
This is not much different to what mpremote, rshell, cpshell and code.circuitpython.org do (the latter implements this in javascript). They all "upload" a code-snippet that reads data sent by the host via REPL. This works fine for small files, but as soon as you transfer large files it will take a long time, especially if you don't have flow-control. But it w...
I had no trouble this morning using https://code.circuitpython.org with a Feather Huzzah32 running 10.0.0-beta.0. I had shut down Chrome completely last night when I put the computer to sleep.
So, I don't see that -- both host and CircuitPython are able to read/write. In the example in the OP, the program tries to start writing right away. It's not clear whether that happens before or after enumeration.
The host does not update its idea of what is on the drive if writes occur without its knowledge. So per-file-open locking does not help the host. Maybe if any file open for write occurs on the CircuitPython side, it should lock the host out of writing until the next enumeration. I...
@Neradoc,
That is kind of what I was thinking as well.
I was able to use screen on the command line to display what is happening
behind the scenes a bit. It looks like the ESP32 is still running serial at
the default baud rate, but I'm not sure why anything else is not working.
To me it looks like the message is still messed up a bit?
@.***:~$ screen /dev/ttyUSB0 115200
Adafruit CircuitPython 10.0.0-alpha.8 on 2025-07-08; Adafruit Feather
HUZZAH32 with ESP32
Board ID:ad...
@bablokb
This is not much different to what mpremote, rshell, cpshell and code.circuitpython.org
Thanks! It's been a while since I actually worked on the board that needed this, I don't know if I forgot that these tools used server/client connections or never knew it.
I believe the problem I was having was a UART buffer overrun error or something similar where typing simple commands into the console worked but whenever you tried to communicate more than a hand full of characters at ful...
I believe the problem I was having was a UART buffer overrun error or something similar where typing simple commands into the console worked but whenever you tried to communicate more than a hand full of characters at full speed you would encounter transmission errors.
That is the core of the problem. I added two parameters to cpshell (chunk_size and chunk_wait) to work around this problem but verifying is certainly the most robust approach.
CircuitPython version and board name
Adafruit CircuitPython 10.0.0-beta.0-8-g857c625421-dirty on 2025-07-25; Adafruit Feather ESP32S3 4MB Flash 2MB PSRAM with ESP32S3
Code/REPL
import time
from adafruit_ble import BLERadio
from adafruit_ble.advertising.standard import ProvideServicesAdvertisement
from adafruit_ble.services import Service
from adafruit_ble.characteristics import Characteristic
from adafruit_ble.characteristics.json import JSONCharacteristic
f...
https://github.com/adafruit/circuitpython/pull/10509 was just merged to add support for the Waveshare ESP32-S3-LCD-1.47, here are the files to add it to the circuitpython.org site. Thanks!
@lone axle do you want to merge the nina-fw now (you gave a thumbs up), or else figure out how to test C6 and merge after that?
(can answer in the PR)
dan, just out of curiosity, Nina now supports ESP32 and C6… Is there any reason it wouldn’t work with S2 or S3?
it certainly could, but we haven't tried building it for those. There might be some minor tweaks necessary. The motivation for the ESP32 and C6 is that they are really cheap and therefore reasonable as co-processors.
@lone axle there are Python versions of passthroughs. I don't know if you tried https://github.com/adafruit/Adafruit_CircuitPython_miniesptool. Also see https://github.com/adafruit/nina-fw/issues/68
Thank you, I'll check those out. Only tried arduino.
Only tested briefly but no luck with miniesptool. I am thinking at least part of my problem is I'm not getting the C6 into boot loader mode properly. The arduino passthrough and this miniesptool code seems to be using GPIO0 for that https://github.com/adafruit/Adafruit_CircuitPython_miniesptool/blob/fdd7cce7eddd45e29930759984ccc58e63849d40/examples/miniesptool_simpletest.py#L18. But I am unsure how to set that based on the fruit jam pinout. It seems like maybe GPIO0 doesn't get it's own pin on the RP2350, and perhaps it's IO9 instead of 0, but maybe that is okay for this module.
The schematic shows it connected sort of to the IRQ pin and I have tried using that in place of GPIO0 but it doesn't seem to work.
I'm not 100% fluent in schematic icons, maybe this is indicating that ESP_BOOT is broken out to a pad or pinhole. I briefly tried jumping a single pinhole on the board that is near-ish to the ESP to GND while running the arduino pass through code but it didn't help, and I decided not to push my luck randomly jumping what is to me an unknown pin much more.
are you using rev C or rev D or earlier?
there was some shuffling of this, but I think it was early on
I believe it's rev C
yep, just found the label, definitely rev C.
It does have some of the I2S pins used by the TLV dac swapped around on this revision as compared to some later ones, I've swapped them in the code on my device to work around that.
are you using board.ESP_IRQ?
I beleive so, I updated the simpletest code with these:
tx = board.ESP_TX
rx = board.ESP_RX
resetpin = board.ESP_RESET
gpio0pin = board.ESP_IRQ
a confusing thing is that IO9 has nothing to do with the pin numbers on the RP2350. The RP2350 has its GPIO23 connected to ESP_BOOT
does ESP_TX go to the RX pin on the C6?
need to make sure whose point of view it is
I believe so. Sorry I cropped out the other side. This is the full C6 module in the Fruit Jam schematic:
from here: https://learn.adafruit.com/admin/guides/4298/editor/30676 if you can access
rev D:
{ MP_ROM_QSTR(MP_QSTR_ESP_CS), MP_ROM_PTR(&pin_GPIO46) },
// was GPIO0 on ESP32. Used for IRQ and mode switching.
{ MP_ROM_QSTR(MP_QSTR_ESP_IRQ), MP_ROM_PTR(&pin_GPIO23) },
// BUSY is also known as READY, and is RTS for BLE mode.
{ MP_ROM_QSTR(MP_QSTR_ESP_BUSY), MP_ROM_PTR(&pin_GPIO3) },
{ MP_ROM_QSTR(MP_QSTR_ESP_RESET), MP_ROM_PTR(&pin_GPIO22) },
// TX and RX are from the point of view of the RP2350.
{ MP_ROM_QSTR(MP_QSTR_ESP_TX), MP_ROM_PTR(&pin_GPIO8) },
{ MP_ROM_QSTR(MP_QSTR_ESP_RX), MP_ROM_PTR(&pin_GPIO9) },
Rev C onl y has { MP_ROM_QSTR(MP_QSTR_ESP_CS), MP_ROM_PTR(&pin_GPIO46) },
ok, never mind..., thought there might be pin changes there
I did get this working on a Fruit Jam mockup with RP2350B Metro and a C6 breakout.
I have a full ESP32-C6 Feather that I got out, but am unsure if it could be used to test. Willing to try if it can.
import board
import digitalio
import time
esp32_reset = digitalio.DigitalInOut(board.D12)
esp32_gpio0 = digitalio.DigitalInOut(board.D10)
esp32_gpio0.switch_to_output(False)
esp32_reset.switch_to_output(False)
time.sleep(0.1)
esp32_reset.value = True
time.sleep(0.1)
esp32_reset.deinit()
esp32_gpio0.deinit()
this is when I was using the breakout
oh, wait, not a breakout, what was I doing, maybe the C6 Feather
honestly, I don't remember. Most of my testing was with the ESP32 breakout. The Feather has IO9 broken out, so you could make a test jig with that
<@&356864093652516868> Monday meeting is in a little over two hours at 2PM US Eastern time. Add your notes here: https://docs.google.com/document/d/1ncUmb1lkvktAE-wOGZbF_OMUQQu0iEHk9b1R_t55Rmg/edit?usp=sharing. We're doing bi-weekly meetings in July and August, so there will be two weeks of news in this meeting.
Circuitpython does not support filtering from someModule import * when someModule contains all = ['symbol1', 'symbol2', ...]. This results in importing more symbols than intended, which can cause a little wasted memory (entries in the globals() in the scope containing from someModule import * ) and differs from CPython in ways that can introduce subtle bugs (primarily through unexpected replacement of existing symbols).
I have modified mp_import_all(...) in **py/runti...
CircuitPython does not use __slots__ within class definitions. Support for __slots__ could result in potentially significant runtime and memory savings, especially for classes with lots of instances (because no dict per instance is needed).
Some of the benefits of __slots__ overlap with collections.namedTuple, but *...
Basically, I'm looking for
* things that could be improved in the **mp_import_all(...)** modifications * general pointers on best practices for core PRs * what needs to be added to turn this into a "good" PR (tests, ... ???)
Please open a PR. They are much easier to review and comment on than a link like the one above.
This kind of change we mostly depend on MicroPython to do. There was some work on __slots__ there that was never merged:
https://github.com/micropython/micropython/pull/3392
https://github.com/micropython/micropython/issues/6070
Circuitpython does not support filtering from someModule import * when someModule contains __all__ = ['symbol1', 'symbol2', ...]. This results in importing more symbols than intended, which can cause a little wasted memory (entries in the globals() in the scope containing from someModule import * ) and differs from CPython in ways that can introduce subtle bugs (primarily through unexpected replacement of existing symbols).
This includes an enhanced mp_import_all(...) in ...
Searching for a 3.5 to 7" LCD display that has a HDMI interface that can do 640x480 (hopefully at 72Hz) for Fruit Jam. Lits of 800x400 but I specifically want 640x480 mode
This is the only one not in China https://www.ebay.com/itm/205222850146
A browser-based IDE for CircuitPython supported microcontrollers. No installation needed. Handy and powerful.
cpnews@adafruit.com for tips
I always welcome tips for articles & projects
Subscribe to the newsletter https://www.adafruitdaily.com/
Thank you @tulip sleet
Thanks @tulip sleet !
Thanks for hosting Dan. have a great week everyone 👋
highlight_color2 is now available for pixel value 0b11. Black is 0b00, white is 0b01 and highlight_color is 0b10.
Also add support for multibit values written with one command when color_command isn't provided.
This basic reproducer code seems to consistently cause a hard crash on the Fun House. It is a very pared down version of this project: https://learn.adafruit.com/funhouse-mail-slot-detector code
from adafruit_funhouse import FunHouse
funhouse = FunHouse(default_bg=None, scale=3)
def send_io_data(mail_value):
funhouse.network.push_to_io("mail", mail_value)
print("before send to io")
send_io_data(1)
print("after send to io")
I have tested on both of these versions and behavior ...
<@&356864093652516868>
Here is the notes document for the next CircuitPython Weekly Meeting, in two weeks, on August 11, 2025. We are doing bi-weekly meetings during July and August. 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/11KpdjrQUXbQ_-uasV4gLlZIPz3q-nfP7A2c9isIOVvg/edit?usp=sharing
I can verify that typing the following into the REPL on RP2 returns to the REPL but causes a safe mode crash when trying to run code.py with Ctrl-D. No need to be in Paste mode or anything special. Perhaps a PIO resource isn't getting freed? Video demo of what I'm seeing attached. This is on Adafruit CircuitPython 10.0.0-beta.0 on 2025-07-15; Raspberry Pi Pico 2 with rp2350a
https://github.com/user-attachments/assets/935d04d1-e664-4c53-8201-5e673c3acaba
re: meeting in the weeds discussion on the mysterious cookiecutter-playground-bundle repo that @tulip sleet didn't remember the details about... way back when (perhaps mid/late June, 2024?), there was a CircuitPython meeting where a couple folks (perhaps Dan & Jeff?) discussed how it would be useful to have a cookiecutter for building Playground guide project bundles. So, I wrote one. I still use an evolved version of that bundle builder for all my guides. But, for my purposes, it's more convenient to just copy the bundle_builder.py stuff and the associated .github folder with the action spec yaml file rather than using cookiecutter. So, I asked Dan if Adafruit would be interested in maintaining the cookiecutter I wrote, he suggested I could transfer it to him as an intermediate step (as I'm not a member of the Adafruit org), and so I did that.
The current contents of the cookiecutter-playground-bundle repo are out of date (code refers to 8.x and is unaware of 10.x, etc.). If anyone wanted to spruce that up a bit, a good starting point would be to compare the cookiecutter-playground-bundle Makefile, bundle_builder.py, and bundle_manifest.cfg files to the ones in any of my recent Plaground guide repos, for example, perhaps samblenny/fruit-jam-portable-midi-synth.
Thanks, I took the transfer and then failed to do anything about it 😦
no worries. life moves fast. there's much to do.
in the mean time, we've had some great improvements to 9.x and 10.x
dev hours well spent
There is work going on upstream in MicroPython to add
__set_name__.
That upstream work is now complete!
- micropython#16806
ARM gcc toolchain 14.3. Rel1 was released July 3, 2025: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads
We could update to this at some point. I don't see anything really compelling in the release notes.
So, I'm wondering if this is a problem specific to the EzSBC clone of the
ESP32 feather...
Specifically the EzSBC ESP32_Feather Chip is* ESP32-D0WD-V3 (revision 3)*
I think this means that this chip is somewhere between an adafruit HUZZAH32
and an adafruit HUZZAH32 V2. I notice that there are different
circuitpython firmwares for each. Up until now I have been running
(adafruit-circuitpython-adafruit_feather_huzzah32-en_US-9.2.8.bin) as the
stable firmware on my board and it has ...
A CircuitPython 9.1.0-beta.3-6-gc2443f993f
B CircuitPython 9.2.4-154-gbd572f86f9
when i compile A create uf2 ftp service appears via nrfconnect mobile app
when i compile B create uf2 ftp service does not appears nrf connect mobile app
- does circuitpython stop support ftp service ?
- does it possible add to B then prepare again uf2
- or i need to stay with A ?
The Feather ESP32V2 is qutie different from the Feather HUZZAH32. It has 8MB flash and 2MB PSRAM; the HUZZAH32 has 4MB flash and no PSRAM. That would explain the failure for the V2 firmware to work on your EZSBC board.
The EzSBC Feather differences from the HUZZAH32 are explained here: https://news.ezsbc.com/esp32-in-feather-format/. The differences are minor.
The chip version should not make a difference. It is not specified as part of the build.
There are a few other differences I see co...
As of #9344 (included in 9.1.0-beta.4), we no longer always start the BLE workflow, including the file transfer service you mention. Read that PR and see https://docs.circuitpython.org/en/latest/docs/workflows.html#ble for information about how to enable the BLE workflow when booting.
Add new board senseBox-eye with ESP32S3. Successfully build it locally and tested some things.
@Timeline8 did you ever resolve this issue or does it still exist?
@peterzhenghj did you hear anything back from Waveshare?
@dheera Did you try a newer version of CircuitPython? At this point, I would recommend trying 10.0.0-beta.0 or later as well.
This may have been fixed by #10321. Could you try 10.0.0-beta.0 or later?
Closing because the boards have been added.
Closing this for now, as we've changed a lot about heap size.
Closing this because I think it is resolved. It might be nice to write up the caching discoveries as a Playground note.
I'm going to close this since it's been over a year.
Closing since it's been over a year without further discussion.
I believe this was fixed by #9299.
Closing since it's been over a year without further discussion. We can reopen if needed.
Should be fixed by #9364.
@MHVUT Hi - it's been well over a year. Did you ever resolve this?
@artBoffin hi - did you ever resolve this?
@Merlin83b Did you ever re-test? Also try 10.0.0-beta.0, which uses an even newer version of ESP-IDF.
Hey Dan, I had not and shelved it. Let me get back to it and let you know.
Sent from Mars
From: Dan Halbert @.>
Sent: Tuesday, July 29, 2025 8:37:21 AM
To: adafruit/circuitpython @.>
Cc: ThinMan @.>; Mention @.>
Subject: Re: [adafruit/circuitpython] Walkmp3rson learn guide does not work with CP 9.x Freezes and displays USB not recognizable on PC Windows (Issue #9211)
See a similar report of random overwrites of files in https://forums.adafruit.com/viewtopic.php?t=219390.
One small suggestion for the USB manufacturer string.
USB_MANUFACTURER = "senseBox"
Is there a reason why the CircuitPython Learn Guide sections for boards with SD cards use adafruit_sdcard rather than the built in sdcardio? e.g. this one for the Metro RP2350: https://learn.adafruit.com/adafruit-metro-rp2350/sd-card
sdcardio is relatively new
we have a to-do for this somewhere. I think the issue is that it's a shared page and we have to consider how to mention both, or separate boards without sdcardio
ah shared page would explain it, thanks
can't wait for sdioio on RP2, but that would require cleverer folks than me
it is actually a "templated page", which allows us to tweak certain parts for the specific guide
it would be easy enough to copy this template and change the example to use sdcardio. It has to get put on someone's to-do list 🙂
i put it on my to-do list, but someone else might do it
It's not high-priority to me. I was looking for a "default example" of SD card use as I'm trying to track down what is maybe a CIRCUITPY filesystem or flash corruption bug while using SD cards with I2S audio. I have working code just wanted to make sure I was close to expected use cases
there is this mini-example: https://docs.circuitpython.org/en/latest/shared-bindings/sdcardio/index.html
yep. my code looks something like this: https://github.com/todbot/circuitpython-tricks/blob/main/larger-tricks/i2s_sdcard_pico.py
once it's mounted, nothing different to see
I looked at the learn guides containing "sdcardIo" but there are not a lot of fancy audio projects
maybe they mostly still use adafruit_sdcard
Hey Dan, I may have spoken to soon. New error. Both with 9.2.8 and 10 Beta 0
The display paints right up to displaying the name of the song and then it crashes with this error message on line 165 which is this command audio.play(mixer)
I am using all of John Parks hardware in the learn guide.
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
/sd/01_Bartlebeats_Carpeter_.mp3
/sd/02_Bartlebeats_Small_Selective_.mp3
/sd/03_Bartl...
Hi Dan, Nope never resolved it.
Since last posting here I finally signed up for IO+ and because that setup was running on a Qt Py S2 with IO supported sensors, I converted it over to Wippersnapper and removed the OLED completely. Although now with Wippersnapper supporting I2C OLED displays I might hook the OLED back up again.
Although that would having nothing to do with this topic using CP so adding it back under WS won't give me any useful information here. I could try running the CP co...
CircuitPython version and board name
Adafruit CircuitPython 10.0.0-beta.0 on 2025-07-15; Adafruit Metro RP2350 with rp2350b
Code/REPL
import time, board, busio, sdcardio
try_adafruit_sdcard = True
mount_point = "/sd"
# pin definitions
sd_sck = board.SD_SCK # board.GP34 # "CLK"
sd_mosi = board.SD_MOSI # board.GP35 # "SI"
sd_miso = board.SD_MISO # board.GP36 # "SO"
sd_cs = board.SD_CS # board.GP39 # "CS"
# sd card setup
if try_adafruit_...
This is because we've now added automounting for SD cards when a board has an SD card detect pin, which this board does.
If you don't bother to try to mount the card explicitly, you'll discover that os.listdir("/sd") will list the files on the board. In addition the card is visible as a drive on the host computer.
Note this issue: #10510.
Oof. Okay so the Learn Guide needs to be updated a lot then 😀. It also means we can't do performance tests between adafruit_sdcard, sdcardio and sdioio. I assume it's using sdcardio under the hood? Is there a way to know?
Yes, we have to document this, and yes, it uses sdcardio. You can do storage.umount("/sd") to unmount, and then mount again however you wish.
@tannewt can say more as well.
If I wanted to unconfigure all the auto-configured stuff on the Metro RP2350, so far I know to do:
displayio.release_displays()
storage.umount("/sd")
usb_host.???
Is there a method to unconfigure the PIO-USB usb host stuff?
@devout jolt
Is there a method to unconfigure the PIO-USB usb host stuff?
I'm not familiar enough with it to know, sorry.
the automounting is about making boards like Fruit Jam work more easily out of the box. See new stuff in https://docs.circuitpython.org/en/latest/docs/workflows.html about Mass Storage, CPSAVES, and automounting
Hi Dan, So I did a little more digging and tested other OS and found any higher than 9.2.5 & 10 crashes with the memory error message. 9.2.4 works fine. Thats about as far as I can go in testing. So something changed in the audiobusio subroutine.
This was fun and have a great day.
Dale Etchells aka ThinMan
From: Dan Halbert @.>
Sent: Tuesday, July 29, 2025 8:37 AM
To: adafruit/circuitpython @.>
Cc: ThinMan @.***>; Mention...
Hello @dahn did you get your Cardputer, what version did you take? I have now two differents, the v1.0 and the v1.1.
Both run 9.2.8 without problem.
There is a behaviour difference for the v1.1.
The trick is that the neopixel(?) is only powered when the screen is powered. So at boot time, the first few blink at bootstap are not visible. Not sure how to turn off the screen, but the theory is that v1.1 can sleep and consume much less than the v1.0. The other difference relate to Wifi antena that give better reception on v1.1 (not tested but hardware only).
I have a video of both startup, if needed I can upload and share.
So the same CircuitPython firmware is good enough for both version of the Cardputer.
In the coming weeks, the Cardputer ADV is expected. The big difference expected is that the keyboard will not be a matrix of 4x14 (consuming that 4+14 GPIO) but there will be an I2C interface to read the keyboard. And the saved GPIO will be exposed.
So while it might be possible to boot with the same firmware, but without the keyboard.
Right now I have no clue how CP can support and I2C keyboard "natively". I am sure someone with more skills will be able to propose a way to support it.
I got V1.1, from Digi-Key.
No, tinyusb doesn't have deinit
@devout jolt ^^
I believe this one can be closed. CP 9.2.4 fixed the issues I was having.
If 9.2.4 works but 9.2.5 and up doesn't, then it's a regression an we should fix it. I'll reopen so we can look at it.
Hey Dan, Sounds good. So between Audiomix and Audiobusio. I was trying to see if there was a difference in Github but I am not really sure where to start looking in Github. I love a good mystery.
From: Dan Halbert @.>
Sent: Tuesday, July 29, 2025 3:05 PM
To: adafruit/circuitpython @.>
Cc: ThinMan @.>; State change @.>
Subject: Re: [adafruit/circuitpython] Walkmp3rson learn guide does not work with CP 9.x Freeze...
Hi. No, never understood what was going on, didn’t make sense why the baud rate would be different. I gave up on the SiLabs solution.
On Jul 29, 2025, at 7:40 AM, Dan Halbert @.***> wrote:
dhalbert
left a comment
(adafruit/circuitpython#8897)
https://github.com/adafruit/circuitpython/issues/8897#issuecomment-3132868928
@MHVUT https://github.com/MHVUT Hi - it's been well over a year. Did you ever resolve this?—
Reply to this email directly, v...
Sorry to hear. I will close this for now but anyone is welcome to add more info so we can reopen.
It now computes slightly more bytes to account for ATB size using truncated division. In other words, any remaining block space that doesn't fill an ATB byte won't be used. So, we round up our next area size to use an exact number of ATB bytes.
Fixes #10451
Ok, I've figured out the issue. It happens when growing the heap with an allocation that is larger than the existing heaps total size. (This is why it works if you do the smaller 7936 allocation first. When allocating for 7937 it is growing based on the total heap size, not the in-progress allocation alone.)
We computed the size necessary for the in-progress allocation slightly wrong which resulted in expanding the heap too little, thus causing the memory error. We computed the number of blo...
I have built a board that includes 4 keyswitches connected to an analog input on an rp2040 mcu. I have a function which reads the analog converter and decodes the result into 4 different keyup / keydown actions.
I would like to simplify the rest of my code by using an event abstration rather than if-blocks, and saw the keypad module includes "Event" and EventQueue, which sounded great -- until I saw that it was not instantiable in normal code.
So... I guess I could reimplement EventQueue in...
@tiny peak if you're interested in simplifying the build process and configuration for your project bundler, it's possible to use circup programmatically from other code, and it can target a mock device on the local filesystem instead of a real device. It will automatically download the bundle and get libraries out of it to include in the bundle zip. The Fruit Jam OS builder uses this technique here: https://github.com/adafruit/Fruit-Jam-OS/blob/main/build.py#L115-L122 It would save you from needing to list out the libraries in the config file since it can use the --auto flag, it'll also automatically grab dependencies of libraries it includes.
I'd say try creating a library that borrows concepts from adafruit_debouncer and provides you with press & release events. I think adafruit_debouncer would almost work (as it can take an arbitary lambda), but it would be inefficient. Another approach would be to find an existing Arduino library (maybe ADCButtons?) that matches your circuit and translate that to a CircuitPython lib...
Thanks for the suggestion... I realize my approach is a bit outside the norm. If somebody wants to overhaul that stuff to work in a more typical way, go for it! I come from more of a security minded background where minimizing auto-magical stuff helps me sleep better. I worry about stuff like software supply chain attacks on pypi packages, minimizing the amount of random code that gets run on my dev box without my specific request for it to happen, and overall just minimizing opportunities for bit-rot. For my purposes, it works great to use the bundle_manifest.cfg file with a hardcoded bundle zipfile URL and hardcoded library names to be extracted from that file by my bundle_builder.py script. It's basically a low-effort equivalent of package managers that let you do lock-file style dependency version pinning with version numbers, SHA hashes, or whatever. I like it because it lets me get very reproducible results while pulling in a minimum of external code that might break or misbehave for reasons outside my control at some future time.
I realize most people don't care about that stuff though. If people want to use a different approach that works in a more familiar way with more automatic magic stuff, that's good too.
I see upsides both ways :). Not having it pull in new versions of libraries that may be incompatible is nice about the more manual approach for instance
I just used the latest version of your bundler successfully on my first project with it 🎉 So thanks for sharing this tool!
yeah, one of my main priorities for the bundle builder was making it easy to have a relatively simple and stable thing for guides that would also be easy to update if needed. I just kinda slapped together the minimum thing that met that goal.
And I'd say I generally worry about similar things. But I've also written lots of, and read through all of circup so I feel more comfortable with it.
yeah, for an Adafruit maintained thing, using circup would probably make a lot of sense
one note on usage is that when I write a guide, I usually update the board I'm using to the newest CircuitPython release and grab the latest library bundle URL to match it. My procedure for using it definitely depends on the Playground guide mentioning the specific CircuitPython version I was using
I don't really have a good solution for helping people update the bundle if that's needed to match an upgraded CircuitPython version
I'm probably gonna run into that if I end up updating all my Fruit Jam guides once I get a production rev D+ board and 10.0.0 gets released
to update things for 10.0.0, probably I'll just manually go through my repos and guides, bump the library bundle url, test and commit that, cut a new release, then edit the guide urls for the download project bundle buttons.
Great! Seems to work fine with some smoke testing of large allocations.
Thanks! This looks fine -- I can't test.
I will mention a suggestion I made long ago, which is to put args to the C display constructors into a struct, so we can use named arguments, use 0 as default values, etc., instead of passing dozens of arguments.
Will there ever be displays with three highlight colors? Maybe eventually it should be an array.
Thanks @odeevee and @supcik!
Since this is fixed by https://github.com/micropython/micropython/pull/17331, we could wait for that. We will be merging from MicroPython when V1.26 comes out.
Mixed news. Rebasing off 10.0.0-beta.0 did not fix my boot looping issue, but switching from qio to dio flash mode did stopped it from looping. However, it still doesn't fully boot into CircuitPython.
This output is printed to the UART. No USB device shows up.
ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0x1 (POWERON),boot:0xd (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd5820,len:0x78
load:0x403cc710,len:0x848
load:0x403ce710,len:0x20b8
entry 0x403cc710...
Is there a way in CircuitPython to programmatically get the SERCOM number on M4 for a given pin (other than a lookup table)?
it uses a lookup table internally
SAMD51 boards have primary and secondary SERCOMs for some pins... will CircuitPython automatically use: primary only? whichever is still available?
(is there a way to force secondary, or mix primary and secondary by a device needing that?)
When a sercom is needed, CircuitPython just searches for a free one. It doesn't classify them as "primary" or "secondary". I would say there may be multiple available per set of pins, but there is no priority order.
thanks, I had a bug but fixing that confirmed... I can have a device use mixed primaries and secondaries of a given SERCOM 🙂
So sometimes allocating things in a different order will pick SERCOM's in a different order. example where it matters: https://learn.adafruit.com/adafruit-trinket-m0-circuitpython-arduino?view=all#trinket-m0-create-uart-before-i2c-2986086
ah, that makes sense. my issue is I'm using a Feather M4 (b/c FeatherWings) and using almost all the pins, but have 6 SERCOM devices so it's tight
and you know about enumerating them all, like this? https://learn.adafruit.com/adafruit-trinket-m0-circuitpython-arduino?view=all#wheres-my-uart-2985036. I have similar scripts for the other SERCOM uses.
yeah, I just modified one to get the pins for SPITarget 🙂
Limor had to spend time playing musical SERCOM's to get the best pin choices on various SAMD boards.
I can see that would be quite a challenge to optimize
now to see if I can juggle further and get my second UART back
I always thought the CS pin didn't have to be on a SERCOM on SAMD (the SPI pin finder I had doesn't use it), but for SPITarget I can't switch the CS pin willy-nilly (like, to A0 which isn't on any SERCOM)
for the purposes of SPITarget, CS is handled by the hw so it knows data is coming in (my assumption). For sending data out, your program knows when it. There is hw support for hw-controlled CS: CTRLB.MSSEN
but we don't use it
ah, ok that also makes sense, thanks
Builds of Fruit Jam OS are published as zip file assets on the Github release https://github.com/adafruit/Fruit-Jam-OS/releases, much like individual libraries, and the bundle. Would we want to / is it possible to have a special link or button on https://circuitpython.org/board/adafruit_fruit_jam/ that downloads the latest Fruit Jam OS zip?
and/or sort of related, but perhaps a question for the learn devs, is it possible to have a button or link in a learn guide that automatically links to a file on the latest release of a repo without having to specify the specific release tag in the URL?
hi , done following but nothing was change am still not see ftp service in nrfconnect mobile app
i rebuild my uf2 with changes in file mpconfigboard.mk
USB_VID = 0x239A
USB_PID = 0x80DA
USB_PRODUCT = "PCA10056"
USB_MANUFACTURER = "Nordic Semiconductor"
MCU_CHIP = nrf52840
UF2_NAME = "SENSERA_Device"
CIRCUITPY_BUILD_EXTENSIONS = bin,uf2
QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICES = "GD25Q16C, W25Q16JVxQ"
CIRCUITPY_BLEIO = 1
CIRCUITPY_BLE_WORKFLOW = 1
CIRCUITPY_BLE_FILE_SERVI...
Is there a method to unconfigure the PIO-USB usb host stuff?
Nope. TinyUSB doesn't have a way to deinit.
Will there ever be displays with three highlight colors? Maybe eventually it should be an array.
Yup, I was thinking about this as well.
I will mention a suggestion I made long ago, which is to put args to the C display constructors into a struct, so we can use named arguments, use 0 as default values, etc., instead of passing dozens of arguments.
Do we have a separate issue for this? Claude may be able to do it.
Some display constructors can take a lot of arguments:
common_hal_rgbmatrix_rgbmatrix_construct()-- 15 argscommon_hal_busdisplay_busdisplay_construct()-- 28 argscommon_hal_epaperdisplay_epaperdisplay_construct()-- 35 (soon 36) args
Since C doesn't have default arg values or keywords args, the arg lists are quite unwieldy.
I propose creating a struct to pass to these constructors. The struct could be initialized with named fields, and many could be omitted if the def...
Do we have a separate issue for this? Claude may be able to do it.
I finally created one: #10528.
Allow mono audiosample sources to play through a stereo audiomixer.Mixer object and add audiomixer.MixerVoice.panning (with synthio.BlockInput support).
These new features greatly improve audiomixer.Mixer usability for sample-based musical instruments. It also optimizes flash storage when stereo audio files are unnecessary when mixed with a stereo source (you'd otherwise have to double the channel count + file size).
Code Demonstration (requires appropriate mono.wav and stereo.w...
The answer to your second question is documented here: https://docs.github.com/en/repositories/releasing-projects-on-github/linking-to-releases#linking-to-the-latest-release
Nice! thank you for that pointer. That makes it very convenient. I knew the release page could be accessed that way, but not the assets.
@FoamyGuy have you seen this at all on anything after 10.0.0-alpha.6? https://forums.adafruit.com/viewtopic.php?t=219390 does report file corruption in 10.0.0-beta.0, apparently.
@slender iron I am all set to do a beta.1 release immediately (release notes done) so we can have a named release for MagTag. Anything else you want in it?
nope!
I've discovered a bug where the panning effect is lost if the mixer is fed as a source into another audiosample destination (ie: audiofilters.Filter). I'll update this PR with a fix once I have it.
Automated website update for release 10.0.0-beta.1 by Blinka.
New boards:
- sensebox_eye_esp32s3
- waveshare_esp32_s3_lcd_1_47
To be clear, I already have code that works, albeit not in an "event" style, so I don't need another solution for that.
What I was asking about is whether
(a) it is possible for me to add an AnalogKeys class to circuitpython core, or preferably
(b) how would the existing code be made usable from python context, so I can create my new class in python?
I say preferably (b) because it would enable lots of other use cases and simplify tinkering, but (a) works for me too.
Could you say more exactly what you are doing with the inputs? You're reading a variable analog voltage and interpreting it? What exactly is the mapping? To add an AnalogKey capability, it would be something that is pretty widely applicable.
The main virtue of keypad is that it does background scanning so you don't have to. Or, are you willing to do the scanning yourself, but you'd like to add events to an EventQueue? We've talked about making it possible to create your own `EventQueue...
Do you need background scanning ? If so, you would have to try and make a class for the builtin keypad library in C.
If not, and you can scan "manually" often enough in your loop, you can implement it in python.
I wrote this, I believe it worked at the time, but I haven't used it since actually.
https://github.com/Neradoc/Analog_Button_Keypad/blob/main/analog_button.py
Helper class for buttons using a resistor ladder and analog output. Follows the keypad module API.
Also this to combine m...
Ha, Neradoc, wish I'd seen your analog_button library before I did a quick swipe at one too yesterday: analog_buttons.py It also implements an Event queue but I'm not sure it's all that necessary as it's not like you can detect multiple button presses
https://developer.nordicsemi.com started blocking wget as a User-Agent very recently. A Nordic DevZone user gave me an alternate URL that still works.
This broke the nordic builds on the 10.0.0-beta.1 release :frowning_face: . I am building them on a local machine.
FYI Fruit Jams are in stock: https://www.adafruit.com/product/6200
It looks like a few atmel-samd boards are running out of flash firmware space. Would it be better for me to disable this feature (panning and mono-to-stereo) on those boards or disable a larger existing feature?
The following boards are affected:
- feather_m4_express
- itsybitsy_m4_express
- metro_m4_express
- seeeduino_wio_terminal
@tannewt nordic builds are working. I'll release this as beta.2 to replace beta.1. No code changes, just build fix.
Automated website update for release 10.0.0-beta.2 by Blinka.
On those boards that have a built-in display (and even those that don't, when a display has been connected but then the board restarts) there are several lines of text shown in the terminal before there's an opportunity to turn off the display in boot.py. For some projects, having this display eliminated would result in a much more usable project.
My current project is a kids' toy, based on an ESP32S3-TFT feather. Having that text displayed wouldn't be a good thing in this situation
A su...
Add board-specific warning that 9.2.x and earlier won't work with Magtag 2025.
Clarify UPDATE in board description.
Use bold a little less for better readability.
CircuitPython 10.0.0-beta.2 released!
https://blog.adafruit.com/2025/07/30/circuitpython-10-0-0-beta-2-released/
Highlights of this release
- Support quad-color e-paper displays.
- Support MagTag 2025 Edition display.
- Use full Mozilla SSL root certificate list for all -network-capable boards.
This is an example of wanting to use a boolean value in settings.toml, which is currently not supported, but would be helpful. #9113 has some related discussion about this.
Could you say more exactly what you are doing with the inputs? You're reading a variable analog voltage and interpreting it? What exactly is the mapping? To add an
AnalogKeycapability, it would be something that is pretty widely applicable.The main virtue of
keypadis that it does background scanning so you don't have to. Or, are you willing to do the scanning yourself, but you'd like to add events to anEventQueue? We've talked about making it possible to create your own `Even...
Do you need background scanning ? If so, you would have to try and make a class for the builtin keypad library in C. If not, and you can scan "manually" often enough in your loop, you can implement it in python.
I wrote this, I believe it worked at the time, but I haven't used it since actually. https://github.com/Neradoc/Analog_Button_Keypad/blob/main/analog_button.py
Background scanning would be nice, indeed, but I can cope with calling a scan function manually.
I do like the keypa...
An issue exists in the pinout for the M5Stack CoreS3. D5 and D6 both map onto GPIO6. It is therefore not possible to use GPIO5. D5 should instead map onto GPIO5 (and probably A5 too to follow the file convention).
Would be easy enough to not break any of those rules by simply checking
os.getenv("hidedisplay") != None
that way, any value like
hidedisplay="yes"
or
hidedisplay="please"
or whatever would still have the desired effect.
Hi @CDarius, your PR #9093 added this board. The error above looks like a copy-pasta problem. Do you have the board? Would you be willing to submit a PR to fix, and maybe double-check the other pin assignments? Thanks.
If you do submit a PR, could you group pin aliases (same pin, different names) together, and add blank lines before and after? That makes it easy to see the aliases.
Well, HIDE_DISPLAY="false" would also enable it, but would be non-intuitive. So booleans would be better. We could also use integers, like 0 and 1.
Adafruit CircuitPython 10.0.0-beta.0 on 2025-07-15; Adafruit Fruit Jam with rp2350b
With this code which is embedded in I2C page of many learn guides:
import board
import busio
from microcontroller import Pin
def is_hardware_i2c(scl, sda):
try:
p = busio.I2C(scl, sda)
p.deinit()
return True
except ValueError:
return False
except RuntimeError:
return True
def get_unique_pins():
exclude = [
getattr(board, p)
...
I don't have my Fruit Jam yet (tomorrow, probably). I tested your exact program on a Metro RP2350B running 10.0.0-beta.0 and beta.2, and it did not hard-crash. I then loaded the Fruit Jam firmware on it, both beta.0 and beta.2, and it did also not crash in either case. So this is a bit strange.
Could you re-test with beta.2, just in case?
It does still occur for me under 10.0.0-beta.2.
However I have noticed another weird quirk about it. If I run the code with USB_HOST_DATA_MINUS in the exclude list and let it finish, then modify the code to remove USB_HOST_DATA_MINUS from the list and Ctrl-C / Ctrl-D it seems to run without the hard crash and complete successfully including printing some pin pairs that have USB_HOST_DATA_MINUS.
i guess just requiring ```HIDE_DISPLAY="YES"`` or "TRUE" would be better. Yes, an actual boolean would be better, but it didn't sound from that other issue that booleans would be working any time soon?
Possible this isn't relevant, but just in case... I got a different I2C safe mode thing yesterday on my Fruit Jam rev B (error message about missing pull ups). That one seemed to be caused by leaving my HDMI capture card plugged into the Fruit Jam (I2C EDID EEPROM) without having the capture card plugged into its own USB power source. Apparently the capture card was loading the I2C pins and confusing the CircuitPython core.
Have you checked to see if reproducing your issue has any sensitivit...
This did originally occur while the Fruit Jam was connected via HDMI to my capture card (though fully powered and connected to computer), and actually an AHT20 connected via STEMMA cable as well.
I removed the AHT20 before the test on beta-2, and have unplugged the HDMI cable now as well, and confirmed I still the same hard crash with nothing else plugged in to the fruit jam beyond the USB C cable powering it and providing serial console.
I was able to reproduce this on my Fruit Jam rev B by running your code above on 10.0.0-beta.2. Serial output made it this far before the board reset and I got a "disk not ejected properly" error from macOS:
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
SCL pin: board.A1 SDA pin: board.A0
SCL pin: board.A1 SDA pin: board.A4
SCL pin: board.A1 SDA pin: board.BUTTON1
SCL pin: board.A1 SDA pin: board.BUTTON2
SCL...
I have an update to my rclcpy module that has a lot of divergence between the common-hal and shared-bindings. Common hal has a new registry file that contains a type registry helper, and shared-bindings has a whole new folder for message classes that don't have any common-hal requirements. Should I be putting some of this stuff in shared module, or tweaking circuitpy_defns.mk in some special way?
as far as I can tell circuitpy_defns.mk expects exact file parity between common-hal and shared-bindings, which I guess I can fake with a bunch of empty files but it seems a bit silly
Does this reproduce on a Metro RP2350 if you connect a USB hub breakout to the USB host header?
I am interested in adding booleans fairly soon, but it's not going to be immediate: we are busy getting the last issues closed for 10.0.0 final. For right now, your best bet would be to make a custom build to turn off the display.
shared-bindings is meant for the Python-to-C API implementation. There should be little or no actual implementation of stuff in shared-bindings. Occasionally there is, but it would be better factored out to shared-module. There are examples of major modules split between port-specific common-hal and shared-module stuff: _bleio, for instance.
There's no implementation in the files, it's just making Python class types
To be more specific, I have a new submodule to rclcpy called std_msgs that contains Int32.c, Bool.c, etc, representing ROS message types as micropython classes
Well, barely any implementation. All they do is assign variables to the internal object.
This sounds like the same case: shared-bindings/microcontroller/ResetReason.* is just an enum using py/enum.h. There aren't any shared-module/ResetReason.* or common-hal/ResetReason.* files. So you could look to see how ResetReason.c is handled in the make files
Ok, I'll check that out, thanks dan!
I connected a CH334F and tried all permutations of: Metro PSRAM / NO PSRAM, Metro firmware / Fruit Jam firmware. All on beta-2. None of them hard crashed running the same code.
Huh... that's weird. What else would be different about the two boards? Maybe the Fruit Jam's I2S DAC, the AirLift C6, or the IR receiver?
has anyone seen espressif (S3 specifically) boards locking up, as in CIRCUITPY still accessible, but serial freezes and the board blinks red (one is alpha.7, the others are beta.0) ...no exceptions, no safemode detected
i have not seen this. Was networking in use?
some were mainly I2C or SPI , others used wifi.monitor ...I'll upgrade, then see if I can narrow it down
i could imagine a busy-wait loop in I2C that never gets what it wants. e.g. the fix for this: https://github.com/adafruit/circuitpython/issues/8093
but could be a lot of other things
The main virtue of
keypadis that it does background scanning so you don't have to. Or, are you willing to do the scanning yourself, but you'd like to add events to anEventQueue? We've talked about making it possible to create your ownEventQueueobjects, but haven't done that yet.
Basically I am asking how to go about making an update to the keypad module/class group that supports AnalogKeys, where a key is defined in the fairly generic way shown in my code snippet above (i.e. a t...
I've seen some of those symptoms happen before (CIRCUITPY drive still mounted in macOS but serial console is unresponsive). This has definitely happened to me on RP2350 boards when using USB host with devices that send a lot of data (high speed gamepad, MIDI controllers with MPE, etc). I can't remember if I've also seen this on ESP32-S3 in combination with using a MAX3421E USB host FeatherWing, but it's definitely possible. I know I saw some pretty weird glitches with USB host on ESP32-S3 last year, but this year I've been doing RP2350, so my memory is a bit hazy on details.
another thing... sometimes I get a kinda similar issue when attempting to sync code to the CIRCUITPY drive while the board is running code that's doing a lot of USB host IO. In that case, my rsync process will hang, the serial console will hang, and the macOS finder will become slow (perhaps with spinning beachball cursor). The CIRCUITPY drive still looks like it's mounted, but it doesn't actually work. In that case, the board will sometimes reset it self eventually, but it can take a while. Usually I just manually reset when that happens.
I think that case has to do with macOS recently introducing some weird behaviors when writing to FAT filesystems
my impression is that there are probably some places in the CircuitPython core where the TinyUSB USB device implementation can get starved for CPU by other IO handling code in the core.
...or at least there seems to be some kind of race condition, interrupt handler priority fight, stack corruption, use after free, or something.
like, a time or two I've seen garbage strings get returned if I try to use the adafruit usb host library to check device manufacturer and product strings.
since you mention ESP32-S3 specifically, and most the other ESP boards (excepting S2) don't have USB device support, I wonder if maybe there's some kind of race condition / interrupt fight thing going on between TinyUSB and wifi.
I've also seen something similar to the first thing you mentioned... copying to/from CIRCUITPY while (certain?) code is running may cause trouble for macOS Finder, sometimes it recovers, sometimes I get impatient
unix port really needed to simify development
Images automagically compressed by Calibre's image-actions ✨
Compression reduced images by 61.5%, saving 279.24 KB.
| Filename | Before | After | Improvement |
|---|---|---|---|
| assets/images/boards/large/adafruit_fruit_jam.jpg | 78.94 KB | 57.34 KB | -27.4% |
| assets/images/boards/large/waveshare_esp32_s3_lcd_1_47.jpg | 70.50 KB | 36.52 KB | -48.2% |
| assets/images/boards/origina... |
Yes, I still have the board and I can take a look/fix at the pin assignment. I'm planning to do it mid next week
This implements video mode timing changes suggested by @WolfWings in circuitpython issue #10242. Previously, picodvi was set so that 640x480 and 720x400 used refresh rates faster than 60Hz. These changes lower the refresh rate to 60Hz which should hopefully be compatible with a wider range of HDMI devices.
Checks:
- [x] pre-commit passed
- [x] tested at 320x240 (640x480) on Fruit Jam rev B with my Samsung TV and it reported 640x480@60Hz. That mode also worked with my picky AverMedia capt...
If anybody wants to try testing a CI build with the 60Hz timing changes suggested above, I just submitted a PR implementing those changes: https://github.com/adafruit/circuitpython/pull/10534
In my limited testing (Fruit Jam rev B board), the new timings seem to work nicely.
If you want to test a CI build:
- Scroll down to the bottom of the pull request: https://github.com/adafruit/circuitpython/pull/10534 and look under the "All Checks have passed section" (expand it if necessary) for th...
Adafruit CircuitPython 10.0.0-beta.2 on 2025-07-30; Adafruit LED Glasses Driver nRF52840 with nRF52840
CircuitPython version and board name
Adafruit CircuitPython 9.2.8 on PyGamer.
Code/REPL
self.pbar = ProgressBar(0, 0, board.DISPLAY.width,
self.glyph_height*2, bar_color=0x0000ff,
outline_color=0x333333, stroke=1)
Behavior
code.py output:
Traceback (most recent call last):
File "code.py", line 295, in
File "code.py", line 79, in init
TypeError: 'module' object is not callable
...
I tested using a Metro RP2350 and with 10.0.0-alpha.7-1 My 10" dvi/vga display wouldn't display at 720x400. I was using Fruit Jam OS to test and by modifying code.py to configure the screen at 640x480 it did work.
After installing this artifact Fruit Jam OS ran without modification at 720x400.
see convo in #help-with-circuitpython for context, but can someone confirm these TX/RX pin defines are wrong (bug)?
https://github.com/adafruit/circuitpython/blob/234ebf4fb1bbfc19412bc7a2bc7528d4ae62f37b/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.h#L26-L27
replied there
CircuitPython version and board name
CircuitPython 9.2.8 on M5Stack Core S3
Code/REPL
import digitalio
import board
import adafruit_sdcard
spi = board.SPI()
cs = digitalio.DigitalInOut(board.SDCARD_CS)
sdcard = adafruit_sdcard.SDCard(spi, cs)
Behavior
Traceback (most recent call last):
File "", line 1, in
File "adafruit_sdcard.py", line 112, in __init__
File "adafruit_sdcard.py", line 133, in _init_card
OSError: no SD card
##...
also touch up some other files to be identical
Encountered by @psnt in discord, confirmed by @deshipu and @caternuson.
Schematics for ref:
https://learn.adafruit.com/esp32-s2-reverse-tft-feather/downloads#schematic-and-fab-print-3136178
https://learn.adafruit.com/esp32-s3-reverse-tft-feather/downloads#schematic-and-fab-print-3138784
<img width="810" height="348" alt="image" src="https://github.com/user-attachments/assets/e2937bdc-2f40-45f4-91f2-83b49ea32789" />
Looks correct per schematics. Did not test beyond that.
@dhalbert just to verify - the changes to mpconfigboard.mk and sdkconfig are intentional as well?
@dhalbert just to verify - the changes to
mpconfigboard.mkandsdkconfigare intentional as well?
Yes, they are intentional, to make the boards match. They are not important. I was just doing a directory compare and noticed the differences.
These build errors are new and unrelated to the changes :(
Tested on Feather Reverse TFT ESP32-S2 and ESP32-S3 using by doing a UART loopback and writing and reading bytes.
Just pasting this here to document the general behavior the bug created:
<img width="1152" height="292" alt="image" src="https://github.com/user-attachments/assets/b4ebaede-a167-4b56-b22c-945280e0b91f" />
Approving. Did not do any hardware testing. But change is simple and correct per schematic.
The build error is something upstream: esptool.py v5.0.2 (first 5.x.x release) was two days ago. Other people seeing the same problem:
https://github.com/espressif/esptool/issues/1107
ModuleNotFoundError: No module named 'esptool.__init__'; 'esptool' is not a package
So I'll wait a bit before re-running this.
Does Circuitpython diverge from micropython on the creation of class constant types? I'm noticing that the recommendation of usermod:
const mp_obj_type_t vector_type = {
{ &mp_type_type },
.name = MP_QSTR_vector,
.print = vector_print,
.make_new = vector_make_new,
};
does not work
I get error: 'mp_obj_type_t' {aka 'const struct _mp_obj_type_t'} has no member named 'print'
MP_DEFINE_CONST_OBJ_TYPE appears to be the widely used replacement but I can't find proper documentation for it anywhere, it's got a lot of macro shenanigans going on behind the scenes so I don't like that I'm cargo coding with it
MP_TYPE_FLAG_HAS_SPECIAL_ACCESSORS is also very common and undocumented, don't really know what it does
it enables properties
I'm trying to build 10.0.0-beta.2 and I'm getting:
In file included from esp-idf/components/esp-tls/esp_tls.h:11,
from ./common-hal/socketpool/Socket.h:13,
from ../../shared-bindings/socketpool/Socket.h:9,
from ../../shared-bindings/socketpool/SocketPool.h:13,
from common-hal/socketpool/SocketPool.c:7:
esp-idf/components/esp-tls/esp_tls_errors.h:12:10: fatal error: mbedtls/error.h: No such file or directory
12 | #include "mbedtls/error.h"
| ^~~~~~~~~~~~~~~~~
and a whole lot of other missing files, is there an additional step now?
same for beta.1 and master
Is it related to Dan's comment from earlier on his failing build? https://github.com/adafruit/circuitpython/pull/10537#issuecomment-3145439221
Adds ROS2 message type support to the rclcpy module. Creating a Publisher now requires a ROS message type - all future messages must adhere to that message type. A small group of simple test messages are available in the std_msgs submodule of rclcpy, including Int32 and Bool. Message type detection is done through a type registry, and the appropriate C level information passed to the Micro-ROS interface. Ideally, future messages and message packages will be supported with an automated class...
@tulip sleet ^ feature complete PR of the new ROS2 message system up if I could entice you to look at my stab at a class registry. Still needs a bit of cleanup I'll tackle this weekend.
I'm re-opening this because it's still present. I'm using 10.0.0 beta 2. I've updated all python code that's running from the source repos, and re-compiled using the current mpy-cross command line utility. I routinely get:
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 issue with your program at github.com/adafruit/circuitpython/issues.
Press reset to...
Is the server local or out on the Internet somewhere? I think the first thing to do would be to try to reproduce this with the simplest possible program, at a higher speed so it fails faster. That could be done POSTing to a local server so you don't annoy your IoT server.
CircuitPython version and board name
Adafruit CircuitPython 10.0.0-beta.2-dirty on 2025-08-01; uGame S3 with ESP32S3
Code/REPL
import audiobusio
import array
import audiocore
import board
import math
length = 8000
sine_wave = array.array("h", [0] * length)
for i in range(length):
sine_wave[i] = int(math.sin(math.pi * 2 * i / length) * (2 ** 15))
audio = audiobusio.I2SOut(
board.AUDIO_BCLK,
board.AUDIO_LRCLK,
board.AUDIO_DATA,
)
sample = aud...
We only want to exit the playing loop when the sample_data wasn't null, otherwise we need to get the buffer and play it once.
Fix #10539
This is a bit awkward, but I can't think about a better way of doing it right now. Improvements welcome.
I tested on three different HDMI monitors, 360x200, 720x400, 640x480, 320x240. Specs from the Dell manuals are included, but I'm not sure how helpful they are.
-
Samsung UN50NU6900 TV, crica 2018: all modes work
-
Dell S2421HS monitor: 640x480 and 320x240 work. 360x200 and 720x400 do not.
<img width="613" height="608" alt="image" src="https://github.com/user-attachments/assets/d6ab7c84-d56c-4e38-8ff2-73529108ef1e" /> -
Dell U2412M monitor (has a old-style DVI socket): NO modes work...
Is that any better or worse than with 10.0.0-beta.2?
if these changes make 720x400@60Hz worse for some monitors compared to sticking with 720x400@70Hz, maybe it would be possible to add an additional option to select between 60Hz and 70Hz when initializing the display. How to do that would be a bit beyond my current knowledge though.
Is that any better or worse than with 10.0.0-beta.2?
With 10.0.0-beta.2:
- Samsung UN50NU6900 TV, circa 2018: 640x480 and 320x240 work. 360x200 and 720x400 do not. (latter two DID work with this PR).
- Dell S2421HS monitor: 640x480 and 320x240 work. 360x200 and 720x400 do not. (same as PR)
*Dell U2412M monitor (has a old-style DVI socket): NO modes work. (same as PR)
So the PR is an improvement on the most flexible monitor.
I am doing this all with request_display_config() fro...
hmm... I wonder if adjusting MODE_720_V_BACK_PORCH to somewhere between its current value of 13 and its PR value of 218 might hit the 70Hz sweet spot that some of those monitors like. WolfWings is the expert on this stuff. I'm just kinda copying and pasting from the comments on that issue thread without properly understanding the timing math.
So... reading a bit about video modes, and comparing that to your monitor specs, it seems that the sync polarity of the current code might be wrong. Currently it has this:
#define MODE_720_H_SYNC_POLARITY 0
...
#define MODE_720_V_SYNC_POLARITY 0
Based on my reading of your specs, some web searching, and some wild guessing, I think 0 means negative sync, so -/- would be right for 640x480, but not 720x400 (may need -/+). Perhaps if you found the correct value for changing `MODE_...
@WolfWings we would welcome your thoughts about this.
TL;DR: Sync polarity exists almost only from daisy-chaining so many standards in a row over the decades from the first VGA monitors all the way to the DVI standard that still had that vestigal "technically we can run analog too" support, so I admit I left them all at 0.
It's a vestige from the earliest analog CRT days, it was a way to encode 2 extra bits of data for the lowest of the low-end monitors that had dedicated circuits to handle each video mode they supported, the proverbial 'I pl...
Even with the above fix, things seem to be pretty broken. There is some random noise at the beginning, and sample rates below about 6000 don't work at all.
I also tried on rp2040, and it will also not play with sample rates below 6000, and will hang when playing a second time.
Thank you for this analyze.
I had the same problem on another board (cardputer) with code I was copy/pasting, and there was a displayio.release_displays() that I did not notice.
@FoamyGuy troubleshooting could be in a FAQ, that is what saved me.
Maybe in guide that use displayio.release_displays() could first check that board.DISPLAY does not exist?
Maybe exactly the same code can work with or without build in display?
I have one monitor (my most flexible one) that likes 720x400 via EDID and that is at 70 Hz. I would suggest leaving that resolution at 70 Hz. My Adafruit HDMI capture dongle amazingly likes the existing 720x400 also.
Nearly all EDIDs, if they support 640x480, want 60 Hz. My "likes a lot" monitor will take 640x480 at 72 and 75Hz also but a vast majority do not. This has made finding a small (3.5") HDMI panel for a cyberdeck near impossible, finding one that will display >70Hz when the "stan...
@samblenny @RetiredWizard @danh To test this PR how do I get a UF2?
To find the artifacts, click on one of the builds, above (after opening up the collapsed list), then click "Summary" at the top of the left sidebar and look for "Artifacts" on the page. Here is a direct link: https://github.com/adafruit/circuitpython/actions/runs/16670995112/artifacts/3665739340. You'll then need to unzip it.
I am using the example from the T Deck repository but it doesnt seem to work for T Deck Plus. Is there any where i can find the correct settings and libraries fpr the T Deck Plus or even better examples? I can only manage to make the screen backlight light up but nothing display on the screen
If you're talking about the Lilygo repository those examples are Arduino, not CircuitPython. You'll probably want to use one of the Lilygo support forums for help with those.
If you want to use CircuitPython the first thing you'll need to do is flash the device with CircuitPython. That can be done from the circuitpython.org website. Click on Downloads, search for T-Deck and then use of the "Open Installer" buttons.
If you have any questions on using the installer or running CircuitPython c...
@samblenny @RetiredWizard @danh To test this PR how do I get a UF2?
To find the artifacts, click on one of the builds, above (after opening up the collapsed list), then click "Summary" at the top of the left sidebar and look for "Artifacts" on the page. Here is a direct link: https://github.com/adafruit/circuitpython/actions/runs/16670995112/artifacts/3665739340. You'll then need to unzip it.
Ok, downloaded to a fresh Rev D FJ, libraries added, code runs 640x480 on the Adafruit ...
To summarize what I'm reading here about test results so far, it sounds like:
- The 640x480@60Hz change is an improvement for some displays
- The 720x400@60Hz change is an improvement for some displays
- We don't have any test results demonstrating that changes in this PR would cause problems for displays that previously worked before the changes
720x400 @60Hz works on my workhorse do anything display even though the EDID says it wants 70 Hz
and works on the Adafruit capture dongle (EDID of dongle just tested lists 640x480 @60 and 800x600 @60, no 7420x400 modes but does list 1400x1050 and 1440x900 both @60Hz.
I think for changing the two supported resolutions to 60 Hz increases compatibility.
Note to @dhalbert - I do get memory allocation errors likely related to a PR you were recently fixing, throwing an error allocating 0 byt...
@WolfWings thanks. I did some testing with the altered CPU speeds. 126_000_000 works with beta.2 at 640x480 on the U2412M old DVI monitor. This monitor may be from 2017 or so. 126_000_000 does not work with the PR build.
141_500_000 unfortunately is not a valid CPU frequency. The closest valid ones are 141_000_000 and 141_600_000. Neither works with the U2412M at 720x400 with either build, though, which is too bad.
This is the datasheet for the video chip used for the U2412M.
...
3. We don't have any test results demonstrating that changes in this PR would cause problems for displays that previously worked before the changes
What i just posted as https://github.com/adafruit/circuitpython/pull/10534#issuecomment-3146717975 shows a regression in the PR build if I adjust the CPU frequencies. Maybe that makes sense, because the changes in the PR were assuming 125 MHz.
If the video output or TinyUSB has issues with changing the clock frequency, there should be alerts to this in the documentation. I can see where Adafruit Support gets some angry customer or two saying they needed some specific overclock but X or Y failed to work at "their" frequency.
I did not have any trouble with the USB connection when I changed the CPU frequency, even to 141MHz.
I can see where Adafruit Support gets some angry customer or two saying they needed some specific overclock but X or Y failed to work at "their" frequency.
Yeah, my hope for this PR is that it can get merged for 10.0.0 to improve the out of box experience for people getting new Fruit Jam boards. I'm hoping this will let people run more of the sample code with the displays they have and cut down on the need for display-related support requests.
It would definitely be nice to support ev...
Yes, I have been concerned that 640x480 @ 60 Hz is most common and the folks trying to "make @72 Hz work" would be disappointed. I'm glad you've done this work, thank you.
Note when this is merged and in a CircuitPython release, some documentation in https://learn.adafruit.com/using-dvi-video-in-circuitpython/overview will need to be changed. That would fall on me.
Perhaps some documentation in Read the Docs would need to change also.
Latest tests, and with some interesting results that may be helpful:
https://code.circuitpython.org/ just blinks leds over and over with the
spinning python wheel for infinity still (without and with a battery)
*With Thonny on the beta firmware for the V1 (without a battery): *
ets Jul 29 2019 12:21:46
rs����
Device is busy or does not respond. Your options:
- wait until it completes current work;
- use Ctrl+C to interrupt current work;
- reset the device and try agai...
The V2 firmware did not work with or without a battery and just does that reset over and over again but can display on the serial output like I posted before.
The V2 firmware is for a board with a different amount of flash and PSRAM. It is not suitable for your board.
Your "clone" board is somewhat different than the HUZZAH32. Not much, but somewhat, as I mentioned above. I was not able to reproduce what you saw on the HUZZAH32. But I will try a bit more. We can't really say that similar ...
Thanks Dan, Makes sense.
I've got an S3 with native usb on order already from Adafruit, so if you
would like me to mail this to you to fiddle around with, let me know. I
know it's not a high priority, but if it's something you would like to look
into more I am happy to donate this board to the cause. It has already
served its initial purpose to help me dive into the world of circuit python
and I already love it way better than arduino code and compiling.
You can email me directly t...
@WolfWings thanks. I did some testing with the altered CPU speeds.
126_000_000works with beta.2 at 640x480 on the U2412M old DVI monitor. This monitor may be from 2017 or so.126_000_000does not work with the PR build.
The last bit is expected, as with the PR build you'd be trying to get it to sync on a 50.4Hz refresh rate which is too low for most monitors to accept, though a lot of TVs happily will. Changing the CPU speed is the way to force the 640x480 bitstream as close as poss...
- We don't have any test results demonstrating that changes in this PR would cause problems for displays that previously worked before the changes
What i just posted as #10534 (comment) shows a regression in the PR build if I adjust the CPU frequencies. Maybe that makes sense, because the changes in the PR were assuming 125 MHz.
Minor correction, the changes in the PR are assuming 150Mhz, the stock ...
Minor correction, the changes in the PR are assuming 150Mhz
Oops, sorry, yes I forgot that.
@CrackXT Thanks. One just split a message at a difference place: was that suggested by weblate? The "opcode" one I am not sure about: it could be a proper translation, though Google translate gives "code d'opération¨. The adding of the period is OK, but not really necessary. We try to avoid periods in messages because they just take space.
Wikipedia say "Code opération" ( so without d' ) https://fr.wikipedia.org/wiki/Code_opération
Native speaker, but Belgian, we used a lot of English for IT studies... a French person would be more appropriate.
So, considering all that, where do things stand for code review? It sounds like supporting more displays and video modes would be possible but not easy. Are the current changes in this PR good enough? Should I be planning to spend some time in the coming week on making revisions?
I'll wait for @tannewt to weigh in and we'll probably discuss this internally on Monday.
LAST_SWCORE_PWRUP does not seem reliable even without any debugprobe attached. It always reads 2 (which is pwrup1 according to the docs), but I am only testing with a single GPIO and I am using pwrup0 which should turn up as 1.
https://github.com/espressif/esptool/issues/1107 was fixed, and a re-run was successful.
You can (and should) use the new mp_obj_malloc() or mp_obj_malloc_with_finaliser() (if you need a finaliser) instead of the old m_new_obj() and setting the base.type explicitly. Take a look at some other make_news in existing modules.
Hi - some suggestions. I will make this a draft PR for now, since you are going to do more. Also awaiting doc for several new constructors, etc. Otherwise it looks quite clean.
You could use mp_arg_parse_all_kw_array() even on the simple construtors, but maybe this is simpler and less code.
Were these going to be omitted or moved to shared-module/?
From https://github.com/adafruit/circuitpython/issues/10539#issuecomment-3146376211
Even with the above fix, things seem to be pretty broken. There is some random noise at the beginning, and sample rates below about 6000 don't work at all.
I also tried on rp2040, and it will also not play with sample rates below 6000, and will hang when playing a second time.
Oh right, my bad. Was referencing old stuff from usermod for this bit.
The failed jobs are due to an upstream problem with esptool which is now fixed. But if it's not working yet, I won't re-run yet.
I figured I would post the "default" structure first before trying any shenanigans. I'll investigate the microcontroller/ResetReason example you mentioned to see if it's a better solution.
I wanted to make sure the overall module and class structure looked acceptable, since I wasn't able to find other shared-bindings modules that attempt large class collections like this.
I think making these changes as a default would be good. It sounds like it only improves things.
I suspect once more people get Fruit Jams we'll need to expose these values to settings.toml. I believe we should be able to patch the hstx command sequences to adjust them. We should require forcing the resolution in that case too.
These might be able to be tuned a bit more, but we think this is good for now.
Please add board.JST-PH to dir(board) for Fruit Jam.
It is the primary label in the cover plate.
Per Carter, the 10 label on the 32 pin header refers to port D10, GPIO unknown att.
D10 is not defined as board.D10. I would guess GPIO10 to conform to D6, D7, D8, & D9.
CircuitPython version and board name
USB_HOST_5V_POWER is defined in dir(board) but not brought out for the user to access.
Code/REPL
import board
dir(board)
Behavior
CircuitPython 10.0.0 Beta 3 for AdaFruit Fruit Jam
Description
No response
Additional information
No response
This appears to be related/duplicate of https://github.com/adafruit/circuitpython/issues/6290
CircuitPython version and board name
Adafruit CircuitPython 10.0.0-beta.2 on 2025-07-30; Adafruit Fruit Jam with rp2350b
Board ID:adafruit_fruit_jam
UID:5A5DC2FB5BCDD764
Code/REPL
# SPDX-FileCopyrightText: Copyright (c) 2024 ladyada for Adafruit Industries
#
# SPDX-License-Identifier: MIT
import board
import pulseio
import adafruit_irremote
# IR receiver setup
ir_receiver = pulseio.PulseIn(board.IR, maxlen=120, idle_state=True)
decoder = adafruit_irremote....
I was able to reproduce this on one of the new Fruit Jam rev D production boards with 10.0.0-beta.2 using simpler code:
import board
import pulseio
pulses = pulseio.PulseIn(board.IR, maxlen=200, idle_state=True)
print("Listening for pulses...")
while True:
if len(pulses) > 0:
print(pulses.popleft())
When I press buttons on an IR remote, I see the red LED blink, but no pulses are detected.
To convince yourself that the code should work, try this variation (board.BUTTON1...
It's a local server. I wrote a test case that makes 10 HTTPS POST requests per second, and right now it's ticking past 9,000 with no errors.
The application has two other components. It has a ST7789 display that it writes data to, and a TMP102 I2C sensor that it reads once per second.
@dhalbert Is there any way that I can debug where in my main code set the hard fault is happening? I have a Pico debugger if that's useful.
CircuitPython core code crashed hard. Whoops!
Hard fault: memory...
You could set a breakpoint on reset_into_safe_mode(), and then look at the stack backtrace. It would be good to compile in debug mode so you can get more info. But sometimes that eliminates a bug because the code or timing is different.
I would say use your original program, but just speed up the POSTing to be every time you read the temperature sensor. If you can then get it to fail, then comment out the display code and see what happens, and if that doesn't cause the problem to go away, ...
CircuitPython version and board name
version:
Adafruit CircuitPython 10.0.0-beta.2-dirty on 2025-08-05; Firebeetle 2 ESP32-P4 Dev Board with ESP32P4
board name:
DFRobot’s Firebeetle 2 ESP32-P4 Dev Board ([https://www.dfrobot.com/product-2915.html](https://www.dfrobot.com/product-2915.html))
Code/REPL
import time
for i in range(1,10000):
print(i)
time.sleep(1)
Behavior
After power-cycling or replugging the USB-C cable, the connection rand...
USB_VID = 0x303A
USB_PID = 0x1001
USB_PRODUCT = "Firebeetle 2 ESP32-P4 Dev Board"
USB_MANUFACTURER = "DFRobot"
IDF_TARGET = esp32p4
CIRCUITPY_ESP_FLASH_SIZE = 16MB
CIRCUITPY_ESP_FLASH_MODE = qio
CIRCUITPY_ESP_FLASH_FREQ = 80m
CIRCUITPY_ESP_PSRAM_SIZE = 32MB
CIRCUITPY_ESP_PSRAM_MODE = hpi
CIRCUITPY_ESP_PSRAM_FREQ = 200m
DEBUG = 1
ENABLE_JTAG = 1
JTAG port output:
<= [2025-08-05 16:08:57.359]: ESP-ROM:esp32p4-eco2-20240710
Build:Jul 10 2024
rst:0x17 (CHIP_US...
@lone axle Thanks for the recent color palette PR merge in Fruit-Jam-OS! I was looking deeper into the code and just now noticed the implementation of a launcher.conf.json file to turn mouse support on and store favorite apps. Instead of environment variables for the color palette, should they instead be moved over there? And are there any plans for documentation of the implementation of that file in the future?
Ah, yeah that is a good call. The color configs should go into that one instead of settings.toml. There are plans to document that (and the rest of Fruit Jam OS). The main product guide has my focus first, but Fruit Jam OS guide is on my list to work on.
@dhalbert
I removed an incorrect character. To my knowledge, there was no line break there yet.
Regarding opcode, a user wrote in the comment that it is the same and does not need to be translated. I added another comment with both translation variants in the hope that a native speaker would see it.
Weblate marked the missing period as an error.
Thank you for the followup!
This is to be expected. ESP32-P4s are quite new. Make sure you build with make DEBUG=1. That will leave IDF logging on while CP is running. The logs you show occur in the bootloaders only.
We're going to leave it in board anyway. It is a use of a pin defined by the board.
FYI: I tried the following code. Only saw True on REPL.
The IRM-H6XXT has a 43.2k ohm internal pull-up resistor connected to the open collector output transistor.
`import time
import board
import digitalio
ir = digitalio.DigitalInOut(board.IR)
ir.switch_to_input(pull=digitalio.Pull.UP)
while True:
print(ir.value, end='')
time.sleep(0.001)`
Can the '10' pin be accessed with import micropython and referring to it by machine.Pin(10)?
The USB_HOST_5V_POWER pin mentioned in this issue (RP2550 GPIO11) is wired up to a MOSFET that can switch the power output on the VBUS net. Looks like you could use it to switch power on and off to devices on the USB host ports.
If you have more general support questions about using Fruit Jam pins, some good options for getting support are:
- Adafruit Discord's help-with-circuitpython channel
- Adafruit forum
- Check the board, schematic, or pinout documents at https://github.com/adafruit...
Looking at the schematic from https://github.com/adafruit/Adafruit-Fruit-Jam-PCB, I'm wondering if this is an E9 erratum thing since the output of the IRM-H6XXT receiver module appears to be routed through a 10K resistor. I'm far from an expert on such things, but by my reading of Dan's description at https://github.com/raspberrypi/pico-feedback/issues/401, it sounds like maybe this would meet the right conditions? I could be totally wrong about that.
Are you sure about this? It looks to me like ports/raspberrypi/boards/adafruit_fruit_jam/pins.c defines D10 as GPIO10. The Fruit Jam schematic shows that D10 on the 2x16 header socket goes to GPIO10.
When I checked just now in the REPL (CircuitPython 10.0.0-beta.2), I got this:
Adafruit Circ...
@samblenny,
Thank you for pointing out R32 - 10k ohm. In reading the documentation for the IR Receiver the 10k resistor should be going from the output of the receiver to 3.3 volts not the GPIO pin and the Red LED. There is a good chance the IR Receiver will work if R32 is replaced by a Zero ohm resistor. As it is the output of the IR Receiver is fighting with the 2.2k resistor and Red LED to get to the GPIO pin. The GPIO pin will always see a high, which it does.
If R32 is replaced wit...
Have you tried using board.A0? On my board, the top plate silkscreen label for the analog port has two lines. The bottom line with "JST-PH" is identifying the connector type. Do you see the top line with "A0" which is identifying the pin?
There is already a board.A0 defined:
Adafruit CircuitPython 10.0.0-beta.2 on 2025-07-30; Adafruit Fruit Jam with rp2350b
>>> import board
>>> hasattr(board, 'A0')
True
@samblenny,
Thank you. I'll give it a try.
The design files are available at https://github.com/adafruit/Adafruit-Fruit-Jam-PCB
To view the board and schematic, I've been using the .sch and .brd files with Altium Viewer.
@samblenny,
Thanks, that is what I did.
If R32 is replaced with a Zero ohm resistor there may be a need to ensure that the GPIO pin does not source 3.3 volts.
If it does the GPIO port may try to source power into the IR Receiver output transistor, if the IR receiver received a valid 38kHz IR signal.
A 150 ohm resistor may be a viable option. But that is why we have EEs.
Thanks @dhalbert
这是意料之中的。ESP32-P4 相当新。请确保使用
make DEBUG=1进行构建。这样,CP 运行时 IDF 日志记录将保持开启状态。您显示的日志仅出现在引导加载程序中。
make BOARD=firebeetle2_esp32p4 clean
make BOARD=firebeetle2_esp32p4 DEBUG=1 V=9
make BOARD=firebeetle2_esp32p4 DEBUG=1 PORT=/dev/cu.usbmodem14201 flash
However, no additional logs appear, whether in the serial port output of JTAG or in the REPL output of CircuitPython.
When the REPL of CircuitPython is disconnected, and there is no additional log output from JTAG, it indicates that the deve...
CircuitPython version and board name
Adafruit CircuitPython 10.0.0-beta.2 on 2025-07-31; Adafruit Feather ESP32S3 4MB Flash 2MB PSRAM
Code/REPL
import digitalio
import board
try:
i2c_power = digitalio.DigitalInOut(board.I2C_POWER)
i2c_power.direction = digitalio.Direction.OUTPUT
i2c_power.value = False
time.sleep(0.1)
i2c_power.deinit()
except Exception as e:
log(f"Failure turning off I2C power: {e}", level="ERROR")
Behavior
I get the ...
@tulip sleet As I work on refactoring out some of the old usermod stuff I was using, should I remove or refactor the _print functions I made based on the old usermod class docs? Are they superseded by any circuitpython automated stuff? They don't seem super common in shared-bindings
stuff like
static void bool_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) {
(void)kind;
rclcpy_std_msgs_bool_obj_t *self = MP_OBJ_TO_PTR(self_in);
mp_print_str(print, "Bool(data=");
If they are useful, fine to leave them in. We don't really have something automated that prints internal values, except namedtuple, etc. Example of a current more informative print routine is keypad_event_print() in keypad/Event.c
ag -Q '_print(' |more will show more.
Summary
Add os.urandom() support to the analog port. Users can now generate random numbers utilizing the TRNG (true random number generator) hardware on the analog port.
The following code generates multiple random numbers and prints them in hex:
import os
print(os.urandom(4).hex())
print(os.urandom(3).hex())
print(os.urandom(2).hex())
print(os.urandom(1).hex())
An example of the expected output is:
bb4f0ebb
8b2dd8
918b
ac
Testing
After I fin...
Question for people who work on the CircuitPython core and built-in frozen modules: What's your preferred IDE or editor to use? I'm getting semi serious about starting a quest to troubleshoot various USB host glitches that have been bugging me. I'm thinking it would be easier if I had more editor support for navigating between related code compared to what I usually use (BBEdit or vim).
I'm specifically curious about editing tools that help with type checking, static analysis, and navigating between definitions of and references to variables, functions, classes, etc.
Bonus points for tools that might help to identify common C problems like failure to guard against null pointers, possible buffer overflows, use after free, and so on.
I use emacs and TAGS files, and use ag to do global code searches. Maybe not exactly what you were expecting/hoping to hear. I think Scott uses Sublime, at least some of the time.
oh... interesting. I tend to be pretty primitive about it and use stuff that works over ssh. Have actually used emacs some in the past, but hadn't heard of TAGS files or ag, so I'll put those on the list of stuff to read about. Thanks!
Jeff Epler has used some code-analysis tools to catch various code erros
there is also TAGS support in vim
read about etags
besides ag, there is also rg, pretty similar
ag is aka silversearch
ag and rg are extremely fast, much faster than grep -r
okay, cool I'll read about those
halbert@cod:~/repos/circuitpython$ time ag foobar >/dev/null
real 0m2.276s
user 0m3.764s
sys 0m5.750s
thanks
I'm using zed now to get LLM powered autocomplete. I don't do much code navigation with it though. The main thing you should get for USB host debugging is a USB sniffer. That way you can see all of the packets from an agnostic source.
I got a https://www.adafruit.com/product/6005 but trust the https://www.adafruit.com/product/708 (or 480) more.
Great Scott Gadgets' Cynthion is an all-in-one tool for building, testing, monitoring, and experimenting with USB devices. Built around a unique FPGA-based architecture, Cynthion’s ...
I have successfully made traces with the Cynthion
The Beagle only puts out a proprietary format and .csv. Scott wrote a converter from the .csv dump to .pcapng. The Packetry software for the Cynthion generates .pcap directly
Can the '10' pin be accessed with import micropython and referring to it by machine.Pin(10)?
You can access any pin using microcontroller.pin. (Small SAMD boards may have some disabled but we don't do that for RP2 that I know of.)
I'd expect the extra logging to come out the default UART. The P4 port is new enough that it may be broken though. CircuitPython may be resetting the pin state when it shouldn't.
Could you give a complete simple example that illustrates the problem? I don't see pin errors just creating the DigitalInOut. Thanks.
I want to make the USB host implementation more useable for game and synth projects. I'm posting this issue in the hope of getting feedback and core dev buy-in for my list of stuff I'm hoping to fix:
- [ ] Unreliable Unplug Event Detection: There's currently no good way to detect an unplugged USB device (some exceptions resulting from an unplug look the same as other types of timeouts). Desktop PyUSB handles this by setting
usb.core.USBError.errnoandusb.core.USBTimeoutError.errno.
...
ill tweak the value on the next batch. no need to remind me :)
Some other issues with interesting discussion about USB host stuff:
- https://github.com/adafruit/circuitpython/issues/5423
- https://github.com/adafruit/circuitpython/issues/10494
- https://github.com/adafruit/circuitpython/issues/10243
- https://github.com/adafruit/circuitpython/issues/9930 (possible missing null pointer check in
find()?) - https://github.com/adafruit/circuitpython/issues/9905
- https://github.com/adafruit/circuitpython/issues/8886
I've been primarily using VS Code. If you get it set up properly, it can be very helpful for both C/C++ and Python/CircuitPython code.
@ladyada,
How will those of us with the current revision find out what the tweak is?
Will there be an avenue for us to take advantage of the tweak?
The options for a HAT that plugs into the 2x16 header are enticing.
Since my primary dev system is currently a Windows system, I'm running CircuitPython builds under WSL. That works fine - VSCode even has a specific mode for "WSL based" workspaces.
The one squishy bit I haven't gotten fully working yet is running the firmware reliably / easily in debug over USB.
I've done a bit and I think it's plausible (maybe someone already has it working?) but I haven't seriously needed it yet.
That sounds interesting. I hear it also supports ripgrep, cscope and other stuff. I'll add that to my list of stuff to read up on. Thanks!
it would require soldering on the board. basically any one that is sold after today will have the fix added. if you bought one before you can hand-fix or just plug in an IR receiver into the IDC blocks. if you are unable to solder we can replace it (but we have very limited stock)
yeah... I noticed the Beagles are gone. Been thinking about a Cynthion. Thanks!
I hadn't heard of ripgrep or cscope. Honestly though, unless you're already used to them you probably wont' need them if you're using VSCode. Getting VSCoder "set up properly" is partly about using the right extensions, but mostly about configuring your workspace so it knows where to find and how to "process" your source. For example, include paths and relavent conditional compilation macros for C/C++, and interpreter version / venv / library path for python. Once that's set up properly, you can simply CTRL-RightClick on just about anything and it will take you right to the declaration/definition.
that sounds cool. I'm particularly curious about static analysis stuff because some of the bugs I've seen while using the USB host API smell like some of the stereotypical memory corruption bugs that commonly happen in C.
...random garbage or all zeros in places that should have a string or an int, and so on.
VSCode also has recursive directory regex search/replace built in (i.e. while there is a ripgrep extension available, it already supports very similar functionality). IIRC the regex syntax is mostly compatible with python's re expression format. The only quirk that comes up frequently is you need to use $1 and $1 for the replace expression instead of 'using \1 and \2 like python'
Haven't stressed the memory related static analysis bits for C code much so I can't say how comprehensive it will be. Almost all my serious embedded code has been in C++ for a long time, and I'm quite careful with memory - almost everything is reference counted and/or RAII wrapped. Doesn't mean I never have memory corruption issues, but when they occasionally come up it's almost always because of order-of-initialization problems with "global" / singleton variables or access from multiple threads without proper concurrency management (or bugs in other libraries my projects depend on)
They still make beagles. Adafruit just doesn't stock them anymore
@ladyada,
I have found what I think is R32. It is right next to the IR Receiver and measures 99.9k. I have a hot plate so if I can get the new resistor I can try replacing it myself. If I was to ask for a replacement Fruit Jam, I would wait until the rush dies down.
How would I find out what the new R32 value is?
If I get a replacement R32:
Because I have in-tension tremors, I would need to take a shot of Scotch about 30 minutes before I start work.
Yes alcohol calms in-tension tremors....
@dhalbert
I did get a hard-crash using a simplified program:
Request counter=15110
Exception: Repeated socket failures
Request counter=15120
...
Request counter=20870
Exception: [Errno 116] ETIMEDOUT
Request counter=20880
...
Request counter=21260
Request counter=21270
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 err...
The content of post_test.php is:
<?php
ob_implicit_flush(1);
function TestPost() {
$wrValue = array("SomeField" => "SomeValue","OtherField" => 42);
echo json_encode($wrValue);
flush();
}
TestPost();
?>
@ladyada
After thinking about it, I request a replacement. A big reason, I dropped a tool on mine tonight and It is bricked.
What is my next step? How long should I wait so other users can get theirs?
@b-blake email support@adafruit to get a refund, then you can buy a new one when its in stock
I took the code, and commented out the SSL bits and changed the URL to non-SSL. The TCP/IP stack is just rubbish, and this proves it. Here's the output:
192.168.168.126 | code.py | 10.0.0-beta.2Request counter=10wrValue);
Request counter=20
Request counter=30
Request counter=40
Request counter=50
Request counter=60
Request counter=70
Request counter=80
Request counter=90
Request counter=100
Request counter=110
Request counter=120
Request counter=130
Request counter=140
Request counter=15...
<img width="804" height="598" alt="Image" src="https://github.com/user-attachments/assets/8a6fb199-0562-47b2-84e0-c635ba9ab833" />
My dev board have two type-c port:
- Port 1 : Default UART, Flash , bootloader log output
- Port 2 : REPL, UDISK
I will also try to find out the reason for the automatic reset.
Of interest: https://github.com/espressif/esp-idf/issues/17052
I stripped out the SSL connection but it still crashes with the simplified code. So either the TCP stack is unstable, or just the whole of circuitpython is unstable.
Request counter=47980
Request counter=47990
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 issue with your program at github.com/a...
I found the issue.
I had another local function referencing the pin during initialization, probably one minute before the device went to sleep. It works now when I removed that.
Is it so that you always need to deinit() a pin after usage, even if you are only using it temporarily in a local function without maintaining it in a global variable?
import digitalio
import board
# Function 1
def i2c_function_1():
try:
i2c_power = digitalio.DigitalInOut(board.I2C_POWER)
i2c_power....
So either the TCP stack is unstable, or just the whole of circuitpython is unstable.
The structure of the code is that the wifi API's use https://github.com/georgerobotics/cyw43-driver underneath, to talk to CYW43 radio module. That uses lwip. Since you ruled out TLS, we don't have to look at mbedTLS, which is also used.
So it looks like it takes a few tens of thousands of calls on average to hit the bug. Is there a high variance in the number of calls? Did you add the gc.collect() ca...
Is it so that you always need to deinit() a pin after usage, even if you are only using it temporarily in a local function without maintaining it in a global variable?
If you're really done with it, then you should deinit it. Internally there is storage and state to make the pin work, and there are hardware settings. So create the DigitalInOut object once and pass it around. It doesn't have to be literally global, but it needs to be shared.
I will close this, but further discussion is fine.
Updated link to shop. The other listed shop (Tindie) is consistently out of stock from several months, probably the maker is not using it anymore.
I know it has been a while, but I was experiencing a similar issue this morning. Circuitpython 10.0.0-beta2 on the esp32-s3 with 2MB PSRAM. Switching to vfs.open fixed the issue for me, but only in conjunction with removing the storage.mount(vfs, '/sd') call. Leaving in storage.mount(vfs, '/sd') works fine when the board is powered independently, but when connecting to my computer this crashes CircuitPython. Looks to me @raquo was right about "bad things" on April 2nd, this may be creat...
@dhalbert , @tannewt
Big OOPS on my part. D10 is buried in this line of tags and I missed it.
'CKN', 'CKP', 'D0N', 'D0P', 'D10', 'D1N', 'D1P', 'D2N', 'D2P'
I apologize. I'll do better next time.
Please make four separate issues. Responding to parts of the single post is tricky.
tested my changes on my custom devboard with code that communicates by UART to secondary MCU. I used names such as Board.WIFI and set it to true to see if the secondary MCU would enable
The code ended up working
@tulip sleet I'm going to switch epd to a struct so I can add partial commands
There's currently no good way to detect an unplugged USB device using the usb.core.Device API. Unplugging will occasionally raise an immediate usb.core.USBError, but often it just results in a delayed usb.core.USBTimeoutError when you next try to poll the USB device. There's nothing about such USBTimeoutError objects to distinguish them from other timeouts that happen in the normal course of polling some USB devices (e.g. USB receivers for wireless gamepads).
Desktop PyUSB handles un...
Currently (10.0.0-beta.2) the usb.core.Device API sometimes returns null values (vid/pid of 0) or strings with random garbage when you try to access the .idVendor, .idProduct, .serial_number, .product, and .manufacturer properties of usb.core.Device.
I know this is very vague, but I haven't figured out how to reproduce it consistently. I've taken to using my own USB device descriptor parser as a workaround, so I haven't researched it carefully yet.
I'm posting this issue at ta...
Currently (10.0.0-beta.2 on Fruit Jam), when reading MIDI messages by USB Host from USB MIDI controllers, note on or note off messages sometimes mysteriously go missing. This also happens for other message types, but note on/off is the most problematic. By "go missing", I mean that the relevant data never shows up as the result of a call to usb.core.Device.read().
I know this is very vague, but I haven't figured out how to reproduce it consistently. My Playground guide at https://adafruit-...
Currently (10.0.0-beta.2 on Fruit Jam), it seems like polling for USB host device input events with usb.core.Device.read() uses a lot of CPU time compared to reading GPIO pins or I2C. I know this is vague. All I have at this point is anecdotal observations that USB polling in combination with picodvi and/or synthio appears to load down the RP2350 CPU (slow display updates, dropped notes, etc). For example, last year (around 9.1.4), when foamyguy ported my [Pumpkin Toss](https://adafruit-pla...
Please make four separate issues. Responding to parts of the single post is tricky.
as requested: #10552, #10553, #10554, #10555
I have been unable to reproduce this on 10.0.0-beta.2, on a Feather ESP32-S2. I was doing HTTP (not HTTPS) POST's to httpbin.org, and then doing HTTP GET's to a local server. I'm powering it with a power-only USB cable. I don't see stray directory entries. I sped up the sleep a lot so it's waking up after 5 seconds. I believe you saw this, but I'm not sure how to reproduce. This could be some kind of brownout issue with the flash, since there's otherwise no writing of the flash going on. The ...
This has something to do with the DotStar implementation. If I comment out
# Dotstars
self.dotstars = adafruit_dotstar.DotStar(
board.DOTSTAR_CLOCK, board.DOTSTAR_DATA, 5, brightness=0.3
)
in Peripherals.__init__() in adafruit_funhouse/peripherals.py, then it doesn't crash.
I had a lot of problems with memory consumption with TLS. If I tried to do two different SSL sites, it was pretty much game over, out of memory. I spent a lot of time trying to work around that. I ended up making my system a proxy for the other system to work around it.
Here's the non-ssl code:
import adafruit_requests
import json
import socketpool
import ssl
import time
import wifi
import gc
ssid="mhsoftware"
psk="WonderNet"
while True:
try:
res = wifi.radio.connect...
I spent a lot of time troubleshooting memory problems with SSL. On a pico w, I could make SSL work with one certificate in my application, but if I tried to use two, I ran out of memory immediately. My "fix" was eventually to have my site grab data from the 2nd site and serve it. The GC stuff is left over from that.
import adafruit_requests
import json
import socketpool
import ssl
import time
import wifi
import gc
ssid="myssid"
psk="mypass"
while True:
try:
res = wifi....
The current (10.0.0-beta.2) TinyUSB @ 542e5b4 submodule is using a commit from 3 months ago.
There have been many TinyUSB commits with fixes and improvements since then.
Updating to the current TinyUSB version would include the commits for these PR's, which might improve the reliability of descriptor parsing:
- https://github.com/hathach/tinyusb/pull/3118
- https://github.com/hathach/tinyusb/pull/3123
- https://github.com/hathach/tinyusb/pull/3165
- https://github.com/hathach/tinyusb/pull/3183
also, this one may help with improving behavior when a USB device is disconnected:
This code illustrates the issue:
import time
import supervisor
import os
import adafruit_connection_manager
import board
import busio
from adafruit_esp32spi import adafruit_esp32spi
from displayio import Bitmap, TileGrid, Palette, Group
from digitalio import DigitalInOut
import adafruit_requests
BG_COLOR = 0x0000ff
display = supervisor.runtime.display
bg_bmp = Bitmap(display.width//4, display.height//4, 1)
bg_palette = Palette(1)
bg_palette[0] = BG_COLOR
bg_tg = TileGrid(bg_bmp, pixel...
@tannewt When you have a moment I'm curious if you that thoughts on what could be causing this. I thought I recalled at one point printing causing slower refreshes and wasn't sure if that was resolved but I've eliminated all prints from the test script to rule that out, and confirmed that the display goes dark during when the request is happening by watching the server log to know its timing.
The output changing to dark interrupts the chroma key background color used by the product pick over...
This PR is a fixes issue #10532
Thanks, two things.
I2Sis misspelledIS2on some pins.- Could you put blank lines before and after each multi-line set of lines with the same pin number? This makes it clearer which pin names are aliases. For example, do:
{ MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_GPIO6) },
{ MP_ROM_QSTR(MP_QSTR_PORTB_IN), MP_ROM_PTR(&pin_GPIO8) },
{ MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) },
{ MP_ROM_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_GPIO8) },
{ MP_ROM...
I updated to Adafruit CircuitPython 10.0.0-beta.2 on 2025-07-31; Adafruit Feather ESP32S2 with ESP32S2 and started up the reproducer script again today and had this corruption happen again.
<img width="154" height="64" alt="Image" src="https://github.com/user-attachments/assets/6aebcc87-b15c-49be-92a1-d8e40f426958" />
It was running for 2-3 hours powered by a USB C cable connected to a wall adapter before it crashed and then had the corrupted file on the drive when I plugged it in to a c...
@tulip sleet I'm just about to get on my laptop
@tulip sleet can chat now
I am seeing the same behavior on the Fruit Jam. I also see a slight variation of the issue with framebufferio displays, specifically HUB75 RGB matricies. When web requests are occurring the display flickers rapidly and random pixels light up giving a "static noise" like effect.
Issue #10031 had similar symptoms but for for flash writes, not web requests....
My guess is that interrupts are being disabled by something and preventing the interrupt used to restart the next video frame. However, I'm not sure how the ESP32SPI Python-level code would cause this. Maybe a long, slow SPI transfer?
Thanks! A PR would be welcome. It would be good to do some testing on multiple platforms before merging the PR.
If the framebufferio issue is the same (and I'm thinking it's probably not now) then that's happening from an ESP32-S3 Matrixportal not an ESP coprocessor.
I suspect this is due to the 1000 hz polling rate of full and low speed USD devices. So we have to wait 1/1000 of a second to get the response when doing a read.
I'd be curious how pyusb on a linux device seems. I wonder if the OS is doing buffering and then the read just reads from the buffer.
@gsexton Just to let you know - we appreciate this testing, and it's on our list to look at this. If you are blocked by these problems, switching to a Pico 2 W would help for now, but there should be fixes on Pico W as well. There are limitations based on the amount of RAM on RP2040, but we could do better.
I suspect this may be related to us not having buffering. A read() goes out the the device to do the read. If the device doesn't buffer enough, then it likely drops some data because we were too slow to read.
This could maybe be fixed by automatically reading some endpoint types and buffering their responses.
I think updating TinyUSB to the latest commit would be the best first step for this issue. Totally possible it's been fixed already.
What are the errno's that pyusb uses?
Please use a unique USB PID. (That's why the CI tests are failing.)
What are the errno's that pyusb uses?
This is the script I wrote last year when I was trying out PyUSB on Debian: samblenny/usbgamepad/usbgamepad.py. The start_xpad() and find_and_connect() functions have the interesting try/except blocks. Summary:
usb.core.USBTimeoutError.errno == 75duringread()is a normal timeout where a retry usually worksusb.core.USBTimeoutError != 75duringread()may happen for an ...
@tannewt For this one, I'd like to try profiling with GPIO pins and a logic analyzer. Do you have a favorite code snippet for quickly toggling pins from C?
@tulip sleet For bumping a submodule commit version (e.g. TinyUSB), are any CircuitPython-specific magic incantations needed with make or scripts or something, or does it just work the normal way?
just cd into the submodule, do a git pull or git fetch, and checkout the commit you want. then cd back up and commit the change
If you think that's the "normal" way
awesome. thanks. I know some of the submodule stuff is a bit unusual.
we use --filter=blob:none, but that's just to save time and space, and doesn't affect the commits
when you mentioned testing the new TinyUSB version, were you expecting that would be done internally at Adafruit?
I can poke at it on my Fruit Jam and such, but that's far from comprehensive compared to all the boards that use TinyUSB
OK, I figured that since my Fruit Jam was broke I couldn't break it more.
So with great care I removed the 10k SMT resistor, R32 and replaced it with a 150 ohm 1/8 watt common resistor.
I bent and cut the wire leads so the lead tips were the same spacing as R32's.
With all the concentration and fine mussel control I could muster, I soldered the 150 ohm resistor in place.
It works great!
A simple IR receiver code.py shows the correct IR codes in REPL.
The RED LED flashes whenever a 38kHz IR ...
This is the latest upstream TinyUSB commit. There were many changes in the past the 3 months since the last submodule update. In particular, there were some fixes for descriptor parsing and better stability when devices are unplugged. See issue https://github.com/adafruit/circuitpython/issues/10556.
Checks:
- [x] pre-commit passed (all checks were skipped because only submodule commit was changed)
- [x] Build with
make -j BOARD=adafruit_fruit_jamworked fine - [x] Firmware build seeme...
Looks like some of the CI builds are failing (feather_m0_express, etc), but it's not evident to me why from looking at the action runner log. By my reading, it seems like the .uf2 files are actually getting created successfully, but then something else is going wrong?
changing the resistor to the left of "IR In" silkscreen to ~1K or less will work (its not very picky!)
closing as will fix in next batch. if folks got one of the first few boards & need IR and can't solder a resistor over/replace it just email support@adafruit for a refund.
To clarify the location of R32 to those who wish to apply this fix:
If you hold the PCB with the USB-A ports pointing down and the USB-C port pointing up:
R32 is the very small SMT resistor immediately below the IR Receiver's left pin.
If the cover plate was in place the text would be right side up.
@samblenny Some of the larger language builds in particular boards are too big, For instance, de_DE for feather_m0_express is too big by 12 bytes. By comparison, the most recent PR merge (#10550) of that build had 236 bytes of room remaining.
I will look for some modules that we might turn off. For instance, on feather_m0_express, codeop, maybe fontio, and/oor maybe one of the displayio bus support modules could be turned off. I'll look at this more later. But you could go ahea...
Swapping R32 for a 1K replacement worked great for me. Thanks for the fix!
I'm planning on migrating from Windows to Debian soon, and in preparation I've been implementing new workflows in a Debian WSL install. Since so many distros are based on Debian, I reasoned that I should probably start there too.
The Building CircuitPython learn guide recommends an Ubuntu environment, but several of the devs here use Arch and others. I'm aware of some differences (flatpaks, etc), but are there any pitfalls preventing me from using Debian as my base? I'm not quite smart enough to build CircPy yet, but I'm steadily learning how so that I can experiment with the Zephyr port.
@slender iron built me a Zephyr test binary a few months ago for an nRF5340 Audio DK, but no matter what I tried I couldn't flash it. The Audio DK is amazing hardware, but Zephyr/NCS is so tedious when rapid prototyping that I'm desperate for a higher-level language, and CircuitPython would be an absolute dream. @tiny peak's playground writeups have also been inspiring and informative.
Are there any devs here who might provide wisdom and insight on my journey? I have plenty of CLI experience (I grew up on Unix and CP/M), but this is a very deep rabbit hole, and I could use some guidance.
We recommend Ubuntu because it's very common, packages are kept up to date, there is a robust PPA system, etc. Recommending a particular distribution makes it easier to duplicate an issue or provide support.
But the differences between distributions are pretty small, and most packages are available everywhere. I don't think you'd have much if any trouble using Arch instead of Ubuntu, or Debian instead. So pick the one that's appealing.
Thanks, @tulip sleet. I always appreciate your input.
You're welcome!
What did you have in mind for testing? I tried some casual stuff with code from my recent projects on a Fruit Jam board, and it seemed fine. My board collection is pretty small--mostly just RP2350, ESP32-S3, RP2040, and a little nRF52840. I have couple SAMD21 boards, but those don't include any of the ones where the builds failed.
@tannewt On these M0 Express boards that are overflowing, we enable epaperdisplay, fourwire, i2cdisplaybus, and paralleldisplaybus. Are there any of these that you would say are impractical on a SAMD21 due to memory requirements or even pin requirements? fourwire and i2cdisplaybus I'd assume we'd keep, but I'm not sure about the others.
I've used Debian for CircuitPython and Zephyr, and it's mostly fine. You'll occassionally run into stuff with udev rules and group membership where you don't have the permissions you need to access a hardware device. Once in a while something might come up where you have the wrong version of some library, or if you try to use a system python package instead of the latest thing from PyPi. I've found instructions for Ubuntu mostly work. The differences between Debian and Ubuntu are pretty small. Take what I say with a grain of salt though because I've been doing Linux stuff for over 20 years, so I probably don't even notice some of the stuff that I do to work around any glitches in instructions.
What did you have in mind for testing?
I am thinking specifically of the USB issues that you mentioned. If it fixes those, it would be great to close them. I am not thinking we'd have to do a lot of regression testing. USB Host should be tested, of course.
Yes, I've already bumped up against udev permissions, and I'm aware of system Python versus venv Python. It's good to hear others have had success, even if it requires further study. Thanks for the response, @tiny peak, and for sharing your helpful writeups.
I am thinking specifically of the USB issues that you mentioned.
oh... that would be kind of a major research project. I'm planning to do that work, but I expect it will take a while. As it stands, I don't have good reproducers for most of the stuff I mentioned in those other "USB Host: *" issues. I've just adopted workarounds to dodge around weirdness that I stumbled on last year when I was starting all the USB host gamepad stuff.
uninstall modemmanager if it is installed. It can grab serial ports
already done. thanks for the tip.
We often update TinyUSB without comprehensive testing. I was just hoping you could check off some known issues, like the plug/unplug one, etc.
known issues, like the plug/unplug one, etc.
For that one, there are two different things going on. My unplug issue is about ambiguity in USBTimeoutError exceptions because Circuitpython doesn't set usb.core.USBTimeoutError.errno. The TinyUSB fix is about the potential for crashing or undefined behavior that could happen for an unplug during an in-progress transfer.
@zinc walrus One thing to keep in mind about Debian is that the Bookworm to Trixie major version update is about to happen (Trixie release is tomorrow I think?)
The minor version upgrades for the past few months have thus far been painless. Should I expect any problems with the major version upgrade?
Dunno... I expect that there will be version bumps on lots of tools and libraries. Might affect CircuitPython build tools, compiler toolchains, etc. in a meaningful way, or it might not. Hard to say.
If you start on Bookworm, stuff will probably work fine, but you'll be missing out on lots of version updates on other stuff which you might enjoy having access to.
Thanks for the warning. I usually wait a bit for the dust to settle before blindly upgrading. I'll watch the forums for potential problems.
Just out of curiosity, what desktop environment do you use?
CircuitPython version and board name
Adafruit CircuitPython 10.0.0-beta.2 on 2025-07-30; Adafruit Fruit Jam with rp2350b
Code/REPL
# SPDX-FileCopyrightText: Copyright (c) 2025 Tim C for Adafruit Industries
# SPDX-FileCopyrightText: Copyright (c) 2025 Anne Barela for Adafruit Industries
#
# SPDX-License-Identifier: MIT
#
import gc
from terminalio import Terminal
import displayio
from lvfontio import OnDiskFont
from adafruit_fruitjam.peripherals import reque...
xfce with an aggressive set of sudo apt remove ... to get rid of default plugins and widgets that annoy me (supplemented with some sudo apt install ... to ensure important auto-installed packages don't get zapped)
I always make sure to uninstall avahid, cups, libreoffice, and tools that do automatic disk access (indexers, thumbnailers, etc). General idea is to reduce the number of open ports and stuff that messes with files on mounted drives.
I use cinnamon, and keep a rather short bottom panel so I maximize screen space
Figuring out how to configure your editor(s) to avoid pooping temporary files all over the place can be really helpful for CircuitPython. I prefer to edit on my hard drive and then rsync files to CIRCUITPY (followed by a sync to flush the cache quickly)
one problem I haven't solved, and don't know where to lay the blame, is that the inter-application clipboard doesn't seem to get filled properly unless I copy something twice. E.g. copying a URL from the browser to discord requires ctrl-c ctrl-c ctrl-v
I use middle button click to send the current selection somewhere else a lot.
Very interesting information, @tiny peak and @tulip sleet. I'm still command-line only since I'm using WSL, but as I plan my move to a bare metal install, I'm beginning to consider desktops. Thanks so much for the recommendations and details.
something to keep in mind if you want a softer start... ssh works great for a lot of stuff
I usually use a Mac for my daily driver productivity apps that I don't want to have to burn time tinkering with. Then, I've got a few linux boxes and an Ethernet LAN on my desk, so I can ssh or VNC out to Debian. Or, for stuff that needs GPU acceleration (e.g. Blender), I can just switch my monitor over to a different input source.
That way, if you have a dev environment install go really sideways, it doesn't take out your whole setup
i use nomachine (free version) to remote-desktop to mac and windows from Linux
Yes, VS Code on Windows essentially uses SSH to "remote" access the WSL virtual machine, so I'm already comfortable with the concept, but I only have one PC to deal with at the moment.
FWIW, picking up some old cheap stuff off ebay has really improved my dev setup. Dell P series monitors are great. Old intel mac minis are great (but go for the higher spec ones).
I buy from https://www.dellrefurbished.com/, but make sure you have a coupon (30-50% off) or buy a "Hot Deal". I have bought maybe a dozen desktops and laptops from there, all were fine. They are off-lease, and come with proper Windows licenses (unlike some other refurbs I've encountered).
+1 for off-lease Dell stuff
Well, I'm not exactly swimming in developer money, but I scrounge what I can.
great thing about linux is it will run on some seriously garbage computers (going by modern specs)
the mix on dellrefurbished has really leaned toward laptops these days; they are seriously cheap and plentiful.
@samblenny,
My math for choosing 150 ohms is as follows.
Under normal conditions the GPIO port will be an input and float and the math below is insignificant..
The GPIO port can source 20ma (.020 amps) at about 3 volts. 3V / 0.02A = 150 ohms. IF the GPIO port is 'True' and not floating when the IR Receiver gets a 38kHz IR signal nothing gets over stressed with 150 ohms.
IR Signals have less than a 35% duty cycle over all. [Zero=25%, One=17%, Start=50%, Stop=0%]
The Red LED has a 2.2k...
FWIW, my primary desktop environment is Windows 11 but I regularly use the "default" (Ubuntu) WSL2 to build CircuitPython images. Most of the Linux PCs I've set up over the past few years have been Ubuntu - I haven't done much with Debian lately (other than using OctoPi for my print farm). If you're not able to get CircuitPython to build under Debian WSL2, maybe there's a Debian vs Ubuntu difference although that feels like a stretch. Keeping USB happy under WSL is a pain, but that shouldn't affect builds...???
How far have you gotten / what are your roadblocks building CircuitPython?
One specific recommendation for using the WSL is to stay in the "local WSL file system" for your builds (i.e. something like ~/git/circuitpython instead of /mnt/c/Users/jbrel/git/circuitpython). I initially tried that latter, using WSL to build in the directories I had already checked out on a normal Windows drive. It was ridiculously slow and temperamental. After cloning the circuitpython repo directly into the local WSL file system, builds in the new repo ran an order of magnitude faster.
just learned something about Discord : I like embedding (hopefully helpful) relevant links in Discord messages. It's easy using [description](link) Markdown syntax, for example : [Markdown](https://en.wikipedia.org/wiki/Markdown). But that typically appends an embedded window showing the linked page when displaying the message, which sometimes feels like unnecessary clutter, Turns out that wrapping a link in angle brackets (<http://...>) disables that but keeps the link itself in the message text. So the above link to Markdown was written [Markdown](<https://en.wikipedia.org/wiki/Markdown>), so there shouldn't be any extra window displayed after this...
Hi! 👋 I’m working on adding support for a new board to CircuitPython, and I’m about to draft a PR. I’m a bit unsure about which branch I should use as the base, should I be branching off main/master, or is there another branch I should target for new board additions? Thanks in advance!
I always added my boards to main
Got it, thanks! I’ll branch off main then.
This is a generalization of #10520, and supersedes it.
This program will hang and then hard crash on ESP32-S2 and ESP-S3, in somewhat different ways (see below).
creating either an I2C or SPI object and then locking it causes the issue . Both use an xSemaphoreCreateMutex(). The try_lock() is necessary: it does an xSemaphoreTake() on the mutex, and then holds the lock for the rest of the program.
(I suggest you import this program manually, instead of using code.py, so you can...
CircuitPython version and board name
Adafruit CircuitPython 10.0.0-beta.2 on 2025-07-30; Adafruit Fruit Jam with rp2350b
Code/REPL
import displayio
import gc
import time
import usb
from usb.core import USBError, USBTimeoutError
def test_descriptor_parsing_read_gamepad():
# Check USB device descriptors, then read from gamepad if found.
# This one is designed to trigger bugs where an in progress USB transaction
# fights with other CircuitPython t...
found another one: https://github.com/adafruit/circuitpython/issues/10562 (USB Host: Fast polling + write to CIRCUITPY crashes board)
I tested my firmware build for this PR to see if it helps with USB Host: Fast polling + write to CIRCUITPY crashes board #10562, but it doesn't seem to make any difference.
CircuitPython version and board name
Adafruit CircuitPython 10.0.0-beta.2 on 2025-07-30; Adafruit Fruit Jam with rp2350b
Code/REPL
import displayio
import gc
import usb
from usb.core import USBError, USBTimeoutError
def test_unplug_during_find():
# This tests how repeated calls to usb.core.find() behave in the context of
# unplugging a USB device. Initially, before a device is plugged in for the
# first time, the generator produces no iterator ...
I tested my firmware build for this PR to see if it helps with USB Host: Unplugging device can break usb.core.find() #10563, but it doesn't seem to make any difference.
Originally, I encountered this problem last year on 9.1.something, or perhaps 9.2.something, using a Feather TFT ESP32-S3 with a MAX3421E USB host FeatherWing. At that point I got started on doing my own descriptor parsing, so it's been a while since I've tried accessing Device.manufacturer, Device.product, and so on.
Today I got out my pile of USB test devices and tried to write a reproducer for this on 10.0.0-beta.2 with a Fruit Jam rev D board. So far I haven't been able to reproduce ...
From an API usage standpoint, it would be great if an unplug event could:
- Mark any objects associated with that device as invalid (or some functional approximation of that)
- Automagically deinit things as needed
- Cause a
usb.core.USBError(not a timeout!) to be raised for any subsequent attempt to access resources related to the unplugged device usingfind(),read(), or whatever.
It's possible that the Pico-PIO-USB submodule (see ports/raspberrypi/lib) should also be updated. It looks like its current submodule commit is 3 months old (v0.7.1 ?) and that the current version is v0.7.2.
Main change appears to be this PR: https://github.com/sekigon-gonnoc/Pico-PIO-USB/pull/186
AirLift can't do web workflow. Change my mind.
The code looks fine to me. I have not yet tested it on hardware. Not sure offhand how to free up a few bytes, it isn't overflowing by much. I'll leave that to others who may know more about it.
CircuitPython version and board name
Adafruit CircuitPython 10.0.0-beta.2-3-gf86bf4c085 on 2025-08-04; Adafruit Fruit Jam with rp2350b
Code/REPL
# SPDX-FileCopyrightText: 2025 Cooper Dalrymple (@relic-se)
#
# SPDX-License-Identifier: GPLv3
import asyncio
import board
from displayio import Group, Bitmap, Palette, TileGrid
import supervisor
from vectorio import Rectangle
from adafruit_fruitjam.peripherals import request_display_config
from neopixel import Neo...
<@&356864093652516868> We'll have our weekly meeting in about 90 minutes from now in this text channel and in the circuitpython voice channel. Please take the time to add your notes in advance to the document: https://docs.google.com/document/d/11KpdjrQUXbQ_-uasV4gLlZIPz3q-nfP7A2c9isIOVvg/edit?tab=t.0 -- I look forward to everyone's updates!
CircuitPython Weekly Meeting for Monday August 11, 2025 Welcome to the CircuitPython Weekly meeting notes! Feel free to add your Hug Reports and Status Updates before the meeting, alphabetically by your username. During the meeting, we go through them in order. If you can’t make the meeting and ...
@tannewt For this one, I'd like to try profiling with GPIO pins and a logic analyzer. Do you have a favorite code snippet for quickly toggling pins from C?
I use the pico-sdk gpio.h directly. Can't remember the API exactly. One CP trick is to ensure the pin number isn't reset. never_reset or adding a check in the reset function can do it.
Open Installer is great but it seems to always install the English firmware.
It's possible that the Pico-PIO-USB submodule (see ports/raspberrypi/lib) should also be updated. It looks like its current submodule commit is 3 months old (v0.7.1 ?) and that the current version is v0.7.2. Main change appears to be this PR: sekigon-gonnoc/Pico-PIO-USB#186
Feel free ...
@tannewt On these M0 Express boards that are overflowing, we enable
epaperdisplay,fourwire,i2cdisplaybus, andparalleldisplaybus. Are there any of these that you would say are impractical on a SAMD21 due to memory requirements or even pin requirements?fourwireandi2cdisplaybusI'd assume we'd keep, but I'm not sure about the others.
I'm not sure you can disable any of these without removing functionality. They all have enough pins for parallel. I can take a look to see wh...
Please try editing code.py directly instead of using Thonny. It plays weird tricks to run files.
Is there a description somewhere of how code.circuitpython.org's not-CIRCUITPY "USB mode" works and is it the same as Thonny's method?
I think it is similar to mpremote. Basically entering the raw repl to change things.
Please file an issue!
That was my assumption too. I was hoping for more details as it works really well for ESP32 and I wanted to talk about it on our podcast 😀
Custom Raspberry Pi Music Player Powered by Raspberry Pi, Fueled by Imagination: What if you wanted to build a music player—something portable, housed in an old CD player? You gut a dead boombox, keep only the speakers, and rebuild everything else from scratch. With a Raspberry Pi, an audio DAC, some wrecking tools, and a whole …
Demonstration of my MusicPi Python system, designed for Raspberry Pi.
https://www.instructables.com/Custom-Raspberry-Pi-Music-Player-Powered-by-Raspbe/