#circuitpython-dev

1 messages · Page 56 of 1

crude blaze
#

heh

#

oh and just to be sure, I'm using the 2.4" FeatherWing v2 atm for this

gilded cradle
#

Oh, ok. I'm using the breakout. Could be the diff.

#

Anyway, thanks. I now have some more things to try.

crude blaze
#

sure thing!

#

if the hardware is different I would also maybe check if any I/O polarity like reset or so might be setup differently

gilded cradle
#

Gonna try wiring a 2.4" featherwing v2 first just to make sure nothing strange is going on

manic glacierBOT
#

These are board definitions for these older ESP32 devkits from Espressif:

https://www.digikey.ca/en/products/detail/espressif-systems/ESP32-DEVKITC-VE/12091812

(ESP32, 8MB SPI flash, 8MB SPIRAM) which I have, and

https://www.adafruit.com/product/3269

(ESP32, 4MB SPI flash, no SPIRAM) which I don't have. (Same board, different modules.) Built and tested ...

#

I am very impressed with how the USB host keyboard works. For my CNC project, I `ve to added the ability to work with the function keys f1-f12, ctrl-left, ctrl-right, ctrl-up, ctrl-down, page down, page up, insert, delete, pause in the format of command VT 100. Offer my modified code "supervisor/shared/usb/host_keyboard.c"

manic glacierBOT
manic glacierBOT
manic glacierBOT
solar whale
#

Does anyone know if there a known limit to the number of characters that may be sent via the UART mode of the Bluefruit LE Connect app. Using the latest version of the IOS and McOS Desktop app, I can only send 20 characters max (18 + 2 EOL characters) With an old version of the MacOS desktop app, I am able to send longer messages. It does not throw any error and it echoes the long messages, but it does not seem to send them. I was just wondering if others are seeing the same thing.

tulip sleet
solar whale
#

Ah OK -- Are you seeing the same behavior?

#

Yikes, that is tough code to read through....

tulip sleet
solar whale
manic glacierBOT
#

This code works on 8.2.9 but not on 9.0.0:

use_arial = True
bg_rect = vectorio.Rectangle(pixel_shader=px, x=0, y=0, width=display.width, height=display.height)
group.append(bg_rect)
from terminalio import FONT
label = Label(FONT, text=os.uname().version, color=0, x=12, y=24)
group.append(label)
if use_arial:
    Arial12 = load_font("/fonts/Arial-12.pcf")
    label2 = Label(Arial14, text="Arial-12.pcf", color=0, x=12 ,y=48)
    group.append(label2)
display.root_group = ...
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Do the ESP chips actually expose a vref pin?

No.. I have never seen an exposed vref pin on any esp module or chip.
I did a quick sanity check on the esp32 wroom module datasheet and there is none.

Or is the value passed here fixed for each chip variant?

As far as I can tell, every variant has a different vref. So yes, the value set in this would be different for each variant to have a correct 0-65535 value.

If it is fixed, then this should be done internally.

I would re...

manic glacierBOT
#

For context: I came across this request / issue as a KMK maintainer.
Any time you want to use keypad without an essentially random input delay, really. The request for "better", i.e. faster, debouncing comes up in the mechanical keyboard scene ever so often, and there are key switches and arcade buttons with significant bounce that could benefit from a more responsive algorithm.
In general the current solution works fine. Once there are strict timing constraints, as in video games, or mul...

manic glacierBOT
#

Could you submit a draft PR with your suggested change, including inline documentation additions and maybe some sample code and explanations.? As long as it's upward compatible, I think this should be OK.

I don't know exactly what you mean by debounce_cycles. Do you mean additional intervals that are skipped after a transition? So that, for instance, does interval=0.02 and debounce_cycles=3 means waiting 0.02*3 seconds after a transition, or do you mean something else? And is this ...

#

This seems OK to me. In CPython, it's something like this:

>>> sys.version
'3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]'

so including all the info above is not out of line with that. In CPython sys.version doesn't have the build target info, but that's OK. Ultimately platform is the more modern way of doing this.

Could you try changing

#define MICROPY_BANNER_NAME_AND_VERSION "MicroPython " MICROPY_GIT_TAG " on " MICROPY_BUILD_DATE

in py/mpconfig.h as w...

manic glacierBOT
#

I think the question is: at what layer of abstraction should the API operate?

At the lowest level internally, I believe all Espressif chips use ~1.1v as VREF (going back to ESP8266 days), ± some per-chip variance that's (mostly?) calibrated out in software. ESP8266 users were warned not to put more than 1.1v on the ADC pin.

Espressif chips are 3.3v devices, and we've chosen 11dB attenuation to give a natural voltage range for ADC (whether or not the particular variant is fully capable...

crimson ferry
#

Is there a way at runtime to get the MicroPython version that's merged? I thought there was once, but I can't find anything.

slender iron
#

merged into cp?

#

I don't think so

#

it is 1.21 in main now

onyx hinge
#

within a git checkout you can ```~/src/circuitpython$ git describe --tags --match "v1.*"
v1.21.0-19942-g7a4e7c36cd

inner orbit
#

Is this the correct place to come for some hints about compiling CP ?

#

I can compile for the Trinket M0 no problems. When I try to remove built-in modules to make space for something else, I get the following error: (I am following the instructions on the Adafruit page)

undefined reference to `usb_midi_module'

When I am using this in the .mk file for the Trinky:

CIRCUITPY_USB_MIDI = 0

stuck elbow
#

remember to do make clean

inner orbit
#

jedgar@jedgar-linux-imac:~/Documents/circuitpython/compiler/source/circuitpython/ports/atmel-samd$ make clean BOARD=trinket_m0

  • Verbosity options: any combination of "steps commands rules", as make V=... or env var BUILD_VERBOSE
    rm -rf build-trinket_m0
#

Same output. And I know from maybe two years ago, this was working for me. But a new install, etc.

#

It also failed with some other modules like neopixel_write, rainbowio, etc

stuck elbow
#

the dependencies between modules are not automatically resolved, if there is another module that depends on usb_midi, you will need to disable it too

#

the line of the error may give you a hint about what module that is

inner orbit
#

Understood.

#

No line numbers, just undefined reference, so I think maybe something is not in the right place. But I can compile without that line and works fine. Who knows?

stuck elbow
#

that udefined reference happens at a specific line of code

#

in a specific file

inner orbit
#

Looking or that now 🙂

#

for

#

Miracle of miracles, it just started working. Huh.

#

If it starts to fail I may come back with more information 🙂

#

Thank you for your help, sir.

crimson ferry
#

thanks tannewt and jepler, I was thinking along the lines of our sys.version string, which indicates a nominal CPython version (and sys.implementation includes , _mpy=262)

crimson ferry
#

that's what prompted the thought

#

I could comment there

tulip sleet
#

micropython added the platform module, which we haven't enabled yet

#

but it is merged in

crimson ferry
#

so maybe just wait for yet

tulip sleet
#

if you see something helpful that would be added by platform, that would be an incentive to make it work sooner

#

right now version-y stuff is spread out between sys.version*, os.uname(), and something else I forget

#

or maybe nothing else

crimson ferry
#

just looked at it, the platform string is board-specific, which we could truncate, but I was just thinking of a user-code way to know the main ancestors of the currently running code... versions of CircuitPython, MicroPython, CPython, mpy-cross

#

not critical at all, just could be informative

#

sys.implementation might be the 3rd you were thinling of

tulip sleet
#

yes, now I scrolled back here

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

In case I was the only one that had to look it up, please address those
cards and letters to:

https://www.apple.com/feedback/macos.html

Feedback area: Desktop/ Finder/ Filesystems
(As a former OS guy, those three things have nothing in common, but, hey,
I'm just playing along.)

Feedback seems to be limited to 800 bytes, so you really can't include much
useful data. I added the oldest (ooops) of John's Buganizer entries (thank
you, John, Tod, Dan!) and the URL of this issues thre...

manic glacierBOT
#

Thank you for the suggestion

  1. About HID_KEY_F1. Ive changed it to going t0 VT100 CSI standards. if its important to leave compatibility with xerox 820 keyboard I can change
    to the previous version.
  2. About HID_KEY_ARROW_RIGHT, HID_KEY_ARROW_UP. I spent a couple of hours
    getting the arrows to work with ctr and without ctrl, and this option
    worked. Perhaps the cause of the error was resolved by the code below. I
    can return everything back and test again.
    if (!(mapper->flags & FLAG...
manic glacierBOT
manic glacierBOT
#

Running Circuitpython 8.2.9 on Itsybitsy M4:

This code:
import board, pwmio
M1A = pwmio.PWMOut(board.D13, frequency=1000)
M1B = pwmio.PWMOut(board.D10, frequency=1000)
M2A = pwmio.PWMOut(board.D4, frequency=1000)
M2B = pwmio.PWMOut(board.D7, frequency=1000)
Throws the error:
ValueError: All timers for this pin are in use

While this code:
M2A = pwmio.PWMOut(board.D4, frequency=1000)
M2B = pwmio.PWMOut(board.D7, frequency=1000)
M1A = pwmio.PWMOut(board.D13, frequency=1000)
M...

manic glacierBOT
manic glacierBOT
#

I suspect this change doesn't have the desired effect.

When ctrl+c is pressed, the result needs to be the interrupt character with value 3.

This happens through the keycode mapper element { HID_KEY_A, HID_KEY_Z, 'a', 0, NULL}, which does not have FLAG_CTRL set, so the initial code is the ASCII value 'c'. Then this is modified (at line 258 before this change) with a bitmask:

                if (ctrl) {
                    code &= 0x1f;
                }

I believe, but did...

#

When USB keycodes are consecutive, which F1..F12 and RIGHT...UP are, it saves a small amount (maybe 8 bytes per entry) of flash storage to use the form which accommodates multiple strings within one entry, { HID_KEY_ARROW_RIGHT, HID_KEY_ARROW_UP, 0, FLAG_STRING, CURSOR_RIGHT SEP CURSOR_LEFT SEP CURSOR_DOWN SEP CURSOR_UP },

This is done somewhat inconsistently in the original (for instance, INSERT..ARROW_UP are consecutive but the table does not use this fact) but it would be nice if it w...

manic glacierBOT
#

Sadly, not really consistent with anything, but nothing is consistent with anything else anyway.

I can rename anything in particular if you have a specific request.

  • "solarize": this is the standard name for this algorithm
  • "morph": this is the name of the routine in openmv. the parameters are compatible or almost-compatible. imagemagick calls this "convert -morphology" so at least it's partially the same (there's also "convert -morph" which is NOT the same, that's some kind of ima...
proven garnet
#

Is str.partition() currently not enabled for all boards as the docs say? Relatedly (or alternatively), does anyone know if the GPS library is currently only viable for larger boards anyway?

tulip sleet
#

if the library uses partition(), then it's never been used on tiny boards. It's a pretty big library

#

I don't see a call to partition() in the library

proven garnet
#

It would be added as part of an PR, so it sounds like it would then become an issue

tulip sleet
#

it imports successfully on a Trinket M0, so I'd say avoid it

#

if you can

proven garnet
manic glacierBOT
#

What's the consequence of making this a warning in 9 and an error in 10? Maybe something like this but less horribly verbose.

warnings_warn(&mp_type_FutureWarning, MP_ERROR_TEXT(
    "Mount point missing. "
    "This will be an error in CircuitPython 10. "
    "This prevents file from being available via web & bluetooth workflow. "
    "Create an empty directory (maybe via USB) first");

Also is it important that the placeholder be a directory, which is a requirement on Unix-...

gilded cradle
#

Hi @crude blaze. I got the display working on the 2.4". It turns out the filename of my overlay had characters it didn't like. I wasn't able to get touch working though. Was there some trick to it?

manic glacierBOT
#

Running Circuitpython 8.2.9 on Itsybitsy M4:

This code:
import board, pwmio
M1A = pwmio.PWMOut(board.D13, frequency=1000)
M1B = pwmio.PWMOut(board.D10, frequency=1000)
M2A = pwmio.PWMOut(board.D4, frequency=1000)
M2B = pwmio.PWMOut(board.D7, frequency=1000)
Throws the error:
ValueError: All timers for this pin are in use

While this code:
M2A = pwmio.PWMOut(board.D4, frequency=1000)
M2B = pwmio.PWMOut(board.D7, frequency=1000)
M1A = pwmio.PWMOut(board.D13, freq...

#

This is because the SAMD51 (and other SAMD chips) have rather arbitrary assignments of function to pins. There is not a crossbar. A given pin is connectable to a few timers. Another pin may be connectable to a subset of those timers, plus some others. So the order will make a difference due to the choice the code makes in the earlier assignments. There is not an optimal order.

manic glacierBOT
slender iron
#

@desert yarrow let's move here. I think ideally the microusb port would work as OTG where it can detect host or device use

#

that'd allow the CIRCUITPY use case to work still

desert yarrow
#

@slender iron - Sorry about the faux pas there. 🙂

slender iron
#

are you using tinyusb via arduino instead?

#

np

desert yarrow
#

No because support was just added recently added that support the FTDI chips in there (very similar to a normal CDC device, but they require some special tweaks internally)

#

I created this in an effort to create a small RP2040-native USB library... if it can work, I'd like to see if I can access it from CP or MP or whatever possible.

manic glacierBOT
#
  • if (!(mapper->flags & FLAG_CTRL) && ctrl) {
    continue;
    } *

Without this, CTRL- UP, DOWN, LEFT, RIGHT do not work.
But you are right about

*{ HID_KEY_A, HID_KEY_Z, 'a', 0, NULL} *

...

if (ctrl) {

  • code &= 0x1f;
    }*

that may work badly. I need some time to change the code and test it again.

I think the best way is for a..z not to use that construction.

About binary Or (|) you are right, I`ll correct it.

About F1 ......

desert yarrow
#

I like TinyUSB, but it's been very hard to get running what we need (simple USB Host support for FTDI based USB Devices).

slender iron
#

in CP we'll only support TinyUSB

desert yarrow
#

I know, that's why I can't use it (yet?).

slender iron
#

that way the work applies across all ports

desert yarrow
#

Does CP allow for external libraries/modules, though?

#

For example, could I pull in custom code into CP through an import?

#

Or does CP have TinyUSB embedded always (ie - and you can't run it without TinyUSB)?

slender iron
#

you could maintain your own fork and not call it CP

#

you can run it without tinyusb but you really shouldn't

desert yarrow
#

I see, ok.

slender iron
#

get it work with tinyusb host and you can use esp32-Sx chips then too

#

they do otg as well

desert yarrow
#

Ok, sounds good. Ha Thach has done a great job with TinyUSB and the latest releases do support what I needed. They just hadn't been fully percolated through the other libraries yet. If the latest TinyUSB v0.16.0+ makes it's way into CP, then that support should just "show up" (for free-ish).

#

Is there a timeline when TinyUSB v0.16+ will be in CP (maybe already?)

slender iron
#

there is a 0.16 PR open right now

desert yarrow
#

HOLY SMOKES@

slender iron
#

🙂 good timing

#

always happy to update too

desert yarrow
#

That would be the solution... v0.15.x did not support the FTDI chips as needed... but v0.16.x does!

slender iron
#

CP doesn't use the CDC level of host support though

#

we expose the lower level instead

desert yarrow
#

Ok

#

This patch has support for the 0xCD18 product id from vendor 0x0403 (FTDI)...

slender iron
#

ya, circuitpython doesn't use the cdc driver for host

#

only the hid host driver

desert yarrow
#

Hrm...

slender iron
#

the expectation is that you'd write a driver in python

desert yarrow
#

Is there a reason why not, if it's there alongside HID?

slender iron
#

we use native hid host internally to input serial into CP

desert yarrow
#

Or... can I use the low-level USB Control transfer messages to talk to the device directly?

slender iron
#

ya, you can

#

our api is meant to match pyusb on linux

desert yarrow
#

Ah, there we go. The issue before was that the FTDI devices were simply ignored and they could never even enumerate, so I was dead in the water.

slender iron
#

though it could be interesting to make a pyserial api

desert yarrow
#

Now... they at least enumerate... and thus, I should be able to at least "talk to" them

slender iron
#

yup

desert yarrow
#

Saweet

#

When do you think the TinyUSB v0.16+ PR will land?

slender iron
#

you don't need it for the low level stuff though

#

it's only a change to the cdc host driver

desert yarrow
#

MERGED! Wow!

slender iron
#

@onyx hinge uploading multiple files to SD card via web workflow doesn't work because we stop the VM immediately and then do the reload wait

desert yarrow
#

The important thing is that at least, now, the device will be enumerated!!! Before it was just ignoring it because it didn't recognize the VID/PID or Class information. Whatever the reason, the device was just being ignored. Now, it should be recognized.

slender iron
#

I think it'd enumerate with older versions. It just wouldn't work with the native cdc host driver

desert yarrow
#

@slender iron - Now that it's landed, will a "current" build of CP include it, or is there a release date when it will be included. Or, can I build a new version right now? Or, should I wait for a nightly release?

slender iron
#

you can build now. absolute newest will have it once the CI runs

desert yarrow
#

Phenomenal! Thanks

slender iron
#

OTG isn't a priority for us because you can't use USB to edit code when using it as a host

desert yarrow
#

Is there a wifi-based editor for CP, so you wouldn't need the USB port?

slender iron
#

yes there is

#

it's pretty new

desert yarrow
slender iron
#

that works for BLE

#

assuming you have mdns support in your os and router

#

otherwise you can use the ip address

desert yarrow
#

that's awesome

slender iron
#

👍

desert yarrow
#

btw, it's kinda fun watching the USB chatter back and forth between host and device... beautiful to see the little dance between the two! I'll checkout CP later when the CI build includes the latest goods.

manic glacierBOT
manic glacierBOT
manic glacierBOT
crude blaze
#

my overlay is currently assuming those changes to be in place but I think none of them should prevent the driver from loading at all

gilded cradle
crude blaze
#

ah yes, the ti-x-plate property is required by the old driver but I depricated that

#

if thats added it should work

gilded cradle
#

Oh right. Well, I'm going through and seeing what overlays I can get working for now. I got one for resistive 2.8 and capacitive 2.8 and display is working, but having issues with touch working intermittantly.

gilded cradle
crude blaze
#

ah you figured it out, nice
Hm yea thats interesting you also saw that. What I observed were some display artifacts when touch was sending data. I figured likely EMI issues of my current messy jumper cable setup.
Do you have that on a proper HAT or are you also using jumper wires atm?

gilded cradle
#

I'm using a proper hat

crude blaze
# gilded cradle I'm using a proper hat

does touch just bork out now and then or do you also get any sorts of weird display artifacts?
I'm not sure if I was seeing two seperate issue. Touch was def. a bit weird overall but I think there might also be a bug in wayfire there

gilded cradle
#

A little of both.

crude blaze
#

ah okay interesting

#

libinput was still showing the touch data coming in just fine but the window manager was just not reacting at times

gilded cradle
#

Possibly it's a conflict with the ili9341 driver or something. I haven't tested that.

crude blaze
#

ah wait, are you using a TSC2007 or a focaltech cap touch display?

gilded cradle
#

Oh, for the TSC2007, I'm using a breadboard setup, but I'm also adding other PiTFTs and using HATs for all those.

crude blaze
#

ah okay! Yea then I wonder if it might actually be an EMI issue on the TSC2007 end. I did not have such issues with DSI displays that used focaltech cap touch

#

maybe worth waiting for the updated HAT then

gilded cradle
#

Oh, I never got touch working on the tsc2007. I switched over to the HATs and I did have issues on those.

crude blaze
#

ooh I see, then I misunderstood earlier

gilded cradle
#

No worries. Just trying to clarify.

crude blaze
#

so you had weird display glitches on those HATs too?

gilded cradle
#

yeah

crude blaze
#

huh!

gilded cradle
#

Well, not the display itself so much. Just the touch input. Like it sometimes leaves a tiny selection box before the cursor disappears.

crude blaze
#

ah, yea that I also experienced. That is definitely a bug in Wayfire but haven't been able to really reproduce to report to Pi Kernel

gilded cradle
#

Do you have any of the HATs like the capacitive one?

crude blaze
#

no unfortunately not. I only have DSI displays here with cap touch

gilded cradle
crude blaze
#

eh RGB I mean, the ones for that upcoming DSI to RGB adapter

gilded cradle
#

Which ones are the DSI displays?

#

Oh, ok. Gotcha.

crude blaze
gilded cradle
#

Yeah, I have a bunch of the RGB displays as well for when I was getting the Qualia up and going.

crude blaze
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

I've tested on my pico by code bellow. Look like good.

import microcontroller
#microcontroller.cpu.frequency = 120000000
print(microcontroller.cpu.frequency)
import time
import sys
import board

import usb_host

import supervisor
pp=usb_host.Port(board.GP26, board.GP27)

while True:
  try:  
    proceedCh=''    
    while supervisor.runtime.serial_bytes_available:
        proceedCh += sys.stdin.read(1)
    if proceedCh!='':
      print('proceedCh:',proceedCh,[ord(res...
midnight ember
#

@lone axle submitted a PR to CircuitPython_SoftKeyboard. Got a little bit done today. 🙂

lone axle
manic glacierBOT
#

CircuitPython version

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

Adafruit CircuitPython 9.0.0-alpha.6-20-g4b92a4a9fa-dirty on 2024-01-18; Raspberry Pi Pico with rp2040

Code/REPL

import board
import digitalio
import storage
import adafruit_sdcard

import busio
#import bitbangio as busio

spi = busio.SPI(board.GP2, MOSI=board.GP3, MISO=board.GP4)
cs = digitalio.DigitalInOut(board.GP1)
sdcard = adafruit_sdcard.SDCard...
lone axle
manic glacierBOT
#

I tried reproducing this with a Pi Pico running 8.2.9, using the same breakout and pins as you. The card is an 8GB from Micro Center. I formatted it freshly to FAT32 with gparted on Linux.

By any chance is there already an /sd directory or file on CIRCUITPY before you try running the above?

I'd say try these things:

  1. storage.erase_filesystem() on the Pico to make sure there's nothing corrupt about CIRCUITPY
  2. Reformat the card externally (and say what you used if it still doesn...
inner orbit
#

Can someone enlighten me as to where to put .py files I want compiled into my Trinket M0 custom firmware?

#

A very small function that I would like embedded to save some "disk" space.

tulip sleet
manic glacierBOT
#

I reduced this to:

def f(a):
    pass

print("Here Start")
#f(a=2, *())     # TypeError: unexpected keyword argument ''
f(a=f, *())      # Safe mode: Hard fault
print("Here End")

So it's not super() or anything like that. It has to do with the * arg.
If the *() arg is removed, it works fine.

If the first call to f() is used it doesn't crash, but gets the indicated keyword arg error.
If the second call to f() is used, it crashes with a hard fault.
I suspect ...

inner orbit
idle owl
#

@slender iron I picked up a 7.3" Inky Frame. I think you added support for the 5.x" version. Is the 7.3" version supported now? If not, how difficult is it to add support for it since the other one works? I have never touched display stuff in the core.

manic glacierBOT
#

Testing with MicroPython v1.21.0 and v1.22.1 on a Feather M0 Express: In the above program, I get TypeError: unexpected keyword argument (note no '') on both calls to f().

Testing with MicroPython v1.22.1 on a PyBoard: As with CircuitPython, uncommenting the second call to f() causes a hard crash. I'll open an issue for MicroPython.

slender iron
manic glacierBOT
#

Hi, I just tested pre-build CP firmware ver 8.2.9 and 9.0.0 Alpha 6 on nucleo-h743zi2. This problem still exists.

I understand the reason why it is lacking the support from Adafruit, but I think you should remove the download page or the download button at least on CP website if it is no longer working. Doing so to prevent someone like me who wants to purchased a more powerful "supported" board and realized it is actually not later. As suggested above, I will try the Blinka on MicroPython ...

idle owl
manic glacierBOT
#

In my application, bitmaptools.draw_polygon would be very useful if it accepted a large (>200) list of integers instead of a ReadableBuffer object. For now, it's iterating through the list and using draw_line instead.

The simpletest example shows converting a list to a byte array, but that doesn't allow coordinate values larger than 127. Using struct or a ulab.numpy array allows larger values up to 16-bits. However, ulab isn't available for all boards and struct is only pract...

manic glacierBOT
#

I've been reading the raspberrypi SDK documentation and I'm not 100% confident about this but it looks like there's no exposed API for querying the DHCP server that's started in AP mode, only to start and stop the server. That said, this is C and it may be possible to extract this from the internal data structures that the DHCP server exposes, which would work but obviously be a horrible coding practice and likely to break without warning with an SDK update.

manic glacierBOT
#

To be able to easily use the entire polygon x-y coordinate range, please consider changing from a ReadableBuffer data type to an integer list.

From https://github.com/adafruit/circuitpython/pull/7471:

In my application, bitmaptools.draw_polygon would be very useful if it accepted a large (>200) list of integers instead of a ReadableBuffer object. For now, the application is iterating through a list and using draw_line instead.
The simpletest example shows converting a list to a...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

@dhalbert That would be awesome!

Here's what I've been posting. I'm happy for any refinements or corrections to it y'all might suggest. I put the actual URLs in for the two links; Github is helpfully condensing them to page titles...

macOS 14.3 should be released within the next few days, so it may help if we can all chime in with feedback reports.

All versions of macOS Sonoma improperly delay metadata writes to small FAT filesystems. This causes errors when writing files to device...

manic glacierBOT
#

Submitted FB13554680 via the Feedback Assistant. (@robertlipe you submitted by the webform, but you can also use the Feedback Assistant directly in macOS).

Userspace FAT filesystem delays writes to small FAT disk drives 8MB or smaller

I work for Adafruit. Adafruit has a a number of products which present as USB devices with small FAT filesystems, notably CircuitPython and UF2 boot loaders. These products are widely used in educational environments.

Since Sonoma, macOS 14...

keen eagle
#

I've been doing some CircuitPython builds and noticed something odd I wanted to check in about

When I build from main I see __dict__ when I tab to autocomplete from an object in the REPL:

Adafruit CircuitPython 9.0.0-alpha.6-26-g84c4f62278 on 2024-01-21; Raspberry Pi Pico W with rp2040
>>> import wifi
>>> wifi.
AuthMode        Monitor         Network         Packet
Radio           __dict__        radio

When I build 9.0.0-alpha.6 I don't see that

Adafruit CircuitPython 9.0.0-alpha.6 on 2024-01-21; Raspberry Pi Pico W with rp2040
>>> import wifi
>>> wifi.
AuthMode        Monitor         Network         Packet
Radio           radio

is that a debugging thing enabled between releases or something unintentional? (I understand what __dict__ is, just surprised to see it visible here)

manic glacierBOT
manic glacierBOT
#

This submission seems to be missing the most serious things: the write errors in MacOS, and that it can be corrupted even if you don't remove it.

I have been unable to duplicate the write errors (I/O Error) consistently, even when using the same examples that others have used. I started to include it but it seemed like a digression. It probably is worth a separate report. The cause may be the same base cause.

manic glacierBOT
manic glacierBOT
#

Addressing issue 8790. I did this for fun and to learn more about CP internals, hope I'm not stepping on anyone's toes and am fine ignoring this if you'd prefer.

Added a new property max_stations_ap to the Radio object, which returns the maximum number of stations the device supports in AP mode

Added a new property stations_ap to the Radio object, which returns a list of dicts that report the MAC address, RSSI and IPv4 add...

manic glacierBOT
onyx hinge
#

just a proof of concept at this point: UVC 'video camera' support is made possible by recent contributions to TinyUSB, and I got the very most rudimentary level of support working at the same time as circuitpython.

hidden rain
#

Try to control an E-S MOTOR 37SG-3650BL motor with PWM. It seems that the required voltage is 12 VDC. It runs regardless immediately without pwm. The PWMIO when set to True turns it off. Any ideas why?

manic glacierBOT
#

Monday, January 22, 2024. 1h38 PM GMT

Board: Adafruit Feather ESP32-S3 TFT
Flashed with:
Adafruit CircuitPython 9.0.0-alpha.6-29-g5f318c37bb on 2024-01-19; Adafruit Feather ESP32-S2 TFT with ESP32S2

IDE: Mu 1.2.0

The REPL output below shows that the board, connected to the in house WiFi,
receives the UPD multicast data packets that X-Plane 12 was set for to transmit.

a) REPL output of manual test to see with attributes socketpool.SocketPool has now (with the latest version of ...

random junco
#

I'm in the planning stages for a podcast episode all about CircuitPython 9. Looking at the release notes for MicroPython 1.20 and 1.21 that have been merged into CP9, is it fair to say these are "under the hood" improvements that most end users won't notice? Or is there a big feature or update I'm missing?

tulip sleet
#

The "split heap" code from MicroPython now enables us to use heap allocation outside the VM, which was very awkward before: any dynamic storage allocation could only be done once, before the VM started. The heap then used the remaining RAM. Now there is an "outside" heap which can be used while the VM is running, and that storage will not be GC'd. So various storage allocations that used to be static can now be dynamic, such as stuff needed for USB setup.

#

We also removed the "long-lived storage" scheme that was added a long time ago to reduce fragmentation. In that scheme, storage that we expected to live a very long time (mostly allocations for compiled bytecode) was allocated at one end of the heap, and shorter-lived storage (like the temp storage used during compilation) was allocated at the other end. Part of the scheme involved moving allocated objects and adjusting pointers. The moving caused some inherent but obscure problems where objects' identities seemed to change.

#

Now long-lived storage is gone, because it was not very compatible with the split-heap scheme. This may cause some projects on small-RAM boards like SAMD21 not to work any more due to increaed fragmentation. We have some ideas for doing something like long-lived storage in a different way that wouldn't involve moving objects, but that won't be in 9.

random junco
#

Thank you Dan! I really appreciate it

tulip sleet
#

Scott and I can talk about this more if you need more background.

random junco
#

sounds good, I'll let you know if I have any follow-up questions

thorny dove
manic glacierBOT
#

Thanks for working on this!

You could use a list of namedtuples instead of a dict, or even create a new native class with appropriate attributes.

If a value isn't available, like rssi or an unknown IP address, None is appropriate and canonical in Python.

Using the internal data structures is probably not bad if that's the only way. It may just stop working later. A PR to the appropriate upstream repo to add an API for that info might make sense. You could see if there's already a...

onyx hinge
#

There's no existing support for "YUV" images in CircuitPython displayio is there?

onyx hinge
#

the top half of the frame was set to red by assigning to a memoryview from Python

manic glacierBOT
#

CircuitPython version

dafruit CircuitPython 9.0.0-alpha.6-19-g99b19a5860-dirty on 2024-01-22; SAP6 (including Seeed XIAO nRF52840 Sense with nRF52840

Code/REPL

# create a source bitmap of size (100,100)
# create a destination bitmap of size (10,10)
bitmaptools.blit(dest, source, 0,0, 30,30,35,35)

Behavior

this raises a value error stating X1 should be in the range 0..9

Description

No response

Additional information

No response

manic glacierBOT
#

I tested back to MicroPython 1.11 and it works. In CircuitPython, this stopped working properly a long time ago:

class D(dict):
    def __setitem__(self, k, v):
        super().__setitem__(k, v)

d = D()
d[2] = 3
print(d[2])
  • starting with 5.00-beta.5: RuntimeError: maximum recursion depth exceeded
  • starting with 5.00-beta.3: Key Error: 2
  • 5.0.0-beta.1 and before: [no error]

The Key Error version gives surprising results:

Adafruit CircuitPython 5.0.0-...
onyx hinge
candid sun
#

i'm going to sit out the meeting today to power thru some guide tasks but wanted to extend a group hug

manic glacierBOT
#

@drath42 if not a PR could you just provide a diff? Thanks.

Sorry for not replying earlier. I was hoping to find time for this last weekend. A diff is easier:

diff --git a/supervisor/shared/usb/usb_msc_flash.c b/supervisor/shared/usb/usb_msc_flash.c
index f212d55270..2ded6de2b2 100644
--- a/supervisor/shared/usb/usb_msc_flash.c
+++ b/supervisor/shared/usb/usb_msc_flash.c
@@ -171,10 +171,16 @@ bool tud_msc_is_writable_cb(uint8_t lun) {
 // Copy disk's data to buffer (up t...
turbid radish
#

Hi @idle owl !

lone axle
turbid radish
gilded cradle
#

Yep, I can read the Blinka section

lone axle
#

am good to go for libraries 👍

midnight ember
#

600+ revisions now

#

@idle owl always nice to see you blinka_heart_circle

random junco
#

noted!

midnight ember
#

hope you are ari are doing better this week ❤️

slender iron
silver tapir
#

Also, if somebody needs me to work on native languages from your country, I'd be happy to. (US is kinda complex as it has way to many, but maybe I can sort it out by lang family)

#

This would be part of the unicode CLDR standard, so it should work without extra hardware, but native in Windows, MacOS, Linux, Android, etc.

midnight ember
#

amazing updates Jepler. that sounds really amazing.

mortal kernel
#

It does look like you found it. Whose name did you see?

#

Got it.

midnight ember
#

@lone axle cardboard? If you give me some dimensions I can design a 3D print for you.

silver tapir
#

There was an amazing luthier in the US, Dr Carleen Hutchins, that de-mystified violin making, and also created a family of 8 sizes of violins that is way better than a typical string quartet. A group that plays them is the "Hutchins Consort" (.org), if you live in the US I urge you a lot to find a concert and go (or at least to watch them in youtube).
Since they are custom sizes, nobody makes strings for them anymore, so this family of instruments might go extinct. So I'm currently ordering materials and building a CNC for winding the flatwounds.
So sure, if you have a weird size instrument, or maybe you need lighter or heavier strings that you find commercially, even if it's a guitar/bass/ukulele, let me know and I'll to my best.

lone axle
#

The final dimensions will be in the guide along with the files for my decals if folks want to use the same size box and re-use the decals, or design a new enclosure for it. Would be great if anyone wants to design and share different variations of it.

midnight ember
#

Cardboard is a great media to use especially for learn guides as everyone has some and might not have a 3D printer.

#

I like the idea for a unifying method that is consistent no matter what the board or connection method is.

lone axle
#

I think it makes sense to release it in the different libraries all at once (and update the frozen ones in the core as well).

idle owl
#

@onyx hinge I have another obligation in a bit here. I'd appreciate it if you could pull in my topic next, and then go back to Justin for their second topic.

midnight ember
#

Is the amount of psram specified in the board config or is that just flash storage?

slender iron
lone axle
#

Does OnDiskBitmap need to store it in RAM?

midnight ember
#

oh that's a good idea too

#

i think as long as the image is less than about 600k

wraith crow
#

The Inkyframe does have an SD card I think though

midnight ember
#

you can also make the image smaller and scale it x2 or x3

#

sdcard is a much better storage idea to get around the low storage on the pico.

#

yeah no speed peformance but you'll have a ton more storage to work with

wraith crow
#

Speed isn't really an issue for e-ink 😄

lone axle
midnight ember
#

Good luck Kattni! Keep us updated.

short tendon
#

What would be a good m0 + airlift example to make sure I'm good on space for ConnectionManager?

midnight ember
#

large e-inks sounds great for calendars, good project.

#

i think most m0 with airlifts at the time were M0 feathers with Airlift featherwings?

#

was the original pyportal m0 or m4?

lone axle
short tendon
#

the m4 + airlift and the m4 matrixpanel are my current low-end test boards

midnight ember
#

yeah at this point it's a little unrealistic to expect an m0 with airlift to have enough since the language has grown so much. m4 does seem like a better least common denominator.

idle owl
#

Thank you for waiting, Justin!

lone axle
#

fwiw I believe the stubs can work with VSCode as well (Anecdotally I think there may be more VSCode users than PyCharm in the community)

midnight ember
#

How/where would the stubs be hosted?

slender iron
#

yup, that's what I was thinking

midnight ember
#

if/elif x 400

lone axle
midnight ember
#

ah that would be nice

lone axle
#

Yep, I would be in favor of the default being a combination of all possible pins, then if they want they can run the command (or set env variable) to a specific one.

midnight ember
#

for devs that have a lot of boards and change multiple boards daily it would be nice to have a quick way to switch between stubs per board.

idle owl
#

I need to head out. Thanks again, all! Appreciate the tips.

midnight ember
#

and needs to be updatable for adding new boards that are released. pip upgrade sounds like an easy way to do that.

#

that would be nice. i do use nvm for an api project to store a token. knowing how much nvm is available is useful.

lone axle
#

Thanks for hosting Jeff. Hope everyone has a nice week!

midnight ember
#

Thank you @onyx hinge for hosting and everyone for participating.

errant grail
#

Thank you!

short tendon
#

Thank you everyone!

slender iron
#

haha, ya. I need to too

#

UVC

onyx hinge
slender iron
#

thanks for hosting jeff!

onyx hinge
#

It's a good time 🙂 I don't even stress out about it anymore.

midnight ember
#

Amazing

slender iron
lone axle
slender iron
#

ya, true

short tendon
#

Could leave the default with nothing...

slender iron
#

or a SET_BOARD_ENV or something

short tendon
#

I wonder what would happen if you raised an exception in the stub

brazen hatch
# onyx hinge

Oh wow! It looks amazing. Easy virtual monitor! I will absolutely work that into ljinux once my display stack is finalized and this is merged.

tame creek
#

i think there's a regression in the 9.x bundle? i can't get macropad examples that use the display to work anymore. macropad_simpletest_display.py fails somewhere deep in adafruit_display_text/bitmap_label.py

brazen hatch
#

Also if this worked on espressif we could use it with espcamera for an easy webcam

#

CircuitPython webcam anyone?

lone axle
tame creek
#

should i open an issue against circuitpython or the macropad library?

lone axle
#

Earlier I noticed this PR in the core: https://github.com/adafruit/circuitpython/pull/8823 that is dealing with bitmaptools validation. If you've got the opportunity to it might be worth testing the build from this PR to see if it happens to be the same issue / fix.

manic glacierBOT
short tendon
#

So I'll try more again later this week, but I can't get another pyi to import into the base boards stub. Even excluding using an env. Tried:

importlib.import_module("boards.board_other")
from boards.board_other import *
import boards.board_other 

And I added the file boards/board_other/__init__py

Doing import board.boards.board_other as board works fine (so I know the file is good)

onyx hinge
#

well drat 😕

short tendon
#

I'll still play with it. Will need to dig into pyi more first

onyx hinge
#

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

tame creek
#

also, 9.x on macropad sometimes crashes to safe mode with a hard fault after disconnecting from within tio, etc. not sure how reproducible this is yet

onyx hinge
spare jacinth
onyx hinge
#

so re-writing a single board.pyi stubs file is seeming more likely as the workable solution. you could just write it directly into the project directory and it would take precedence, right?

#
    import specific_board as board
else:
    import board
```otherwise maybe you go down the road of writing this or similar in code.py, though I'm not enthused
short tendon
#

if import_module doesn't work, then it would be a huge if/elif block. And that's not scalable (IMO). I think either:

  1. telling users to do the import specific_board as board above
  2. a command line method to replace board_stub/__init__.pyi with a specific one
slender iron
#

is it true that env variables can change its behavior?

short tendon
#

Not certain yet. Was focusing on importing first

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 9.0.0-alpha.6-33-g9f016796e0-dirty on 2024-01-22; Adafruit Macropad RP2040 with rp2040

Code/REPL

# N/A; also happens with freshly reformatted CIRCUITPY drive

Behavior

soft reboot

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

You are in safe mode because:
CircuitPython core code crashed hard. Whoops!
Hard fault: memory access or instruction error.
Please file an is...
short tendon
#

And when I had them in there, it found them anyway. I had tried:

import os
if os.getenv("board_id", None):
    if os.getenv("board_id") == "board_a":
        AA: microcontroller.Pin
    elif os.getenv("board_id") == "board_b":
        BB: microcontroller.Pin

and both AA and BB were defined, so switched to the loading of files first

manic glacierBOT
tulip sleet
short tendon
tulip sleet
#

yes, that was my impression -- thinking that the file is going to be executed by a type-checker is wrong, apparnetly

short tendon
#

So what @onyx hinge said with:

if STATIC_TYPING:
    import specific_board as board
else:
    import board

might be what we can do

#

That, or a shell command:

set_board_stub specific_board
slender iron
manic glacierBOT
manic glacierBOT
#

I understand the reason why it is lacking the support from Adafruit, but I think you should remove the download page or the download button at least on CP website if it is no longer working. Doing so to prevent someone like me who wants to purchased a more powerful "supported" board and realized it is actually not later. As suggested above, I will try the Blinka on MicroPython for now.

Please file an issue here: https://github.com/adafruit/circuitpython-org I don't agree that it should b...

short tendon
lone sandalBOT
short tendon
#

@slender iron, well maybe....

slender iron
#

👍

short tendon
#

Dang it. even in a py it still imports if it's in an if block. So the full logic is still not there

#

I'm guessing since it's typing it's trying to be as complete as possible

#

I think this might be the closest we can come:

#

It could also be a good first step...

manic glacierBOT
manic glacierBOT
manic glacierBOT
proud veldt
#

not sure whoelse besides @mortal kernel is working on ble for the pico w, but i found this and I hope it might be of some inspiration/help https://www.youtube.com/watch?v=RnpVAqOmc8E

This video introduces the use of tinyusb HID host and BTstack HID device on Raspberry Pi Pico W to convert a wired USB keyboard into a Bluetooth wireless keyborad. Test Bluetooth wireless keyboard input on desktop PC and cell phone.

Custom Bluetooth HID keypad:
https://youtu.be/XO2e0KP2YLk

Code:
https://rfwumcu.blogspot.com/2023/04/raspberry-p...

▶ Play video
proven garnet
# short tendon I think this might be the closest we can come:

I'm just catching up here, I have a love/hate relationship with .pyi files for all of these reasons. Have stub-only packages been discussed? If you make their generation and PyPI upload automated, you could make it so that each virtual environment could download the typing stub for a single board.

tulip sleet
#

i think there was worry about 500 packages, one for each baord

proven garnet
#

You're limited to one per environment since the type checker will try to find a single match for board, but you could just pip install the typesheds

proven garnet
manic glacierBOT
proven garnet
#

I know that for the CircuitPython VS Code extension you explicitly set the board, so I assume it works like the proposed environment variable that was mentioned prior in that context. I don't remember how much that setting affects things though (type checking? importable modules?).

#

Sorry if I'm going over treaded territory

short tendon
#

So making them all would be easy, there are 2 downsides:

  1. would pypi rate-limit us?
  2. if you wanted to see if your code worked for 2 different boards, you would need to uninstall one stub and install the other
proven garnet
#

Not sure about the rate limiting, it is weird that the answer isn't in an FAQ though I suppose there isn't a usual need to upload like this.

tulip sleet
#

I see this as more something that might be done in the editor extension rather than just by installing packages. Also, for instance, suppose you want to write generic code rather than for a specific board, or for a set of boards. It seems like a lot of work when you just want to check the pin names or supported features for a board

manic glacierBOT
#

I wonder if the validation should be pushed down into disk_read() or what it calls: mp_vfs_blockdev_read(). That makes those routines safer to call from elsewhere.

@drath42 I don't immediately see the reason for this change:

-    if (vfs->fatfs.ssize == MSC_FLASH_BLOCK_SIZE) {
+    if (vfs->ssize == MSC_FLASH_BLOCK_SIZE) {

I could probably figure it out, but I'll ask you instead :slightly_smiling_face:

manic glacierBOT
#

I wonder if the validation should be pushed down into disk_read() or what it calls: mp_vfs_blockdev_read(). That makes those routines safer to call from elsewhere.

I took some notes on the callstack up to the point where it crashes, but I didn't spend too much time figuring out how this code is used outside of my immediate problem. I'll look into it later (I hope).

@drath42 I don't immediately see the reason for this change:

...

I could probably figure it out, but I...

manic glacierBOT
manic glacierBOT
#

I loaded the latest artifact from #8699 up on a Feather ESP32-S3 and I'm still seeing web workflow issues. If the file browser screen is accessed the REPL appears to hang, refreshing the file browser screen releases the REPL for a few seconds and then it freezes again, after several minutes the REPL does become responsive again at least until the web workflow file browser screen is refreshed again.

Renameing or deleting a file from the web workflow file browser when the REPL is frozen wil...

slender iron
#

interesting to see CP 8 was released at the start of february 2023

manic glacierBOT
#

Along with file delete/rename/uploads changing the current folder (going into the SD folder for example) through the web workflow file browser also releases a hung REPL.

Uploading a file causes the code.py to stop for an auto-reload soft reboot, after which the code.py starts and runs normally however the web workflow page no longer responds. Other Circuit Python devices still show the device, however the link doesn't work.and evenually times out with a "this site can't be reached" messa...

manic glacierBOT
#

I'd thought about using a class like the Monitor class but it felt heavy for such a simple call. I'm happy to rewrite it to do that if you'd prefer, though.

I'll change the code to return None for the IP address DHCP lease for the station.

If I'm understanding correctly, namedtuples would be immutable, unlike the dict? Maybe that would be preferable.

I'll take a closer look at the Pi Pico SDK re: the DHCP server. I'm much more familiar with Espressif's.

I'm not at all understand...

slender iron
#

@tulip sleet want to pair program today?

#

I'm around this afternoon

tulip sleet
slender iron
#

yup, gonna eat now and then I'll be free

tulip sleet
#

great, ping me when you're back

manic glacierBOT
slender iron
#

@tulip sleet done eating. are you ready?

tulip sleet
#

yes, finished the link surgery

manic glacierBOT
#

Looking at the code, maximum data that can be transferred in "one go" is 65k - at 100kHz and assuming 10 bits per byte (covers ACK etc), this would take 6.5s. So a 1s timeout may incorrectly fail.

Choices would be to have a computed timeout, or reduce the chunk size to say 1k - I'd be inclined to go with the latter

manic glacierBOT
#

This PR fixes #2253 and #8093.

Explanation

This works by creating the nrfx_twim device with a callback (twim_event_handler).
When the callback is triggered it marks that the transfer has finished and records any error/success code in the twim_peripheral data structure.
We replace the nrfx_twim_xfer function with our _twim_xfer_with_timeout which make a note of the start time, and waits until either the callback has triggered or 1s has elapsed.
If the timeout is triggered i...

manic glacierBOT
manic glacierBOT
short tendon
#

Not sure who is best to ask, so will just throw it into the ether...

I have a laundry list of things that I would enjoy doing with/for CP.

Things like:

  • Connection manager
  • Adding things to cookiecutter (tox related)
  • Creating and updating some libraries (OAuth, generic time fetcher, config library, etc)
  • adding test coverage to libraries
  • and more!

Although I can ask random questions here or take up the next 10 weeks of in-the-weeds...

I thought I'd ask if there is a better way?

I will give as much to this as I can, and that is accepted. Right now it's kinda a thing at a time and would love to super-power that.

Let me know.

slender iron
#

Asking questions here is probably the most expedient way of going about it

short tendon
#

Sounds good. Was hoping for something that might be a little faster. And didn't annoy people with constant questions of "Do you want this"

slender iron
#

I'd much rather you ask before doing something than just doing it

#

🙂

#

gotta run now. thanks for your help!

short tendon
#

Oh I agree - don't want to waste anybody's time. Just trying to adjust my personal time and how much I can give to working on Adafruit work, vs other stuff

keen eagle
short tendon
#

So my issue is more that I have time to give, and Adafuit is the first bucket I want to give it too. But if I can't pre-fill that with a task-list, it will go elsewhere. I have a bunch of ideas and partial libraries I've written for my own things and just trying to figure out what to do.

manic glacierBOT
short tendon
#

Back to the stubs thing. Although not sure why they come up double... but this is pretty cool (IMO)

#

If I had an easy way to do a video, I'd show code errors when switching boards. I like the idea of an env var, but this super quick switching is super cool...

#

And when I made the comments on the call yesterday about adding things into the doc-string? This is why

#

Not pulling Frozen Modules and Avalible, but would....

manic glacierBOT
orchid basinBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
orchid basinBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

It turns out this is a Linux issue. The MacroPad worked fine to wake up macOS and Windows. See https://github.com/adafruit/circuitpython/issues/5380#issuecomment-925044500 for how to determine which USB devices are enabled for wakeup. See also https://askubuntu.com/questions/848698/wake-up-from-suspend-using-wireless-usb-keyboard-or-mouse-for-any-linux-distro/874701 for details on how to change these settings. I would have thought there was an easier way, and maybe there is for some Linux dis...

#
  • Fixes #8774.
  • Fixes #5380.

Thanks very much to @meesokim for code to enable usb_hid to wake a sleeping host computer, and to @hathach for implementing this ability in TinyUSB in the past.

Tested successfully with MacroPad RP2040, Feather nRF52840, and Circuit Playground Express on Windows and macOS.

On Linux not all HID devices are automatically enabled to do wakeup. See @hathach's comment. See also...

manic glacierBOT
#

This enables rudimentary UVC support. Tested on Adafruit MacroPad RP2040. This is not the final form of the API, which will ultimately be usable as a displayio display. Instead, this is intended as a preview for folks who are interested in testing basic functionality now.

  1. Configure boot.py for UVC:

    import uvc
    uvc.enable_framebuffer(128, 96)
    
  2. put RGB565_SWAPPED content in uvc.bitmap at runtime. This code shows a horizontally scrolling test pattern:
    ...

short tendon
#

Do we feel this is the way to go then?

manic glacierBOT
#

A recent PR run complained:

Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-python@v4, actions/cache@v3, actions/upload-artifact@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

We may be able to depend on these actions being updated, or we may need to bump ...

slender iron
short tendon
#

Let me try that

#

Not in a way that I can get it to. I also tried:

from typing import TYPE_CHECKING

if TYPE_CHECKING:
    import board.matrixportal_m4 as board
else:
    import board

And TYPE_CHECKING is False in the editor

slender iron
#

it doesn't work with os.env?

manic glacierBOT
manic glacierBOT
short tendon
short tendon
slender iron
#

kk. Don't use pycharm so don't have experience with it

short tendon
#

does it work in VS Code?

slender iron
#

I don't use vs code either

short tendon
#

Mu?

slender iron
#

sublime text

short tendon
#

ahhhh. I do a lot in UltraEdit. sometimes simple is good

manic glacierBOT
short tendon
#

@slender iron - do you feel we can move forward with creating the stub board files and figure out how best to use them in each IDE while that's moving along?

slender iron
#

I think you should do what's best for you

short tendon
#

Do we want to add them to circuitpython-stubs?

manic glacierBOT
slender iron
short tendon
#

Cool

proven garnet
# short tendon Cool

If you're doing one for VS Code, check out the CircuitPython extension for VS Code. For what it's worth I believe it already grabs board definitions and bubble library info. Not sure how its capabilities align with your goal, but I think I remember seeing it open source and also permissively licensed (MIT, I think) if you decide to do something else.

short tendon
manic glacierBOT
#

the doc build error:

Error: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run

It is now an error for two different steps to upload artifacts with the same name. Some people do it on purpose, though I do not know whether we do or not. I imagine the change was made out of belief that it was an error that should be diagnosed.

the silabs error is the usual spurious build error, which remai...

manic glacierBOT
manic glacierBOT
proven garnet
#

I can look into that though, to make sure that selecteing the board really does change pin definitions and it isn't just a general catch-all selection of pins

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.2.9 on 2023-12-06; Raspberry Pi Pico with rp2040

Code/REPL

>>> print(f'{63456:,}')
63,456
>>> print(f'{63456:b}')
1111011111100000
>>> print(f'{63456:_b}')
Traceback (most recent call last):
  File "", line 1, in 
ValueError: invalid format specifier
>>>

Behavior

print(f'{63456:,}')
63,456
print(f'{63456:b}')
1111011111100000
print(f'{63456:_b}')
Traceback (most recent call l...

manic glacierBOT
manic glacierBOT
manic glacierBOT
short tendon
midnight ember
#

previously the only way to display a circuit python display to OBS was with the Pico DVI. Hopefully UVC will allow live streaming of a display with displayio to OBS? FoamyGuy could output the display instead of having a webcam pointed at the display. I know it's really early but the prospect of the capability is really exciting.

manic glacierBOT
onyx hinge
#

@slender iron no, not asking for specific action around the flash ioctl thing. but we would end up with crashy-crashy problems if we took a flash implementation from micropython without modifying it, and sadly the compiler won't give us an error to help out

slender iron
#

thanks for doing the review!

slender iron
#

@onyx hinge build is green after consolidating the enum

manic glacierBOT
onyx hinge
slender iron
#

very cool!

onyx hinge
#

colors are swapped but I know where that is

onyx hinge
#

@slender iron or are those colors right? The blue looks quite blue but the purple's correct.

slender iron
#

it looks ok to me. try the display ruler 🙂

onyx hinge
#

and choosing the opposite "swap bytes in word" setting is clearly wrong (green blinka)

slender iron
#

hrm, only the big one has the test colors

onyx hinge
#

oh, okay

#

well boo. it works on macropad but on qtpy esp32s3 it fails to start if I have the UVC-configuring line in boot.py.

#

well I guess I'll be getting out the big debug guns tomorrow 🙂

manic glacierBOT
#

Hello Dan.

Thank you for approving my request.

I am a professor at a technical university (see my home page
https://jacques.supcik.isc.heia-fr.ch/) and the hardware of this board
has been developed by my colleagues in the electrical engineering
department. This board will be given to young people during exhibitions to
attract them to technical studies. I am in the computer science department
and my role is to write software for this board and to promote it on
open-source platfor...

#

On esp32s3, having the UVC-configuring line alone causes a hard-fault at startup. However, disabling some other USB devices allows it to boot and run code.py:

import uvc
import usb_hid
import usb_midi

usb_hid.disable()
usb_midi.disable()

uvc.enable_framebuffer(64, 64)

however, as far as I can tell within qv4l2, the device never actually transmits a frame of data (received frame count never increases). I have not yet analyzed this failure in further detail.

slender iron
manic glacierBOT
#

@furbrain I was going to test this, and first tried to reproduce the old problem from #2253. However, I can't seem to get the test suggestions there to work: unpowered LSM9DS1 on an Arduino Nano 33 BLE, or an unpowered LIS3DH attached to a Feather nRF52840 with a resistor between SCL and SDA. In both cases CircuitPython 8.2.9 complains that SCL/SDA pull-ups are missing.

Did you test this against some hw configuration you knew would cause the problem? Thanks.

orchid basinBOT
manic glacierBOT
#

I tested it against my current use case - i2c device is on the board, but is powered by a dedicated pin. I'd you turn the pin on and then connect the bus, everything works fine until you unpower the bus and it crashes

This is also the case if you are running an I2C display on separate per and later remove the power. Because the display gets repurposed as a console it is never properly shut down and you get a hang when you try to turn off the power to it

proven garnet
manic glacierBOT
proven garnet
#

It generates stubs for them upon building the extension and supplying them with it. The build CI parses the C file pin defs and generates pyi files for each board.

#

The extension allows you to select different boards, and doing so changes Pylance (Python analysis) to use those generated and supplied stub files, as well as other things like giving the CircuitPython std lib modules that it also parses precedence over CPython's ones.

#

In summary, stubs are built when the extension is built on GitHub, and selecting the board reorganizes the order of where autocomplete looks to give precedence to those stubs.

manic glacierBOT
proven garnet
#

For what it's worth, if my understanding is correct about the process, it means that pin stubs are not generated regularly but only on extension updates. The library autocomplete works with the same Pylance method, but instead downloads the most recent bundle from within the extension, so that IS up to date.

short tendon
#

Cool. I'll take a look. I'm also building from pins.c and other places

tulip sleet
#

@slender iron @onyx hinge I need 28 bytes in ru translations for a couple of M0 basic boards that use a lot of pins. There's not much left to squeeze, HOWEVER, if I turn on MICROPY_ERROR_REPORTING_TERSE, which shortens a bunch of messages in py/, then I gain back about 1300 bytes. These terser messages are not bad: they mostly leave out ancillary stuff, like number of values expected instead of just wrong number, or an additional type name for explication.

#

just to give you an idea of other headroom, trinket m0 ru has <300 bytes free, because it has many fewer pins.

#

These builds have already been pruned to an inch of their life. I checked for accidental double precision, etc.

#

these terse messages are already in the translation files, they just might not have been used previously

onyx hinge
#

I think it's worth considering

tulip sleet
#

i will do this in the morning; it needs a little extra mechanism to control from the Makefiles

manic glacierBOT
thorny dove
#

Question: I am using an Adafruit Feather ESP32-S2 TFT flashed with CPY v9.... (see below). I tried to follow the move of board.DISPLAY to displaybus.DisplayBus, however I can't set root_group. See the REPL trial below: Adafruit CircuitPython 9.0.0-alpha.6-29-g5f318c37bb on 2024-01-19; Adafruit Feather ESP32-S2 TFT with ESP32S2. See image of REPL output https://imgur.com/a/RzygVaL

stuck elbow
thorny dove
stuck elbow
#

yes, display2 is a class, you never created an instance of it

thorny dove
#

ok, thanks

thorny dove
#

@stuck elbow I flashed the latest. Used board.DISPLAY. It runs OK

lone sandalBOT
short tendon
lone sandalBOT
slender iron
manic glacierBOT
manic glacierBOT
tulip sleet
#

@slender iron I am going to make draft release notes for a 9.0.0 alpha or beta release, which brings up the question, alpha or beta?

#

maybe we are ready for beta

slender iron
#

beta works for me

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.2.9 on 2023-12-06; Adafruit MatrixPortal S3 with ESP32S3

Code/REPL

import displayio
import board
import rgbmatrix
import framebufferio

displayio.release_displays()
DISPLAY_WIDTH = 320
DISPLAY_HEIGHT = 160
DISPLAY_ROTATION = 0
BIT_DEPTH = 3
AUTO_REFRESH = False


matrix = rgbmatrix.RGBMatrix(
    width=DISPLAY_WIDTH, height=DISPLAY_HEIGHT, bit_depth=BIT_DEPTH,
    rgb_pins=[
        board.MTX_R1...
manic glacierBOT
#

Seeing as how it would require at least 20 panels to replicate this issue there will have to be a way to emulate the buffer data required to throw that error. That is definitely dev territory and way over my head.

I have not encountered that issue with 12 panels and according to the dimensions listed @identifystation could successfully get up to 15 panels. Even if it's a framebuffer size limitation or miscalculation I have my doubts that a single Matrix Portal S3 will have the signal str...

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

I figured out the esp32s3 crashing bug (I was not counting the correct sort of endpoint) but the frame data still never transferred. @hathach said he was working on esp32s3 uvc in arduino, so if there's a library level problem with esp32s3 it will be exposed that way. I don't know what that means for whether/when we merge this PR. It does seem to work well on rp2040 (at least the one board I tested).

tulip sleet
#

@onyx hinge are you working on any near-term fixes that I might put into beta.0? I think I could hold off on the terse messages because the beta.0 build might just fit due to the version string being shorter. Or we'll just have a couple of broken ru builds

onyx hinge
tulip sleet
onyx hinge
#

I wasn't intending to do much work today so I won't be testing it right now

tulip sleet
#

ok, so not urgent. I think I will just do beta.0 this morning.

#

that will get rid of a large backlog. Can do 8.2.10 in a week or two or less

onyx hinge
#

great, and thank you!

manic glacierBOT
#
[adafruit/circuitpython] New tag created: 9.0.0-beta.0
#

Examples of TERSE vs NORMAL messages. The messages are still quite understandable; you just have to look at the context more carefully

"__init__() should return None"
"__init__() should return None, not '%s'"

"name not defined"
"name '%q' is not defined"

"cannot create instance"
"cannot create '%q' instances"

"unsupported type for operator"
"unsupported type for %q: '%s'"

"wrong number of values to unpack"
"need more than %d values to unpack"

"object not callable...
manic glacierBOT
short tendon
#

Will there be an 8.2.10 release? I saw the PR into 9 for Fix subclassing dict which would force code to support 9+ if they wanted to use that

tulip sleet
short tendon
#

Okay. There are a few things I personally have that I've had to do some crazy work-arounds to get to work. Was there more than 1 pr? because it looked pretty small...

tulip sleet
#

though one could always wrap dict.

#

we are hoping to get 9.0.0 final out relatively soon

short tendon
#

You can wrap it, but dict(wrapped_dict_class) doesn't work

tulip sleet
#

I think you could target your connectionmanager to 9.0.0

#

i mean you make a duck-type dict-ish thing

short tendon
#

connectionmanager doesn't need it. I have a slew of other things sitting on a back burner. The main one is a Config library that loads from json files, and it works in the most part by exposing things like __getitem__, but there is strange behavior around passing it into a dict constructor.

#

I'll try it on the new 9.0.0 beta and see if it works

manic glacierBOT
orchid basinBOT
manic glacierBOT
#

In runs of .github/workflows/create-website-pr.yml, this may happen.

Run python3 build_board_info.py
Logged in as adafruit-adabot
unable to create branch
{"message":"Not Found","documentation_url":"https://docs.github.com/rest/git/refs#create-a-reference"}

That step is reported as succeeding, though it clearly has not. (The reason for the failure is that adafruit-adabot/circuitpython-org needs to be updated.)

See for example (until it disappears): https://github.com/adaf...

short tendon
#

@tulip sleet should I open a bug for this:

class Test:
  def __init__(self, data={}):
    self._data = data

  def __repr__(self):
    if hasattr(self._data, "__repr__"):
      return self._data.__repr__()
    # dict.__repr__ does not exist in CircutPython
    return str(self._data)

  def __delitem__(self, key):
    if key not in self._data:
      raise KeyError(key)

    del self._data[key]

  def __getitem__(self, key):
    if key not in self._data:
      raise KeyError(key)

    return self._data[key]

  def __setitem__(self, key, value):
    self._data[key] = value

  def items(self):
    return self._data.items()

  def keys(self):
    return self._data.keys()

In CPython this works:

In [26]: x = Test()
In [27]: x['a'] = 1
In [28]: x
Out[28]: {'a': 1}
In [29]: dict(x)
Out[29]: {'a': 1}

In CP 9.0.0-beta.0 it doesn't (also doesn't in 8.2.9):

>>> x = Test()
>>> x['a'] = 1
>>> x
{'a': 1}
>>> dict(x)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 19, in __getitem__
KeyError: 0

When adding logging CPython it calls keys and iterates over those. in CP it seems to start at 0 and work up from there

short tendon
tulip sleet
short tendon
#

@tulip sleet looks like it happens in both micropython 1.21.0 and 1.22.1

tulip sleet
#

subclassing builtin types is known to be flaky in a number of ways; whether this is a real bug or just a limitation I am not sure

short tendon
#

since you can subclass dict in CP9, I can replace all the self._data with super() calls. But then of course it doesn't work on 8.x

#

Does Adafruit have anything like LTS for versions?

tulip sleet
short tendon
#

Gotcha. Makes sense

tulip sleet
# short tendon Gotcha. Makes sense

we have talked about version-specific bundles where the library versions included are specific to a particular release, like 1.1.0 for 8.x and 2.0.0 for 9.x, but we haven't done that

short tendon
#

Oh that would be cool. (Could even match the CP version...)

tulip sleet
#

so for now we just write version checking code in the lib itself if it's needed and take it out later

short tendon
#

Makes sense. Would be cool if mpy-cross could automatically leave out the other bits

manic glacierBOT
#

CircuitPython version

MicroPython 9.0.0-alpha.6-49-gb704452f70 on 2024-01-27; linux [GCC 11.4.0] version

Code/REPL

class MyDict(dict):
    def __init__(self, initial_dict=None):
        super().__init__(initial_dict)

d = dict({'foo': 'bar', 'a': 123})
print(d.keys())  # keys is correct
d = MyDict({'foo': 'bar', 'a': 123})
print(d.keys())  # keys is empty

Behavior

When running the above example, the base dictionary is not initialized corre...

manic glacierBOT
onyx hinge
#
set up CIRCUITPY.IMG as /dev/loop0
mounted /org/freedesktop/UDisks2/block_devices/loop0 on /media/jepler/CIRCUITPY
jepler@bert:~/src/circuitpython/ports/posix$ cat /media/jepler/CIRCUITPY/boot_out.txt 
Adafruit CircuitPython 9.0.0-alpha.6-48-ga17d2ac0db-dirty on 2024-01-27; posix with amd64
Board ID:default

I considered whether POSIX CircuitPython would use FAT or POSIX VFS implementation; I still think doing POSIX VFS would be good (access files directly on the hosting computer) but FAT was easy..

#

so, now, it arbitrarily allocates a 512KiB file "CIRCUITPY.IMG" which can be "loop mounted" on supporting operating systems like linux.

#

one reason I want to switch to POSIX VFS is because I want to run tests from this thing, not upstream's 'unix' port.

#

because it will not be such a hack to enable stuff in shared-modules for this port, meaning we can test more of it

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

Concerns / resolves #8777

Slight difference to the implementation mentioned in #8777: I "upgraded" to an integration based algorithm because the simple scanning timeout still gave me issues on some anoyingly bouncy keys and for better filtering of potential noise/EMI (which I did not encounter, but hey, it's basically free).
Summary:

  • keypad state transitions happen after their cumulative average crosses an adjustable threshold,
  • keypad.currently_pressed has been converted hold the ...
#

As we discussed earlier and I think you confirmed here, I think a "scan" here means elapsed time of one interval. Is that indeed what you mean? So is 1 the same as the previous algorithm? I would think that 0 would mean no debouncing then.

I would change scans on average to intervals on average, assuming that's what you mean. It's not so obvious that a scan occurs once per interval, and in the future, ...

#

"scan" means elapsed time of one interval, yes. The reason why I changed the name from "interval" to "threshold" is that it's not a fixed interval (i.e. constant time) anymore. The "threshold" seemed to be more accurate a description when dealing with the integrating that depends on physical bounciness.

"intervals on average" is a good suggestion. Tbh, I struggled a bit with the doc string. Not easy to convey what exactly the parameter does without laying out the low level algorithm.

#

So for your excessively bouncy switches, how is making the interval be (old)interval * debounce_threshold less satisfactory? Does it introduce too much latency? But I would think the integration algorithm also introduces similar latency with the threshold set to to some multiple of the interval.

Basically, yes. The integration algorithm has a similar latency (strictly at least equal, sometimes slightly longer) -- the thing that improved is that this algorithm has a seesaw-like characte...

#

Thanks for the comments. So my remaining question is

So is 1 the same as the previous algorithm? I would think that 0 would mean no debouncing then.

I am a little confused by your saying that 1 is no debouncing, instead of the (disallowed) 0.

I can take another look at that. I think the constant offset of at least 1 is necessary to encode and distinguish pressed/released states. Offsetting the argument by one is a possibility, although that would introduce an awkwar...

#

My thoughts were also: You have to measure pressed/released for at least threshold (>=1) intervals for an event. Measuring for 0 intervals didn't make sense in that regard.

I understand that 0 doesn't make sense, but I was confused that your doc string said 1 means NO debouncing. I thought it waits for one interval, so it is at least doing one interval of debouncing.

#

If you have Samsung Disk Magician or some other utility programs installed on Windows, it can cause disconnect-behavior. Or your CIRCUITPY drive may be corrupted, though that usually does not cause disconnects. Try erasing all of flash with the "nuke" UF2, as described here: https://learn.adafruit.com/getting-started-with-raspberry-pi-pico-circuitpython/circuitpython#flash-resetting-uf2-3083182.

#

I would not describe the current behavior (before your code) as "no debouncing". It debounces fine for bounces that resolve in less than interval, because it collects state-transition info across two (consecutive) interval times.

I tested the current code a bunch with keyboards, etc. We have not gotten complaints of bouncing when the current keypad is used in keyboard projects.

I have seen some tactile switches that have really long bounce settle times, like 50 msecs.

manic glacierBOT
#

I agree, up to 50ms works for most mechanical keyboard switches. There are some buttons that only barely work consistently with that scan rate, but that's not really my incentive. I also didn't mean to call the current implementation "no debouncing", that's why I put the "no" in parentheses; I apologize if that came across the wrong way. The rate limiting does work in most cases, no arguing about that.
It's not the absolute delay that the scan rate limiting introduces that can is perceived a...

manic glacierBOT
#

i whipped this up as a short term solution; you are welcome to any and all of this code, most of it was translated from the micropython implementation:

import board
import busio
import time

class MPU6886:
    # MPU6886 Register Addresses and Configuration Constants
    _CONFIG = 0x1a
    _GYRO_CONFIG = 0x1b
    _ACCEL_CONFIG = 0x1c
    _ACCEL_CONFIG2 = 0x1d
    _ACCEL_XOUT_H = 0x3b
    _ACCEL_XOUT_L = 0x3c
    _ACCEL_YOUT_H = 0x3d
    _ACCEL_YOUT_L = 0x3e
    _ACCEL_ZOU...
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.2.9 on 2023-12-06; Raspberry Pi Pico W with rp2040
Board ID:raspberry_pi_pico_w
UID:E6616407E353582C
MAC:28:CD:C1:07:71:81

Code/REPL

import time
import wifi

wifi.Radio.enabled: True
radio = wifi.radio
radio.stop_station()
#setting up ssid, password, channel and authmode
ssid = 'RPPW'
password = 'RPPW1234'
channel = 1
authmode = (wifi.AuthMode.WPA2, wifi.AuthMode.PSK)

print('activating access po...
manic glacierBOT
manic glacierBOT
#

Along with some pure Python functions to build the 4096-entry look up table, this should allow most photo editing layer blend modes to be implemented.

This is a almost a superset of bitmaptools.alphablend except that only RGB565_SWAPPED is supported and instead of having a skip index there is an optional mask bitmap; we should decide what to do about this. Part of that would include benchmarking the alternatives.

idle owl
#

Oof. I'm trying to copy files to a Pico W, running 9 beta 0. I already nuked it and tried installing CP again. I can copy .mpy files fine, but anything else fails with an I/O error, both using Finder and cp via command line. Anything else being a .bmp, or a .py file. I also can't save code.py evidently.

#

Going to try 8.

random junco
slender iron
#

@onyx hinge I'm interested in getting CP running in an arm cortex simulator environment too

idle owl
idle owl
#

Oh nice. Thank you!

#

Ok, now it tells me I don't have enough free space.

#

This is the bmp that comes with the simpletest file for the display library.

#

I can edit code.py at least.

devout jolt
slender iron
#

I wonder how much flash space we'd save if we split dict tables into keys followed by values

manic glacierBOT
#

Still an issue in beta.0
Adafruit CircuitPython 9.0.0-beta.0 on 2024-01-27; Raspberry Pi Pico W with rp2040.

<details>
<summary>Test Code...</summary>

import time
import os
import wifi
import traceback

AP_SSID = "Bob"
AP_PASSWORD = "YourUncle"
ITERATIONS = 5
DELAY = 3

time.sleep(3)  # wait for serial
print("="*25)

def connect():
    while not wifi.radio.connected:
        try:
            wifi.radio.connect(os.getenv("WIFI_SSID"), os.getenv("WIFI_PASSWORD")...
slender iron
#

right now QSTR only dicts store a two black bytes for each 16bit qstr key

manic glacierBOT
idle owl
#

I switched to trying to use the SD card, but it says Mount point directory missing. The pin for CS is correct, as well as SPI. I have no idea how to troubleshoot SD cards.

#

Docs mention if two things are using SPI, do the card first. It already was first. Code isn't even getting to init'ing the display right now.

#

The MicroPython example to use the SD card looks about the same as my code, so it's not that I'm doing that part wrong, I would think.

#

Maybe the card is formatted wrong? I did FAT. I remember there being some SD card formatter app, but I can't find it now.

slender iron
#

I just changed this so it's a breaking change in 9.0

idle owl
#

Hah ok. Like mkdir from command line on CIRCUITPY?

slender iron
#

ya, or just in finder

idle owl
#

Finder isn't playing nice. But, understood. Thank you!

#

Huzzah!

#

It's upside down, but it displayed the image!

onyx hinge
#

wahoo

slender iron
idle owl
#

Oof. The PR is too old to have build artifacts anymore. I guess I'll pull it and build my own to test it.

slender iron
#

<@&356864093652516868> Just a last minute reminder that our meeting is in just over ten minutes in the CircuitPython voice chat. I look forward to chatting with you all!

onyx hinge
#

I totally got distracted, thanks for the ping 🙂

blissful pollen
#

lurking today, no notes

lone axle
onyx hinge
#

I'm just working on a PR to add a placeholder CIRUCITPY/sd because I think that'll help folks

lone axle
#

I've worked with ones that were maybe 1/4 of that size, which required full PCs to drive the display. To see it that large and driven by a microcontroller is insane

short tendon
turbid radish
#

Thanks all!

onyx hinge
#

thank you scott!

gilded cradle
#

Thanks

candid sun
#

thanks for hosting @slender iron

lone axle
#

Thanks for hosting Scott! Have a great week everyone!

turbid radish
#

Please do get your #CircuitPython2024 contributions in

ember iris
#

Thanks all! Have a great week everyone!

short tendon
onyx hinge
#

@slender iron what #ifdef turns on ble workflow? is it just CIRCUITPY_BLEIO?

manic glacierBOT
slender iron
manic glacierBOT
#

sd/placeholder.txt (uses 1 sector):

This placeholder file allows mounting an SD card at /sd

settings.toml (539 bytes, so 2 sectors, if all features enabled):

# Settings in this file can be retrieved via os.getenv()
# Certain settings starting with CIRCUITPY_ are also used by CircuitPython.

### Core settings
# CIRCUIPY_HEAP_START_SIZE = 8192
# CIRCUITPY_PYSTACK_SIZE = 1536

### Wifi settings
# CIRCUITPY_WIFI_SSID = "wifi network name"
# CIRCUITPY_WIFI_PASSWORD...
idle owl
#

Wheeeeeee building CP for the first time on this machine. -j22 That was the fastest build I've ever done.

ornate breach
#

How fast did it build?

idle owl
#

I didn't think to time it until after the fact, but it was probably 30-40 seconds?

ornate breach
#

CP usually takes 30-45 seconds on my Intel MBP with 8GB of RAM

idle owl
#

I'm terrible at timing, tbh.

#

Could have been less.

#

I have... an embarrassing amount of RAM in this thing.

ornate breach
#

I have 64GB of RAM in my desktop lol

#

I rarely do anything that justifies that amount haha

idle owl
#

I tanked the entire thing, and it still took as long as yours. That's odd to me. I wonder what's slowing it down.

#

Same. This is the first time I've tanked any of it.

ornate breach
#

Tbf, building in macOS terminal seems to go pretty faster for me in a lot of areas where it’s just slow on windows

idle owl
#

Ok, so the build loaded, the display works. I have no idea how I'm supposed to use these objects for the LEDs and buttons, though....

ornate breach
#

Aside from random things like forgetting to export a path

idle owl
#

Fair enough

ornate breach
#

objects can usually be accessed through the board class

idle owl
#

Right. That's where they are. But I don't understand what to do with them.

ornate breach
#

Is this a board you designed?

idle owl
#

I think the buttons are using a shift register.... I guess the keyboard shared module does that?

#

No, it's the Pimoroni Inky Frame 7.3". I got this board def from an existing PR.

ornate breach
#

Oh okay

idle owl
#

I'm testing it to see if it's working so I can get it updated and the CP folks can move forward with it

ornate breach
#

I would assume the keyboard shared module should handle button presses

idle owl
#

Ok, I'll see if the pins match what that module wants.

ornate breach
#

👍🏻

idle owl
#

oh it's keypad. Right. Rusty over here already. 😄

#

Looks like they do!

ornate breach
#

I hear ya there lol… it’s been so long since I’ve contributed to circuitpython. These days I just use the eval board builds for circuitpython if I hadn’t already submitted a board before lol

idle owl
#

So it's reading them as buttons 7-3, but hey it's a start!

slender iron
#

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

idle owl
#

I've lit up an LED!

slender iron
idle owl
#

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