#circuitpython-dev

1 messages · Page 48 of 1

tulip sleet
#

i think deshipu has thought about this

slender iron
#

and it is often (but not always) bitbanged

tulip sleet
#

this seems like 10.0.0 or later

slender iron
#

I wouldn't wait until 10 for that

#

I could see us changing C code that makes digitalinouts internally to take them in in addition to pin

#

fourwire chip_select is a good example

tulip sleet
#

DigitalInOut as a protocol

slender iron
#

it isn't really a protocol

#

in the C internal sense

tulip sleet
#

but if we made it such

slender iron
#

I'm thinking the python duck typing sense

tulip sleet
#

right now duck typing in C is kind of painful, though, would you say?

slender iron
#

lookup switch_to_output on the given object and value

tulip sleet
#

you have experience from displayio

slender iron
#

I'd rather support python implementations of digitalinout at the same time

#

an internal protocol restricts you to native implementations

tulip sleet
#

yes, that's the distinction I was looking for

slender iron
#

only native implementations can run outside the VM though

#

so native code that runs outside the VM needs to 1) lookup well know names and 2) check to see if it is a native implementation

#

So, I'm pushing the pimoroni expander PR to match the style of a Python library and we'll expand internal APIs they want to use so they do the name lookup they need

tulip sleet
#

i would worry a little bit whether doing this is going to impeded "pad" in the future

slender iron
#

how so?

onyx hinge
#
+    MP_PROTO_IMPLEMENT(MP_QSTR_Pin)
+    .switch_to_input = mcu_pin_switch_to_input,
+    .switch_to_output = mcu_pin_switch_to_output,
+    .set_value = mcu_pin_set_value,
+    .get_value = mcu_pin_get_value,
+    .get_pull = mcu_pin_get_pull,
+    .get_drive_mode = mcu_pin_get_drive_mode,
+    .get_free = mcu_pin_get_free,
+    .claim = mcu_pin_claim,
+    .never_reset = mcu_pin_never_reset,
+    .reset = mcu_pin_reset,
+};
+
 const mp_obj_type_t mcu_pin_type = {
     { &mp_type_type },
     .flags = MP_TYPE_FLAG_EXTENDED,
@@ -90,6 +154,7 @@ const mp_obj_type_t mcu_pin_type = {
     .print = shared_bindings_microcontroller_pin_print,
     MP_TYPE_EXTENDED_FIELDS(
         .unary_op = mp_generic_unary_op,
+        .protocol = &mcu_pin_proto,
         )
 };
```using a protocol was what I was doing in the branch I started, fwiw.
tulip sleet
#

i don't know, just worried the API generalization is going in the wrong diretcion

slender iron
#

I'd rather not use a protocol

onyx hinge
#

is there a solution to the i2c bus locking problem?

#

of i2c bus extenders specifically

slender iron
#

code that uses the digitalinouts needs to handle errors when setting values

onyx hinge
#

I think that gaming out what that looks like for a complicated case like KeyMatrix would be informative.

slender iron
#

displayio already skips a refresh when the bus is locked

#

are there any boards that use keymatrix and an IO expander?

#

I don't think we should convert all things that take in pins to dios

onyx hinge
#

it's not possible to have a row or column pin be on an IO expander right now of course

tulip sleet
#

there are some user-defined keyboards that use such a matrix, not sure they are the greatest design

#

latency, etc

onyx hinge
#

I don't think it is a "good" use case in the sense that you'd want to encourage it, but it's an approximate worst case because it involves background tasks and potentially a whole pile of pins. say your worst enemy puts 4 row pins and 4 column pins on each of two I/O expanders, just because they could ..

slender iron
#

if they are dedicated i2c busses then it works fine but slowly

#

if not, it skips when the bus is locked by user code

#

(but also a reason to add a bulk pin read/write api)

onyx hinge
#

(qualia has keys on an io expander but it's just 1 pin = 1 button, not a matrix. but having those work with keypad.Keys sure would be nice!!)

stuck elbow
#

personally I'm worried it will further slow down displayio

tulip sleet
slender iron
tulip sleet
# stuck elbow personally I'm worried it will further slow down displayio

my impression is that you've thought about this stuff a lot (including maybe some more wacky ideas from half an hour ago here), and also know how they compare with MicroPython, etc. Interested in what you think about duck-typing of dio, adding a "pad" concept or making it possible to set strength, pulls, etc. on a Pin, etc.

#

and you have experience teaching folks to do pin io of various kinds

stuck elbow
tulip sleet
#

i understand, thanks, some ideas enable one thing but make other things harder or more obscure

stuck elbow
#

for keypad specifically, I would prefer a separate class for an expander, that makes use of the interrupt pin on that expander, instead of doing constant scanning like the native pin version (even for the native pin one I wanted to switch to use pin change interrupts eventually, I just didn't have the knowledge to do it)

#

waiting for i2c transactions inside a timer interrupt is just too miserable

#

though I have one trick that I'm trying to use for the touch keypad, where I start the transaction in one tick, and instead of waiting for the result, read the result in the next tick

#

but that ties up the adc

#

for i2c it would lock the bus

#

and one tick might still not be enough

tulip sleet
#

yes, maybe a lightweight fast keypad scanner is at cross purposes to dio duck-typing for keypad. And the expanders can have different ways they work and you don't want to support them all in C

stuck elbow
#

support for C code in mpy might help with that

slender iron
#

that's a cpu architecture nightmare though

stuck elbow
#

yes, and several other nightmares besides

slender iron
#

😄

stuck elbow
#

especially the way it's done in MP with that function array

#

Greenspun's tenth rule rears its ugly head

stuck elbow
#

of course it would have to be the "soft interrupt" mechanism from MP

tulip sleet
#

could, but calling back out to python has its issues, gc latency, etc

stuck elbow
#

yes, but you would only do those those calls once per keypress, which is not that often

tulip sleet
#

so the python function would read the expander and then pass the result back to keypad, where it would be turned into events?

stuck elbow
#

yes, precisely

tulip sleet
#

suppose you had an API to stuff events into the EventQueue instead (or some other kind of event queue generalization).

stuck elbow
#

sure, doesn't matter if you do it explicitly with a return value or by side effects

tulip sleet
#

would an asyncio task waking on the interrupt pin be good enough, or it really has to be pre-emptive?

stuck elbow
#

event queue would be generally useful anyways

tulip sleet
#

yeah, I felt bad the EventQueue was so limited, but everything had to fit on small boards

stuck elbow
#

so a python implementation of keypad using asyncio?

#

but then the users have to use asyncio

tulip sleet
#

yes, that's right, you thought more clearly than me

#

yes, they would

stuck elbow
#

it feels like we need an RTOS :D

tulip sleet
#

implementing soft interrupts is not on our list now

stuck elbow
#

so another possibility

#

make bitbangio work with python implementations of DigitalIO, and make bitbangkeypad and a bunch of other such modules, as needed

#

possibly in python even

#

possibly using asyncio

tulip sleet
#

that is interesting, again doing duck-typing in C (if bitbangio is in C). Would be interesting to try to write bitbangio.I2C in Python, would the timing ever work out?

stuck elbow
#

well, you control the clock

#

only uart is a problem

tulip sleet
#

yeah, SPI and I2C not a problem

stuck elbow
#

doing uart over an expander is a next level of challenge

tulip sleet
#

no one has asked for that 🙂

stuck elbow
#

yet

#

nepixels and 1wire are a problem too

#

apa102 is fine

#

I mean dotstar

tulip sleet
#

RP2040 PIO

stuck elbow
#

I wonder how it could be documented to make it clear what is possible and what not

stuck elbow
tulip sleet
#

i mean control the expander with PIO for time-critical things

stuck elbow
#

would be an interesting chip

#

add pio to any microcontroller

tulip sleet
#

PIO is replacing C code you have to link in

stuck elbow
#

well, you can always do inline assembly

tulip sleet
#

i will leave that to MP 🙂

stuck elbow
#

even with pio you still have to feed/drain the FIFOs

tulip sleet
#

yes, it's not easy to do externally

#

i think we just reinvented microcontrollers

stuck elbow
#

expanders kinda are that

#

what if there was only one officially supported expander, and it was seesaw?

#

imagines the people queueing with torches and pitchforks

tulip sleet
#

wouldn't fly, and that's lock-in (though other people could clone seesaw)

stuck elbow
#

aren't all expanders kinda similar in how you communicate with them, though?

#

you just read a register and the bits are the states

#

so if the c code for supporting the expanders let you specify the register address, you would already support most of them?

tulip sleet
#

i don't know, they may have special "features"

stuck elbow
#

maybe we should do a survey of the most common ones

#

I imagine most of the special features would be handled in the initialization, which would be in python

#

kinda like displayio lets you specify the commands for pixel operations

tulip sleet
#

that is an interesting idea

slender iron
#

make just enough configurable

slender iron
#

I wonder if we should move to a permanent heap + split MP heaps

#

I'm looking at this rgbmatrix code and thinking about the complexity of moving things

#

if we do permanent heap + split heap, then we can promote blocks from one to the other

tulip sleet
#

I'll find it

slender iron
#

Multi heap I think

#

The more I think about it, the r more I think it’s best to it’d allow us to allocate non mp memory while mp is running

#

And that’s why we end up having to move things

#

Could do multiple displays then

tulip sleet
# slender iron Multi heap I think

found it, it's gc_never_free() which is already in main from the v1.19.1 merge. It keeps a linked list list of permanent_pointers, and marks these as used when gc starts

#

so you just alloc from the heap normally and then gc_never_free(the thing)

stuck elbow
#

so it fragments the memory

tulip sleet
#

yes, but if you alloc the permanent stuff first, it will be contiguous heap allocs

#

and you can alloc in multiple different heap areas if you want

stuck elbow
#

so it would be for things like the reserved memory on the esp32?

slender iron
#

@tulip sleet I think that only lasts the lifetime of the MP heap though

slender iron
#

np 🙂

#

I'm definitely thinking this is the way to go

manic glacierBOT
#

Thanks for your review. It seems we have different philosophies when it comes to the implementation of this IO expander.

To me the IO expanders are an implementation limitation of the product, due to the RP2040 not having enough native IO for the functions we needed. As such this PR is geared towards abstracting their existence away, like how was done for CYW. Now, I understand that the CYW support may have been hastily added and thus should not have been used as a template, but the result...

slender iron
#

with split heaps that grow on demand we could run two MP VMs at once

manic glacierBOT
#

Thanks for your review. It seems we have different philosophies when it comes to the implementation of this IO expander.

To me the IO expanders are an implementation limitation of the product, due to the RP2040 not having enough native IO for the functions we needed. As such this PR is geared towards abstracting their existence away, like how was done for CYW. Now, I understand that the CYW support may have been hastily added and thus should not have been used as a template, but the ...

tulip sleet
#

and you are forbidden from allocating regular objects in it. (The API is not ideal for that right now.)

slender iron
#

want to video chat about this?

#

my brain is going on it

tulip sleet
#

in amelia

blissful pollen
#

Would that possibly make all the display allocations easier? I know Framebuffer (or one of those) has a lot of if statements to ensure things persist across restarts

manic glacierBOT
#

I don't think it's a better user experience when one tries to use the pin for something it isn't meant to work with. It only works with digitalio and therefore should just act like digitalio.

So you're suggesting that rather than having a TcaPin object, since it can only do IO it should skip that step and be a DigitalIO object from the outset? FourWire and such would then accept that for any case, without specifically needing to know about that pin type?

To be fair, this feedbac...

slender iron
#

and I think remove the hard coded limit

blissful pollen
#

That would be useful. Dealing with that for the IS31 was the hardest part

slender iron
#

👍

onyx hinge
#

I tried simply increasing the gifio width (conditionally on espressif) but I got hardfaults with the gif I tried to use 😦

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.2.6 on 2023-09-12; Adafruit MatrixPortal S3 with ESP32S3

Code/REPL

import board
import displayio
import framebufferio
import rgbmatrix
import busio
import digitalio

uart = busio.UART(board.TX, board.RX, baudrate=115200)
uart.timeout = 0

print("Initialized UART")

displayio.release_displays()
matrix = rgbmatrix.RGBMatrix(
    width=64, bit_depth=4,
    rgb_pins=[
        board.MTX_R1,
        ...
manic glacierBOT
orchid basinBOT
manic glacierBOT
#

With firmware CYW43 bluetooth firmware blobs, BTstack, and a skeleton implementation of _bleio in place flash grows from 85.7% to 88.14% and RAM from 40.14% to 44.35%. This includes both BLE and Wifi support.

I'm filling in functionality by cherry picking existing code wherever possible, otherwise writing new code. My method is adding to the port's _bleio one function at a time, testing, and then moving on.

No blocking issues at this time.

tidal kiln
#

what's the general plan for updating or supporting older code for this?

#

(displayio.Display change)

manic glacierBOT
#

@DJDevon3 At first there was no issue, as long as I stayed away from UART. Only when I added UART it crashed every time yesterday on save. I had to do a power cycle every time because the reset button wouldn't get out of safe mode either. Today it seems every one in two times. Not sure what's different today. The crash is sometimes so severe that I have to drag the UF file back on the disk because the drive is showing up as matrixboot.

tulip sleet
#

you could check the repo

tidal kiln
#

@tulip sleet thanks. sry. i'm playing catchup on this change. looking now...

tulip sleet
#

I must be remembering something else

#

this can wait until we start releasing 9.0.0 releases, not sure how long that will be

tidal kiln
#
Do we want to provide commented old version for some period of time for people that are still using <= 7.X versions?
#

curious about this as well

tulip sleet
#

I think in most cases people are using 8.x. We haven't stopped building 7.x bundles yet. There are few things that are unfixed regressions from 7.x to 8.x, but not many.

Commented-out code is yet another thing to explain in the learn guides, so I would be inclined not to do that.

tidal kiln
#

so idea is to just change all code to display.root_group = and then tell people to update to CP 9?

tulip sleet
#

update to CP 8. it's available in 8

tidal kiln
#

ok. just grep'd the learn repo and doesn't look like anything has been updated.

tulip sleet
#

there are a lot of .shows due to NeoPixel, so it may be a bit of sifting

tidal kiln
#
$ grep -r "display.show" | wc -l
298
tulip sleet
#

welp 🙂

#

do you want to take this on? @slender iron @onyx hinge think it's time to get rid of the .show()s?

tidal kiln
#

apologies if i've missed a bunch of this being discussed in the weeds already

tulip sleet
#

np, it wasn't discussed recently. I think it kind of fell off the radar.

tidal kiln
#

started looking into this due to a feedback comment on the displayio guide

#

i'll def update that

#

and i'mthinking discuss both, with mention of versions where it changes, etc.

#

just in case there are people stuck using older CP versions for some reason

tulip sleet
tidal kiln
#

i think jeff and scott are afk today. i'll try and make the monday meeting and bring this up in the weeds.

slender iron
slender iron
slender iron
#

@tulip sleet do you think I should PR these rgbmatrix fixes to 8.2 or main?

slender iron
#

(I am)

manic glacierBOT
slender iron
#

@midnight ember ☝️ will hopefully fix your rgbmatrix safemode issues

midnight ember
#

I'm not the only one. Just the only one with 12 panels to my knowledge. If you're gonna test go big? 😅

#

I think Melissa and others have run into the same issue even with 1-4 panels.

#

Which version should I install to get that update?

#

or is this slated for 9.0?

#

I'm going out of town tomorrow and will be gone for 2 weeks. Will have to revisit it when I get back.

manic glacierBOT
#

I don't think it's a better user experience when one tries to use the pin for something it isn't meant to work with. It only works with digitalio and therefore should just act like digitalio.

So you're suggesting that rather than having a TcaPin object, since it can only do IO it should skip that step and be a DigitalIO object from the outset? FourWire and such would then accept that for any case, without specifically needing to know about that pin type?

Yup! Exactly. Any pl...

slender iron
midnight ember
#

I could be wrong but I think artifacts are only available to team members. Only way I can grab a build is via the S3 bucket or build it myself using the 8.x main repo. Leaving in a few hours to the beautiful smoky mountains. ⛰️

tulip sleet
manic glacierBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.2.3 on 2023-08-11; Teensy 4.1 with IMXRT1062DVJ6A

Code/REPL

import adafruit_bno055
import busio

# Initialize the IMU imu_sensor
imu_i2c = busio.I2C(board.SCL, board.SDA)
imu_sensor = adafruit_bno055.BNO055_I2C(imu_i2c)

last_val = 0xFFFF


def temperature():
    global last_val  # pylint: disable=global-statement
    result = imu_sensor.temperature
    if abs(result - last_val) == 128:
        re...
thorny dove
#

@atomic summit advised me to post the following here: Today I flashed the latest CPY: Adafruit CircuitPython 9.0.0-alpha.1-50-gaa0d7aad83 on 2023-09-28; FeatherS3 with ESP32S3. The command: 'import feathers3' caused the error: File "feathers3.py", line 23, in <module>. ValueError: Invalid pin, while line 23 is: # Setup the BATTERY voltage sense pin vbat_voltage = AnalogIn(board.BATTERY)If I issue from mu-editor V1.2.0 REPL the commands import board followed by dir(board) then among others appear: BATTERY, VBAT and VBAT_SENSE, so how I can get an 'Invalid pin' error

atomic summit
stuck elbow
#

Invalid pin in this case means that the pin in question cannot be used as an analog pin

#

so either the pin references got mangled, and that no longer refers to the pin it was supposed to, or maybe the ADC needs now to be explicitly enabled first, or something similar?

thorny dove
#

disregard this board.STEMMA_VERTICAL_I2C() issue. I have to do further checking.

stuck elbow
#

sounds like the pins are mixed up allright

thorny dove
#

thanks @stuck elbow

manic glacierBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.2.6 on 2023-09-12; Adafruit CircuitPlayground Express with samd21g18

Code/REPL

# Write your code here :-)

print("Hello World!")

Behavior

Code stopped by auto-reload. Reloading soon.
soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
OSError: [Errno 5] Input/output error

Code done running.

Description

  • Error on e...
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.2.4 on 2023-08-22; Adafruit Feather ESP32-S2 TFT with ESP32S2
Board ID:adafruit_feather_esp32s2_tft

Code/REPL

numbers = [1, 2, 3]
new_numbers = [0, *numbers, 4]
print(new_numbers)
# Expected output: [0, 1, 2, 3, 4]

Behavior

Traceback (most recent call last):
File "", line 1, in
SyntaxError: *numbers must be assignment target

Description

Different behaviour between CircuitPython and Pyt...

manic glacierBOT
thorny jay
manic glacierBOT
manic glacierBOT
lone sandalBOT
manic glacierBOT
#

Looking at the quirc library that is used internally by qrio, I found that the library also returns the positions of all four corners of the QR codes it found, but that information is not passed on to the Python object returned.

I wonder if there would be a simple way of somehow adding an option to get that information. That would allow projects that have a moving camera to center on the QR code, and even to calculate a rough position relative to the QR code, similar to how one can do it w...

manic glacierBOT
#

One way to do it is to add a positions argument to the decode method, that would default to False, and that, if set to True, would make the call return a list of 6-tuples, instead of pairs.

Another way would be to add an additional method, such as get_positions (or a property called positions) that would return a list of 4-tuples with the positions corresponding to the list returned by the last .decode() call. It would return an empty list if there was no call previously. A p...

manic glacierBOT
#

As you may imagine, the API was designed to be as simple as possible.

Maybe the extended API would have:

  • QRDecoder.analyze() which feeds the pixel data in and returns a list of 4-tuples (quirc_begin() ... quirc_end())
  • QRDecoder.extract() which, if it's given an integer, does the decode & extract from the previously analyzed image

this would leave .decode() as analyze() + looped extract().

Alternately, if this is about avoiding the attempt to decode an "obviously too small" co...

manic glacierBOT
manic glacierBOT
#

Hello @dhalbert, I am looking forward to contributing to this issue. The following changes are proposed after reading your previous comment and @muranyia's comment.

sumitra@sumitra:~/opensource/circuitpython$ git diff
diff --git a/shared-bindings/rotaryio/IncrementalEncoder.c b/shared-bindings/rotaryio/IncrementalEncoder.c
index 24df2b2d1..669b85c5f 100644
--- a/shared-bindings/rotaryio/IncrementalEncoder.c
+++ b/shared-bindings/rotaryio/IncrementalEncoder.c
@@ -35,7 +35,9 @@
#inclu...

manic glacierBOT
slender iron
#

@lone axle are you able to host the meeting today? just checking to make sure

lone axle
manic glacierBOT
lone axle
#

<@&356864093652516868> The weekly meeting will occur here on Discord in the #circuitpython-dev channel in about 1 hour from now. Please add your notes to the document: https://docs.google.com/document/d/12JEwXvIK4qXQrW0834d0OvcB_UJrkzvz7ZYyqQ8iLmg/edit?usp=sharing We look forward to hearing from folks during the meeting!

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.2.6 on 2023-09-12; Adafruit Feather M4 Express with samd51j19

Code/REPL

na

Behavior

synthio doesn't appear in the built-ins list for Feather M4 Express

Description

Not sure if there's a reason synthio isn't on Feather M4 Express be or just a simple omission? Looks like it is built in on ItsyBitsy M4.

Additional information

No response

lone axle
#

@mortal kernel I saw your not about seeking BLE and WIFI examples in the meeting notes. For BLE this repo has a handful: https://github.com/adafruit/Adafruit_CircuitPython_BLE/tree/main/examples You can also search on Github for other repo's named like Adafruit_CircuitPython_BLE_[something] for various other higher level libraries that are made to interact with different things which will also contain examples/ directory. For WIFI, my goto test scripts are the ones in the examples/ dir in the Adafruit_CircuitPython_Requests, and Adafruit_CircuitPython_MQTT repos.

thorny jay
# lone axle <@&356864093652516868> The weekly meeting will occur here on Discord in the <#32...

Sorry skipping the meeting without notes.
No CP this week, I am still running and testing the Teddy Ruxpin code from Limor and Jepler. The image part of the code is incomplete or not working. I want to work on the eyes animations and that is not covered fully in the published code. It requires understanding of PIL and potentially NumPy to process the images. Also the code is object oriented with a lot of decoration... not the kind of Python I usually do on microcontroller.

manic glacierBOT
slender iron
turbid radish
#

Please subscribe and tell everyone they might wish to do so too

#

We have posts marked Hacktoberfest

slender iron
#

@gilded cradle got a link to that page for eink markings?

gilded cradle
silver tapir
#

I have monkeys and large reptiles as neighbours, and can't recommend coding inside a forest 🙂 <3.

stuck elbow
#

will this affect low-memory platforms?

#

I'm happy to help testing this

manic glacierBOT
silver tapir
#

Circuitpython LTS? :p

gilded cradle
#

Thanks everyone

lone axle
#

Here is the notes document for next Tuesday’s CircuitPython Weekly meeting. It is at 11am Pacific / 2pm Eastern here on Discord, on Tuesday instead of Monday due to a US holiday. 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/1ghZq1dOYCZS5ptTj100rZ955xsZ209iXcma8Xd81unU/edit?usp=sharing

manic glacierBOT
manic glacierBOT
#

@jedgarpark I do think it's possible to create custom builds and enable / disable any core modules that have build flags. It would require modifying the mk file for the board you're building and then making a local build with the process documented in this guide: https://learn.adafruit.com/building-circuitpython

Alternatively there was functionality added so that custom builds can be created inside of Github via an actions task rather than having to do everything locally. I don't have any ...

#

@tannewt Does the RO2040 Nano support Circuit Python over the web workflow or is that like an ESP32 thing? A friend just got one and we've been struggling to get REPL working over the web workflow.

RP2040 Nano is not supported because it is an RP2040 connected to an ESP32. (We call this an airlift for adafruit products.) We are moving to a single core solution with ESP. So, I don't expect we (Adafruit-funded folks) will ever add it.

lone axle
#

The Template Engine library that was discussed during the weeds recently is all pushed into a repo and I believe it's ready for initial realease / adding to the bundle. https://github.com/FoamyGuy/Adafruit_CircuitPython_TemplateEngine

I'm not sure what the right process is for getting it's real repo created. I think github has a "transfer repo" feature, or if someone creates a new blank one we could push the initial code into it from this one. I think it needs someone with access to the org on Github in order to do that part. If anyone that does have access to do that gets a moment I'd appreciate help with that, let me know if there is anything further on my end to do as well.

slender iron
#

I found an issue to split epaperdisplay from displayio

#

any opinions about it being epaperio or epaperdisplayio?

blissful pollen
#

Is the functionality basically the same? That is if the epaper version looks/feels the same as displayio i like the epaperdisplayio name more personally and will likely help direct people to the right place. But given there is no other epaper module probably does not have a huge impact either way.

slender iron
#

ya, I think the idea is to move the EpaperDisplay class to it

#

may be worth splitting the regular Display out too

#

in 9.x we'd put them in the old place too

blissful pollen
#

If Display may also get moved out a convention where displayio stands as the main module and epaperio or displaydriverio? or something become the displays. Like all the display like modules have the same convention (if I'm making sense)

manic glacierBOT
slender iron
#

maybe displayio becomes displaycore to match audiocore

manic glacierBOT
blissful pollen
#

That makes sense to me. Having a clear this is the drivers to display different tech vs here is the common items works well.

manic glacierBOT
#

As discussed in the weeds a few weeks back, a board specific simpletest script.

I did the Feather ESP32-S2 TFT and made the script illustrate the usage of:

  • displayio
  • wifi / requests
  • LED blink
  • Neopixel rainbow cycle
  • Button input

I'm interested if anyone has ideas about what else should (or shouldn't) be included in the simpletest script. I wanted to try to feature the built-in hardware as best as possible without making the script overly complex.

One idea I had but di...

lone axle
# slender iron maybe `displayio` becomes `displaycore` to match `audiocore`

displaycore exists as a concept in the core I think. I'm not sure if I understand how you mean to change the names, but if the python / user facing name becomes displaycore and there is still that concept inside the core that is different from what the new name in python code would be referring to I think it could be a little confusing.

#

if that existing concept is being exposed under it's own name that makes sense to me, though I'm not sure if that is what you mean.

#

maybe the confusion isn't so bad either, it's only really applying to someone whose mucking about in the internals of the core anyway so I suppose they're already dealing with different concepts under similar names in a few other cases.

slender iron
#

I'm not sure exactly what would stay on displaycore but the idea is that it'd include the internal display core stuff

blissful pollen
#

Curious if a new displaycore module would have Bitmap or Gifs or could you even go as far as a _displayio module that underpins it all (just spitballing ideas not sure if this is good / bad)

slender iron
#

I think I'm for splitting it anywhere we could save code space by disabling

manic glacierBOT
manic glacierBOT
#

The delay is fairly long, on the order of 10 to 20 seconds. I can see one shot of writes when I save the file, the delay, then the remaining writes:

flash_write_blocks: block_num=42, num_blocks=1
flash_write_blocks: block_num=43, num_blocks=1
***delay 10 to 20 seconds***
flash_write_blocks: block_num=2, num_blocks=1
flash_write_blocks: block_num=3, num_blocks=1
flash_write_blocks: block_num=4, num_blocks=1
flash_write_blocks: block_num=5, num_blocks=1
flash_write_blocks: block_nu...
manic glacierBOT
manic glacierBOT
#

The workaround above is far from ideal as it needs to be repeated each time the device is plugged in to the Mac's USB port or for any other operation that causes MacOS to remount the CIRCUITPY filesystem. /etc/fstab is a dead end, Sonoma appears to ignore it for at least USB filesystem mounts. There's a huge amount of variability in the delay, I've seen it as low a 3 seconds and as high as 25 seconds, so increasing CIRCUITPY_AUTORELOAD_DELAY_MS to 30000 mS is probably not a good option....

manic glacierBOT
#

This behavior makes macOS more like Linux and Windows. It would be interesting to see if there is also a delay with a regular USB stick, that is, if you do a write and then pull the stick within a few seconds, does it lose the write and/or corrupt the file system?

I'd expect it to behave as you describe, it's getting late so I'll write this up and try the stick in the morning. The issue for Sonoma is not that the writes are delayed, it's that once the writes start it's reasonable to exp...

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

The writes can be both data writes to the individual files, and also filesystem metadata updates to the FAT. On Windows, the delay was considerably worse on FAT12 than FAT16 and larger. It appeared to be a relic of floppy disk support, to avoid spinning up the disk or wearing it out with frequent writes. See https://github.com/adafruit/circuitpython/issues/111. Supposedly this was fixed at some point in Windows 10, but I haven't had a chance to verify. On Linux, there is a delay for caching r...

manic glacierBOT
#

@dhalbert That's interesting. Casting about the web, I've found problems reported on versions of MacOS prior to Sonoma. Camera SD cards were getting corrupted, the root cause being removal of the card without dismounting. The posters were looking for a solution that would force noasync when the card automounts, but could never find one. In an earlier post to this thread I tried unmounting the Express and then remounting it with noasync specified. The delay between groups of writes went aw...

manic glacierBOT
#

@dhalbert Ran the experiment pulling a USB stick after a write:

  1. Created a 32M FAT12 filesystem on a USB stick
  2. Wrote the canonical code.py to the stick and verified
  3. Mounted the stick on Sonoma and opened it as a folder with VSCode
  4. Edited a minor change into code.py
  5. Saved code.py
  6. Counted one potato, two potatoes and pulled the stick

Wound up with a zero length code.py and without the expected .code.py metadata file.

manic glacierBOT
manic glacierBOT
#

@dahlbert Under the covers what's going on is that MacOS copy-on-reads blocks of a file into virtual memory and backs that memory with an unallocated area of the underlying filesystem. Writes become stores into virtual memory, triggering immediate page-outs to the filesystem. Because the filesystem mount flags include MNT_ASYNC, updates to the FAT and the metadata file are deferred until a timeout mechanism forces a flush. This is why pulling the stick results in a zero length file, the fil...

#

This got me thinking that if autoreload were to trigger selectively on just writes to the FAT (probably just two on such a small file system) this would eliminate the I/O error at the expense of a delayed autoreload.

That's a good idea, and we've thought about that in the past. But weren't sure that the FAT is the last thing written on all operating systems. The writes on Windows seemed to be a in random order sometimes. Also, writing data files that are in use could cause the progra...

manic glacierBOT
#

hi I had the same issue and thought I leave my rough step dir pio here.

this pio is able to vary step frequency and endposition while stepping. So one does not have to wait for it to reach its target.

the current setup is a 32bit input with a delay in the 21msbs and an endposition in the 11lsbs.
Like eg. Delay of 100 and endpos of 100 (1100100 bin)
000000000000001100100 00001100100

suboptimal limits and quirks; for once I tried to keep the step period constant, with label `compe...

manic glacierBOT
manic glacierBOT
#

Also, writing data files that are in use could cause the program to read bad data or cause program errors, though that's not as common as updating the program files.

Yes, that scenario is going to fail hard with MacOS, and probably with Linux and Windows too! Sharing a filesystem has lots of pitfalls, and this is clearly one of them. The producer and consumer do need some sort of locking, signaling and synchronizing mechanism to make sharing through the filesystem safe.

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

I did hope that this one could be a good starting point as inspiration for others. I'm open to any feedback on it. I do think the built-in hardware on a given device will factor in heavily to it's simpletest so there will be some parts that aren't as re-usable between different devices.

Some kind of automated generation would be neat, but I'm not opposed to sourcing some of it it from human activity. It gives us the opportunity for some new "good first issue" type things that people with l...

lone axle
#

Is it intentional that rgbmatrix raises ImportError: no module named 'rgbmatrix' on the Matrix Portal S3 starting with this build from S3:

adafruit-circuitpython-adafruit_matrixportal_s3-en_x_pirate-20230922-d6b284e.uf2

This one and newer raise the exception, and the ones below it do allow successful importing of rgbmatrix

If it is intentional where can I find out about the new API for it?

#

Ahhh, I found discussion at the bottom of #8411 that does discuss rgbmatrix being disabled intentionally.

I wonder if there is some way to make a notice for the Matrix Portal S3 specifically not to use any builds during this window where it is disabled since it renders the primary function of the hardware unusable unless I'm misunderstanding it. Although perhaps the issue is shortlived #8447 is in the works to resolve it.

manic glacierBOT
manic glacierBOT
#

@dhalbert @IrregularShed I'm currently working on the mentioned issue, but I'm facing confusion regarding which specific file needs to be modified. I have identified multiple audiobusio files. Could you please provide clarity on the exact file that requires modification for this issue?

sumitra@sumitra:~/opensource/circuitpython$ git grep "Bit clock and word select must be sequential pins" .
locale/ID.po:msgid "Bit clock and word select must be sequential pins"
locale/circuitpython.po...

manic glacierBOT
manic glacierBOT
#

@dhalbert Tested the stick pull on MacOS Big Sur (11.7.8) and had no data loss.

Tracing a file save on the same system, there is no appreciable delay between writes. Here is an annotated trace:

flash_write_blocks: ticks=296289, block_num=51, num_blocks=1 file update
flash_write_blocks: ticks=296333, block_num=2, num_blocks=1 FAT update
flash_write_blocks: ticks=296388, block_num=3, num_blocks=1 " "
flash_write_blocks: ticks=296393, block_num=4, num_blocks=1 " "
flash_write_blocks...
mortal kernel
#

Wondering which is the preferred IDE for CP beginners, Mu or Thonny? Something else?

blissful pollen
mortal kernel
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
tulip sleet
#

@slender iron @lone axle I updated and published circup 1.2.4 to do only 8.x bundles. There was no CircuitPython—Org bundle for 8.x. The last bundle release was two years ago (!). I tried to build a new one but that failed, so I opened an issue about that. To fix, I just copied the old 7.x bundle and uploaded it as 8.x. Now works.

lone axle
#

Thank you. I can try to look into that bundle and see if we can get the build working.

manic glacierBOT
manic glacierBOT
#

@dhalbert Earlier you'd asked whether sync forces proper behavior on MacOS Sonoma. Yes, it does. I've verified that both the command line sync and python os.sync() force updates to the Express filesystem immediately.

I did a small survey and found that the Mu IDE is an entry point for beginners. So, I added an os.sync() to write_and_flush() in logic.py of Mu. With the patch, saving code.py works as expected, i.e., the file and all directory and FAT updates are written out i...

thorny jay
#

Hi, could@lone axle (or next meeting host?) post a new pinned message with the meeting google doc document? The last one is from Liz pointing to Tim's meeting of the 2 october. Thanks. (I just want to write a hug report to CGrover... before I forget)

manic glacierBOT
manic glacierBOT
clear halo
manic glacierBOT
#

If keypad had simple tick timestamps, I wonder if that would work for you. Or if countio kept some kind of simple timestamps (e.g. supervisor.tick_ms() values) of the previous n ticks, maybe that would be useful. But that wouldn't help your lower-power sleep quest.

As of https://github.com/adafruit/circuitpython/commit/72bfd39a1754ca5b6c6a3c6d6b03444fe92ae49e, keypad events do capture timestamps (using supervisor.ticks_ms()). countio does not yet have this functionality.

manic glacierBOT
#

From the MicroPython 1.21 release notes:

...the zlib C module has been removed and replaced with a new MicroPython-specific deflate module and DeflateIO class that is optimised to provide efficient streaming compression and decompression. The zlib (and gzip) modules are now implemented in pure Python on top of the deflate module.

Here as a note for myself, or others that may take this on after CP merges with MP 1.21 but this may also result in a space savings by moving some functionalit...

manic glacierBOT
#

I didn't do any testing with problematic data for this, I just spotted the code looks suspect. Perhaps make some good wav files and then read them in and check the data is ok. That should fail for ones where the % 4 length is wrong. The code pads it with a mid value, 128 (0x80) for unsigned 8 bit, 0 for signed 16 bit.

#!/usr/bin/python3

import wave

sample_rate = 16000
data = bytes(range(32, 32 + 8 + 1))

for length in (4,5,6,7,8):
    with wave.open("testdata-u8-{:...
digital ibex
#

I have a bit of a strange idea. If I were to write a Minecraft modification that allows CircuitPython to be emulated with blocks in-game, would I be allowed to get a board page for it on circuitpython.org or would I have to maintain it in a fork due to its unusual nature?

#

I might be able to use existing work, like the OpenComputers II mod. If that were to be possible, this could be as easy as replacing the default OS (Linux) with a custom-compiled version of CircuitPython. I'm open to any ideas on this.

slender iron
slender iron
digital ibex
lone axle
# digital ibex I have a bit of a strange idea. If I were to write a Minecraft modification that...

If you're interested in prior similar projects: https://github.com/FoamyGuy/Minecraft_Feather_RP2040 I created this mod and some tools that go along with it. It's not really emulating a device to a full extent, instead it's very basic just spawning and despawning redstone torches based on messages being sent back and forth via USB serial between the mod and a phyiscal connected microcontroller. The real device could be removed from it though if you have something else send those messages in to the mod. Maybe some components or ideas from this could be helpful to you.

digital ibex
#

What if it was a Blinka board? Maybe you could install Blinka on the host system and use Python to control redstone in-game. That might be easiest. I could do it with an HTTP server in Python and GET requests in Java for the mod.

lone axle
spare jacinth
#

would it be something like the mod running emulated logic -aka CircuitPython- (can mods be written in C or would it need some RPC or whatever to be run from Java?)... and a few redstone wires as the GPIO?

#

and some custom block where you write the code?

digital ibex
spare jacinth
#

sounds like an interesting way to get into CircuitPy/Minecraft internals.. but i dont really see a good "interface" on how a user would actually interact with it

digital ibex
#

I think having buttons and levers for inputs, and redstone lamps for outputs is sufficient for basic use. Maybe it could even integrate with other mods for more advanced devices.

lone axle
#

With the Blinka example, if I'm understanding correctly, they would run a python script on the same PC that Minecraft server is running on (likely same as client is running on as well) with Blinka code in it that would then interact with mod running inside the game.

spare jacinth
#

but at that point you aren't really running circuitpy on minecraft, but using a mod to connect a "fake device" running "usual" circuitpy on the computer with redstone blocks
which would work, but is not what i understood they want to build

tbh i dont really see how CircuitPy logic would be run on/from the mod without something like that, anyway 🙃

digital ibex
#

That actually is what I want to build. It's less "CircuitPython in Minecraft" and more "CircuitPython with Minecraft" 😉

manic glacierBOT
spare jacinth
#

from my understanding it would be kinda simple (things always go off after saying this)
you would define the low level functions like how to read/write "pins" (redstone wires?), or write to console (messages in chat?) and everything else may just work?

digital ibex
#

That's the hope!

spare jacinth
#

your mod would pretty much be a server there, listen for circuitpython's messages and react accordingly (reply a pin reading, place a block, etc)

#

I would like to mess with it too, my Java knowledge is almost 0 but should get used rather faster. Let me know if you open a repo or whatever 👀

digital ibex
#

Will do, thanks for the offer!

spare jacinth
#

It would be quite interesting using power levels for stuff, eg: hex data over a single wire instead of 4 of them (needs tons of comparators to preserve the level, tho)

#

At the very least they would be a good way of doing analog signals

digital shoreBOT
#
adafruit
Owner

.adafruit

Members

37,828

Roles

38

Category Channels

8

Text Channels

63

Voice Channels

7

Threads

16

Boost Count

23 Boosts (Tier 3)

wraith crow
#

When you specify PSRAM_SIZE in mpconfigboard.mk is the size referencing 8bit or 16bit words? So specifically would a 64Mb (8M x 8bits) chip be 8M or 4M?

spare jacinth
#

i would like to assume any size measurement out there to be bytes, but there is always some outlier 🤣 (as in, what PSRAM_SIZE means)

wraith crow
#

😄 8bit or 16bit bytes?

spare jacinth
#

I understand 64Mb as:

  • M being uppercase => "stages" being 1024 (and not 1000)
  • b being lowercase => bits (and not bytes)

So, in bytes, i would say:
8 * 1024 * 1024 = 8M

#

I've never heard about using "byte" to refer to a 16bit thing

wraith crow
#

ok

#

thx

manic glacierBOT
clear halo
#

Hey @stuck elbow I was just listening to the latest CP weekly meeting about your need for visual fiducials and just wanted to see if you're aware of April Tags?

https://april.eecs.umich.edu/software/apriltag

I've used them with an OpenMV camera:

https://openmv.io/blogs/news/apriltag-marker-tracking-the-future-is-here

Seems like they'd be ideal for your use? I'm sure it could be ported from OpenMV if you wanted to use it with CircuitPython...

stuck elbow
manic glacierBOT
manic glacierBOT
#

I mean physical pins 11 and 12, GP33 and GP34 in picture

This is what I see in pins.c, pin_GPIO33 and pin_GPIO34 are missing:

{ MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) },
{ MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) },
{ MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) },
{ MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) },
lone sandalBOT
manic glacierBOT
#

I agree with that. There are other missing pins too. https://github.com/adafruit/circuitpython/blob/8.2.x/ports/espressif/boards/waveshare_esp32_s3_pico/pins.c has a much more complete list, without the pin aliases (Ax, etc.).

@tirtharajsinha would you be able submit a PR to correct pins.c in main here to match 8.2.x? I am wondering if this pins.c was copied from another board that wasn't a good match. @michael-ring If you would like to do a PR to make this match the 8.2.x vers...

manic glacierBOT
manic glacierBOT
#

Thanks. The pins.c in main is very different from the one in 8.2.x, so this may just generate a merge conflict or cause a bad mergewhen we merge from 8.2.x to main. Could you submit a PR against main to minimize the differences in the board definitions? There are necessary differences in the sdkconfig and maybe other places which will remain different.

orchid basinBOT
manic glacierBOT
#

Hi, @dhalbert I have created a pull request against main in #8464 .

But at the time of rechecking I found a another issue, Pin 19 and 20 were added in pins.c mistakenly. These pins are broken out in these specific board. these pins are used as USB peripheral.

So I have created a another PR ##8465 on 8.2.x. I have already fixed this issue regarding pin (19,20) in PR #8464 to main

Maker of these board have taken some very unusual decisions on remaping the pins.

manic glacierBOT
#

The error message for creating an I2S object on the rp2040 platform in CircuitPython can be misleading when the word_select and data pins are not sequential. This change updates the error message to provide clearer guidance by specifying "GPIO pins" instead of just "pins". The revised message now reads:

ValueError: Bit clock and word select must be sequential GPIO pins

Closes #8058

blissful pollen
#

Has anyone tried or had issues with trying to get the web workflow working on the Pico-W lately? Trying to see if I am missing a step, my router is acting weird, or if there is an issue. I'm seeing pretty inconsistent behavior but have never really been into the code in this area.

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

The Waveshare ESP32-S3-Zero board (https://github.com/adafruit/circuitpython/pull/8468) uses a Neopixel with different color order than RGB as the status LED, which means that it blinks green on error, and red on success. This is confusing for the users.

It would be nice to be able to specify a variable in the mpconfigboard.h for that board to swap the colors, so the errors are red and success is green.

I think the easiest way to do that is to add an ifdef in the `supervisor/shared/st...

manic glacierBOT
manic glacierBOT
#

The operating system shouldn't matter for code running on the board. But saving a file triggers auto-reload. You can turn off auto-reload with supervisor.runtime.autoreload = False if that's more convenient.

OSError: [Errno 5] is unexpected.

What IDE or editor are you using? Is there a safemode.py file or a boot.py file?

Update: other(s) are seeing this issue too

Sorry for the basic question, but where does the supervisor.runtime.autoreload = False go? I'm...

manic glacierBOT
#

The operating system shouldn't matter for code running on the board. But saving a file triggers auto-reload. You can turn off auto-reload with supervisor.runtime.autoreload = False if that's more convenient.
OSError: [Errno 5] is unexpected.
What IDE or editor are you using? Is there a safemode.py file or a boot.py file?
Update: other(s) are seeing this issue too

Sorry for the basic question, but where does the supervisor.runtime.autoreload = False go? I'm ...

thorny jay
#

Hello, before I fill an issue, on the Feather USB Host with 8.2.6 I was able to toggle on and off the USB, now in 9.x the GPIO is "in use". So I was wondering if there is a way around. I want to enable/disable the Teddy RuxPin (and later change the USB mass storage content... if possible):

import board
import digitalio

led_or_power = digitalio.DigitalInOut(board.USB_HOST_5V_POWER)
# On 9.0.0-alpha.1-63-gc9d7195505: fail with "ValueError: USB_HOST_5V_POWER in use"
# On 8.2.6 it works fine

# To test the code logic, you can replace the line with
#led_or_power = digitalio.DigitalInOut(board.LED)

led_or_power.direction = digitalio.Direction.OUTPUT

while True:
    led_or_power.value = True
    time.sleep(5)
    led_or_power.value = False
    time.sleep(5)```
orchid basinBOT
manic glacierBOT
manic glacierBOT
#

The awkward moment when you [experience this in July](#circuitpython-dev message) and ask about it in Discord, but forget to file an actual issue, and then Sonoma ships..

Can I suggest that in the meantime, relevant CP/Adafruit guides get updated with a little note about Sonoma issues with a link to a page noting the workarounds? I don't know what the % of CP users on macOS are, but I'd assume it's more than a handful of us, and S...

manic glacierBOT
manic glacierBOT
#

After some debugging, it would seem the I2C frequency is not compatible with Teensy is why it's failing. After changing it, I was able to make the sensor work:

`import time
import board
import adafruit_bno055
import busio

i2c = busio.I2C(board.SCL, board.SDA, frequency=400000)
sensor = adafruit_bno055.BNO055_I2C(i2c)

last_val = 0xFFFF

def temperature():
global last_val # pylint: disable=global-statement
result = sensor.temperature
if abs(result - last_val) ...

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.2.6 on 2023-09-24; EK68Custom with rp2040

Code/REPL

a customised boot.py which automatically locks out interfaces if no interaction during boot.
____________________
from ref.boot_process import run_bootup
run_bootup()
____________________
And at the end of run_bootup():

    finally:
        if should_disable_ports:
            run_ignore_errors(120, lambda: storage.disable_usb_drive())
            r...
thorny jay
#

Was there a weekly meeting 21 hour ago?
I don't see the usual posting here, like extract from the newsletter, I don't see a the call message, the google doc seems only partially completed, there is nothing on Spotify or YouTube.
I was not online, and I think most Monday I will only be able to put notes and listen to the recording.
But I feel the meeting just did not occur yesterday.

thorny jay
slender iron
#

Sorry I didn’t ping folks with a reminder! I was afk yesterday

slender iron
#

<@&356864093652516868> Our meeting will be in just over an hour. Talk with you soon!

manic glacierBOT
#

After additional study of the codebase I must admit that changing the refresh_time is not the right thing to do. So I will update my pull-request to get the other stuff in.

But I would still like to get rid of the useless time spent in _clean_area. Can we add an option to make this optional? The only reference I found regarding this cleaning is in a document from Waveshare and they state it is necessary because of ghosting. But they give no reference for this claim.

Pimoroni, which us...

lone axle
gilded cradle
#

You're welcome. It was fun.

manic glacierBOT
#

CircuitPython version

9.0.0-alpha.1-63-gc9d7195505

Code/REPL

import time
import board
import digitalio

led_or_power = digitalio.DigitalInOut(board.USB_HOST_5V_POWER)
# On 9.0.0-alpha.1-63-gc9d7195505: fail with "ValueError: USB_HOST_5V_POWER in use"
# On 8.2.6 it works fine

# To test the code logic, you can replace the line with
#led_or_power = digitalio.DigitalInOut(board.LED)

led_or_power.direction = digitalio.Direction.OUTPUT

while True:...
gilded cradle
#

👋

errant grail
#

Thanks Scott!

lone axle
#

Thanks for hosting Scott! Hope everyone has a great week 👋

midnight ember
#

Thank you for hosting @slender iron

slender iron
#

👍

#

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/1Z2hOLlAeC6nmtiImTzmkis1pREnbMsQum4Dlls3enaI/edit?usp=sharing

slender iron
#

looks like it's targeting absolute newest

#

but I broke it when I disabled .show()

gilded cradle
#

Yeah, I didn't know about show going away when I wrote it.

slender iron
#

using absolute newest can change anything. best to do a fixed newest version when you need it

gilded cradle
#

Yeah, I'll do that in the future (and in the relevant guide).

slender iron
#

thank you!

gilded cradle
#

I just want to test that the code works first. I think the reason I didn't point it to a branch at the time was because of the instability issues the matrixportal s3 was having at the time that you addressed.

slender iron
#

9.x is the only thing with the bitmaptools improvements right?

lone axle
#

bitmaptools existed more generally before that. But displayio.Bitmap.blit() was moved into bitmaptools() more recently

#

So things that would have previously imported displayio only now need bitmaptools if they were using Bitmap.blit()

#

one of those things being BitmapLabel from adafruit_display_text which itself is used within several other libraries.

slender iron
#

I saw blendmode mentioned in an error on that thread

lone axle
#

Ah, not sure on that, less familiar with some of ther other utilities within bitmaptools.

slender iron
lone axle
#

Thank you. I can validate that functionality in the releaser with it.

slender iron
#

👍

#

I think it'd be neat to integrate a label into the flow

#

to have it autodetect and call out the change

manic glacierBOT
manic glacierBOT
slender iron
#

@stuck elbow a third private function would have the shared piece

stuck elbow
slender iron
#

👍 np

#

I'm the same way

manic glacierBOT
#

Hi,

I've tried to serve httpS on a Pico W, but it's indeed slow as reported also in: https://github.com/adafruit/circuitpython/issues/7657

Is it possible to use an external crypto chip attached to the Pico W to speedup HTTPS (something like https://learn.adafruit.com/adafruit-atecc608-breakout/overview)?

I just want to know if I'm digging in the right direction [and that it's not a rabbit hole 😄] - IMO an example with this would be highly useful.

Thank you again for your incredibl...

manic glacierBOT
#

After additional study of the codebase I must admit that changing the refresh_time is not the right thing to do. So I will update my pull-request to get the other stuff in.

Thank you!

But I would still like to get rid of the useless time spent in _clean_area. Can we add an option to make this optional? The only reference I found regarding this cleaning is in a document from Waveshare and they state it is necessary because of ghosting. But they give no reference for this claim.

...

tidal kiln
#

general design guide like question - should #def like constants go at the module level or class level?

slender iron
tidal kiln
#

like if it's for internal class use only vs. something user code would need?

slender iron
#

yup

tidal kiln
#

user code ones = module level?

slender iron
#

or if it's used by one class or many

tidal kiln
#

thinking those should go module level

tidal kiln
#

@candid sun just fyi - see above question. relates to your pr.

candid sun
#

@tidal kiln okay thank you!

lone axle
slender iron
#

Thanks for bugging me. Sorry I failed to make one yesterday. I’m afk for lunch and will try and do it later. Bug me again if I don’t

tulip sleet
tidal kiln
tulip sleet
#

then if class-related, in class, not in module, sure

tidal kiln
#

@tulip sleet actually, i'm just a person in the middle (but also curious about the details). see link above - its liz's pr.

tulip sleet
#

and avoid unnecessary prefixes that are redundant w/r/t class

#

e.g. make the names as short as reasonable, to save space

#

not ADS555_ADC_GAIN5, but just GAIN5, or whatever

#

i just made that up

tidal kiln
#

what's answer specific to pr above?

lone axle
#

Thank you!

tidal kiln
#

@candid sun u wanna chat here about ur pr and those consts? obviously i don't know 🙂

candid sun
#

@tidal kiln sure thing 🙂

tidal kiln
#

(i'll update design guide if seems worth it to capture details)

#

in general, i think your PR is at the point now its good for other CP peeps to review

candid sun
#

@tidal kiln okay cool, thank you so much for all of your reviews. i learned a ton and definitely understand library structure a lot more

tidal kiln
candid sun
tidal kiln
#

yah, agree, would be good to link from that guide

manic glacierBOT
#

Ok I put in a simple safemode.py as per your link:

import microcontroller

microcontroller.reset()

I also DDed over my Win7 OS with latest backup too. Didn't see any issues and the keyboard was detected and installed fine as long as I allowed the firmware to auto-disable things as per my run_bootup.py in the description (aka simple mode). Win7 was happy to let the kb be treated as a kb with no issue. But when (while still in Win7) replugged the kb with the password entered a...

candid sun
#

in doing the readthedocs for https://github.com/adafruit/Adafruit_CircuitPython_AD569x , i'm getting this error:

There is a programmable error in your configuration file:

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/adafruit-circuitpython-ad569x/envs/latest/lib/python3.11/site-packages/sphinx/config.py", line 358, in eval_config_file
    exec(code, namespace)  # NoQA: S102
    ^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/adafruit-circuitpython-ad569x/checkouts/latest/docs/conf.py", line 121, in <module>
    import sphinx_rtd_theme
ModuleNotFoundError: No module named 'sphinx_rtd_theme'```
assuming there's some setting i'm missing? i know stuff for read the docs changed recently
GitHub

CircuitPython module for the AD5691/2/3 I2C DAC. Contribute to adafruit/Adafruit_CircuitPython_AD569x development by creating an account on GitHub.

stuck elbow
manic glacierBOT
#

Not quite sure what to list this under but I have recently purchased the SuperMini NRF52840 which seems to be fully compatible with the Nice!Nano.
So I flashed the Nice!Nano CircuitPython build on it and tested all the pins to see if they all map the same and everything seems to be working A-Okay.

So I don't know what the best course of action is here.

manic glacierBOT
#

I have added support for this to my fork:

https://github.com/Axeia/circuitpython-ESP32-S3-Zero/blob/1477bc403bb3e58a64dc1ede92567b44934dfee3/supervisor/shared/status_leds.c#L261-L266

(and a #define MICROPY_HW_NEOPIXEL_ORDER_GRB (1) line to mpconfigboard.h)

Disclaimer: I am definitely out my element in C as those are the first lines I've ever written in it. Initially I tried adding:
#define MICROPY_HW_NEOPIXEL_GRB (&pin_GPIO21)
to mpconfigboard.h as an alternative to:
`#...

manic glacierBOT
manic glacierBOT
#

I have created a copy of the Waveshare RP2040 LCD 1.28, because the Waveshare RP2040 Touch LCD 1.28 has the LCD Reset pin on GP13 instead of GP12.

It is not a very advanced port. I'll try and add the initialization for the display next. (But the one I copied doesn't have initialization either).

Next steps would be:

  • Display initialization
  • Adding touch pins
  • Add initialization for other modules (like touch, and accelerometer)

Reference:
https://www.waveshare.com/wiki/RP2040-To...

manic glacierBOT
manic glacierBOT
#

We might want to enable the espcamera module back, there is no reason why it wouldn't work with this board, there are enough pins, and external ram.

For completeness (we talked about it on discord as well :))

Creating esp32s3 image...
Merged 4 ELF sections
Successfully created esp32s3 image.

1482784 bytes used,  -40992 bytes free in flash firmware space out of 1441792 bytes (1408.0kB).
   4220 bytes used,    3972 bytes free in 'RTC Fast Memory' out of 8192 bytes (8.0kB)....
tulip sleet
lone axle
#

It seems to have completed successfully, but there are still some exceptions printed in the log, and some messages about API rate limit. Looks like there is wait / retry logic built in to it as well so it was able to succeed eventually.

manic glacierBOT
#

I did create an 'issue' for this ( see https://github.com/adafruit/circuitpython/issues/8473 ) as I wasn't sure if it warranted its own build.
The SuperMini NRF52840 is fully compatible with the nice!nano and actually works fine just flashing the nice!nano circuitpython build to this board.

These files are thus near identical to the nice!nano just changing the USB PID to the one I got from the board whilst it wasn't flashed with anything yet through lsusb command under linux ( Bus 001...

slender iron
#

@candid sun do you need help getting the RTD going for that new library?

candid sun
#

@slender iron i did get RTD working with the right theme. i think the only thing pending is adabot accepting the admin invite

slender iron
#

k, I can accept that

#

getting it added as a subproject of cp is usually manual too

candid sun
#

sweet, thank you!

slender iron
#

accepted

#

added the subproject too

candid sun
#

thank you very much!

manic glacierBOT
main furnace
#

Does circup support CircuitPython 9.0?

manic glacierBOT
#

Not possible to add a screen I don't think? ... as I put this keyboard together myself from discrete components and passives, following the RP2040 hardware guide/datasheet. It's not an official castellated board or anything like that. Anyhow, I added a section to my USB detection loop to check if it's in Complex Mode on USB disconnect. If so, it resets the board too. This gives it time to reboot in time with my PC rebooting, ready to enter the UEFI boot selection screen and then subsequen...

slender iron
main furnace
#

Wow, bleeding edge! Would an issue in the circup project be appropriate?

slender iron
#

we're waiting for the MP 1.20 merge since it changes the mpy format again

main furnace
#

Ah, gotcha. Thanks!

manic glacierBOT
#

Some workarounds:

  • simply waiting until the write completes: code.py will restart again after the final write. [not tested by me yet]
  • Turning off autoreload: supervisor.runtime.autoreload = False.
  • Doing sync in a Terminal window
  • Adding an os.sync() in the right place in whatever editor is being used.
  • Downgrade back to Ventura. I don't know how easy or possible this is.

I will not have an opportunity to try this on a Sonoma Mac for a few days, but will try to characteri...

lone axle
#

@main furnace I've been using circup successfully on newest builds but have to pass --py flag to get python instead of mpy files.

tidal kiln
#

i can't reproduce

Adafruit CircuitPython 8.2.6 on 2023-09-12; Metro MIMXRT1011 with IMXRT1011DAE5A
>>> import board
>>> from adafruit_seesaw import seesaw, rotaryio, digitalio
>>> i2c = board.I2C()
>>> 
#

is there any known issue with M7 and the pull up test? like something that might be marginal?

stuck elbow
#

That looks like a bug in the i2c code of that encoder to me.

#

Like it crashes or hangs at some point, and holds one of the lines low, which looks to the mcu like a missing resistor

#

I wonder if adding a delay before creating the i2c object would help, maybe it's just slow startup of the mcu on the encoder?

tidal kiln
#

but only happens in that specific context

#

the i2c scanner works

#

and i can't reproduce using same hardware

manic glacierBOT
stuck elbow
#

is the encoder firmware versioned?

tidal kiln
#

yes

#

but it rarely changes

stuck elbow
#

both examples run the check, so if one works and the other doesn't, consistently, it must be timing

#

the only other option is memory corruption during the imports

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.2.6 on 2023-09-12; Raspberry Pi Pico W with rp2040

Code/REPL

a=1697226806333; print(a); print("%d" % a); print("%f" % a); print(int(a)); print(float(a));

Behavior

This is the output I get from the above code:

1697226806333
1697226806333
1697226670080.000000
1697226806333
1.69723e+12

Description

I get different values between integer and float. I suspect the int to float conversio...

orchid basinBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Ah, that explains it,
I was actually trying to take a unix_timestamp in milliseconds (derived from a api call) and dividing by 1000 so I could use time.localtime(seconds_since_the_epoch) to get a datetime.time_struct suitable for setting the RTC.

time.localtime seems to want a float, but I guess it then converts that back to an integer?

I guess I need to think in smaller numbers because the unix_timestamp in milliseconds is possibly 48bits long!

Assuming my time in ms is:
16972296...

#

time.localtime() can take an int or a float in "regular" Python. In CircuitPython, it will also take either but it's converted to an int.

>>> import time; print(time.localtime(1697229699.987654321))

This is a real float, but the significant digits after about 5 1/2 digits are dropped. It's not the magnitude of the value (it can be up to about 10**38), but the precision. So you'll get a time, but it won't be as precise as the floating point value.

If you are trying to set your ...

manic glacierBOT
#

well, in CircuitPython the RTC needs a struct_time object, and that is a part of time. I don't know how else to easily convert an integer timestamp (which might be 32 bits+) into a struct_time object without using the ``time``` library.
But anyway, using an integer timestamp in seconds (rather than a float ms or a float secs) passed to time.localtime seems to work for me and I get the correct struct_time to pass to the RTC, even though that int timestamp is 32bit.

Thanks for l...

lone axle
#

@gilded cradle with the new Blinka_DisplayIO I'm curious if you could point me in the right direction for how to get the data from a Display object and use it to load a PIL.Image object? I know it used to use the PIL.Image internally but no longer does.

I'm guessing it is somehow using fill_area() to fill a buffer memoryview which can then somehow be "fed into" PIL to create an Image object, but I'm not sure how. I tried Image.frombuffer() and Image.frombytes() without success, I think there must be some reformating of the data that needs to take place or something.

manic glacierBOT
lone axle
#

I got seemingly very close with img = Image.frombytes("I;16", (400, 300), buffer.tobytes()) but The size and shape of my image data is correct, but the color is off. This is meant to be green and purple like many of the display driver simpletests.

stuck elbow
#

@lone axle is there a reason why you specifically have to use PIL and can't just use pygame.image.save()?

lone axle
stuck elbow
#

I have some pygame experience, but it was before version 2.0

lone axle
#

my code was ultimately using pygame.image.fromstring() to get it back from the PIL Image to the pygame image

stuck elbow
lone axle
#

there is probably a way to skip PIL now and go directly from the new displayios concept into pygame's image concept. But I'm not sure how quickly I'll figure it out.

#

Thank you, I'll take a look at those.

iron fractal
lone axle
iron fractal
#

Oops yeah you're right it's something @slender iron wrote. The implementation looks reasonable but must be a reason it wasn't properly released.

slender iron
#

I can be pretty lazy when it comes to polishing up libraries

gilded cradle
#

Your approach may be better for long term compatibility though if you can get it working. I think it’s sending the colors as RGB565 iirc

manic glacierBOT
#

@heygauri run make translate locally, and then commit the resulting change to locale/circuitpython.pot.

I followed the same process, and it updated the error message in locale/circuitpython.pot. However, it also generated some unintended changes, approximately -518 lines, which I am not aware of. You can see those changes in this PR.

Update: I followed the document https://learn.adafruit.com/building-circuitpython/linux and below is the output:

$ make translate
find extm...

manic glacierBOT
#

The missing error messages are because the ulab submodule was not loaded, so its messages were omitted. You can do make fetch-all-submodules from the top level, or descend into ports/atmel-samd (or most other ports), and then do make fetch-port-submodules, which will get ulab.

There were some new translations, so I merged from upstream, and re-did the make translate, and pushed new commits to your branch. Should be all set now. I'll review and merge when the build is done.

lone axle
#

I think I found some good news / bad news on the RTD front: https://blog.readthedocs.com/defaulting-latest-build-tools/

The've recently made a change do away with some of the automatic things that happened and were installed during their builds based on the date the project was made. That is good for the sake of consistency, but it does mean that some of the defaults we have been relying on are no longer in place.

Specifically sphinx-rtd-theme used to be installed automatically during a build in RTD, and now it no longer is. This means that any new builds on our libraries (and maybe core?) will fail with this error:

#

Some of the changes that can be used to fix it are in this diff: https://github.com/adafruit/Adafruit_CircuitPython_TemplateEngine/compare/48c67eb...main basically boils down to needing to include sphinx-rtd-theme in docs/requirements.txt and then setting html_theme and html_theme_path inside of the conf.py file.

However it's probably worth making further changes to it before rolling out to the other libraries. I think some of our logic in conf.py can be made less complex because we don't need to worry about running inside RTD vs. outside / locally. I opted for a more quick and dirty fix, but now that I've found the blog post I have a better understanding of what led to it, and think it can be made even simpler in our conf.

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

The missing error messages are because the ulab submodule was not loaded, so its messages were omitted. You can do make fetch-all-submodules from the top level, or descend into ports/atmel-samd (or most other ports), and then do make fetch-port-submodules, which will get ulab.

There were some new translations, so I merged from upstream (upon reflection, probably not necessary), re-did the make translate, and pushed new commits to your branch. Should be all set now. I'll r...

ornate breach
#

is there a way to fetch submodules without getting the ones for the RPi broadcom port

manic glacierBOT
#

Just got back from vacation. Tried this out first thing with 8.2.6 and still getting the same issue. Will hard fault after about 5-6 file saves in Mu regardless of bit_depth. Also rainbowio of the fireworks no longer works as it did no matter the bit_depth setting used. Because rainbowio isn't working like it was with 8.2.5 perhaps I'm using outdated libraries? I only updated the UF2 to 8.2.6

Should I be using this with a 9.0 alpha instead? It says merged into 8.2.x main, just want to ...

manic glacierBOT
#

Can't test, but looks fine!

Could you submit another PR to main? Note that mpconfigboard.mk and sdkconfig have changed significantly in our 9.0.0 revamp of various things, so just merging this from 8.2.x is not going to work. Check out some examples of your current boards in main.

Yeah, sure thing. It 9.0 close? I am working on adding 2 more boards at the moment, so do I just add them to main and not bother with 8.x?

devout jolt
#

Question for @tulip sleet or anyone else with knowledge of C-based CircuitPython classes.
Which is more space/time/CPU efficient: Reusing keypad.Event for my touch sensor events or creating a namedtuple("Event", "key_number pressed released")?

stuck elbow
#

reusing will always be more efficient, no?

#

also will avoid memory fragmentation

devout jolt
#

this has been my assumption too. I mean, I'm not using keypad for anything else, but it is built-in

stuck elbow
#

why would using it for something else be a problem?

devout jolt
stuck elbow
#

I'm thinking we are talking past each other, not sure you mean the same thing by "reusing" as I do

atomic summit
#

Was fighting that macOS Sonoma sync issue all day yesterday - what a disaster 😦

Thankfully I saw the issue posted here last week just before I updated my work Mac Studio to Sonoma, but wow.

stuck elbow
#

keypad has an option to fill in the information in an existing Event object, without creating a new one, that is more efficient than creating a new Event

stuck elbow
#

otherwise circuitpython would be using mtp for this

stuck elbow
#

I'm sure they know what is best for them

devout jolt
# stuck elbow keypad has an option to fill in the information in an existing Event object, wit...

Sorry maybe some code will make it clearer. I have a board that has many touchio pads. I want to turn those pads touches into events, like keypad. This is what I'm currently doing: https://github.com/todbot/picotouch_synth/blob/main/circuitpython/pts_drum_machine/picotouch_synth.py#L117
There are no other uses for keypad. I was wondering if using keypad.Event in this was was more/less-efficient than constructing a namedtuple

atomic summit
#

Sorry, forgot to add the drooling sarcasm emoji - oh Apple don't provide one of those either - how ironic 😉

stuck elbow
devout jolt
stuck elbow
#

I mean, one that runs in the background, like keypad does

devout jolt
stuck elbow
#

but it's been slow progress

stuck elbow
#

I'm sure that with a bit of tweaking it could also bring world peace and eternal prosperity

devout jolt
stuck elbow
#

I suppose iphones do it through a music collection management app still?

devout jolt
stuck elbow
#

at least it's not the web browser

tulip sleet
#

but the efficiency difference is probably inconsequential. Our discussion of this may have taken more time than the runtime difference for a year.

#

I assume Apple didn't want to support MTP because they wanted an iPod monopoly on Macs. But such marketing considerations have been gone for years.

mortal kernel
tulip sleet
tulip sleet
mortal kernel
#

Dan could be right on about Apple's motives. That said, there's always been a path for a third party to add MTP filesystem support as a kext. AFAICT no one has ever taken on the task.

stuck elbow
tulip sleet
#

we support .txt and .py, but if the native MTP is not handling non-image extensions, that's a big pain.

#

I see other ones, some obsolete

#

but we really don't want to have to ask our Apple users to do this kind of thing. Impossible for schools, etc.

atomic summit
tulip sleet
#

I have two Macs and will upgrade one to Sonoma so I can characterize this, maybe take some Beagle or wireshark traces

atomic summit
#

I had it failing to upload bitstreams yesterday to my BlizzardS3 board in UF2 mode (custom UF2 bootloader we made for BlizzardS3).

tulip sleet
#

if you just wait 10-20 seconds, does it eventually work?

atomic summit
#

And sometimes I was able to copy the file without error, but it didn't actually update it - until I did a sync.

tulip sleet
#

or is something timing out? I want to see if it's doing something like: write data -- wait 10 seconds -- write metadata

#

When Windows delays writes, it's more like: wait 10 seconds -- write data and metadata

atomic summit
#

I found the same thing with updating code.py on the device. I'd update it and do a soft reset (have auto loading off) and it didn't actually update the code even though I got no error.

#

I had to manually sync the drive.

#

but - sometimes it worked without a sync.

tulip sleet
#

behavior probably depends on whether the file grows or shrinks, etc. I'm not even sure if it's writing metadata first or data first

mortal kernel
#

On the MacOS Sonoma thing, the annotated traces I put on the issue shows the timing.

tulip sleet
#

or mixed

atomic summit
#

I tried the os.snyc() in a loop in my code, and that never helped.

tulip sleet
#

that is surprising

#

I thought that worked for someone

mortal kernel
#

It's writing the filedata as soon as it's updated. It's the directory and FAT updates that are delayed.

atomic summit
#

It it worked for me, it was as inconsistent as not using it.

tulip sleet
atomic summit
#

I looked through the issue on github, but didn't experience anything different from what was already added there.

tulip sleet
#

@mortal kernel is it possible to mount the filesystem as sync or something like that

#

ok you said

Manually mounting the filesystem specifying option noasync removes the delay. This appears to be a regression in Sonoma.

#

so it works if mounted noasync?

#

@atomic summit eightycc's experience is that sync should fix it, so hmm...

mortal kernel
tulip sleet
#

is there something like a udev rule?

mortal kernel
#

sync needs to go immediately following the fclose.

tulip sleet
#

do you have any contacts still at Apple who might be able to explain the behavior change?

#

i should have re-read the whole thread; you did more extensive experiments than I realized. This all started just when I went out of town for two weeks

mortal kernel
#

I'm waiting to hear back from one of my contacts.

tulip sleet
#

thank you

mortal kernel
#

In the meantime, I've been working on a user agent (a MacOS daemon) that uses the DiskArbitrator framework to modify mount flags. Basically, it remembers mounts you've flagged for synchronous updates and forces the flag during the mount process. It gets started automatically by MacOS and lives in small icon on the toolbar. I got motivated to do this because it's clear this is an issue for more than CP.

tulip sleet
#

yes, I would think more people are going to pull USB sticks and get corruption. Yes, they're supposed to eject, but it used to work

#

when I search for sonoma disk issues, I get a bunch of other complaints (slow this or that), but nothing really coherent

mortal kernel
#

What's strange is that I've been all over the Sonoma open source code and cannot find anything that's changed that could cause this. I've look hard at vfs in the BSD part of the kernel and at the msdosfs kext. Nada.

#

That MP issue does look like the same thing. Yeah, I've done searches too. It's hard to draw a straight line to our issue on most of them, but wait a month.

tulip sleet
#

pretty mysterious that you're not seeing any code changes. I wonder if there was a closed-source daemon that was doing prompt syncs or something, and now it's gone

mortal kernel
#

Don't discount the possibility that I've missed something! The code is complicated and has had many fingers in it over the years. There is a closed source bit called FSkit that handles automounting when a device appears, but all the real work of file I/O happens in those two spots I mentioned.

devout jolt
manic glacierBOT
#

Yeah, sure thing. It 9.0 close? I am working on adding 2 more boards at the moment, so do I just add them to main and not bother with 8.x?

9.0.0 is not that close. We are finishing the MicroPython v1.20.0 merge, and then we'll start doing alpha's, because the .mpy format will stop changing. But then we also need to do the v1.21.0 merge, and there's a lot of debugging to do too.

No issue if you want to wait and do all the boards at once for main.

#

Yeah, sure thing. It 9.0 close? I am working on adding 2 more boards at the moment, so do I just add them to main and not bother with 8.x?

9.0.0 is not that close. We are finishing the MicroPython v1.20.0 merge, and then we'll start doing alpha's, because the .mpy format will stop changing. But then we also need to do the v1.21.0 merge, and there's a lot of debugging to do too.

No issue if you want to wait and do all the boards at once for main.

Ok, thanks for clarifyin...

manic glacierBOT
odd thunder
#

I hope this is the right place to ask this. If not, let me know. I would love to be able to use the MAX3421 chip to enable USB host functionality on any mcu. I have some experience with this chip and was going to put some time into building support for this chip into the usb_host circuit python core. If I'm successful would this be considered for a pull request, or would you rather not have the comminity contributing code to core modules?

crimson ferry
#

@odd thunder A core dev can better answer authoritatively on the merits (I'm just a community member), but community most definitely contributes to the core (via PRs). But since this feature would rely on an external chip not present on most boards, perhaps it would be an optional module... pin choices for the connection would vary?

odd thunder
#

@crimson ferry thanks for the response. That makes sense, I can write a library instead, similar to how sensors and other external hardware is supported

crimson ferry
#

hopefully a core dev will chime in, or you could open an issue for discussion

odd thunder
#

Your timing is impeccable. I’m very excited to see this. How will the functionality be exposed to an application? My use case is to control dslr and mirrorless cameras over usb. I’d be happy to contribute support for this protocol once these updates are live

wraith crow
tulip sleet
#

there will also be arduino support for various chips

manic glacierBOT
#

With Scott's recent memory work on 9.x, I decided to take another look at this since I believe it's some sort of memory management bug, however the issue still seems to occur using the latest build from main.

I was able to build a debug build by disabling WiFi which actually ended up creating a much smaller image (about 500K free flash, rather than 50K free flash for the standard build). That build still showed the issue but it took much more activity (memory use) before the problem occurr...

manic glacierBOT
tulip sleet
#

@slender iron I can run the CPy meeting this afternoon, since you did it last week while I was away. I will prep the notes.

tulip sleet
#

<@&356864093652516868> Reminder: There is a CircuitPython weekly meeting in a few hours, 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! https://docs.google.com/document/d/1Z2hOLlAeC6nmtiImTzmkis1pREnbMsQum4Dlls3enaI/edit?usp=sharing

lone axle
# lone axle Some of the changes that can be used to fix it are in this diff: https://github....

I confused myself slightly while looking into this by looking at a library that "fell through the cracks" of the recent RTD change. It was cookie-cut before the change was live there, and it wasn't published when the patch to fix the other libraries was rolled out so it didn't have that fix yet, which essentially was the simplification that I referred to in this post, so that is already done mostly everywhere.

The change that RTD made on 10/3 (outlined in the RTD blogpost) does mean that sphinx-rtd-theme is no longer installed automatically so we'll need to add it to one of our requirements files in order to get the library docs builds to succeed inside of RTD. I've tested that fix successfully in the TestRepo: https://github.com/adafruit/Adafruit_CircuitPython_TestRepo/commit/364a28bd7385e1df0f2faf0b8cec5764b096bacc and RTD build is back to passing successfully with that change https://readthedocs.org/projects/adafruit-circuitpython-testrepo/builds/22241651/

main furnace
#

Now running: Adafruit CircuitPython 9.0.0-alpha.1-68-ga4b8afb54f on 2023-10-14; Adafruit-Qualia-S3-RGB666 with ESP32S3

tulip sleet
#

meeting starting in 5 minutes

lone axle
manic glacierBOT
lone axle
manic glacierBOT
turbid radish
#

Submissions welcome

slender iron
#

Our repos are generally marked with the hacktoberfest tag

lone axle
#

hacktoberfest is tagged on the repo, so it counds for all PRs even if they aren't tagged specifically at the PR level.

wraith crow
#

Yes thanks

slender iron
silver tapir
#

Another reason to use the esp32 web workflow ❤️

slender iron
#

do we want a glossary on RTD or should we remove it?

#

we deleted the MP one

mortal kernel
#

@slender iron I've been building CP 8.2.6 and CP 9.0.0 with the ARM GCC 12.3 toolchain without modifications to CP or Pico SDK. I'm not seeing any problems related to using this toolchain. 🤞

slender iron
#

I'm using 13.2 now successfully too

lone axle
tulip sleet
#

we plan to move to 12.3 after finishing the micropython merges

#

gcc 13 looks like it would save more space, but there is no downloadable toolchain set from ARM yet

mortal kernel
tulip sleet
#

we just point to the arm download

slender iron
candid sun
#

thanks @tulip sleet !

lone axle
#

Thanks for hosting Dan! Hope everyone has a great week!

main furnace
#

rah!

#
#Using the Qualia RGB666 board
from tl032 import display
from adafruit_display_text.label import Label
from terminalio import FONT
import displayio
import time

display.rotation=90
group = displayio.Group()
label = Label(FONT, text="Bar Display", color=(44,240,44), 
    x=display.width//2,
    y=display.height*3//4)
group.append(label)
display.root_group=group

It's nice!

slender iron
slender iron
#

@tulip sleet any idea when you want to start the 1.21 merge?

tulip sleet
#

i'd want to do it against main after v1.20 is merged, yes? Immediately afterward is fine. Did you push to my branch for the v1.20 merge and I'll make a regular PR?

slender iron
#

I did push

#

the docs build is failing

#

I have a fix i can push

tulip sleet
#

sure ga

slender iron
#

done

#

my ci build is green besides that

#

pre-commit was green too

tulip sleet
#

i am finishing up the meeting notes

slender iron
#

👍

tulip sleet
#

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/13dm8Dw4AJq_dwmmmlnnBj79qUaau48uXwYyJTO2_YMs/edit?usp=sharing

manic glacierBOT
slender iron
#

@tulip sleet gonna make a PR for 1.20?

tulip sleet
slender iron
#

np. naps are great

#

I'm starting to test on some boards so I'll make a comment on the PR

manic glacierBOT
slender iron
#

my CI run is green. only espressif is still going

tulip sleet
#

@slender iron Did we decide on which one of us was going to start the v1.21 merge? I am willing to do that because the repeat merges will look familiar. I can knock off the easy stuff and then we can do pair merging or split up problems as necessary for the rest.

slender iron
#

that sounds good to me

#

I'm reading through the 1.20 merge PR but I'm not sure its worth it

#

I've only found two weird files

tulip sleet
#

i started that but gave up. which two?

slender iron
tulip sleet
#

after the build finishes I will push removing those. Are you doing some board testing? I can pick some ports that don't overlap with you.

slender iron
#

I did esp32s3, esp32 and samd51

#

1011 and silabs are on my desk

#

pico w would be good to test too

tulip sleet
#

I'll do pico w

#

and nrf

slender iron
#

👍

manic glacierBOT
slender iron
#

@tulip sleet I've found a couple other minor things so wait to push

tulip sleet
#

i am still testing

#

pico w is doing wifi just fine

slender iron
#

🎉

manic glacierBOT
slender iron
#

nice, CI passed

tulip sleet
#

OKAYYY!!

#

@slender iron basic BLE stuff works; tested with heart rate monitor

slender iron
#

that's more than I'm doing

#

repl on 1011 worked fine

tulip sleet
#

i am mostly testing with what's lying around on CIRCUITPY on the boards

slender iron
#

ya, that's what I'm doing too

#

except that was a new board 🙂

tulip sleet
#

i could test spresense

slender iron
#

kk, I was gonna skip it

tulip sleet
#

did you test stm?

slender iron
#

nope, still working on silabs

tulip sleet
#

spresense will blink

slender iron
tulip sleet
#

i2c works fine on STM32F405

#

moving back to thread

manic glacierBOT
manic glacierBOT
slender iron
#

ok, I have a silabs fix I'll PR tomorrow

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
slender iron
#

any thoughts about renaming displayio to displaycore once we move the individual display types out?

manic glacierBOT
midnight ember
#

displaycore is longer so you'll get displaycore.displaycore potentially?

#

if we're going to be stacking a lot of stuff into displays in the future then core does make more sense semantically.

slender iron
#

I've gone back and for on it

#

because displayio still has helpful stuff in it

midnight ember
#

We have audiocore so it would be in line with current naming conventions.

#

That brings up a question of renaming busio to buscore too? 🤷

lone axle
#

this potential change would mean something like from displayio import Bitmap, Group, Tilegrid would be changed to from displaycore import Bitmap, Group, Tilegrid ?

#

If I'm understanding it correctly I think my only thought is that vectorio should share a suffix with wherever Bitmap and Tilegrid land so if those are displaycore then maybe vectorio changes to vectorcore so that it matches still. Probably the same for terminalio and maybe gifio as well.

I'm not sure I understand the difference in meaning between core and io used in the context of the suffix for the built-in modules though. I've always understood the 'io' suffix to be kind of a catchall for many core modules like displayio, sdcardio, busio, aesio, rainbowio. If it's intended to mean more strictly the pin level input / output that is used by the module then I could see that Bitmap, Group, Tilegrid don't exactly tie into that directly.

#

there are some others like fontio, qrio, gifio that aren't really tied to the pin level IO either though.

slender iron
#

the io suffix helps to make module names unique too

#

we did audiocode because we wanted audioio to actually be the "audio" output

#

displayio has come to mean the way we manage object on a display

#

more than how we output to a display

ornate breach
#

Hey Scott or Dan or whoever can/wants to chime in:
Is there anything prohibitive about using or building support for QSPI on circuitpython?

slender iron
#

not sure what you are asking

ornate breach
#

Right now I don’t see a way to use SPI flash in QSPI mode

slender iron
#

on what port?

ornate breach
#

I’d like to have that option, but I’m curious if there are limitations with how circuitpython runs where we wouldn’t really see any benefit to using it.

#

Esp32-S3

#

Or S2 even

slender iron
#

they both support it

ornate breach
#

I’d like to use it separately from the circuitpy FS

slender iron
#

ah, that we don't have

#

and the s2 and s3 are using the peripheral that can do it already

#

I don't think any of the others can

#

you might be able to use the same peripheral with a different chip select

#

how are you going to use it?

ornate breach
#

To store game files I don’t want directly accessed from the circuitpy drive

#

SPI is probably fast enough

#

But qspi would be pretty cool

slender iron
#

the simple option is to use the circuitpy drive

ornate breach
#

My thoughts are, I have a switch that I toggle that is sort of an upload mode read by boot.py that takes any files in a folder say “new games” and copies them to qspi and the. Deletes the contents of the folder after moved.

#

The spi flash is then just mounted as a fs accessed by whatever I’m doing in code.py

slender iron
#

all so you can hide the game files?

ornate breach
#

Yeah

#

I don’t want to hide the circuitpy drive though

slender iron
#

the closest thing I can think of is an sd card

ornate breach
#

I mostly just want to keep the games safe from accidental erasure of the esp32

#

Yeah, I just don’t want the bulk of an sd card

ornate breach
#

But if it’s the only reasonable way, perhaps I’ll just use one

slender iron
#

can't you just copy them over again if erased?

ornate breach
#

Sure, I could

#

Just trying to make a more persistent storage of games

slender iron
#

I see you are talking Gbit size flash. that's almost certainly nand flash that we don't support

#

we only support spi nor flash

ornate breach
#

Yeah, it’s nand

#

What would it take to support nand?