#circuitpython-dev

1 messages · Page 87 of 1

manic glacierBOT
orchid basinBOT
manic glacierBOT
#

The RP2350 HSTX-DVI outputs run at double-pumped CPU clock speed, with the 'clock' pin at 1/10th of that per the DVI spec. This means that the 'pixel clock' they're generating is cpu clock speed / 5 so by default? 30Mhz. Shifting them down to 125Mhz CPU clock speed drops that pixel clock to 25Mhz.

The 'VGA 640x480' 60Hz timings require 25.175Mhz pixel clock, with VESA requiring a minimum of 0.5% clock tolerance but in practice because generating exactly 25.175Mhz with PLLs is such a hard t...

proven garnet
#

I'm doing a quick crawl through the ReadTheDocs CI status via adabot tools - I noticed that some of my older libraries that were transferred to be under adafruitwere failing doc builds. I'll tag any repositories it catches with issues. (also, howdy!)

proven garnet
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

In 10.0.0 alpha 6, when reading a fixed number of bytes from usb_cdc above a certain size (7936) and above, a memory allocation error is thrown (from a new REPL). It doesn't happen with lower values.
This seems to start happening with #10264
Tested on a Clue too.

Adafruit CircuitPython 10.0.0-alpha.6 on 2025-05-17; SparkFun Pro Micro RP2040 with rp2040
>>> import usb_cdc
>>> data = usb_cdc.data.read(7936)
Traceback (most recent call last):
  File "", line 1, in 
MemoryError: memory alloc...
manic glacierBOT
#

Sets .flags.with_dma = 1 in RMT config that is used in pulseio.PulseIn and fixes https://github.com/adafruit/circuitpython/issues/9234.

Quoting the documentation:

The receiver saves the incoming signals into its internal memory block or DMA buffer, in the format of [rmt_symbol_word_t](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/peripherals/rmt.html#_CPPv41...

candid sun
#

<@&356864093652516868> We'll have our weekly meeting in about 60 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/1LkWa9fIlK7wzdpeyxYi2RbaUSO2Dx84AvcDQm40nA7s/edit?tab=t.0 -- I look forward to everyone's updates!

manic glacierBOT
#
Adafruit CircuitPython 10.0.0-alpha.6 on 2025-05-17; Adafruit Feather ESP32S2 with ESP32S2

Reproducer code:


import alarm
import board
import digitalio
import neopixel
from os import getenv
import random
import time
import adafruit_connection_manager
import adafruit_requests
from adafruit_io.adafruit_io import IO_HTTP, AdafruitIO_RequestError
import wifi


# On MagTag, enable power to NeoPixels.
# Remove these two lines on boards without board.NEOPIXEL_POWER.
np_power = digitalio...
lone axle
manic glacierBOT
lone axle
#

Thanks for hosting Liz. Have a great week everyone 👋

candid sun
#

Here is the notes document for next Monday’s CircuitPython Weekly meeting. It is at the normal time of 11am Pacific / 2pm Eastern here on Discord. Everyone is encouraged to attend! Please add your hug reports and status updates even if you’ll be attending the meeting - it’s super helpful! If you are unable to attend but would still like to include updates, feel free to include them in the notes and we’ll read them off during the meeting. Hope to see you there! <@&356864093652516868>

https://docs.google.com/document/d/1jvf9RJemO6wEgcF2ca4Y0_FeNHtK9IuHQa1Ij3aErYc/edit?tab=t.0

manic glacierBOT
lone axle
#

@candid sun the reproducer for the s2 sleep / flash corruption thing is in the issue here: https://github.com/adafruit/circuitpython/issues/10398. It expects settings.toml entries for WIFI_PASSWORD, and WIFI_PASSWORD (intentionally different from the default ones to avoid web workflow starting up), and ADAFRUIT_AIO_USERNAME, ADAFRUIT_AIO_KEY as well as a random feed on AIO.

manic glacierBOT
#

I don't have much that I can test at the moment but here is a summary of the combinations what I can test:

  • Waveshare ESP32S3-Zero Windows: No/Very late CIRCUITPY drive
  • Waveshare ESP32S3-Zero Ubuntu: Works as expected
  • Generic ESP32-S3-MINI-1 module Windows: Works as expected

So all boards and combinations work with 9.2.8, and with 10.0.0-alpha.6 only the Waveshare board doesn't work with Windows.

manic glacierBOT
manic glacierBOT
#

Hadn't realized this before, but when the CIRCUITPY drive does show up after a few minutes in the problematic configuration, it is read-only.

I tried removing code.py, main.py and settings.toml and also tried replacing them with empty files (settings.toml was empty all along), but this doesn't change anything. These changes to the files were only possible on linux, due to the above problem.

I also tried a second Windows 11 machine, but this behaves the same as the first: No/Very la...

manic glacierBOT
#

I have this problem on raspbian 12 bookworm Linux weathers 6.12.28-v8+ #1877 SMP PREEMPT Wed May 14 12:07:03 BST 2025 aarch64 GNU/Linux
lots of weird errors trying to mount 5 picos simultaneously on a Pi4b. I have done the erase_filesystem and installed the latest circuitpython and all my uuids are different and I used "fatlabel" to set different labels on each pico.
it's my birthday can someone fix it please

jaunty juniper
#

fun fact, yesterday or so I had weird circumstance where two mounted CP drives became suddenly called "Untitled" (or something like that) when I connected a third board (I have more boards connected but not mounted), and some reset was required to fix it (didn't reboot the computer, or restart the Finder). That's MacOS 15.4.1. Never seen that before, couldn't repro. 🤷

manic glacierBOT
#

so it seems that every time you transfer a file to the pico (a) it ejects the CIRCUITPY drive (b) it starts running from scratch (software reboot) (c) it expects something like pcmanfm to automatically remount it. I have 15 files in my program. So I rsync them to the pico and it gets confused. Also I disabled pcmanfm so when it ejects it does not get remounted. Also some unix process writes to the CIRCUITPY sporadically ejecting the drive. So when not programming (writing to CIRCUITPY) ...

manic glacierBOT
#

Yes but sometimes the pico locks up e.g. spewing output to tty and CIRCUITPY may become unaccessible. If this behavior is default (autoreload NOT disabled) I use it as follows. I have a script "zip.sh" which mounts the CIRCUITPY then immediately copies hello_world.py to code.py. Otherwise if you wait too long (not immediately) you can no longer access CIRCUITPY. Then it continues running hello world and is back to normal.

manic glacierBOT
#

Moved from > I have this problem on raspbian 12 bookworm Linux weathers 6.12.28-v8+ #1877 SMP PREEMPT Wed May 14 12:07:03 BST 2025 aarch64 GNU/Linux

lots of weird errors trying to mount 5 picos simultaneously on a Pi4b. I have done the erase_filesystem and installed the latest circuitpython and all my uuids are different and I used "fatlabel" to set different labels on each pico.
it's my special day can someone fix it please. Often the disks don't even show up in blkid although they do ...

manic glacierBOT
#

I just did "apt-get update; apt-get upgrade" it was kernel 6.12 and now it has a couple new upgrades (same kernel I think).

All the picos do not even appear in blkid output probably because there are 5 of them. About three of them are there usually, but they come and go.

So you have to physically unplug them or something like that so that only one or two or three of them are there at a time ????

ionic elk
#

Is there some contributor documentation on translations? Looks like it's what's failing my CI builds

devout jolt
jaunty juniper
manic glacierBOT
manic glacierBOT
#

there are two awg16 wires going from the raspi 4b server to the pico ground and run pins. There is one pair of wires for each pico.
I use these to do a hard reset. There is a 4.7k pull up on the run pin of each pico. The wires are 10 ft long.
Someone suggested that this wire was losing voltage. The run pin resets the pico when it goes low so normally they have to have
a high voltage (at the end of the wire at the run pin). If there is too much current in the wire it supposedly could sp...

#

The wires are 10 ft long.

If you have things physically spread out enough that there are multiple 10 foot wires involved, you could potentially have a variety of stray voltage sources from RF, inductance, ground loops, etc. If your equipment includes wired connections between devices that are powered from different wall outlets (or otherwise not from one computer's USB), there's a possibility you might have currents running on ground lines or other spicy analog stuff.

manic glacierBOT
#

I would swear you were pulling my leg. I removed the 10 ft wires and replaced them with 4 ft sheilded wires. The grounding of the sheilding foil was not connected because I am to wiped out to do it. The black and red wires were. I tried it with the surge suppressor for the server and the surge for the picos plugged into different and then the same outlet (well two plugs on the same
gfi bathroom outlet). Never in any of these cases did I get anything in blkid. I unplugged all but one pow...

manic glacierBOT
#

now it is stable with 5 picos appearing in blkid and /dev/ttypico[ilrtw];
the ones that were oscillating appearing and not showing up were simply boot looping; they crash as soon as software reset;
the only way (other than reflashing .uf2) I know of resetting the boot looping is the zip.sh script which mounts CIRCUITPY then immediately copies hello_world.py to code.py. The immediate copy is the key thing. This helps a lot.

How about a mandatory pause before software reset long enough so yo...

manic glacierBOT
#

Ouch. That must be pretty frustrating. If that were my project, I would be very suspicious of possible hardware damage to some or all of the RP2040 chips on those boards. It's possible for chips that get exposed to conditions outside their rated electrical limits to begin having intermittent faults rather than a catastrophic failure. That may not be what's happening, but it's likely enough that it would probably be worth your while to try an experiment to confirm that theory or to rule it out...

manic glacierBOT
#

One other thing... For RP2040 boards, you can trigger the built in bootloader by holding down the BOOTSEL button while plugging in the USB cable. If you do that, it should show up as a usb mass storage volume labeled RPI-RP2, and you can copy whatever UF2 file you want onto that volume.

This learn guide explains how to do that, including how to use the flash_nuke.uf2 rom image if you want to totally erase the flash:
https://learn.adafruit.com/getting-started-with-raspberry-pi-pico-circui...

manic glacierBOT
manic glacierBOT
#

PID request (CECE) for Omnimo nRF52840 board has been marged.
https://pid.codes/1209/CECE/

On Mon, Feb 24, 2025 at 6:46 AM omar pelo @.***> wrote:

Yes, we did it, truly sorry for the delayed response.

On Fri, Feb 21, 2025 at 6:50 PM Scott Shawcroft @.***>
wrote:

@.**** commented on this pull request.

In ports/nordic/boards/omnimo_nrf52840/mpconfigboard.mk
<https://github.com/adafruit/circuitpython/pul...

manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 9.2.8 on 2025-05-28; Seeed XIAO nRF52840 Sense with nRF52840

Code/REPL

import time
import board
import digitalio
from adafruit_lsm6ds.lsm6ds3 import LSM6DS3

led = digitalio.DigitalInOut(board.LED)
led.direction = digitalio.Direction.OUTPUT

i2c = board.I2C()
#board.SDA, board.SCL
while not i2c.trylock():
    pass

print("I2C ready")
i2c.unlock()

#sensor = LSM6DS3(i2c)

while True:
    #accel_x, ac...
manic glacierBOT
#

thank you for all those interesting ideas. I don't think any hardware is "fried" yet though. My next move will be to try to eliminate any possible ground loops by instead of using a wire directly from the Pi4b to the respective picos, setting up a "controller pico" for each pico which is connected by usb to the Pi4b. Each respective control pico will have a reset wire to the run pin of the "target" pico.

This is the same idea as a debug probe but custom. I could even add a connection for...

#

There's a power pin to enable too.
Try this code, it works on mine.

import board
import busio
import time

# sensor
from adafruit_lsm6ds.lsm6ds3trc import LSM6DS3TRC as LSM6DS
from digitalio import DigitalInOut
imu_pwr = DigitalInOut(board.IMU_PWR)
imu_pwr.switch_to_output(True)
time.sleep(0.1)
i2c = busio.I2C(board.IMU_SCL, board.IMU_SDA)  # IMU SCL/SDA
sensor = LSM6DS(i2c, address=0x6A)

while True:
    acceleration = "Acceleration: X:%.2f, Y: %.2f, Z: %.2f m/s^2" % (sensor.accelerat...
manic glacierBOT
#

As I've been working through implementing the PR for this issue, I've put together these notes.

The Pico processors and their SDK define the following low-power states:

  • SLEEP state - The SLEEP state is entered when both cores are asleep which is: (1) both cores have entered SLEEP by means of WFI/WFE, and (2) DMA is quiescent. Upon entering the SLEEP state, portions of the clock tree are gated OFF under control of CLOCKS SLEEP_ENx registers. In the SLEEP state, power dissipation is re...
manic glacierBOT
#

Some more notes:

  • powman resets directly after wakeup, so you cannot set the wakeup cause
  • On the RP2350, the AON-timer uses the powman-timer internally.
  • as a user, I would want the choice between power-savings and timer accuracy. If I need an accurate timer, I use an external RTC and GPIO-wakeup anyhow. LPOSC accuracy can be tested and taken into account for. I have specimen with 1%, 8% and 25% differences. These are not constants and depend e.g. on temperature, but there are use-cases ...
manic glacierBOT
#

powman resets directly after wakeup, so you cannot set the wakeup cause

The wake-up cause can be determined by examining POWMAN register LAST_SWCORE_PWRUP after reset. My implementation leaves a special value in SCRATCH0 to indicate this case, although CHIP_RESET with HAD_SWCORE_PD set likely tells the same story.

On the RP2350, the AON-timer uses the powman-timer internally.

As far as I can tell, the AON timer is the POWMAN timer.

I have experimental code that uses powman-states ...

#

HTTPS being involved is looking like a promising theory. I also think that I've narrowed down to POST specifically, I've yet to see it occur with a GET request.

In my latest test I had this corruption occur with this code that makes a POST to httpbin.org:


import alarm
import board
import digitalio
import neopixel
from os import getenv

import time
import adafruit_connection_manager
import adafruit_requests

import wifi


# On MagTag, enable power to NeoPixels.
# Remove these two lines ...
manic glacierBOT
ionic elk
manic glacierBOT
manic glacierBOT
#

As far as I can tell, the AON timer is the POWMAN timer.

As far as I understand the SDK, this is only true for the RP2350.

Would you be willing to share your code? I'm doing quite a bit of stumbling around in the dark with P1 states. Which P1 state are you entering for those impressive power numbers?

It is still too experimental but I will push my powman-tree once it is cleaned up and a bit more tested. But I mainly follow the examples from https://github.com/peterharperuk/pico-examp...

manic glacierBOT
ionic elk
#

@tulip sleet wondering the best way to handle duplicate VID/PID for the alternate ROS builds I've been creating for a limited number of boards. Given that microROS is large and may not be commonly used, I've been enabling it only for "alt" builds of boards, such as espressif_esp32s3_devkitc_1_n8r2_ros. Would it be permissable for these alts to share the original VID/PID, as they are the same board with limited additional software? Or should I figure out a different solution?

tulip sleet
ionic elk
#

What's an existing alias I could look at for reference, to suppress the CI error?

tulip sleet
devout jolt
ionic elk
#

Apparently, you register with circuitpython/tools/ci_check_duplicate_usb_vid_pid.py

manic glacierBOT
manic glacierBOT
#

It looks like you chose a couple of boards to enable this on because they were what you had on hand. Is that right? Ultimately, there could be many more, but we might just suggest that people do a rebuild themselves. I am not sure we want eventually dozens of boards with and without ROS.

Thanks for the review! I have lots of ESP32 boards but picked these two specifically because the DevkitC is a nice standard option for the ESP32S3 with lots of debugging options, and the Cardputer has so...

ionic elk
#

@tulip sleet this is thinking ahead a lil but micro-ros has a construct called a "service" which is basically a function callback requested over the network. Do you think it's feasible to call a user-created circuitpython function during a polling or wait loop that rclcpy creates?

manic glacierBOT
#

I am currently fighting with GPIO wakeup. It is really strange, only about one out of three times the pico will enter the off-state. It seems like there is a glitch that triggers wake up already a fraction of a second after the device powered down. And I have my GPIO hardwired to 3V3 so I cannot really understand why.

Some of the power manager registers do not reset on a power manager triggered reset. Calling powman_disable_all_wakeups() before setting up new alarm conditions for entry t...

manic glacierBOT
tulip sleet
manic glacierBOT
#

It is really time that I push my working tree.. I already have these calls in my code:

        powman_disable_all_wakeups();
        powman_timer_disable_alarm();
        powman_clear_alarm();

The strange thing is that the code works sometimes. My test program just blinks the LED a few times and then tries to power-down. If I just let it run, it takes a random number of boot-cycles until the power-down is successful.

manic glacierBOT
devout jolt
#

I'm trying to implement a driver for an SPI DAC (MCP4822) on rp2 that requires the per-sample bits to be shifted up in the word and other bits to be set per sample (for gain, channel, etc selection). I'm looking at rp2's I2SOut.c & PWMOut.c and both just set up the DMA to the output register and start it going. Is there a way to have a per-buffer callback be called so I can modify all the samples before DMA sends them out to SPI?

left mirage
#

Hi, curious if there is a port of circuitpython capable of building/running on the nRF24LU1+ microcontrollers (the ones used in logitech unifiy receivers)

devout jolt
manic glacierBOT
#

I resoldered it so all the sensor devices were run off the 3.3V output of the pico instead of the mpm3610 directly. Then I removed the wires from the pi4b server to the run pins of the respective picos and the ground wires; that was possibly causing a ground loop. Instead I have an additional usb cable from the pi4b server going to a "control pico" (like a custom debug probe) for each respective main weather station pico. The control pico ground is connected to the main pico ground to avoi...

manic glacierBOT
#

@bablokb You've probably already figured this out, but I'll mention it just in case: The SWD interacts with the operation of the RP2350's power sequencer and power manager in some undocumented ways. With debugprobe attached and openocd active, power manager registers CHIP_RESET and LAST_SWCORE_PWRUP (and likely some others) are affected after restart from an SWCORE power-down. I've found that it's safe to have debugprobe physically attached, but with openocd running things get weird.

manic glacierBOT
manic glacierBOT
atomic summit
#

Hiya folks - before I open an issue in github, I wanted to check if anyone has been seeing the old
RuntimeError: No pull up found on SDA or SCL; check your wiring
In 9.2.7/9.2.8 on the Espressif port? Specifically the ESP32-S3?

I get that every time I try to initialise the I2C using i2c = board.I2C()

The board has 10k pull-ups on SDA and SCL.

It even fails if I try to setup the bus directly

>>> i2c = busio.I2C(microcontroller.pin.GPIO9, microcontroller.pin.GPIO8)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: No pull up found on SDA or SCL; check your wiring

Same board works fine in Arduino and scanning finds the I2C device without issue (plus I can communicate with the device).
Scanning...
I2C device found at address 0x36 !
found 1 devices, done!

Is this a know issue? This is happening on a new unannounced board, but the board works in MP and Arduino/PIO... so not a HW issue.

Is there a way to disable that check?

devout jolt
atomic summit
devout jolt
atomic summit
#
Adafruit CircuitPython 9.2.8 on 2025-05-28; TinyS3 with ESP32S3
>>> 
>>> import board
>>> board.I2C()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: No pull up found on SDA or SCL; check your wiring
>>> 
#

There have been no CP changes to my boards for a long time.
If this is not a known issue, I'll keep hunting here before I raise an issue

devout jolt
atomic summit
#

Ok, I think I know what it is... 2x I2C devices on the board, both on the same I2C Bus. One powered up and one powered down. CP doesn't like that.

#

However the pullup check is doing it's thing, the power state of one of the devices is influencing it, which is shouldn't.

#

if I have the both powered, it works:

Adafruit CircuitPython 9.2.8 on 2025-05-28; TinyS3 with ESP32S3
>>> import board
>>> board.I2C()
<I2C>
>>> 
#

we really need a way to disable the pull-up check

#

if either are powered down, or both are powered down, it fails.

#

The fail should be the lack of initialising the peripheral, not a pull-up failure.

#

Thankfully I can work around this now I know what it is... but I feel like I'm being punished here for a valid HW design implementation 😉

devout jolt
# atomic summit Thankfully I can work around this now I know what it is... but I feel like I'm b...

I’m kinda surprised it works under Arduino. The pull-up check is just checking to see if either pin is pulled low. https://github.com/adafruit/circuitpython/blob/48891653e5ab0b6999f4d34bde6fd985dcbb9e77/ports/espressif/common-hal/busio/I2C.c#L62

GitHub

CircuitPython - a Python implementation for teaching coding with microcontrollers - adafruit/circuitpython

atomic summit
#

it's def working in Arduino. So can I disable CIRCUITPY_REQUIRE_I2C_PULLUPS in my firmware to get around this?

devout jolt
#

I think so

devout jolt
#

I wonder if the difference is that Arduino I2C drives SCL high on init while CircuitPython relies on the pull-ups, meaning the misbehaving device doesn’t mess up the bus

atomic summit
#

I'll do some extra digging when I'm back at work next week and report back, thanks for your help @devout jolt 🙂

manic glacierBOT
atomic summit
#

Hmm, I have another weird issue that I cant find anything about online... all of my boards I'm flashing CP 9.2.7 or 9.2.8 onto, via UF2, wont appear on my Mac running macOS 15.5 - they all appear as NO NAME in /Volumes and don't mount, BUT they all mount correctly plugged into my wife's Mac running macOS 14.x (can't remember which) and on my son's Win11 notebook.

#

But they will mount the UF2 drive if I push them into that on my Mac, but wont ever mount the CIRCUITPY drive.

#

I've now tried this on 11 boards (a mix of TinyS3, FeatherS3 and ProS3) and some with CP installed from my testjig (rPI) and some done manually on my Mac (erasing teh flash, flashing UF2, then mounting and copying over CP).

#

Initially I thought it was the "didn't format the partition properly, so the volume didn't get named" issues that we've seen in the past, but these boards all mount correctly on other machines.

#

Anyone here using macOS Sequoia 15.5 (24F74) that can confirm or refute there's a macOS issue?

jaunty juniper
thorny jay
#

It seems that the following message is in my discord buffer since last meeting:

Thank you @tulip sleet (and @crimson ferry) for the in the weed answer/idea (from last week?).

The network code I am working on only care about one interface, the "native" on that board, or AirLift or WizNet. And I think that order is the prefered one, so I can check in that order:

  • Does it have (try import) wifi? => use that
  • Does it have board.ESP_CS => try AirLift
  • Try WizNet else there is no networking anyway.
atomic summit
#

But at least now I know it's not just me.

#

And I only moved to 15.5 yesterday 😦 I think my Mac Studio at work is still 15.4.. maybe

jaunty juniper
#

somebody seemed to have an issue flashing in 15.5, but that was solved with redownloading the uf2 so it was seemingly unrelated

jaunty juniper
#

now I'm curious what it would look like on an oscilloscope to see why the test fails, but you probably have better things to do 🙂

atomic summit
#

Well, I'm at home, and it's a piublic holiday tomorrow, so home then as well, so can't get in front of a scope till mid week. If I remember, and have time I'll see what I can capture

manic glacierBOT
#

Ok, I tested it with another access point with completely different hardware (FRITZ!Repeater 1200 running OpenWRT), and the problem persists – if I use WPA2-PSK with optional PMF, I see a normal handshake in my logs:

Sun Jun  8 22:30:27 2025 daemon.info hostapd: phy0-ap1: STA de:ad:be:ef:c0:fe IEEE 802.11: authenticated
Sun Jun  8 22:30:27 2025 daemon.info hostapd: phy0-ap1: STA de:ad:be:ef:c0:fe IEEE 802.11: associated (aid 1)
Sun Jun  8 22:30:27 2025 daemon.notice hostapd: phy0-ap1:...
#

CircuitPython version and board name

Adafruit CircuitPython 9.2.8 on ESP32-S3
Adafruit CircuitPython 10.0.1 on ESP32-S3
Adafruit CircuitPython 9.0.2 on ESP32-S3

Code/REPL

# Board does not boot (aka does not get to the REPL)

Behavior

During power-on or reset, the LED on GPIO35 is active, but OLED does not activate, and REPL does not appear on USB/Serial port.

Serial terminal shows:

Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_R...
manic glacierBOT
#

Fixes #10407.

Changed the GPIO in board.c, which controls the rail for the OLED screen and I2C pull-ups. Also added RESET signal to busdisplay constructor.

Tested with two Heltec WiFi LoRa V3 boards. On power-up the OLED shows the CircuitPython REPL. Opening serial port shows boot getting past Serial console setup and into the REPL. I was able to upload libraries and run code via code.circuitpython.org.

manic glacierBOT
#

CircuitPython Board Configuration System

This system allows board configurations to be defined using a single board_setting.toml file,
which is then automatically converted into the required C and Makefile configurations.

File Structure

  • board_setting.toml - Main configuration file
  • generate_board_config.py - Generator script
  • test_board_config.py - Test script
  • board_template.toml - Template with all available options

Usage

  1. Create a `board_setting....
manic glacierBOT
#

This is an interesting idea: a single config file that is a board definition.

However, there are many cases in current board definitions that are not covered in the board definitions or the script to generate the board definition. As an example, there are no provisions for pin aliases, special naming conventions, etc. For example, all GPIO pins are named GPIO which is not always the case at all. Also, for example, board.I2C() is always included, even if there are no I2C pins.

The .m...

manic glacierBOT
#

Hi - this is merging from main to 9.2.x, which is causing an excessive number of commits.

Side comment, not related to the above: we suggest creating your own branch instead of using your main for changes, which causes your main to get out of sync with upstream main. See https://learn.adafruit.com/contribute-to-circuitpython-with-git-and-github/always-work-on-a-branch#create-your-new-branch-2992239

tulip sleet
manic glacierBOT
manic glacierBOT
#

Here are some ideas for how to fix:

  • Just make a new PR, specifying base main instead of 9.2.x.
  • After your PR is merged, clean up your main do a git reset --hard on your main to a commit before any of the changes you made on main. Then catch up your main to adafruit/main by doing git pull adafruit main (merging from upstream), or git fetch adafruit; git merge --ff-only adafruit/main. This assumes you've named the upstream git remote as adafruit (by default it is `up...
thorny jay
#

If the weekly meeting is today, I just added hug reports.
It seems that I have not done any CircuitPython in the last 6 days, I have not even implemented any of the suggested improvement to my "auto-detect" network python file.
Also no in the weeds question.

manic glacierBOT
tulip sleet
#

I'm working on a getting a working microphone. Be there in a minute or two

turbid radish
#

75% better

#

96% is great for me

#

lone axle
#
uncut nexus
#

sounds quite cool, foamyguy!

turbid radish
#

Thanks Dan!

lone axle
#

Thanks for hosting Dan! Have a great week folks.

tulip sleet
#

Here is the notes document for next Monday’s CircuitPython Weekly Meeting. It is at the normal time of 11am Pacific / 2pm US Eastern here on Discord. Add your hug reports and status updates to the document before the meeting. If you are unable to attend but would still like to contribute, feel free to add your notes and we’ll read them off during the meeting. Hope to see you there! <@&356864093652516868>
https://docs.google.com/document/d/1hl0zjeBqJOAb7zaFQRHPTIioSjKfkTWbpw1xtVEOyEo/edit?usp=sharing

manic glacierBOT
ionic elk
#

@tulip sleet Should I keep my ESP_LOGW calls, or toss them? Normally I'd maybe leave them as comments, with their associated messages in in case the module needs further in-depth debugging, but I want to adhere to expected style.

#

Also, were you saying that mp_raise_RuntimeError_varg(MP_ERROR_TEXT("ROS failure at line: %d"), __LINE__); will turn into a unique QSTR and not save space?

thorny jay
#

So the FruitJam with build-in C6 AirLift is like a PyPortalTV.
In my solar panel monitoring journey, I used Feather RP2350 + AirLift FeatherWing + HSTX2DVI to display exactly the same thing as on a PyPortal, with exactly the same 320x240 resolution.

Is there any FruitJam / Metro 2350 / Feather RP2350 code example that does more than 320x240, because the pixel are rather big on a "TV". It's ok to lose colors.

Also I was wondering if it was possible to use the "text" mode and do better there with pseudo graphic character, like in old Basic Home Computer. Or custom font.

I guess memory is the issue, in the good old days, computer had "sprites" to have moving objects, and that was not taking much space as there was no frame buffer, but the screen was render line by line based on sprite position. Of course this is far from displayio.

tiny peak
#

If you want to get fancier than that, you might look at using Arduino instead of CircuitPython

tulip sleet
ionic elk
#

I've deleted te ESP_LOGWs that occured during runtime, but I was more referring to the ones on errors that cannot be processed at runtime, in de-init and reset

thorny jay
# tiny peak To see what's currently possible for RP2350 DVI video output resolutions and col...

By the way I saw your color pallet Playgound page, thanks: https://adafruit-playground.com/u/SamBlenny/pages/fruit-jam-color-checker

I was hoping for example code, because the documentation is not so clear:
On RP2350, output resolution is either 640x480 or 720x400. Monochrome framebuffers (color_depth=1 or 2) must be full resolution. 4-bit color must also be full resolution. 8-bit color can be quarter, half or full resolution. 16-bit color and 32-bit color must be quarter or half resolution due to internal RAM limitations.

So I should be able to do 640x480 full resolution in 8-bit?
As oppose to all the example I see that are 320x240 with pixel doubling.

manic glacierBOT
#

I've discovered that rcl_node_fini has actually been returning some form of error code, but does not impact performance - subsequent runs of circuitpython and Micro-ROS proceed fine despite whatever's going on. Since it doesn't impact the functionality of the module I'm wondering if I can leave this for another PR? I've left the debug messages in there for now.

manic glacierBOT
#

Fixes #10407.

Changed the GPIO in board.c, which controls the rail for the OLED screen and I2C pull-ups. Also added RESET signal to busdisplay constructor.

Tested with two Heltec WiFi LoRa V3 boards. On power-up the OLED shows the CircuitPython REPL. Opening serial port shows boot getting past Serial console setup and into the REPL. I was able to upload libraries and run code via code.circuitpython.org.

(Resubmission of PR #10408, I targeted the wrong branch.)

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Add BUSIO Support for supported MAX32xxx devices. Not all capable MAX32 devices are supported yet; more support for MAX32650/MAX32666/MAX78002 boards may be added in a future PR. This module was tested on a MAX32690 board, the AD-APARD32690-SL. I used a ADT7140 I2C and MAX31723 SPI temperature sensor, and also tested the UART via the debug port serial connection.

  • BUSIO support added for MAX32 devices
  • Peripherals enumerated in peripherals/max32690 for MAX32690 MCU, including helper fu...
manic glacierBOT
#

@dhalbert Actually, port_malloc(size, true) doesn't seem to work here. I get a espidf.IDFError: Invalid argument in the constructor of PulseIn.

I know that the esp-idf rmt functions check whether the buffer is in internal ram and return this error when it is not, and I got the same error before I switched to heap_caps_malloc. I havn't checked whether the same is happening now, but thats my guess.

I noticed some funny looking logic in port_malloc for espressif: https://github...

manic glacierBOT
manic glacierBOT
#

Hello dhalbert,

yes you can :), my native language is German. I did the other translations with the help of deepl.

In addition, I checked whether the translation at the end resulted in the same word order as in English.

This is certainly not perfect, but I think it's a good compromise.

If the procedure is not correct, please let me know.

Thank you for your work and that of the community!

With kind regards
CrackXT

manic glacierBOT
#

CircuitPython version and board name

- CircuitPython 9.2.8 @ Qt Py M0 (similar performance on 9.2.7)
- CircuitPython 9.2.8 @ ItsyBitsy M4 (have not tried other versions)

Code/REPL

import time
import supervisor

class Foo:
    pass

class Bar:
    a = 1
    b = 2
    c = 3
    d = 4
    e = 5
    f = 6
    g = 7
    h = 8
    i = 9
    j = 10

foo = Foo()

bar = Bar()

arr = [1, 2, 3, 4, 5]

dct = {"a": 1, "b": 2, "c": 3}

def measure(label, value):
    now =...
manic glacierBOT
#

That would be a micropython core issue, but also dir is not really intended to be used outside of the REPL basically, so its performance doesn't seem to be relevant to me.

There are other reasons why you shouldn't use dir in scripts. Like the fact that it will evaluate properties, which could cause massive side effects, especially in Cicuitpython libraries where sensors often use computed properties that will cause an I2C transaction or something. Or raise "not implemented" exceptions th...

manic glacierBOT
#

I don't agree, since dir() allows you to write very compact, dynamic code. I use it often in the context of configurations: with dir I can check if e.g. a user-level module overrides settings in a say global default module. For single attributes, I tend to use hasattr() or getattr(), for multiple attributes dir() works better.

As @Neradoc points out, you have to take care and you should know what you are doing (or should I say diring).

If your code is time-critical, introspection...

manic glacierBOT
ionic elk
#

Getting a zephyr error, ERROR:__main__:autogen_board_info.toml is out of date., anyone know how to fix that?

#

it's in zephyr-cp, seems unrelated to my PR

ionic elk
#

The CI seems to skip zephyr-cp normally, maybe it's because I've added a new module to shared-bindings

onyx hinge
#

@ionic elk seems likely, that file appears to include a line for every module , = true or = false depending whether it's included. If that's accurate, then those files would all need to be regenerated if a new module is introduced.

#

The source file says this, but it didn't seem to show up in the build output: autogen_board_info.toml is missing or out of date. Please run `make BOARD={board}` locally and commit {autogen_board_info_fn}." I don't know whether you need a zephyr setup in order to do this successfully.

#

but probably

ionic elk
#

Having to have a local zephyr setup to add a module for a totally different port seems a bit onerous

#

I'll see what I can do but that seems like something that ought to be reworked

onyx hinge
#

@slender iron if you have a chance, maybe you can weigh in. are @ionic elk and I overlooking something, or is it necessary to install zephyr and build every zephyr board, just to add a line for a new shared-bindings module that is disabled on all zephyr boards?

tulip sleet
ionic elk
#

seems to have done it, but now there's random errors in the i.mx port

#

related to the USB core? error: unknown type name 'tuh_bus_info_t'; did you mean 'tuh_itf_info_t'?

#

I'm fairly confident that's an entirely unrelated infrastructure issue.

onyx hinge
#

@ionic elk if you look at the changes tab of your PR you can see that your PR modifies the tinyusb submodule. This often happens unintentionally. It could lead to the message you got. https://github.com/adafruit/circuitpython/pull/9955/files#diff-749a20dad23785e96fde6ded78481c711e4cdc1f60d8adde2ceb7404f7be7c0e

GitHub

This PR adds MicroROS as a board-specific option to the Espressif port. The Robot Operating System (ROS and successor ROS2) is kind of a misnomer: it is not an operating system, but it is a very co...

ionic elk
#

wait, no, it's not, I got a tinyUSB submodule update

#

oh yep ninjaed

#

yep must have snuck into a PR somehow

onyx hinge
#

it happens often enough that it feels like a git flaw, even though I don't know how it should be fixed. (for instance, "git commit -a" will do it, if you haven't been careful to "git submodule update" whenever switching branches)

ionic elk
#

nah I think this was me being lazy on literally the last commit I made

#

I didn't do a git status like an idiot

onyx hinge
#

for years I tried criticizing my colleagues when they made that mistake but it didn't work and also they hated me 😜

jaunty juniper
#

I made a shell alias st as a shortcut, sometimes I type it in chat boxes by mistake

ionic elk
manic glacierBOT
ionic elk
#

finally done!

manic glacierBOT
#

Currently, the addition of any new module to shared-bindings will cause a CI error on all boards in ports/zephyr-cp, even if the module is not enabled for any of those boards:

ERROR:__main__:autogen_board_info.toml is out of date.

This is because the autogenerated file autogen_board_info.toml lists every module in Circuitpython with their enabled/disabled status, but is not autogenerated during the CI process. Currently, fixing this issue requires either installing zephyr and ...

slender iron
manic glacierBOT
#

I should have spotted the issues above.

@CrackXT Could you fix the issues above, and look for similar issues? Thanks.

If you don't know a language that well or at all, then I think it might be better to leave the translations to humans. Once a translation is done, it's not likely to be audited by a human unless someone encounters the message, since the message will not be listed in weblate as needing translation. Computer terms in particular can vary a lot. A native speaker could use AI...

manic glacierBOT
#

Thanks for the Micropython context, I didn't think to look there.

I ran into this issue as a sort of a "reverse heisenbug" – I used dir() in a runtime print statement to debug an unrelated issue, and this added an ~80ms delay on samd21. Even though my code can tolerate some delays, that was too much, causing the code to break in a similar yet different way to what the original unrelated issue was. It's hard to debug issues caused by debugging methods.

The issue you mentioned with dir() ...

jaunty juniper
#

@tulip sleet I use en_US so I don't usually pay much attention to translations, but I could look more actively at new weblate PRs. I can also look at fixing the french on weblate

proven garnet
#

Reviewing this PR, it looks good but wanted to check about the change of no longer returning a location when there is no fix. The change itself seems reasonable, but I don't have a good sense of how much legacy code will need to be changed or updated, like Learn guides.

https://github.com/adafruit/Adafruit_CircuitPython_GPS/pull/115

GitHub

Changes parsing for RMC messages to that time values are still reported even if there is not a GPS fix. This is particularly relevant for GPS cards which have a battery included and maintain an RTC...

manic glacierBOT
tulip sleet
tulip sleet
manic glacierBOT
jaunty juniper
jaunty juniper
#

and I don't have enough German left in my brain to help with that (or latin, but we don't have a latin translation anyway, alea jacta est or something)

manic glacierBOT
#

Making a more complete note here that this PR has a known issue where Micro-ROS is unable to clean up the Node and Publisher objects without returning an internal error code. This doesn't currently inhibit the module in any known way, as it soft restarts and both creates and uses new objects of both types just fine, but I'm leaving in the associated catches and internal (ESP monitor) debug messages while investigate further. Since this occurs during soft-reboot, it's not practical to print th...

manic glacierBOT
hidden fulcrum
#

Hello,

I am a developer at Luftdaten.at.
We are using CircuitPython with the ESP32-S3 for our air quality sensors. For educational purposes and ease of use, we require WiFi Enterprise support in order to use these sensors at universities with eduroam.

Specifically, we need support for EAP-PEAP and EAP-TTLS authentication.
I would be willing to contribute this functionality to CircuitPython, and I would greatly appreciate a brief overview of the required steps to get started.

Lg, Nik Sauer

stuck elbow
thorny jay
tulip sleet
#

I believe MicroPython has already done some work on this, which may be helpful to look at. Their API is different, but the ESP-IDF-level code would presumably be similar.

mortal kernel
#

@tulip sleet While we're waiting for an official update from Pico SDK 2.1.1 to 2.1.2, I need to cherry-pick some PR's from the develop branch. A way to do this will be to create a branch circuitpython-2.1.1 in our forked repo from the 2.1.1 tag and cherry-pick to that. Alternatively, we could move to the upstream develop branch, but that will require updates to other libraries as well and entails some risk of other issues cropping up. We're currently using a branch force_inline_critical_section_2.1.1 in our forked repo that is based on upstream tag 2.1.1, so what I'm proposing is a variation of that with a more generic branch name, similar to what we do with ESP-IDF.

manic glacierBOT
tulip sleet
tulip sleet
# mortal kernel <@329766224093249548> While we're waiting for an official update from Pico SDK `...

I just looked at the commits in develop, which has a number of interesting changes. Which other libraries would we need to update? If we moved to a particular commit on develop, we could test against that. We will need to update the other libraries anyway at some point. It might be less work to use develop for now, since we are still doing alpha releases, and by the time we get to betas or final, 2.1.2 should be out.

#

I am just trying to save some work here. Of course, tracking down new bugs is also work.

mortal kernel
tulip sleet
#

and your power PR is held up because you need the 2.1.2 fixes? I just want to make sure I understand.

tulip sleet
mortal kernel
#

@tulip sleet Just back from my walk. I'm not sure about the lwip, mbedtls, and cyw43-driver inter-dependencies. I need the upstream power PR to get down to the 0.5 mA on deep sleep. There's also an LPOSC setting issue that's fixed on the develop branch, plus Scott's PR, plus my PR for the PICO_RP2040 and PICO_RP2350 macros. After thinking it over, I'd rather go with a circuitpython-2.1.1 branch in our forked repo that cherry-picks what we need, as I'd first proposed. We can move to the official 2.1.2 once it's released. That way we're not taking on a conversion that may or may not be complicated. No idea why 2.1.2 is delayed, but it has been a while. If you'd like to talk about it, give me a ping.

tulip sleet
manic glacierBOT
onyx hinge
#

@ionic elk @tulip sleet @slender iron late follow up: I've never installed/configured zephyr but running python ports/zephyr-cp/cptools/update_board_info.py from the top dir of circuitpython regenerated a bunch of files, possibly successfully. it added a bunch of = false lines, which surprises me a bit because I thought the code was checking whethere there was any change, including lines for disabled modules. but, I didn't check too closely what happens at CI time.

if these files can be generated so easily (less than 100ms here!) maybe they don't need to be committed after all. Is this used by zephyr or just for docs/shared_bindings_matrix.py ?

#

or my understanding is incomplete, more likely.

#

but I think that script might be the one tannewt meant is good for just adding the =false lines for new shared-modules

manic glacierBOT
#

Merges MicroPython v1.24.1 into CircuitPython.

  • A few error messages were changed to match the current MicroPython messages. MicroPython had changed some is not to isn't and similar several years ago, but we never picked up these changes. I previously thought we had kept the old messages deliberately, but now I think it was just an oversight. This reduces code differences in some upstream files, and removes some // CIRCUITPY-CHANGE annotations. In most cases, messages were changed d...
manic glacierBOT
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.0-alpha.6 on 2025-05-17; Adafruit Metro RP2350 with rp2350b

Code/REPL

Adafruit CircuitPython 10.0.0-alpha.6 on 2025-05-17; Adafruit Metro RP2350 with rp2350b
>>>
soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Traceback (most recent call last):
  File "code.py", line 25, in 
ValueError: SD_CS in use

Behavior

Guide [examp...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

I think the CircuitPython core may be initializing the SDCard automatically in the 10.x versions branch which is why it reports the pin is already in use.

It's worth trying to just start using the SDCard from your code at its mount point /sd/ as if it's already mounted to see if that works.

We do still need to update the guide though to make clear which versions have which behavior. And ideally try to update the examples with error handling to support both versions.

manic glacierBOT
manic glacierBOT
ionic elk
manic glacierBOT
tiny peak
#

Two part question for folks involved with RP2350 HSTX DVI stuff:

  1. Am I just imagining this, or was there some discussion of making an API thing that would give you a way to be sure of the exact picodvi video mode that's in use when code.py starts?
  2. Is there a plan for adding a picodvi.Framebuffer.color_depth property so that it's possible to detect the full video mode at runtime? (width and height properties are already present)

Context: It's currently not possible, as far as I can tell (10.0.0-alpha.x), to detect which video mode picodvi is in. So, you kinda need to always do a release_displays() and then create a new picodvi display at the start of code.py. That can get you into trouble with heap allocations.

#

Detecting width and height works fine, but it's also important to know about color_depth.

#

I was thinking of making a github issue with a feature request for adding an picodvi.Framebuffer.color_depth property, but I'm not sure if I've overlooked some existing way of managing the video mode.

manic glacierBOT
#

For RP2350 (Fruit Jam), there seems to be no way to check the current color depth of a picodvi.Framebuffer. Detecting width and height works fine, but that's not enough to determine the current video mode. If I understand correctly, it seems like adding a picodvi.Frambuffer.color_depth property would make it possible to detect the full video mode to decide if re-initializing the display is necessary. Context: a...

lone sandalBOT
lone sandalBOT
manic glacierBOT
manic glacierBOT
#

I ran into a related problem because of my assumptions.

in my settings.toml

MQTT_BROKER=mqtt.svc

I run

mqtt_broker = os.getenv("MQTT_BROKER")

and I get this error

ValueError: invalid syntax for integer with base 10

If I alter my settings.toml

MQTT_BROKER="mqtt.svc"

then it runs fine. I had assumed it would always return a string but it doesn't. I also assumed it was trying to make a float because it has a period in it, but that isn't a thi...

manic glacierBOT
manic glacierBOT
#

If we are completely disallowing ints then it's a breaking change that we need to document clearly with the mention that we only accept strings in our subset of toml (and that they need double quotes).
https://docs.circuitpython.org/en/latest/docs/environment.html#details-of-the-toml-language-subset

• The supported data types are string and integer
...
• Only integers supported by strtol. (no 0o, no 0b, no underscores 1_000, 011 is 9, not 11)

Alternatively we could still allow ...

#

I have no HW so I'm not able to test on HW, but under this PR the intent is that internal routines that get integers will continue to work as before.

It is only intended to change the os.getenv API so that it can no longer return integers (cpython compatibility) and will issue a better error message in the case that a non-quoted value is encountered with a key passed to os.getenv.

I'm not sure whether I'm in favor of this change myself, because as you say it ought to go through deprecat...

#

See
https://github.com/adafruit/circuitpython/pull/10422#issuecomment-2972938020:
from @Neradoc:

If we are completely disallowing ints then it's a breaking change that we need to document clearly with the mention that we only accept strings in our subset of toml (and that they need double quotes).
https://docs.circuitpython.org/en/latest/docs/environment.html#details-of-the-toml-language-subset

• The supported data types are string and integer
...
• Only integers supported by...
#

The fundamental problem, as we know, is that TOML provides multiple data types, and os.getenv() is only strings.

I see some different possibilities:

  1. Don't change the current non-CPython behavior.
  2. Error out when doing os.getenv() on a non-string value. This is #10422 as of now.
  3. Change os.getenv() to always return the value as a string. The user code can parse the string as appropriate.
  4. Add something like supervisor.get_setting(key) which will return a typed value consisten...
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.0-alpha.6-2-gc6e4d72cd3 on 2025-05-21; Pimoroni Pico Plus 2 W with rp2350b
(adafruit-circuitpython-pimoroni_pico_plus2w-en_US-20250521-main-PR10366-c6e4d72.uf2)

Code/REPL

`raspberrypi` `i2ctarget` code (only reads):

import board
from i2ctarget import I2CTarget

I2C_ADDRESS = 0x40

# Pico Plus 2 W
with I2CTarget(scl=board.GP5, sda=board.GP4, addresses=(I2C_ADDRESS,)) as device:
    while True:
...
manic glacierBOT
#

This more elaborate version runs fine on atmel-samd, and should(?) run on raspberrypi. Very large payloads, and CRC checking to verify that what's written is what's read.

atmel-samd i2ctarget (only reads):

<details>
<summary>code.py</summary>

import time
import binascii
import board
import busio
from i2ctarget import I2CTarget

I2C_ADDRESS = 0x40

# Feather M4 Express
with I2CTarget(scl=board.SCL, sda=board.SDA, addresses=(I2C_ADDRESS, 0x41)) as device:
    print(f"{time.mo...
manic glacierBOT
#

This PR expands the space available for the circuitpython firmware on non-USB Espressif boards: ESP32, ESP32-C2, C3, C6, and H2.

Non-USB boards that used to have CIRCUITPY_LEGACY_4MB_FLASH_LAYOUT = 1 no longer have that set. Their ota_0andota_1partitions are now combined into a singleota_0partition at the same location. Theiruser_fs` partition does not move.

Conversely, non-USB boards that did not have CIRCUITPY_LEGACY_4MB_FLASH_LAYOUT set now have `CIRCUITPY_4MB_F...

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
mortal kernel
#

@tulip sleet I'd like to go ahead with the merge now. OK with you?

tulip sleet
mortal kernel
#

I'll build after the merge to get a good look at what's happening with NLR. It's one of those things where I can guess what the build is doing, but actually examining a build with symbols in GDB tells the real story.

manic glacierBOT
#

udev rules got mangled udev rules are

ACTION=="add",   SUBSYSTEMS=="usb",KERNEL=="ttyACM[0-9]*"                           ,ATTRS{idVendor}=="239a",ATTRS{idProduct}=="8120",ATTRS{serial}=="E66141040383362E",OWNER="garberw",GROUP="garberw",MODE="0600",SYMLINK+="ttypicoi"
SUBSYSTEM=="tty",                       ATTRS{idVendor}=="239a",ATTRS{idProduct}=="8120",ATTRS{serial}=="E66141040383362E",OWNER="garberw",GROUP="garberw",MODE="0600",SYMLINK+="ttypicoi"

I tried adding ```time.sleep(8)`...

manic glacierBOT
#

Pretending to deep sleep until alarm, CTRL-C or file write.

@garberw This indicates that the issue is in "pretend" deep sleep, not in actual deep sleep. In "pretend" deep sleep you will not achieve any power savings. To enter real deep sleep, your board cannot be connected to USB. Have you tested with real deep sleep?

I'm adding this issue to my list of Pico sleep issues and will attempt to reproduce with script you've provided.

#

From the documentation (confused me a little):

If CircuitPython is connected to a host computer via USB or BLE the first time a deep sleep is requested, the connection will be maintained and the system will not go into deep sleep. This allows the user to interrupt an existing program with ctrl-C, and to edit the files in CIRCUITPY, which would not be possible in true deep sleep.

If CircuitPython goes into a true deep sleep, and USB or BLE is reconnected, the next deep sleep will still...

#

in my previous post ... there is something about how it crashes when reconnecting about the time it says "pretending to sleep";
I tried inserting a time.sleep(8) as the first line in the program to wait for the tty to connect. I think this helps to wait for it to connect before printing anything on the tty. Maybe I did not wait long enough (8 sec). With this modification it stayed working
longer but still eventually crashed.

Any help? is there a way to wait for the tty to be ready ...

mortal kernel
#

@tulip sleet I've verified that for Espressif builds for Xtensa and Risc-V cores that the native NLR implementations from Micropython are not used. Instead, both use Espressif's longjmp.

manic glacierBOT
#
[08:56:37.042] Waiting for tty device..
[08:56:48.055] Connected

The Waiting for tty device delay occurs while the udev rule for the /dev/picoi
(/media/picoi like /media/CIRCUITPYTHON usb flash drive) udev rule is recognizing the flash drive;
this is about the same time as the udev rule for the tty regognizes the tty;
this might be faster without the custom udev rule;
I need the udev rules because ther...

tulip sleet
manic glacierBOT
mortal kernel
#

One more thing, if we turned it on we'd get a regression for at least Xtensa cores!

lone axle
#

<@&356864093652516868> The weekly meeting is scheduled to occur today at the usual time 11am US Pacific / 2pm US Eastern. About 90 minutes from now. Feel free to add your hug reports and status updates to the notes doc https://docs.google.com/document/d/1hl0zjeBqJOAb7zaFQRHPTIioSjKfkTWbpw1xtVEOyEo/edit?usp=sharing. We look forward to hearing from everyone.

manic glacierBOT
manic glacierBOT
#

The whole purpose is to deep sleep to conserve power. I want to squeeze as much life out of my batteries as possible. The objective is to sleep for about 5 minutes, wake up, communicate over a socket for 15 to 20 seconds, then go back to sleep and repeat the cycle indefinitely. Not sure how VID/PID would help since I already have found the VID/PID and have the serial number and so on.

It is possible that the problem is just due to the fact that the test runs are done attached to a termina...

tulip sleet
tulip sleet
#

Thanks @lone axle !

lone axle
#

Thanks everyone, have a great week.

#

Here is the notes document for next Monday’s CircuitPython Weekly Meeting. It is at the normal time of 11am Pacific / 2pm US Eastern here on Discord. Add your hug reports and status updates to the document before the meeting. If you are unable to attend but would still like to contribute, feel free to add your notes and we’ll read them off during the meeting. Hope to see you there! <@&356864093652516868> https://docs.google.com/document/d/1hI6KHn3VmxD-cUztuCCBbLCvQCurP2DwukbjIUZbScU/edit?usp=sharing

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

You can use it to identify which board is which, and you won't need udev rules. Some related discussion about this is happening now here: #help-with-projects message, but it's a somewhat different use case.

You can use https://github.com/adafruit/Adafruit_Board_Toolkit, https://github.com/Neradoc/discotool, and maybe also pyserial to identify the boards. You can do this dynamically, instead of doing a static assignment via udev.

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 9.2.4 on 2025-01-29; Adafruit QT Py ESP32 PICO with ESP32
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.

Code/REPL

# SPDX-FileCopyrightText: 2023 Michał Pokusa
#
# SPDX-License-Identifier: Unlic...
manic glacierBOT
#

bought 8 TPL5100s;
run with
(1) no screen and only tio termnal
(2) instead of an 8 second delay before printing the first output to the tty use supervisor.runtime.serial_connected
(3) no udev rules (except default rules) using /dev/ttyACM1
failed. all runs so far have failed.
Tried it with usb tty data cable unplugged (real sleep). Has been running four hours stably. This is by virtue of the fact that my program no longer has any large bugs in it. But if it did ....

The "fake dee...

manic glacierBOT
#

Are there any dev boards with a screw terminal breakout e.g. same form factor as pico or otherwise that could solve all my problems?

@garberw: you could try one of these: https://github.com/bablokb/pcb-pico-power-switch.

I am not sure if this really solves all of your problems, but at least it will keep the battery drain low. Note that this shim is not better than the TPL5100 regarding power, but it has the correct form-factor and it allows programmed wake ups based on real (wall clock)...

manic glacierBOT
#

Update Adafruit Fruit Jam board to rev D. I'd like to get this in soon, for a 10.0.0-alpha.7 release. We can make further changes later, of course.

  • Adds ESP pins.
  • Updates I2S pins, which were swapped around.
  • Adds a board.UART(), which exposed on the pin header. It is also shared with the ESP32-C6 UART pins.

@ladyada I named the former NINA-FW "GPIO0" pin as board.ESP_IRQ. If you have another idea, we can change.

manic glacierBOT
manic glacierBOT
#
[adafruit/circuitpython] New tag created: 10.0.0-alpha.7
orchid basinBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
ionic elk
#

Is it worth it to make a new issue about adding message types to rclcpy or should I just chat about it in this thread if stuff comes up

tulip sleet
#

https://blog.adafruit.com/2025/06/17/circuitpython-10-0-0-alpha-7-released/

Highlights of this release

  • Update frozen modules.
  • Merge updates from MicroPython v1.24.1.
  • Espressif:
    • Expand the CircuitPython firmware partition on non-USB boards, allowing more space for features in the future.
    • Fix pulseio.PulseIn length limitation.
    • Initial implementation of MicroROS.
  • Nordic: reinitialize BLE properly after deep sleep.
  • Incorporate fixes from CircuitPython 9.2.8 and later:
    • Fix deque bug.
    • Fix I2S audio file read causing memory corruption.
    • Support "Spectra6" six-color e-ink displays.
    • Fix audiodelays.Delay when freq_shift=True.
    • Board fixes.
manic glacierBOT
#

Ok reloaded with 10.0.0-alpha.6
got this failure:

soft reboot

code.py output:
['class', 'name', 'Pin', 'Processor', 'ResetReason', 'RunMode', 'dict', 'cpu', 'delay_us', 'disable_interrupts', 'enable_interrupts', 'nvm', 'on_next_reset', 'pin', 'reset', 'watchdog']
['class', 'name', 'bases', 'dict', 'frequency', 'reset_reason', 'temperature', 'uid', 'voltage']
['class', 'frequency', 'reset_reason', 'temperature', 'uid', 'voltage']
240000000
None
Started develo...

tulip sleet
manic glacierBOT
#

Tested on Fruit Jam Rev B for switching between video modes (320, 240, 8) and (320, 240, 16). Looks good.

The color_depth property shows up as supervisor.runtime.display.framebuffer.color_depth:

Adafruit CircuitPython 10.0.0-alpha.7-1-g5a401d545e on 2025-06-17; Adafruit Fruit Jam with rp2350b
>>> import supervisor
>>> d = supervisor.runtime.display
>>> dir(d)
['__class__', 'auto_refresh', 'fill_row', 'framebuffer', 'height', 'refresh', 'root_group', 'rotation', 'show', 'width...
manic glacierBOT
#

Tested on Metro RP2350 (no PSRAM), and I got this:

Auto-reload is off.
Running in safe mode! Not running saved code.

You are in safe mode because:
CircuitPython core code crashed hard. Whoops!
Heap allocation when VM not running.
Please file an issue with your program at github.com/adafruit/circuitpython/issues.
Press reset to exit safe mode.

Press any key to enter the REPL. Use CTRL-D to reload.

This happens even when code.py is empty

manic glacierBOT
tiny peak
#

@lone axle color_depth detection PR works great on Metro RP2350 no PSRAM and Fruit Jam Rev B! 🎉 👍

lone axle
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

This is crude with misc html around so you'll have to overlook that. I was having problem figuring how to display it here.

/</
Type | Size | Path | Modified |  
-- | -- | -- | -- | --
📁 | 0 B | lib | 12/31/1999, 5:00:04 PM | ✏️ Rename | 🗑️ Delete |  
📁 | 0 B | sd | 12/31/1999, 5:00:02 PM | ✏️ Rename | 🗑️ Delete |  
📄 | 167 B | boot_out.txt | 12/31/1999, 5:00:08 PM | ✏️ Rename | 🗑️ Delete | 📝 Edit
📄 | 3.3 kB | code.py | 6/17/2025, 11:36:36 AM | ✏️ Rename | 🗑️ Delete | 📝 Edit
📄 | 100 B | setti...

manic glacierBOT
zinc walrus
#

I noticed a slightly confusing name collision in the Adafruit Learning System Guides.

There are two folders named CircuitPython_Logger with entirely different applications. The one under CircuitPython_Essentials demonstrates data logging to the file system, whereas the top level folder demonstrates debug logging to the various handler backends.

I don't know if those folder names are cast in stone due to inertia, but it's at least worth considering a different name for one of them.

zinc walrus
# jaunty juniper what is the issue ?

Words? Language? Disambiguation? Two separate examples for markedly different libraries and concepts sharing identical names in a beginner's learning guide?

I realize there are higher priorities, so if no one else is bothered, then neither am I.

jaunty juniper
#

to be clear, this repository is NOT a learning guide, it's a repository of files for learn.adafruit.com

thorny jay
willow totem
#

Looks like the circuitpython-stubs is still at alpha 4, not 7. Not sure but maybe something going on with releases @lone axle.
I used --upgrade --pre

lone axle
tulip sleet
# lone axle interesting, yeah it looks like no releases made it up to pypi since alpha.4. I ...

I was just going to ask you about this. I opened an issue, and confirmed it happened again with the alpha.7 release last night: https://github.com/adafruit/circuitpython/issues/10361 as mentioned, I think this might be due to https://github.com/adafruit/circuitpython/pull/10312. The error quoted in the issue is functionally the same as the failure last night: https://github.com/adafruit/circuitpython/pull/10312

#

I looked at this a bit and didn't see an obvious cause

jaunty juniper
#

like a specific enough code snippet

#

I found the guide that uses the CircuitPython_Logger directory by putting the directory name directly in the learn guide search. Works even better with a name like "Trash Panda" 😄

thorny jay
#

Yeah, that is what I had in mind too, the link is one way.
I try to not sneak in too much in the learn repo, as it is easy to be spoil on incoming guide or product.

manic glacierBOT
#

rclcpy is a new and very barebones implementation of the Robot Operating System (ROS) client library for Circuitpython. One of the more pressing features it is missing is message support - parts of a ROS network talk to each other using messages that have a specific type, from basic types such as strings and different sizes of int, to complex robot types like quaternions and pointclouds. rclcpy only supports one hardcoded type at present, the Int32, and will need more to become practicall...

manic glacierBOT
lone axle
# tulip sleet I was just going to ask you about this. I opened an issue, and confirmed it happ...

I've replicated the issue with extra stuff in the name inside a local container so I can start tinkering to try to fix it. #10312 I am not sure about. I'm not very familiar with build_board_info.py, at first look it seems to me that create_pr() is used only during the release process. I think make stubs itself is creating a tar.gz with that 'weird' name even if just run normally outside of the release action.

I'm not sure how it gets the filename it uses though. Perhaps something related to git describe and some new version of something with new behavior started being used.

tulip sleet
#

Somehow it's not picking up the release tag that is created during the release process, or it's creating a new tag instead of using the existing tag. But I don't know how. I think you are right about git describe.

lone axle
#

as an aside, I gave claude the docs task from the actions yml file and asked it to create a Dockerfile that would setup a suitable environment for testing. It had to fill in some gaps that we rely on other actions for, but did a good enough job.

#

I think the root cause is here: https://github.com/adafruit/circuitpython/blob/main/Makefile#L286 this is using python -msetuptools_scm to get a version number. When I run that command I get the full string which is now being put into the tar.gz files 10.0.0a8.dev3+g25132775c1. I will try to tweak it to omit the 3rd decimal and anything after.

manic glacierBOT
#

I think this should fix #10361

python -msetuptools_scm returns a full version string which seems to include some hex hashes and a dev number i.e. 10.0.0a8.dev3+g25132775c1.d20250618, but pypi does not like all of this being included in the name when we attempt to upload it for stubs release.

This change uses cut to omit the 3rd period and anything that follows it, so we end up with a value like 10.0.0a8 which matches how the versions used to be the last time this succeeded wi...

manic glacierBOT
manic glacierBOT
#

Started development server on http://192.168.4.235:5000
192.168.5.13 -- "GET /client" 438 -- "200 OK" 1236 -- 123506ms
192.168.5.13 -- "GET /client" 464 -- "200 OK" 1236 -- 13ms
192.168.5.13 -- "GET /client" 438 -- "200 OK" 1236 -- 13ms
192.168.5.13 -- "GET /connect-websocket" 511 -- "101 Switching Protocols" 149 -- 20ms
192.168.5.13 -- "GET /client" 438 -- "200 OK" 1236 -- 14ms
192.168.5.13 -- "GET /connect-websocket" 511 -- "101 Switching Protocols" 149 -- 21ms
192.168.5.13 -- "GET /client"...

zinc walrus
manic glacierBOT
#

I don't think this is the right fix. The stubs version error from the 10.0.0-alpha.7 release build is here:https://github.com/adafruit/circuitpython/actions/runs/15716969701/job/44296628261#step:13:42, and excerpted below.

Note that the version number is already 10.0.0a8.dev0, even though this is exactly 10.0.0-alpha.7. We haven't gotten to alpha.8 (a8) yet.

I think the new logic in #10312 (or maybe it's something else), is not converting the current tag properly. It would proba...

tulip sleet
#

@lone axle The weird thing about the stubs problem is that if you just do make stubs, it does the right thing:

$ make stubs
...
Successfully built circuitpython_stubs-10.0.0a7.tar.gz and circuitpython_stubs-10.0.0a7-py3-none-any.whl
lone axle
tulip sleet
#

did you git checkout 10.0.0-alpha.7?

#

tip of main is already past alpha.7

lone axle
#

No, I just cloned main and updated submodules

tulip sleet
#

yes, that would be a "dev" version. It's like the CI is not finding the tag, or it thinks there are commits beyond the tag, or maybe the build is just dirty for some reason so it generates a dev tag

#

try that checkout in the container

#

It's just the twine part that seems not to be working

#

maybe we should look inside the .tar.gz file and see what the version nams are

lone axle
#

the python command still outputs the dev stuff even after checking out alpha7

git checkout 10.0.0-alpha.7
...
HEAD is now at c5128a9902 Merge pull request #10430 from dhalbert/update-frozen-modules-2025-06-17
(venv_cp) root@85594a1475ba:/workspace# python -msetuptools_scm
10.0.0a8.dev0+gc5128a9902.d20250618

But make stubs does result in a clean name

Successfully built circuitpython_stubs-10.0.0a7.tar.gz and circuitpython_stubs-10.0.0a7-py3-none-any.whl
tulip sleet
#

I think that first thing is the key problem. so setuptools_scm is not figuring out the python version name properly.

#

is that how it used to be done when the alpha.4 release worked? Or mabye there was an update to setuptools_scm that broke things

#

inside the .tar.gz looks ok too

lone axle
tulip sleet
#

that is a long time ago. alpha.4 was May 4

lone axle
#

but there were successful alpha releases of stubs on pypi as late as may 4th

tulip sleet
#

is setuptools_scm pinned?

#

i dont' think so

lone axle
#

The version of python inside of the container was released shortly-ish after the most recent successful one

Python 3.12.3 (main, May 26 2025, 18:50:19) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
tulip sleet
#

not python, but setuptools_scm

#

locally I have

$ pip3 list |grep setuptools
setuptools                               75.8.0
setuptools-scm                           8.1.0
#

i will see if I can update both and then what happens

lone axle
#

I'm not entirely sure what setuptools_scm is or how it got installed honestly

tulip sleet
#

it's install by pip or pip3. it's part of the notoriously messy python release stuff. python release tooling is awful

lone axle
#

I do have a newer one inside the container

setuptools-scm                           8.3.1
tulip sleet
#

i just upgraded and am rebuilding stubs

#

just doing make check-stubs, it's still OK, but let me try the `python -msetuptools_scm you did before and after

#

what directory did you run that in

lone axle
#

Ah, I think I must have bungled something earlier when I had it output the dev+stuff

#

doing that again now and it's the clean version 10.0.0a7

#

I had some changes in my local copy for a moment that might have impacted it. But I am on alpha7 branch now and it does report the clean version

tulip sleet
#

but you did run python -msetup_tools_scm and it got a bad version

#
(.py) halbert@cod:~/repos/adafruit/circuitpython$ python -msetuptools_scm
10.0.0a7
#

hmm

manic glacierBOT
zinc walrus
# jaunty juniper I found the guide that uses the CircuitPython_Logger directory by putting the di...

I wasn't trying to burden you with minor name changes (I realize those directories and filenames are already embedded throughout the website), but thought I'd share my perfectionist observations here.

As for the Learn Guides, I've been programming since the Apple 2, and I'm typically fluent enough to prefer browsing the repo directly for quick syntax examples. For unfamiliar concepts like asyncio however, the elementary introduction articles are absolutely fantastic and greatly appreciated. Sincere thanks to all who contribute.

full plume
#

I have some CircuitPython licensing questions regarding a project (https://www.lumensalis.com/Projects/LCPF/) I'm releasing.

Here are some relevant details:

  • it is NOT an Open Source project
  • is free for use in personal projects, but the current license effectively prohibits everything else
  • this is probably temporary - my intent is to change to a dual-licensed model with the default being a generally permissive OpenSource(ish) license for everything EXCEPT commercial/for profit use, but that's later. For now consider it "free as in beer"
  • does provide complete and non-obfuscated source
  • built on (stock unmodified) CircuitPython
  • depends on various bits of the Adafruit CircuitPython library bundle
  • supports a variety of AdaFruit StemmaQT products

I obviously want to know about anything I'm doing that technically violates any licensing terms, but I also want to make sure none of it would violate the "spirit" of expectations for CircuitPython. I haven't seen anything along the lines of "don't use our terms unless you're using an OpenSource license", and CircuitPython uses the commercial-friendly MIT license, but still... I hope - but do NOT want to assume - that this is "acceptable"

Here are my specific questions:

#
  • Is it OK to use CircuitPython in the project name? (currently called the "Lumensalis CircuitPython Framework") I think it meets all the requirements for branding at https://docs.circuitpython.org/en/latest/README.html#branding except for being listed on circuitpython.org, but I'm guessing that is for hardware products (i,e. controller boards) wanting to use "CircuitPython" in their naming/etc.?
#
  • Is it OK to redistribute individual modules from the Adafruit CircuitPython library bundle? I'm creating a combined zip containing my own framework code and assets along with various dependencies from the bundle. Primary motivation is to streamline the "getting started" process - install the firmware (using, for example, https://circuitpython.org/board/lolin_s2_mini/), extract the contents of the distribution zip file to your CIRCUITPY drive, and you're all set - ready to start using it in your code.py.
#
  • Is it OK to incorporate elements from CircuitPython images/logos into a custom logo for my project?
jaunty juniper
#

my understanding is that if it's a fork you are not to use the name or logo, but I would actually email pt@adafruit.com for that kind of inquiry.

#

FYI if your plan is streamlining distribution, there are ways outside of CP to make a bin or UF2 that contains a pre-filled CIRCUITPY drive (depending on the targetted port)

full plume
#

I'm not too concerned about disappointing the hard core "software must be free" copy-left crowd that would consider even the MIT license "evil", but I certainly don't want to offend any of the major contributors/supporters of the CircuitPython project.

jaunty juniper
#

(so no zip required)

full plume
jaunty juniper
#

oh I see

full plume
full plume
jaunty juniper
#

yeah that's not my domain, it seems like it should be fine, but I would email pt to ask if you are unsure

full plume
#

One of the biggest hurdles for a technophobe is getting the board set up the first time - i.e. before it has a UF2 friendly bootloader installed. The web-based process on circuitpython.org/downloads isn't as simple as I'd like for the kind of users I'm trying to support. OTOH it really is a pretty impressive system, and I think it's almost as simple as it can be given what it's trying to do.

jaunty juniper
#

I wrote discotool manager to make a UI for installing and updating libraries, the alternatives being circup (command line) and the vscode extension, but it doesn't handle installing Circuitpython itself. I'm not really actively adding features to it currently. Thonny does that for Micropython I believe...

full plume
#

There are only a few things I can think of that would make it less intimidating. Of course they'd also make it less flexible, which I suspect would not be a welcome tradeoff for most CircuitPython users.

full plume
jaunty juniper
#

oh yeah it does esptool too, nice

full plume
#

My ideal would be a simple button/ link (per finite set of board types) on my website, i.e. "Install on a LolinS2 Mini", that steps them through the hardware-specific side of the process (i.e. restarting in flash update mode, selecting your USB port) and takes care of everything else without giving them any unnecessary (for the very specific use case of my framework) choices. The current process has about a dozen steps. https://www.lumensalis.com/Projects/LCPF/LCPFDocs/Controllers/LolinS2Mini/

full plume
#

If you could "pre select" things, like

  • Full Circuit Python install of a specific version
  • yes we're overwriting everything
  • ideally figure out the appropriate drive once the bin level UF2 loader is installed, and again after the UF2 image is updated
  • before/after labels can change and be board specific, BUT the "preselect" config would also be board specific, so for example it would know to look for "S2MINIBOOT" when updating the UF2 and "CIRCUITPY" for the rest (adding extra libs, wifi-credentials, etc.)
  • if you can actually get at drive labels from a browser...
    and add additional board-specific "help" details - with pictures or maybe even video - on the exact start steps, you could have a significantly less intimidating process.
#

Just an FYI, this is a rather unique project which is OBSESSIVELY focused on being non-programmer-friendly as the top priority, with everything else like performance and ease of extending (vs using) the framework in a distant second place at best. It is very architecturally opinionated/biased towards that focus, and actually does a few things I consider bad practice outside of it.

tulip sleet
full plume
#

It's almost reducing Python to a DSL for configuring what hardware you have, and what behaviors you want. Ideally there's no "traditional" imperative lower level programming - and by "low level" I mean things like "set this LED to blue", "set this servo to 30 degrees", "is this switch closed" ...
I already have all this mostly functioning, but whether it will be as accessible and intuitive as I'm hoping for non-programmers reamains to be seen.

full plume
# tulip sleet How well does the OPEN INSTALLER button on <https://circuitpython.org/board/loli...

For me personally it works great. For the rather narrow focus of the LCPF project, I'd prefer something with fewer options - guardrails and training wheels - to make it less intimidating. But I really wouldn't consider building that myself - it's not a simple problem and the OPEN INSTALLER already deals with the worst parts. Even thought I could reinvent that wheel, I sure wouldn't want to maintain it.

However, if my project takes off, and the source for all the OPEN INSTALLER plumbing is available, I might someday consider building a general extension on top of OPEN INSTALLER to allow for a tightly scripted "beginner mode" installs similar to what I described above. IMHO it would make a lot more sense as an enhancement for OPEN INSTALLER in general than some forked hack.

All that said, the "getting started" guide for my project is currently based on walking them through the process using OPEN INSTALLER on circuitpython.org, which is a major improvement over requiring them to, say, install the Arduino IDE or VSCode or heaven forbid esptool just to get the firmware loaded. In terms of making it as easy as possible, this is still something I'd like to improve, but it's "close enough" to be a ways down the priority list compared to other things I want to simplify.

tulip sleet
#

got it -- I misunderstood where your project fit in the initial setup workflow

full plume
#

yeah, if I could point people to the right controllers with an appropriate verrion of CircuitPython preloaded, that would sidestep most of this. Unfortunately the "right" controllers - at least initially - need to be ESP32 variants with UF2 and CircuitPython support AND be pin compatible with the Wemos D1 Mini layout. Unfortunately, AFAIK Adafruit doesn't make anything like that (D1 Mini compatible), and I haven't seen any others with CircuitPython - or even UF2 support - preinstalled (although some come wtih MicroPython, but not UF2).

tulip sleet
manic glacierBOT
full plume
#

One other major bugbear is NeoPixels/WS21812s. I've been using and abusing them with glee for a long time, but a lot of the people I want to "enable" find soldering about as intimidating as programming. I'd love to find a source for varied (single/stick/matrix/ring) NeoPixels with small pigtail connectors preinstalled. You can sometimes find them (especially flex strips) with the JST 3 pin 2.54 pitch connectors, but those are a bit bulky. I've used 3pin JST1.25 for years , but that's not something my "target customer" will be exited about soldering to a PCB. (OTOH, for my own projects I've hand-soldered 2020 SMDS: https://www.adafruit.com/product/4684)

tulip sleet
#

a general solution to this would be a solderless header pin. There are those hammer ones, but I don't know of single-pin solderless solutions.

full plume
tulip sleet
#

i think you still need a jig and a tool of some kind. maybe a dowel is good enough

#

why is the Wemos D1 the "standard" in this case

#

this is getting out of circuitpyton-dev relevance

#

I think you could drill a hole in a dowel to make a tool to mount these

full plume
# tulip sleet https://www.digikey.com/en/product-highlight/m/millmax/press-fit-pcb-pins-for-pl...

I'd love to keep this conversation going - this is an issue I've been chewing on for many years - although maybe in another channel? I'm actually somewhat surprised that I'm not seeing a NeoPixel / adressable RGB specific channel here. I do have one on the Lumensalis discord ( https://discord.com/channels/880111998455672942/1376955862941306990 ) although its new and hasn't had much (cough ANY cough) traffic yet

tulip sleet
manic glacierBOT
#

I think we are going to need this change inside of RTD config inside of libraries as well.

The library github actions docs build are centralized in the workflows repo and are already set to 3.12, but the RTD ones are individual in each repo and are set to 3 currently. i.e. https://github.com/adafruit/Adafruit_CircuitPython_Display_Text/blob/7d1f187aac8e899e791324cc78633bf4f32c984b/.readthedocs.yaml#L17

I will try to validate this and work on a patch for adabot if this is the case.

lone axle
#

@full otter maybe hold off on the RTD config change if you want. I'm following a lead on another way to resolve this issue that hopefully won't require changing the config

manic glacierBOT
#

@dhalbert this is an alternative solution I think: https://github.com/adafruit/Adafruit_Blinka/pull/977

I didn't know that requirements.txt could contain conditions on python versions like this, but found other usages of that in blinkas requirements file.

That change seems to allow the adafruit-blinka install to succeed under py3.13, without needing lgpio. I think it should still be able to complete a docs build like this but am still in the process of testing that.

full otter
lone axle
manic glacierBOT
#

Merge MicroPython v1.25.0 into CircuitPython.

  • Remove extmod/virtpin.*: not used in CircuitPython.
  • Change some #if defined(FOO) && FOO changes we made back to just #if FOO, and define those cpp macros elsewhere if necessary. This reduces code differences.

Initial simple smoke testing: SAMD21, SAMD51, ESP32-S3 (wifitest), RP2040.

I'll make it not a draft once the build is successful.

manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.0-alpha.7 on 2025-06-17; Raspberry Pi Pico W with rp2040
Board ID:raspberry_pi_pico_w
UID:E6614103E719A637
MAC:28:CD:C1:00:6B:08

Code/REPL

No code that works or gives an error that can be referenced.
Windows sees it.  CP has no reference to it I can find.

Behavior

USB drive created that is not addressable or manageable by CP.

Description

10.0.0 a-7 defines a second USB drive on ...

full plume
#

Is there any specific reason CircuitPython doesn't provide/support importlib beyond keeping the firmware size little smaller? It appears that it is supported in micropython.

full plume
#

I have some workflow patterns I've used with python systems that depend on reloading. The 'auto-restart' on writes to the CIRCUITPY drive provide a similar benefit which has been "good enough" (actually better in some ways) to keep me from digging into this earlier, but I'm starting to miss some of the things it doesn't do. Specifically, reloading modules on the fly without restarting the application. Probably not something your average CircuitPython (or even Python in general) developer should be fiddling with - beyond trivial scenarios it often causes more trouble than its worth unless you fully understand the implications and use some specific patterns to keep code "reload friendly". But if you set things up properly, there are some cases in which it can provide a vast improvement in workflow efficiency.

full plume
#

It looks like I might be able to recreate enough of my reload patterns by using __import__, but I'm not positive if that will be enough. I haven't messed with anything at that level (i.e. without using importlib) in Python 3.x. And it looks like CircuitPython does support import...

spare jacinth
#

anyway, what are you trying to do? might be possible in a few lines of custom code; just like you already did for reloading a module, by removing it from sys.modules

full plume
full plume
jaunty juniper
#

note that you can reload with supervisor.reload(), save some data between reloads in alarm.sleep_memory if available (we don't have a clean mechanism for that otherwise without using flash), and use supervisor.set_next_code_file before it to reload with a different main script

full plume
#

I'm looking for python-style reload of a module without restarting

#

It's not as generally useful, bit it can make your workflow much more efficient in a few cases

jaunty juniper
#

ah it's more for dev workflow, not for use in the final running code ?

full plume
#

(although at least it's much less likely to cause any permanent damage)

#

(assuming you're not doing it in a live algorithmic trading application running at the hedge fund you're working for)

manic glacierBOT
full plume
#

the specific current use case is working on some logic for fancy multi-LED patterns . Being able to update the logic with minor tweaks while it's running. Having to restart every time, even if it only takes five seconds to get back to where the pattern is running again, can make it harder to maintain momentum. To be fair, I didn't realize it was only (actually a little less than) five seconds to restart - felt a lot longer (although that may be because I recently turned WiFi off which can add quite a bit of time to a restart).

manic glacierBOT
jaunty juniper
#

having web workflow on can help as it auto connects and maintains the wifi connection between reloads

#

I don't remember what board, not on non-native wifi

full plume
#

I'm primarily editing module/library code which might be a bit challenging for the web workflow. Although it could probably replace what I'm doing with Thonny - that's where I access the USB REPL/console out but the only file I open is code.py (which almost never get's touched).

jaunty juniper
#

I'm not saying to use it, you can have it enabled and use USB

#

the web workflow is agnostic to what files you are editing, it all works the same, it's a just a file name

full plume
#

There's a lot of supporting stuff in my project that doesn't end up on the CIRCUITPY drive (including docs, all the .git bits, ...). I've got hooks in VS Code detecting any writes to the module/library source and then copies them to the CIRCUITPY drive. I'm a bit skittish about doing library development with git on a USB drive.

#

Not to mention all the fancy back end "helpful" bits in VSCode python extensions for auto-complete, syntax checking, etc will probably be much happier with source on an SSD

jaunty juniper
#

that makes sense

#

I'm waiting for someone to write a sync script that uses wwshell (which is part of circup)

full plume
#

yeah, so far my libraries have about 6500 lines across 121 python files

full plume
#

my approach so far is rather... primitive, but it's simple and it works. But only for CircuitPython 9.x, so I'll need something better soon.

tiny peak
#

all of my recent Playground guides use that setup: one Makefile target builds a project bundle zip file, and a second rule does the rsync.

full plume
#

looks like wwshell is related to the BLE workflow (Bluetooth) so it would work in scenarios where you don't have a CIRCUITPY drive available

jaunty juniper
#

wwshell is a file client for the web workflow (hence the ww part)

full plume
# full plume I might take a crack at that after I start using circup

If you're using VSCode, I think the approach I'm using wouldn't be hard to adapt. Same detection logic to catch when the file changes, then you'd simply use wwshell (assuming there's a CLI or better yet can import it into a python script) to send the file instead of copying it to the CIRCUITPY drive

#
import sys, shutil, os.path
print( f"args = {sys.argv}" )

targetDir = "D:\\lib"
submoduleDir = 'lumensaliscplib\\lib'

def syncFile():

    def writeLog( s:str ): print( s )
    
    filename = sys.argv[1]
    if not filename.startswith(submoduleDir):
        writeLog( f"skipping {filename}, not in {submoduleDir}" )
        return
    inLibFilename = filename[len(submoduleDir)+1:]
    target = os.path.join( targetDir,inLibFilename )
    writeLog( f"updating {filename} to {target}" )
    shutil.copy( filename, target )


if __name__ == "__main__":
    syncFile()
#

pretty simple

#

then add this under "settings" in the code-workspace file

#
            "commands": [
                {
                    "match": "lumensaliscplib.*\\.py",
                    "cmd": "echo runOnSave matched ${relativeFile}"
                },
                {
                    "match": "lumensaliscplib.*\\.py",
                    "cmd": "python  ${workspaceFolder}\\devOps\\fileSaveSync.py  ${relativeFile}"
                }
            ]
        },```
#

(adjusting for your directory structure)

#

it's a hack, but it actually works quite well most of the time

#

there's plenty of ways it could be improved, but that should be all you need if you're comfortable fiddling with VSCode under the hoods

#

however, I wonder how many people using CircuitPython are actually using git or working with more than a handful of their own source files ?

lone sandalBOT
onyx hinge
#

Hello from Oslo!

tulip sleet
#

lovely!

manic glacierBOT
tulip sleet
manic glacierBOT
lone axle
tulip sleet
lone axle
#

Thanks for hosting Dan! Have a great week everyone!

#

note, that issue was created 1/14, so it is not related to current issues with Blinka. But it was on A64-OLinuXino by Olimex device which I wasn't familiar with.

tulip sleet
#

Here is the notes document for next Monday’s CircuitPython Weekly Meeting (June 30). 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/177RrtFUmsky3b2Wjl8vVRVqceU6LJavFfWSm2krT_TQ/edit?usp=sharing

proven garnet
#

I'll check out the meeting when it's uploaded, thanks Dan and all!

proven garnet
#

@lone axle @tulip sleet Catching up now!

Ah, I can provide some context about requirements.txt being dynamic - I believe it's because you could theoretically change that at install time and install requirements "dynamically" whereas the list in pyproject.toml is truly part of the file. A good example would be Blinka, where you can analyze the system at install time and see that if you're on a Raspberry Pi that you should write some other additional libraries to a file. It's dynamic compared to that (and is likewise called such in pyproject.toml when you use the requirements.txt file.

But you are entirely right, it's not much different that what we have today effectively.

#

I do agree that having the dependencies in their own file is extrememly readable. I think I could automate it to be equally legible but definitely admit that is a downside of moving away from it.

#

I think I'd also end up defining the documatation and optional requirements in pyproject.toml as well, which is possibile and wouldn't change the way its done for optional now from the user's perspective (pip install library[optional])

jaunty juniper
#

how would you write requirements.txt dynamically when using pyproject.toml ? is there a way to make it run a script ?

proven garnet
#

Also, thanks for bringing up the projects like the screenshot one. I also see @jaunty juniper typing so I'd want to make sure circup doesn't break.

proven garnet
jaunty juniper
#

oh ok I see what you mean

proven garnet
#

So they would still be defined ahead of time like they are now, just housed in a different file

lone axle
proven garnet
#

You COULD define a "circup" option similar to "dev" or "optional", but that is a hack, and if someone tries to do a now valid pip install library[circup] then pip will throw a fit and it probably wouldn't be clear to the user what went wrong.

#

I'll add it as an issue to the bundle as suggested, and see if I can scope out any unintended consequences to guides or other projects, thanks!

lone axle
#

Sounds good, thank you!

proven garnet
#

As I catchup live, my apologies for my attrocious grammar - it didn't help that I wrote these last minute

#

After a quick look, I'm not sure if it was tied to the other issues with Blinka based on the board that was used. Still, I also agree with the sentiment regarding the second issue - I do think it's really a botched install of Blinka. I think it's just more unfortunate that the mechanism for trying to announce the issue is getting unintentionally silenced.

#

I also agree that patching is probably overkill, especially if it's not widespread and downloading the missing library fixes the issues as @lone axle says

#

Thank you!

manic glacierBOT
#

The W55RP20-EVB-Pico is an evaluation board for the W55RP20, a SiP (System in Package) chip that integrates the W5500 (wired TCP/IP controller) and the RP2040. As a result, both the features of the Raspberry Pi Pico and the W5500 can be utilized.

The W55RP20 features two identical PIO (Programmable Input/Output) blocks, one of which is used for communication with the W5500. For more detailed information on PIO, please refer to section 3 "PIO" in the RP2040 datasheet.

This PR adds initia...

manic glacierBOT
#

firmware-waveshare_rp2350_zero-9.2.x-host.uf2

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 main or against (if it exists) the branch for the current stable release or an upcoming minor release. The branch will be named i.j.x, for example, 9.2.x. Bug fixes and minor enhanceme...
lone axle
#

I am trying to add a property getter to a class in the core. I basically copied one from another class and tried to change the relavent names and things for the intended use. The code compiles, but trying to access and print the property results in <bound method>. If I add parenthesis to call it as a function instead of access as a property it returns the expected value. I'm sure there is something relatively simple wrong with the declaration but I have been unable to spot it. Is anyone able to tell what is making it only work as a function instead of a property?

static mp_obj_t terminalio_terminal_obj_get_cursor_y(mp_obj_t self_in) {
  terminalio_terminal_obj_t *self = MP_OBJ_TO_PTR(self_in);
  return MP_OBJ_NEW_SMALL_INT(common_hal_terminalio_terminal_get_cursor_y(self));
}
MP_DEFINE_CONST_FUN_OBJ_1(terminalio_terminal_get_cursor_y_obj, terminalio_terminal_obj_get_cursor_y);

MP_PROPERTY_GETTER(terminalio_terminal_cursor_y_obj,
    (mp_obj_t)&terminalio_terminal_get_cursor_y_obj);
// ...
// ... locals dict:
{ MP_ROM_QSTR(MP_QSTR_cursor_y), MP_ROM_PTR(&terminalio_terminal_get_cursor_y_obj) },
#

at first it seemed to me like the issue is the "get" in terminalio_terminal_get_cursor_y_obj at the bottom in the locals dict. Looking closer at the unrelated property that I copied from it doesn't have "get" in that variable/address ref. I tried removing that so the code matches more closely the one this was copied from, but then cursor_y is not available at all on the object as a function or a property.

tulip sleet
#

change the third arg in MP_DEFINE_CONST_OBJ_TYPE (at the very end of the file) from MP_TYPE_FLAG_ITER_IS_ITERNEXT, to MP_TYPE_FLAG_ITER_IS_ITERNEXT | MP_TYPE_FLAG_HAS_SPECIAL_ACCESSORS,

lone axle
#

Thank you! that did it 🎉

manic glacierBOT
#

Terminal already has these values internally, this change exposes them to python.

My intention is to utilize these with a custom wrapper of Terminal class that adds support for ANSI color escapes. Having access to the cursor position makes it easy to know where in the TileGrid the colors need to get changed when an escape code is encountered.

If this overflows builds one option is try to make these available only if the tilepalettemapper module is enabled if that's possible. It's turn...

manic glacierBOT
#

Thanks for adding these new boards.

We don't put board- or port-specific stuff in shared-bindings. The idea of shared-bindings is that the Python API is common across all the ports that implement it.

Instead, put the port-specific stuff in ports/raspberrypi/bindings. There are already some RP2xxx-specific things there, which you can use as models.

In this case, it would make sense to create a new module, called, say piospi with a class piospi.SPI(). The you can have a flag,...

manic glacierBOT
manic glacierBOT
orchid basinBOT
manic glacierBOT
#

While looking into something else I found some libraries that have usages of pre 7.x OnDiskBitmap API that required opening the file before creating the ODB instance. I created this issue for the place I found it: https://github.com/adafruit/Adafruit_CircuitPython_SSD1680/issues/34 and haven't searched for more in other libraries / learn code yet but do intend to.

In the ODB docs https://docs.circuitpython.org/en/latest/shared-bindings/displayio/index.html#displayio.OnDiskBitmap it mentions...

manic glacierBOT
#

https://github.com/adafruit/Adafruit_Learning_System_Guides/issues/3067 reported some malformed JSON in a config file used by the EZ Make oven project.

While looking into this I realized that the incorrect JSON didn't cause the code to stop working and led to the realization that JSON parsing seems to be more forgiving at least in the case of a missing comma between child list items

For comparison here is a simplified reproducer, there is a missing comma between [2,3] and the [1,2] tha...

winged oyster
#

Dear all, I am new to Discord and to Adafruit #circuitpython-dev. I am directed to this channel by the CircuitPython compiling error to seek help. I have search this channel for 9.2.8 build error support and found nothing specific to the topic. Would I be able to ask for help here with building circuitpython 9.2.8 on local machine? I have used Adafruit's learning guide on "Building CircuitPython" by Dan Halbert and had no problem building and using version 9.2.7 and 10.0.0-alph.2 for ESP32_S3. I recently pulled to update my local clone to release 9.2.8 and 10.0.0-alpha.7. I used git checkout to 9.2.8 and used the same learning guide to guide my build. This time, however, I run into an esp-idf ble_store.h error. Has anyone encounter this error?

manic glacierBOT
#

Fleshing out this issue for posterity.

I replicated this problem today when building on WSL2/Ubuntu. For whatever reason, I'm getting timeout errors from github trying to run make fetch-submodules-port. The errors when running the build look similar to this:

fatal: unable to access 'https://github.com/georgerobotics/cyw43-driver/': SSL connection timeout
fatal: could not fetch 348725336b51b158b7eaca8bd53113555cfa6093 from promisor remote
fatal: Unable to checkout 'c1075d4bc440422cf2b...
lone axle
winged oyster
#

Yes, certainly. Thank you for helping! I didn't know if this is the right channel to seek help on this topic so I did not include the full error output in the previous message. This is the error: -- Build files have been written to: /home/user/Adafruit/CircuitPython/ports/espressif/build-waveshare_esp32_s3_touch_lcd_2/esp-idf
QSTR updated
GEN build-waveshare_esp32_s3_touch_lcd_2/genhdr/qstrdefs.generated.h
Module registrations updated
GEN build-waveshare_esp32_s3_touch_lcd_2/genhdr/moduledefs.h
Root pointer registrations updated
GEN build-waveshare_esp32_s3_touch_lcd_2/genhdr/root_pointers.h
In file included from esp-idf/components/bt/host/nimble/nimble/porting/nimble/include/syscfg/syscfg.h:9,
from esp-idf/components/bt/host/nimble/nimble/nimble/include/nimble/ble.h:25,
from esp-idf/components/bt/host/nimble/nimble/nimble/host/include/host/ble_gatt.h:31,
from ./common-hal/_bleio/Service.h:15,
from ./common-hal/_bleio/Connection.h:18,
from ../../shared-bindings/_bleio/Connection.h:11,
from ./common-hal/_bleio/Adapter.h:14,
from ../../shared-bindings/_bleio/Adapter.h:12,
from ../../shared-bindings/_bleio/init.h:14,
from ../../main.c:60:
esp-idf/components/bt/host/nimble/nimble/nimble/host/include/host/ble_store.h:145:18: error: 'MYNEWT_VAL_BLE_GATT_CSFC_SIZE' undeclared here (not in a function); did you mean 'MYNEWT_VAL_BLE_GATT_CACHING'?
145 | uint8_t csfc[MYNEWT_VAL(BLE_GATT_CSFC_SIZE)];
| ^~~~~~~~~~
-e See https://learn.adafruit.com/building-circuitpython; Adafruit Discord #circuitpython-dev
make: *** [../../py/mkrules.mk:93: build-waveshare_esp32_s3_touch_lcd_2/main.o] Error 1

lone axle
#

it looks like some of the requirements it's expecting to find aren't present

orchid basinBOT
manic glacierBOT
manic glacierBOT
orchid basinBOT
#

I'm changing where to find the Espressif .bin bootloader files. They used to all be at the top-level of the S3 directory, like

s3://adafruit-circuit-python/bootloaders/esp32/tinyuf2-adafruit_feather_esp32s3-0.32.0.zip

and now I want them to be in board-specific subdirectories, to be more organized:

s3://adafruit-circuit-python/bootloaders/esp32/adafruit_feather_esp32s3/tinyuf2-adafruit_feather_esp32s3-0.32.0.zip

I've already done this "by hand" for the existing files, ...

manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.0-alpha.7 on 2025-06-17; Adafruit Metro RP2350 with rp2350b
Board ID:adafruit_metro_rp2350
UID:030FA9DAE6154C9A

Code/REPL

# SPDX-FileCopyrightText: 2025 Anne Barela for Adafruit Industries
#
# SPDX-License-Identifier: MIT

import supervisor
from displayio import Group, TileGrid, Palette, Bitmap
from adafruit_bitmap_font import bitmap_font
from adafruit_display_text import label
from adafruit_fr...
manic glacierBOT
winged oyster
# lone axle it looks like some of the requirements it's expecting to find aren't present

Yes, I did esp-idf install and export according to the steps outlined in the build guides: https://learn.adafruit.com/building-circuitpython and the espressif-build https://learn.adafruit.com/building-circuitpython;.

Before posting for help, I completely rebuilt everything twice from scratch—starting with a fresh git clone of the main branch and attempting to build for the Adafruit Feather ESP32-S3 boards. The error message remained the same in Adafruit and Waveshare S3 boards.

Based on your insight that the error likely points to a missing build requirement, I’ll focus more closely on verifying the requirements during my next clean rebuild. Thanks!

How to build CircuitPython yourself on different platforms

devout jolt
# winged oyster Yes, I did esp-idf install and export according to the steps outlined in the bui...

If it helps, these are the exact commands I used just now on MacOS to build CircuitPython for ESP32:

git clone  https://github.com/adafruit/circuitpython.git
cd circuitpython
make fetch-tags
pip3 install --upgrade -r requirements-dev.txt
cd ports/espressif
make fetch-port-submodules
./esp-idf/install.sh
. ./esp-idf/export.sh
# we're now running different python so:
pip3 install -r ../../requirements-dev.txt
make BOARD=adafruit_feather_esp32s2
manic glacierBOT
#

Thank you for your detailed explanation.
I was also wondering whether it would be appropriate to put Wiznet-specific code under shared-bindings, so your clarification is very helpful.

Thank you for your suggestion, but in this case, I believe the PIO SPI code is limited to Wiznet boards, since wizchip_pio_spi.c implements the SPI protocol specifically for the W5500 chip.

Given this, would it be appropriate to create a new module named wiznet_pio, with a class wiznet_pio.SPI()?
For ex...

manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.0-alpha.7 on 2025-06-17; Adafruit Metro RP2350 with rp2350b
Board ID:adafruit_metro_rp2350
UID:030FA9DAE6154C9A

Code/REPL

I cannot seem to get the settings.toml values
CIRCUITPY_DISPLAY_WIDTH=640
CIRCUITPY_DISPLAY_HEIGHT=480
CIRCUITPY_DISPLAY_COLOR_DEPTH=2

To be seen by this code. if the mode is 320x240 before the code is run, it will not toggle the screen to 640x480.

Behavior

Screen...

manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.0-alpha.7-6-ge3c5548344 on 2025-06-25; Adafruit Fruit Jam with rp2350b

Code/REPL

import gc

from displayio import Group, TileGrid, Palette
from terminalio import Terminal, FONT

from adafruit_bitmap_font import bitmap_font
import supervisor

# un-comment and the font load succeeds
#l = [1024] * 1024

main_group = Group()
display = supervisor.runtime.display
display.root_group = main_group

prin...
orchid basinBOT
candid sun
#

<@&356864093652516868> We'll have our weekly meeting in about 60 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/177RrtFUmsky3b2Wjl8vVRVqceU6LJavFfWSm2krT_TQ/edit?tab=t.0 -- I look forward to everyone's updates!

lone axle
lone axle
#

Thanks for hosting Liz, have a great week everyone!

tulip sleet
#

thanks!

candid sun
#

Here is the notes document for the next CircuitPython meeting. It is in 2 weeks on July 14, 2025 at the usual time of 11am Pacific / 2pm Eastern here on Discord. Everyone is encouraged to attend! Please add your hug reports and status updates even if you’ll be attending the meeting - it’s super helpful! If you are unable to attend but would still like to include updates, feel free to include them in the notes and we’ll read them off during the meeting. Hope to see you there! <@&356864093652516868>
https://docs.google.com/document/d/1tNfH3S0mIj57cCBzMRyaPH49nARgvj3ZDp2TbR1Nd4o/edit?tab=t.0

ionic elk
#

Has anyone ever messed with Open Pixel Control for Circuitpython? Through espressif?

#

Have a buddy asking me about it. I found some old adafruit guides that use it but nothing more recent. It seems like it was useful for LED art installations so I found that surprising

#

I guess maybe if you want something to connect to OPC, it doesn't need to do anything else. So there's no point in using anything other than default hardware for it

orchid basinBOT
manic glacierBOT
#

I've looked into this a little and found the following:

terminalio.Terminal does support custom fonts, but only ones initialized with lvfontio.OnDiskFont.

Terminal does not currently work with any fonts that are loaded via adafruit_bitmap_font. I tried for a bit to make that work with some modifications on both sides but was unsuccessful in the end. The crux of the problem is that fonts loaded by adafruit_bitmap_font do not have a bitmap property that contains a Bitmap with the f...

manic glacierBOT
manic glacierBOT
winged oyster
# devout jolt If it helps, these are the exact commands I used just now on MacOS to build Circ...

Thank you, Todbot, for sharing your list of commands for building CircuitPython!
Your list has been extremely helpful in narrowing down the potential source of the error. I was able to execute the commands without issue, with a minor modification to set up the virtual environment on Ubuntu 24.04 LTS. After comparing your list with mine last night, I believe I may have identified the cause of the problem. I plan to conduct further testing after work to confirm, and I'll post an update here once I have more results.

manic glacierBOT
#

I have reproduced this problem with a QT Py ESP32-S3 4MB/2MB, running its own firmware, and also running the Waveshare Zero 4/2 firmware. As you reported, it works fine on Ubuntu, but on Windows 11, CIRCUITPY takes a long time to show up, and is read-only.

Very interestingly, a QT Py ESP32-S3 8MB works fine on Windows 11. CIRCUITPY appears right away, and is read/write. So it may have to do with the presence of the PSRAM.

@Sola85 What is the flash/PSRAM configuration of the Generic ESP32-S3...

winged oyster
# winged oyster Thank you, Todbot, for sharing your list of commands for building CircuitPython!...

@devout jolt Can you share your list of commands for building any recent stable release, say 9.2.8?
Your list of commands build CircuitPython to the latest version, which is now 10.0.0-Alpha.7.
I would like to build the latest stable release, 9.2.8. After running make fetch-tags, I checked out 9.2.8 and repeated the remaining steps on your list, but encountered a different set of errors. The Adafruit build guides offer limited instruction on how to build older releases. Thank you!

tulip sleet
#

there are sometimes problems of tools changing out from under us, but that usually shows up in the CI more than in local builds

devout jolt
# winged oyster <@352910176736772096> Can you share your list of commands for building any recen...

It's basically the same, just switch to the tag. Specifically, here are the commands I used to build CircuitPython 9.2.8 for an ESP32-S2 Feather:

git clone  https://github.com/adafruit/circuitpython.git
cd circuitpython
git checkout 9.2.8
make fetch-tags
pip3 install --upgrade -r requirements-dev.txt
cd ports/espressif
make fetch-port-submodules
./esp-idf/install.sh
. ./esp-idf/export.sh
# we're now running different python so:
pip3 install -r ../../requirements-dev.txt
make BOARD=adafruit_feather_esp32s2

I'm using arm-none-eabi-gcc version 14.2.Rel1, if that matters. As DanH said, what exactly are the errors you're seeing?

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

minimum power

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 main or against (if it exists) the branch for the current stable release or an upcoming minor release. The branch will be named i.j.x, for example, 9.2.x. Bug fixes and minor enhancements can be submitted against the...
manic glacierBOT
manic glacierBOT
#

This may be a memory error. If request_display_config(640, 480) is changed to 320x340, the additional memory succeeds on an RP2350 without PSRAM but with only 3K free. Updated code

SPDX-FileCopyrightText: 2025 Anne Barela for Adafruit Industries

SPDX-License-Identifier: MIT

import terminalio
import displayio
import supervisor
from adafruit_bitmap_font import bitmap_font
from adafruit_display_text import label
import gc
from adafruit_fruitjam.peripherals import request_display_config

#...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.0-alpha.7 on 2025-06-17; Raspberry Pi Pico W with rp2040
Board ID:raspberry_pi_pico_w
UID:E6614103E719A637
MAC:28:CD:C1:00:6B:08

Code/REPL

Adafruit CircuitPython 10.0.0-alpha.7 on 2025-06-17
RP2040 chips Possibly others.

Behavior

Adafruit CircuitPython 10.0.0-alpha.7 on 2025-06-17 creates an SD card reader on RP2040 W devices that cannot be accessed.
See [https://forums.adafruit.com/v...

manic glacierBOT
#

The crucial difference is that the 8MB build is compiled mostly with -O2; the 4MB build is mostly -Os to fit in the smaller firmware partition. If I compile the 8MB build with -Os, it starts having the same problem.

Now to figure out why. This could be due to something uninitialized or something that should be volatile but is not.

Yup, a bisect may help certainly help here, and that is probably the next thing.

manic glacierBOT
manic glacierBOT
#

CircuitPython version and board name

Adafruit Circuit Python 9.2.8 dated 07/02/2025 on PicoW

Code/REPL

I have a wireshark dump I can upload to a private location if you would like. I'm pretty sure the issue is in the network stack, and not the code.

Behavior

[07/02/2025 21:18:22] ERROR InfluxWriter._send_request(body=tempmon,sensor=otext temp=68.30) Exception: [Errno 113] ECONNABORTED

Description

So I have a device that I'm using. It has a L...

manic glacierBOT
#

Could you try 10.0.0-alpha.7? Also make sure all the CircuitPython libraries are up to date.

A wireshark trace may be helpful, but a small test program that we can run to reproduce the may be the most helpful. Are you talking to the same server in both network environments? Is it a local server?

We use the same library to talk to the CYW43 co-processor that MicroPython uses. In fact, it was developed by them: https://github.com/georgerobotics/cyw43-driver. We may be ahead or behind of the l...

manic glacierBOT
#

Setting CIRCUITPY_SDCARDIO = 0 causes the problem to go away; turns off some things added in #10129, and reduces the LUN count back to 1. It's still weird that it takes -Os to have the problem appear. On a whim, I tried making the ejected[] etc .arrays in shared/supervisor/usb_msc_flash.c be volatile: no help.

I am posting these comments just to help keep track of what was tried.

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Haven't tested in a very good while but it used to work. And pretty well at that.
I cannot physically test as I'm unable to access that board anytime soon
but it should work unless CircuitPython changed something.

I don't use espcamera as is, but use software on top of it (in CircuitPython).
Here is my config:

data_pins = D
pixel_clock_pin = PCLK
vsync_pin = VSYNC
href_pin = HREF
i2c = i2c0
external_clock_pin = XCLK
external_clock_frequency = 20000000
powerdown_pin = None
reset_pin...
manic glacierBOT
manic glacierBOT
#

gc.collect() freezes things for a sizeable chunk of time. How can that be improved?

  • faster measurement
    • optimization without good measurements is... challenging
    • gc.mem_alloc() and gc.mem_free() are terribly slow - they use gc_info() (in C) to add up stats for each block in each mp_state_mem_area_t
      • adding a singleton to track the same info would add a little overhead in time for allocating and collecting instances, but would dramatically improve the speed o...
manic glacierBOT
#

Perhaps the easiest quick improvement would be wrapping/mapping the C level gc_info(...) call for access in CircuitPython?

  • a single call could provide the same information as calling gc.mem_alloc() and gc.mem_free()
    • calling gc_info(...) (in C) isn't cheap
    • both gc.mem_alloc() and gc.mem_free() internally call gc_info(...)
  • anywhere you want to grab both values you're hit with the cost of calling gc_info twice
  • this should be trivial to implement, a...
#

In the latest alphas of 10.0.0 ...

I'm currently running on 10.0.0-alpha.7-7-g363be5fe80 (2025-07-01). It did improve things significantly, but I still often get gc collection pauses in the hundreds of milliseconds. Many of the "collectables" are temporaries generated from things like list comprehensions and using (as parameters or in invocations) *args, **kwds. Also string formatting, but most of that can be eliminated easily enough.

I've put together a benchmark harness to h...

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

TBH that's not much clarifying. I'm a big fan of the "It works on my device" (TM) certification program, but if there is no documented way to make the camera work with CircuitPython I'd still suggest removing the mention of this feature in the CircuitPython website.

I don't think you are under any obligation to support this board nor the camera feature, but if you claim you do...then you should be able to provide some guidance for others to use.

manic glacierBOT
#

It used to work. But as I said, I'm just unable to access it right now to produce the command.

If you give me a month to get my home renovation done, then yes, I'll be able to access the board and bring you the full command.
But until then this is all I have to give you from my existing stuff. I did give you everything I can at this time.

There are the PR notes and code comments I made while figuring how to port the camera, which you can dig through if you want more old stuff.

If you think...

#
manic glacierBOT
#
  • Fixes #10390.

The SD automount code did not always check for get_vfs() returning NULL when there was no SD card, which caused mysterious results on some boards. On QT Py ESP32-S3, compiled with -Os, there were issues on Windows. On Feather ESP32-S3, also compiled with -Os, the build simply didn't work.

The bug was fixed by adding a check in tud_msc_capacity_cb(), but checks were added elsewhere for safety as well.

@Sola85: I think this should fix what you saw.

manic glacierBOT
manic glacierBOT
#
  • This is the ESP32-S3 part of #9533. ESP32-S2 will be done later.

This supersedes #10265, which got out of date due to #10424.

Starting as draft to check for compilation issues.

All the Adafruit-produced ESP32-S3 guides have been updated to account for this change. This changes the Adafruit ESP32-S3 boards and all the other ESP32-S3 boards to use a single ota_0 partition. So there is no dualbank and no OTA update support.

Also, mpconfigport.mk, and the mpconfigboard.mk fi...

orchid basinBOT
manic glacierBOT
#

@neilenns I see the same behaviour on Windows, but it looks like this this a "Windows UI Thing" because chatter tells me that my product string is being reported correctly and there's no sign of "CircuitPython HID" anywhere:

[Device #0 - HID (Handle: 0x3be13e7f / 1004617343)]
\\?\HID#VID_239A&PID_80F4&MI_03#8&104bb9f4&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
dwVendorId                    : 0x239a
dwProductId                   : 0x80f4
d...
manic glacierBOT
#

Not sure if this is what's preventing implementation, but this thread found a solution for getting the rssi for a connected AP:

Hmm, seems the Pico SDK/cyw43 driver has the Infineon numbers doubled / shifted left?

0x19 * 2 = 0x32
0x1d * 2 = 0x3a

May want to try if using 127 * 2 = 254 (0xfe) works as command to get RSSI?

Source: https://forums.raspberrypi.com/viewtopic.php?p=2047463#p2047467

manic glacierBOT
#

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 main or against (if it exists) the branch for the current stable release or an upcoming minor release. The branch will be named i.j.x, for example, 9.2.x. Bug fixes and minor enhancements can be submitted against the stable release b...
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

In https://github.com/espressif/esp-idf/issues/10013#issuecomment-3044597966 an espressif rep reports that the bug we worked around in https://github.com/adafruit/circuitpython/issues/7032 has been fixed in a newer idf version. If true, circuitpython can remove the workaround when esp-idf is updated. I don't know specifically which esp-idf versions have the fix.

This issue has been resolved in lwIP version 2.2.0, and is included in recent ESP-IDF versions.
The fix is not present in vers...

tulip sleet
manic glacierBOT
#

When using both DAC and ESP32SPI it seems that the order the objects are initialized causes the DAC to work or not. If ESP_SPIControl is initialized before the DAC then audio play back works successfully. But if the DAC is initialized before ESP_SPIControl then audio playback does not work. audio.playing property is true and the while loop finishes after the length of the audio file, but no audio comes out of the speaker.

Adafruit CircuitPython 10.0.0-alpha.7-7-g363be5fe80 on 2025...
#

With the code like this is also does not play the audio:


from audiocore import WaveFile
import time
import gc
import board
import busio
from digitalio import DigitalInOut
from adafruit_esp32spi import adafruit_esp32spi
from os import getenv
import adafruit_tlv320
import audiobusio


ssid = getenv("CIRCUITPY_WIFI_SSID")
password = getenv("CIRCUITPY_WIFI_PASSWORD")
esp32_cs = DigitalInOut(board.ESP_CS)
esp32_ready = DigitalInOut(board.ESP_BUSY)
esp32_reset = DigitalInOut(board.ESP_RESET)
s...
#

This order of initializing lets audio play successfully:

i2c = board.I2C()
dac = adafruit_tlv320.TLV320DAC3100(i2c)

# Init ESP_SPIControl here and the audio beep plays successfully
esp = adafruit_esp32spi.ESP_SPIcontrol(spi, esp32_cs, esp32_ready, esp32_reset)

dac.headphone_output = True
dac.configure_clocks(sample_rate=16000, bit_depth=16)

audio = audiobusio.I2SOut(board.I2S_BCLK, board.I2S_MCLK, board.I2S_DIN)
wave_file = open("/beep.wav", "rb")
beep_wave = WaveFile(wave_file)
# ...
...
#

this version also plays sound successfully:

# ...
i2c = board.I2C()
dac = adafruit_tlv320.TLV320DAC3100(i2c)
audio = audiobusio.I2SOut(board.I2S_BCLK, board.I2S_MCLK, board.I2S_DIN)
wave_file = open("/beep.wav", "rb")
beep_wave = WaveFile(wave_file)

# Init ESP_SPIControl here and the audio beep plays successfully
esp = adafruit_esp32spi.ESP_SPIcontrol(spi, esp32_cs, esp32_ready, esp32_reset)

dac.headphone_output = True
dac.configure_clocks(sample_rate=16000, bit_depth=16)
# ...

It s...

manic glacierBOT
full plume
# tulip sleet CPY BUILDERS: Here is a bash completion script that will do tab completion on `m...

been a while since I did deep bash magic, and I'm not sure if this is even close but it looks like bash-completion has a way to auto-register completion files. If I'm reading correctly, renaming your script to make, _make, or make.bash and putting it in ${BASH_COMPLETION_USER_DIR} should work. It also appears that ${BASH_COMPLETION_USER_DIR} can have multiple paths, and these are searched before the built-in completion scripts. However, I'm not sure if this actually helps - in theory it should at least make your script "just work" without having to source it directly. But unless it magically merges multiple entries in the search path, that probably won't help much.

GitHub

Programmable completion functions for bash. Contribute to scop/bash-completion development by creating an account on GitHub.

full plume
# tulip sleet CPY BUILDERS: Here is a bash completion script that will do tab completion on `m...

another possible hack - not sure this would work and it's moderately ugly but....
before your _make_board_completion you could add

source <LOCATION_OF_BASH_COMPLITION_BUILTINS>/make

which should pull in the "default" implementation as _comp_cmd_make,
and then insert

        else 
            _comp_cmd_make

at the end of _make_board_completion (before fi) - that might make it
fall through to the original behavior when yours doesn't match?

#

(or it could fail spectacularly - haven't have to do any serious bash scripting for years so I might be a bit rusty)

tulip sleet
# full plume I'm assuming you're trying to "append" your completion logic to bash-completion'...

Right -- I understand the pathing for the bash completion scripts, but there is already a supplied script that does something useful. I want to augment that, not replace it. complete -F function_name command_name does s replace, not an augment. Yes, I could put one inside the other, but that's not very maintainable. But one of the bash-completion authors made a suggestion here: https://github.com/scop/bash-completion/discussions/1400, and it works.

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Looking at MXC_SPI_SetDataSize(), it can return E_BAD_PARAM if the frame size is out of range for the SPI peripheral, or it can return E_BAD_STATE if the peripheral is in the wrong state. The first is a ValueError, so you could used "Invalid %q" or "%q out of range". The second is, I think, a "should not happen" error, so that would be a RuntimeError.

You don't have to distinguish these, but it might make it easier on the user. There is an existing "Invalid state" message, th...

manic glacierBOT
devout jolt
#

Not sure if this is useful for others, but I put together a little command-line tool to quickly print out a particular board's board.* pins for a given board_id, if you have a circuitpython repo checkout. I use it when helping the occasional newbie who are trying to use board defines that might not exist on their particular part. I call it cirpy-showpins: https://gist.github.com/todbot/e91853b9d5e021405bb9a85081a39163
Output looks like:

% cirpy-showpins.py circuitplayground_bluefruit
board_id: circuitplayground_bluefruit
pins: A1 A2 A3 A4 A5 A6 A8 A9 ACCELEROMETER_INTERRUPT ACCELEROMETER_SCL ACCELEROMETER_SDA AUDIO BUTTON_A BUTTON_B D0 D1 D10 D12 D13 D2 D3 D35 D4 D5 D6 D7 D8 D9 I2C L LED LIGHT MICROPHONE_CLOCK MICROPHONE_DATA MISO MOSI NEOPIXEL POWER_SWITCH RX SCK SCL SDA SLIDE_SWITCH SPEAKER SPEAKER_ENABLE SPI TEMPERATURE TX UART
tulip sleet
#

i was thinking of adding a "Convenience tools" page to "Building CircuitPython" for the bash completion script I just got working, and maybe this too

devout jolt
tulip sleet
#

we could run it as part of the data generation for a board fomr cicuitpython.org and/or the docs build

tulip sleet
#

After that I will make an alpha.8. thanks.

manic glacierBOT
#
[adafruit/circuitpython] New tag created: 10.0.0-alpha.8
orchid basinBOT
manic glacierBOT
#

If I read the code changes correctly (haven't tested raspberrypi), AP will take precedence over station for mDNS.

On espressif, a device with both station and AP active will present the mDNS host to both networks:

import time
import os
import wifi
import mdns
import adafruit_httpserver

PORT = 8080

time.sleep(3)  # wait for serial

# wifi station
wifi.radio.connect(os.getenv("WIFI_SSID"), os.getenv("WIFI_PASSWORD"))

# wifi access point
wifi.radio.start_ap("Bob...
lone sandalBOT
manic glacierBOT
#

board.SDIO_DATA on a number of boards is a tuple of four pins for use with sdioio.SDCARD(..., data=...)

The example in sdioio incorrectly put it in square brackets: [board.SDIO_DATA]. Remove those to use the intended tuple, and also include a sample line for boards that do not have this tuple but have board.SDIO_DATA0, board.SDIO_DATA1, board.SDIO_DATA2, board.SDIO_DATA3 pins instead.

Thanks Seth K in discord for discovering the doc problem.

I've also updated some example...

tulip sleet
#

https://blog.adafruit.com/2025/07/08/circuitpython-10-0-0-alpha-8-released/

Highlights of this release

  • Increase the firmware partition size for ESP32-S3 boards with 4MB flash, allowing more features to be included, including BLE. You must update the TinyUF2 bootloader on these boards. See the release notes for details.
  • Merge updates from MicroPython v1.25.0.
  • Fix regressions caused by SD automount capability.
  • Add Terminal.cursor_x and .cursor_y.
  • Add picodvi.Framebuffer.color_depth.
manic glacierBOT
winged oyster
#

Building CircuitPython on Local Machine

manic glacierBOT
#

Thank you for your suggestion, but in this case, I believe the PIO SPI code is limited to Wiznet boards, since wizchip_pio_spi.c implements the SPI protocol specifically for the W5500 chip.

Given this, would it be appropriate to create a new module named wiznet_pio, with a class wiznet_pio.SPI()? For example, should I place the files like this? port/raspberrypi/common-hal/wiznet_pio/SPI.c port/raspberrypi/bindings/wiznet_pio/SPI.c

Please let me know if this structure is correc...

#

Sorry for the delay in reviewing this. We are short-handed at the moment.

You might consider putting the .py files in their own repo and adding that repo as a submodule. That would make maintenance easier, giving the library a central place to live where you could version it, etc. I will not merge until I hear back from you about this, but otherwise it looks fine.

manic glacierBOT
turbid radish
#

This morning I finally got a Code Page 437 truetype font that converted to an LVGL font with most of the glyphs intact. That font loads up fine in CircuitPython.

#

After awhile I need to see if I can get that font to work in a Terminal window. That would finally get me CP437 characters in an ANSI terminal so I can look at emulating some PC games with the right character set.

willow totem
turbid radish
#

The fonts are at https://github.com/jcs/ansiterm. I had no luck converting the Old Skool PC CP437 fonts from TT to LVGL which is sad as they have the best selection.

manic glacierBOT
manic glacierBOT
manic glacierBOT
strong violet
#

CircuitPython library bundles are created by applying circuitpython-build-tools to each submodule of the bundle repository. circup downloads the whole bundle and extract only small part of it. What if circup downloaded the snapshot of the library repository at requested version (tag) and built that specific part of the bundle itself? This would reduce the download times, and the user could install older versions if required. Has this been discussed before? Do you see some clear problems with this approach?

jaunty juniper
#

what do you mean extracts small parts of it ?

#

circup downloads the zip from the latest release of the bundle which contains the libraries, dependencies, and examples

#

do you mean perhaps a mechanism to only download what was updated since the last download ?

#

that would be quite complicated. Downloading a specific version for a library could be possible since the repository urls are known and so the library's release zip for that version could be independently downloaded

#

we could could download libraries one at a time (and cache it) like pip does but I think that could be more downloads and a worse experience for the usual use case ?

#

dunno, maybe it could be an interesting option to test and compare

strong violet
#

I mean if I need to circup install adafruit_character_lcd, cicup downloads lot more than I actually need. Instead, it could download latest bundle info, find out that the repo is at https://github.com/adafruit/Adafruit_CircuitPython_CharLCD, download the snapshot at latest (or requested) tag and build only part of the bundle from this

jaunty juniper
#

yeah but it downloads the bundle only once, and then it can use that to install the dependencies too (of which there's 2, technically 3 with bus device)

#

but yeah I know the feeling that circup downloads a bundle every time I use it, but it's actually only once a day (if necessary)

#

(which is why I setup a cron job that runs circup at night to preload the bundle every day)

manic glacierBOT
strong violet
#

The benefit of focused download is that one can also request older versions

full plume
#

I have the following code

        self.pulseIn = pulseio.PulseIn(pin, maxlen=120, idle_state=True)
        self.decoder = adafruit_irremote.GenericDecode()

setting up an IR remote receiver. In 9.x this worked fine on all the ESP32 variants I tested with. In 10.0.0-alpha8 on a Lolin S2 Mini, it fails with espidf.IDFError: Operation or feature not supported on the first line (creating the pulseio.PulseIn instance). @mortal kernel I'm fairly certain it still worked when I was testing with your ESP-IDF 5.4.1 branch a few months back.

There are some open issues regarding pulseio.PulseIn and ESP32s on the repo, but I didn't see anything obviously related to this exception or as a regression in general (worked in 9.x, fails now). Should I add this as a bug report?

jaunty juniper
# strong violet The benefit of focused download is that one can also request older versions

yeah versioning is not a thing with the bundle, but then again the policy of the bundle is to be compatible with the current versions of Circuitpython so downloading an old version is a rare edge case. It would require something to peg a version to avoid update to change it, and there is currently no version management for dependencies, so it would be up to the user to peg the versions of dependencies if necessary.
You can open an issue in the circup repo with your suggestion, it's the best way to keep track of the idea

full plume
#

Requesting older versions could cause a lot of weird issues without introducing a dependency management system to the user's code (i.e. code.py, etc), which feels like a bit of overkill for typical CircuitPython users? Also, it might be tricky to incorporate into existing CircuitPython workflows without chewing up precious space on the controller's filesystem. It's fairly simple to skip circup and maintain your own "dependency bundle" for deployment if you want full control over individual package/module versions.

jaunty juniper
#

fix "pulseio.PulseIn maxlen is limited to 128 in esp32"

full plume
tulip sleet
full plume
#

fwiw it fails with espidf.IDFError: Operation or feature not supported for values of maxLen >= 30, but espidf.IDFError: Invalid argument for maxLen < 30

full plume
tulip sleet
#

I think the PR author did test it, so it's surprising. If they left a test program in the PR, see if there's anything diffrent.

#

they submitted the PR to solve their problem with it

jaunty juniper
#

I really just ran this as a test (on a lolin S2)

import board
import pulseio
pulseIn = pulseio.PulseIn(board.A0, maxlen=120, idle_state=True)
#

(actually I wasn't sure what pins were eligible, so I ran a loop on a list of pins with a context manager and try/catch, but then I reduced it to that)

manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.0-alpha.8 on 2025-07-08; S2Mini with ESP32S2-S2FN4R2

Code/REPL

import pulseio, board
maxLen = 128
pulseIn = pulseio.PulseIn(board.IO35, maxlen=maxLen, idle_state=True)

Behavior

Traceback (most recent call last):
  File "", line 1, in 
espidf.IDFError: Operation or feature not supported

Description

I was able to create and use (along with **adafruit_irremote.GenericDecode...

full plume
jaunty juniper
#

yeah it works in alpha 6 and anything pre-10397 I tested

manic glacierBOT
turbid radish
#

Weell, I used my working teminalio.Terminal sample program to try to load a LVGL font instead of terminalio.FONT. I got the dreaded "TypeError: Unsupported font type". I may have to wait until Scott gets back to ask about using a terminal font other than terminalio.FONT. 😮

manic glacierBOT
#

Yup, that PR enables "DMA mode" for PulseIn to fix a previous limitation.

In that PR I mentioned that Espressif warns about limited support of this feature on different variants, but since the documentation fails to state which variants have limited support, I enabled the feature for all variants.

Maybe S2's then fall into the category of having limited support, in which case DMA mode should not be used for these.

I have some Lolin S2 Minis and can try this out next week.

#

Yup, that PR enables "DMA mode" for PulseIn to fix a previous limitation.

In that PR I mentioned that Espressif warns about limited support of this feature on different variants, but since the documentation fails to state which variants have limited support, I enabled the feature for all variants.

Maybe S2's then fall into the category of having limited support, in which case DMA mode should not be used for these.

I have some Lolin S2 Minis and can try this out next week.

...

full plume
manic glacierBOT
#

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 main or against (if it exists) the branch for the current stable release or an upcoming minor release. The branch will be named i.j.x, for example, 9.2.x. Bug fixes and minor enhancements can be submitted against the stable release b...
turbid radish
#

SPDX-FileCopyrightText: Copyright (c) 2021 Randall Bohn (dexter)

SPDX-FileCopyrightText: Copyright (c) 2021 Anne Barela for Adafruit Industries

SPDX-License-Identifier: MIT

Modeled on https://github.com/circuitpython/CircuitPython_Module_Examples/

blob/801475f745fe2a61738f1abed3bd01007118efa3/terminalio/

terminalio_terminal_example.py#L5

import board
import displayio
import terminalio
import picodvi
import framebufferio
from adafruit_bitmap_font import bitmap_font

displayio.release_displays()
fb = picodvi.Framebuffer(320, 240, clk_dp=board.CKP, clk_dn=board.CKN,
red_dp=board.D0P, red_dn=board.D0N,
green_dp=board.D1P, green_dn=board.D1N,
blue_dp=board.D2P, blue_dn=board.D2N,
color_depth=8)
display = framebufferio.FramebufferDisplay(fb)

group = displayio.Group()
display.root_group = group

palette = displayio.Palette(2)
palette[0] = 0x220000 # not so dark Black
palette[1] = 0x00FFFF # Cyan

ROWS = 12
COLS = 40

font_file = "fonts/CP437-8px.bin" # Test external LVGL font
font = bitmap_font.load_font(font_file) # Use font = terminalio.FONT for built-in

font_glyphs = ""

for i in range(256):

font_glyphs = load_glyphs(i)

w, h, _, _ = font.get_bounding_box() # last two are x_offset and y_offset

term_bitmap = displayio.Bitmap(320, 240, 2)

termgrid = displayio.TileGrid(
term_bitmap,
pixel_shader=palette,
y=20,
width=COLS,
height=ROWS,
tile_width=w,
tile_height=h,
)
group.append(termgrid)
term = terminalio.Terminal(termgrid, font)

term.write("Terminal %dx%d:\r\n" % (COLS, ROWS))
term.write(" %dx%d pixels.\r\n" % (COLS * w, ROWS * h))
term.write("VT100 protocol.\r\n")
term.write("Both carriage return and line feed \r\n are required.\r\n")

while(True):
pass

GitHub

Examples for the built-in CircuitPython core modules. - circuitpython/CircuitPython_Module_Examples

manic glacierBOT
#

This way, no modification to the CircuitPython API would be necessary.
All else being equal, that's certainly a good thing.

Or use of DMA mode could be tied to the value of maxlen. If maxlen>128 then DMA mode is forced and an error is raised if not available (since maxlen>128 only works with DMA mode anyway) and if maxlen<128 then dma mode is not used.
This seems reasonable, but it also

  • hides a bit of relevant detail which could be confusing ("why can't I have two 256 byte channels")...
#

Sorry for the confusion. I thought I had made a mistake by submitting a PR
in main and not in a branch.
I submitted a new PR(#10467) a few minutes ago.

On Wed, Jul 9, 2025 at 1:25 PM Dan Halbert @.***> wrote:

dhalbert left a comment (adafruit/circuitpython#10465)
https://github.com/adafruit/circuitpython/pull/10465#issuecomment-3053909300

What was your reason for closing this PR? We probably could turn on BLE if
it doesn't fit or something like that. Right no...

full plume
manic glacierBOT
#

Well @FoamyGuy - using a modified version of your code has got me the closest to using an LVGL font in Terminal. I was able to get rid of the large allocation without issues.

<img width="400" height="193" alt="Image" src="https://github.com/user-attachments/assets/8345ca9b-b00a-4b2b-be67-c16a317f3ce2" />

`# SPDX-FileCopyrightText: Copyright (c) 2025 Tim C for Adafruit Industries

SPDX-License-Identifier: MIT

import gc

from terminalio import Terminal
import displayio
from lvfontio imp...

full plume
#

Looking under the hoods, it seems unlikely that ... yep, that loading a regular font (bitmap_font.load_font(...)) will work but lvfontinfo might

manic glacierBOT
#

This completes the multi-step task of converting 4MB Espressif boards to use a single larger firmware partition, instead of having one main partition and a second OTA-update partition of the same size. The increased size of the partition allows us to turn on BLE on 4MB boards, and allow other features.

  • Fixes #9553 (last task: do ESP32-S3 boards)
  • Clean up espressif/boards/*/mpconfigboard.mk.
    • remove CIRCUITPY_ESPCAMERA = 0, which no longer needs to be done explicitly on non-PS...
manic glacierBOT
#

I am on it. Thanks.

On Wed, Jul 9, 2025 at 2:18 PM Dan Halbert @.***> wrote:

dhalbert left a comment (adafruit/circuitpython#10056)
https://github.com/adafruit/circuitpython/pull/10056#issuecomment-3052645167

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.
Thanks.


Reply to this email ...

manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 9.2.8 on 2025-05-28; Seeed XIAO nRF52840 Sense with nRF52840

Code/REPL

import board
import adafruit_tca9548a

i2c = board.I2C()

i2c.try_lock()
addresses = i2c.scan()
print([hex(address) for address in addresses])
i2c.unlock()

test_boards = []

for addr in range(0x70, 0x78):
    print(f"Attemping address {addr:#2x}")
    temp = adafruit_tca9548a.TCA9548A(i2c=i2c, address=addr)
    try:
        temp...
lone axle
#

@tulip sleet on fruit jam rev c with the ESP32 C6 I am noticing that frequently requests end up failing with a timeout. I turned on debug in espspi and see that part way thru receiving data it starts reporting ESPSocket: 0 bytes available over and over until timeout. I have done some troubleshooting around this and have a few findings and a few questions.

  1. Where is the best place to create an issue for this? core, esp32spi, nin-fw?
  2. I noticed that the response is being read in 32 byte chunks which seem to be iterating "somewhat slow". Even when the request does occasionally succeed it takes what feels like a long time for the amount of total data being fetched. I've realized that I can increase the chunk size to 1024 here inside of requests: https://github.com/adafruit/Adafruit_CircuitPython_Requests/blob/5e646b244cf36f879f15aaf77a270e4c7e6e8336/adafruit_requests.py#L313 and it seems to make the requests much faster and make them finish successfully more reliably. Each chunk read iteration doesn't seem to take appreciably longer than the 32 byte ones. I have yet to have it fail with a timeout using 1024 whereas without that change sucess is only maybe 1/10 or so. Do you think it's worth trying to add an API to requests for the user code to set this value in order to work around this issue? or better to leave it as is and dig further to figure out root cause / other solution?
tulip sleet
crimson ferry
#

@lone axle does it do this with a variety of servers?

lone axle
#

I have really only tested only adafruit product API: https://www.adafruit.com/api/products/6358. I ran the requests simpletest on it a week or two ago a couple of times and I think it was failing some of the requests to httpbin also but I did only cursory testing of that at the time. I'll try it and a few other servers in a bit when I return from walk.

lone axle
tulip sleet