#circuitpython-dev

1 messages · Page 74 of 1

manic glacierBOT
devout jolt
tulip sleet
# devout jolt Question: is there a mechanism allowing one to compile-in a code.py and librarie...

yes, here are some boards with their own frozen code:

ports/nordic/boards/challenger_840/mpconfigboard.mk:11:FROZEN_MPY_DIRS += $(TOP)/ports/nordic/boards/challenger_840
ports/raspberrypi/boards/solderparty_rp2350_stamp_xl/mpconfigboard.mk:14:FROZEN_MPY_DIRS += $(TOP)/ports/raspberrypi/boards/solderparty_rp2040_stamp
ports/raspberrypi/boards/solderparty_rp2350_stamp/mpconfigboard.mk:14:FROZEN_MPY_DIRS += $(TOP)/ports/raspberrypi/boards/solderparty_rp2040_stamp
ports/raspberrypi/boards/solderparty_rp2040_stamp/mpconfigboard.mk:14:FROZEN_MPY_DIRS += $(TOP)/ports/raspberrypi/boards/solderparty_rp2040_stamp
#

right now code.py has to be code.py, main.py code.txt, or main.txt (the latter two are just to save new users from themselves)

#

You could change the default code.py print("Hello World") to instead import some frozen module

#

.

brazen hatch
#

The sensor may be cooked. I had a 2640 do the same to me recently.
Try switching to another camera.

manic glacierBOT
tulip sleet
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 9.1.4 on 2024-09-17; M5Stack Dial with ESP32S3

Code/REPL

import time
import board
import displayio
import vectorio

display = board.DISPLAY

def show_and_count_loops_per_second(num_reads: int) -> None:
    time_ms = time.monotonic_ns() // 1e6
    next_lps_time = time_ms + 1000
    lps_counter = 0

    while num_reads > 0:
        lps_counter += 1
        time_ms = time.monotonic_ns() // 1e6
       ...
manic glacierBOT
wanton dirge
#

Hey @slender iron , I'm getting the PR in but seeing some CI fails because it looks like my local pre-commit installation wasn't catching format issues for some reason. I'll try to get the CI steps passing today.

slender iron
wanton dirge
#

Is there something I should add the name of my port to to get this CI scheduler run to pass?

slender iron
#

I think there is a list in the python files

#

let me find it

#

try adding it there

manic glacierBOT
manic glacierBOT
modest hazel
#

I used MP_REGISTER_MODULE and cleaned the build, but it's not showing when I call help("modules")

devout jolt
modest hazel
#

okay, I'll give that a try, thank you!

devout jolt
modest hazel
#

okay. I'm stuck again. I think I'm getting closer, but I'm getting this error now that it's picking up the files and trying to build them:

In file included from ../../shared-module/_lightshow/__init__.c:48:
../../shared-module/_lightshow/__init__.c: In function 'lightshow_tick':
../../py/mpstate.h:337:40: error: 'mp_state_vm_t' {aka 'struct _mp_state_vm_t'} has no member named 'lightshow_singleton'
  337 | #define MP_STATE_VM(x) (mp_state_ctx.vm.x)
      |                                        ^
../../shared-module/_lightshow/__init__.c:112:34: note: in expansion of macro 'MP_STATE_VM'
  112 |     lightshow_obj_t *lightshow = MP_STATE_VM(lightshow_singleton);
      |                                  ^~~~~~~~~~~

I'm not sure where I should be defining lightshow_singleton beyond what I've already done - so I don't know why I'm getting this error.

slender iron
modest hazel
#

Like this?

    lightshow_obj_t *lightshow = MP_STATE_VM(lightshow_singleton);
    if (!lightshow) {
        lightshow = m_new_obj(lightshow_obj_t);
        lightshow->base.type = &lightshow_type;
        lightshow = gc_make_long_lived(lightshow);
        MP_STATE_VM(lightshow_singleton) = lightshow;
    }

Source: https://github.com/buildwithpiper/circuitpython/blob/piperCP9.0.0/shared-bindings/_lightshow/LIGHTSHOW.c
For background, this is for a 8x8RGB matrix that is driven using shift registers and closely modeled after the _pew module. Admittedly, I'm a little out of my depth being this deep into it, but it's a requirement for our base firmware.

slender iron
#

lemme find it

#

Looks like the new way to get it into there is with MP_REGISTER_ROOT_POINTER. Search for an example of that

modest hazel
#

okay, I added MP_REGISTER_ROOT_POINTER(mp_obj_t lightshow_singleton); to the end of shared-bindings/_lightshow/LIGHTSHOW.c, but that didn't seem to have any effect - should I be somewhere else?

slender iron
#

try cleaning and rebuilding

#

the root pointer stuff may not rerun correctly

modest hazel
#

😦 Same error unfortunately - I ran make clean at the top directory, then make -C mpy-cross and make clean BOARD=... in the port directory.

manic glacierBOT
modest hazel
#

At least I think that's what the issue is currently.

tulip sleet
#

sorry, I was responding to someone else!

modest hazel
#

oh, sorry!

tulip sleet
#

i don't remember where the list of files is specified, but the _lightshow directory needs to be listed somewhere to get that to work.

#

I don't think it's a special list, but if you haven't added it to the right .mk file yet, then it won't be preprocessed to find the registration

modest hazel
#

Okay - that's helpful - maybe the file needs to be listed explicitly in /py/circuitpy_defns.mk?

#

I think I added init.c there, but not LIGHTSHOW.c

tulip sleet
#

make it be set up like all the other shared-bindings stuff

#

right, it needs to be compiled. Look at some other things that use MP_REGISTER_ROOT_POINTER, like, say, keypad

modest hazel
#

Okay, I really appreciate the lead. I'll start trying to plug it in.

tulip sleet
#

in general don't use ALLCAPS for a filename, btw

tulip sleet
devout jolt
slender iron
#

@tulip sleet replied. not sure why it'd impact i2c

tulip sleet
slender iron
#

it should detect it automatically

manic glacierBOT
manic glacierBOT
onyx hinge
#

@tulip sleet I recently soldered a psram to my feather 2350 and it worked. Fwiw

#

Gpio8 (psram cs) is not shared with anything so it should be fine

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 9.2.0-beta.0-16-gec5cca6983 on 2024-09-27; TinyS3 with ESP32S3

Code/REPL

# SPDX-FileCopyrightText: 2020 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT

"""
This example acts as a keyboard to peer devices.
"""

# import board
import sys
import time

from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS

import adafruit_ble
from adafru...
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.

From a post above in this now rather long thread.

@eightycc: is it possible that you publish the current state of your work somewhere so others might step in and continue on this project?

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#
  • Fixes #9535
  • Fixes #9561

Update to use new ESP-IDF I2C driver. @tannewt did most of this work in https://github.com/tannewt/circuitpython/commit/8a4ad54fe71b78011050f962f8a5eb7f37ffc6b5 (https://github.com/tannewt/circuitpython/tree/idf5.2_i2c). I started with that, fixed a few things, and fixed some issues with the esp32-camera library, which recently had a PR to use the new driver.

I retested the problems reported in #9535 and #9561 amd they seem to be fixed.

manic glacierBOT
manic glacierBOT
#

locally, git thinks this a (probably unintended) rewind of the tinyusb submodule

Submodule lib/tinyusb 5217cee5de..4349e99fb2 (rewind):
  < Merge pull request #2801 from hathach/release-0.17.0
  < Merge pull request #2799 from hathach/add-pico2
  < Merge pull request #2794 from hathach/fix-circleci
  < Merge pull request #2450 from HiFiPhile/vendor_fifo
  < Merge pull request #2788 from dp111/cppcheck
  < Merge pull request #2789 from hathach/enhance-disconect-connect-esp32
#

Yes, in the old version, using the old driver, it was:

      #if CIRCUITPY_I2C_ALLOW_INTERNAL_PULL_UP
        .sda_pullup_en = GPIO_PULLUP_ENABLE,  /*!< Internal GPIO pull mode for I2C sda signal*/
        .scl_pullup_en = GPIO_PULLUP_ENABLE,  /*!< Internal GPIO pull mode for I2C scl signal*/
        #else
        .sda_pullup_en = GPIO_PULLUP_DISABLE,  /*!< Internal GPIO pull mode for I2C sda signal*/
        .scl_pullup_en = GPIO_PULLUP_DISABLE,  /*!< Internal GPIO pull mode for ...
lone sandalBOT
manic glacierBOT
#

This PR includes a fix for the null pointer dereference from issue #9670 and adds short error message strings to help distinguish between different types of usb.core.USBError exceptions.

I understand that adding unique strings to the core is generally problematic, but I don't know how to avoid it in this case. For writing USB device drivers, it's very helpful to be able to identify the specific causes of the different types of exceptions that get grouped together under USBError. If there w...

manic glacierBOT
#

In larger libraries with multiple modules it makes more sense to put all modules into a src-directory and don't scatter them in the top-level directory. Python setuptools explicitly supports this setup as a default (in this case, pyproject.toml does not have to specify the modules explicitly, but this is only a side note and not relevant here).

This PR changes tools/preprocess_frozen_modules.py to support this setup. The change is backward compatible.

manic glacierBOT
manic glacierBOT
#

are you contributing patches elsewhere for this? e.g., I don't think a circuitpython library organized this way will work with circuitpython-build-tools, so it wouldn't be possible to organize a library like this and place it in the community bundle.

(I don't think there's a written rule for this but my gut tells me that to submodule something into frozen modules in the core we would want it to be in a bundle as well)

manic glacierBOT
#

are you contributing patches elsewhere for this?

Not yet, but this is planned. Before I can contribute the library, I need to make sure it can be added as frozen.

e.g., I don't think a circuitpython library organized this way will work with circuitpython-build-tools, so it wouldn't be possible to organize a library like this and place it in the community bundle.

A patch for the community-bundle/circup would certainly be next step if necessary.

(I don't think there's a writt...

manic glacierBOT
#

I added a fix for the failing pre-commit check (translation file needed changes). I'm not convinced that my approach here of adding error strings and updating the translation file is the right way to solve the problem of distinguishing types of USB errors. If there were a way to set USBError.errno, I would prefer to do that. But, I don't know if or how that would be possible.

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 9.1.4 on 2024-09-17; Adafruit Matrix Portal M4 with samd51j19

Code/REPL

from adafruit_matrixportal.matrix import Matrix

# default pinout:
# R1 - G1
# B1 - GND
# R2 - G2
# B2 - B
# A - D
# C - E
# CLK - LAT
# /OE - E
matrix = Matrix(width=64, height=32)

# alternate pinout:
# R1 - G1
# B1 - GND
# R2 - G2
# B2 - E
# A - B
# C - D
# CLK - LAT
# /OE - GND
addr_pins = [board.MTX_ADDRA, board.MTX...
manic glacierBOT
#

I was concerned that if someone set the hostname using wifi.radio.hostname that this default code would replace it when the interface was reset.

I'm haven't figured out if there is a way to reset the network interface in code yet, but I did some quick testing and it seems that wifi.radio.hostname survives a ctrl-d reset without being set back to this new default value. I haven't seen the host name set by wifi.radio.hostname show up on my router yet, but I'm thinking there's some sort of dh...

manic glacierBOT
#

I'm not sure what level of reset or reinit would clear the hostname, or if CircuitPython has such a path invokable by the user.

I do see the wifi.radio.hostname = blahblah to show up in the router right away once there's a new wifi connection...

Please note that when the hostname is altered after interface started/connected the changes would only be reflected once the interface restarts/reconnects

<https://docs.espressif.com/projects/esp-idf/en/v5.3.1/esp32/api-reference/network/...

manic glacierBOT
#

Neither wifi.radio.enabled = False nor wifi.radio.stop_station() clear the custom hostname.

<details>
<summary>In 9.1.4, supervisor.reload() will clear the custom hostname back to CONFIG_LWIP_LOCAL_HOSTNAME...</summary>

Adafruit CircuitPython 9.1.4 on 2024-09-17; Adafruit QT Py ESP32-S3 4MB Flash 2MB PSRAM with ESP32S3
>>> import microcontroller ; microcontroller.on_next_reset(microcontroller.RunMode.NORMAL) ; microcontroller.reset()

[11:25:41.279] Disconnected
[11:...
#

two entries/comments, the first I tried everything but strace:

  1. journalctl -b | grep mount returns:
    Sep 30 08:29:41 nebula udisksd[1751]: mountpoint /media/rps/CIRCUITPY is invalid, cannot recover the canonical path
    Sep 30 08:29:41 nebula udisksd[1751]: Cleaning up mount point /media/rps/CIRCUITPY (device 8:1 is not mounted)

  2. pmount -w -s /dev/sda1 CIRCUITPY
    no errrors but mounted read only

  3. fstab
    I was unsupervised and put my laptop into a state where IT had to fix my...

#

strace pmount -w -s /dev/sda1 CIRCUITPY
execve("/usr/bin/pmount", ["pmount", "-w", "-s", "/dev/sda1", "CIRCUITPY"], 0x7fff91b69410 /* 30 vars /) = 0
access("/etc/suid-debug", F_OK) = -1 ENOENT (No such file or directory)
brk(NULL) = 0x562c720ef000
arch_prctl(0x3001 /
ARCH_??? */, 0x7fffee359e70) = -1 EINVAL (Invalid argument)
fcntl(0, F_GETFD) = 0
fcntl(1, F_GETFD) = 0
fcntl(2, F_GETFD) ...

manic glacierBOT
#

Ok, the pmount problem is evident from the end of the trace: pmount must be able to run as root (at least part-time), so it needs the suid bit set. Normally, the installation should take care of that.

But let's look at the very first error:

  1. journalctl -b | grep mount returns:
    Sep 30 08:29:41 nebula udisksd[1751]: mountpoint /media/rps/CIRCUITPY is invalid, cannot recover the canonical path

Do you know which command triggered this log-entry? AFAIK, mounts below `/media/...

slender iron
#

<@&356864093652516868> Our community meeting will be in 10 minutes in the CircuitPython voice channel. Talk with you soon!

manic glacierBOT
#

my first guess is on power cycle of my laptop root is following some script that sends a command to the udisksd daemon

my second guess is the startup script has a timing issue, trying to mount the raspberru before the raspberry pi board has connected via the usb (this might be the real problem)

my new problem is something I ran on my laptop now connects to the raspberry pi twice (or thinks it does), I have two different CIRCUITPY drives on /media/rps/ CIRCUITPY and /media/rps/ CIRCUITP...

austere acorn
#

not sure how we'd silence cats anyway 😼

lone axle
slender iron
#

I think I got my numbers working again

#

restarted my browser

onyx hinge
#

👋

#

two, two kinds of audio effects

lone axle
#

Thanks for hosting Scott. Have a great week everyone.

onyx hinge
#

thanks Scott. Short & sweet

manic glacierBOT
#

Latest updates:

  • Simplified the processing code, hopefully making it easier for others to follow
  • Tested again 16-bit signed and 8-bit unsigned sources. So far Synth, RawSample and WaveFile. MP3 still is not working.
  • Added in dynamic range compression like in Synth for 16 bit echos.
  • Added a lot of comments to the code

Things are close now. I still want to see if I can tell why MP3s are not working (they should be don't think it is a processing limit).
I do have to clean up the d...

lone axle
#

Does anyone have experience or insight with Github rate limiting? Digging into this adabot tests issue I'm finding that the X-RateLimit-Remaining header is inexplicably not containing a value, which gets defaulted to 0 and leads to logic in adabot looking for the X-RateLimit-Reset header, but that one also has no value. The code is currently written to assume that it will have a value in this scenario so when it's missing a KeyError is raised.

Strangely the request imediately preceeding the one that fails does contain the X-RateLimit-Remaining header and it still has a large value 4952 remaining out of 5000 limit. But for some reason on the following request the headers exist in the response but don't seem to have a value. Link to actions output: https://github.com/adafruit/adabot/actions/runs/11112781607/job/30875604335#step:7:47

The request where they have no value gets a 200 status code and it's content looks like what is expected for the response, just the headers seem to be "messed up" in this way where the keys exist without values.

manic glacierBOT
lone axle
manic glacierBOT
onyx hinge
#

@lone axle I looked at the output of the actions and am scratching my head over it

#

@lone axle it looks like this line is only hit once you're already having an exception .. I can't find any evidence that the quiet= parameter ever existed to logger.error()... I would remove quiet=

#

E TypeError: _log() got an unexpected keyword argument 'quiet'

#

@lone axle tests/unit/test_common_funcs.py patches some get function or method, see mock_github_get inside test_is_new_or_updated.

If it's this get that's being used, the expected headers won't be there. You could try adding them (result.headers['key'] = 'value') and see if it fixes CI

#

scratching my head how this ever worked though

#

but I don't see this mock being used in the other tests so it still doesn't feel like a full explanation

#

(for anybody not familiar with the terminology, in this case a mock is a replacement for a function or method that makes it do something different during testing)

#
-        remaining = int(response.headers.get("X-RateLimit-Remaining", 0))
+        remaining = int(response.headers.get("X-RateLimit-Remaining", 99))
```(in github_requests.py) you could also try defaulting the number of requests remaining to 99 and cross your fingers. then it wouldn't enter the part where it tries to get the time until rate limit reset
upper radish
lone axle
# onyx hinge <@382939733107408897> it looks like *this* line is only hit once you're already ...

I ended up making a test branch to work on and I have removed the quiet argument in that branch https://github.com/adafruit/adabot/tree/testing_fixes. It is a mystery to me why it was there or how it ever worked in the past as well. I also could not find any documentation that made reference to quiet. I will try giving it a larger default. If nothing else I'm curious if subsequent requests start having numerical values for those headers again after the one where they are seemingly blank.

manic glacierBOT
manic glacierBOT
orchid basinBOT
manic glacierBOT
manic glacierBOT
#

This is very weird! I'd expect audio stuff to run in between VM byte codes. I'd appreciate it if you could dig into why it isn't working.

Took a look, seemed between two channels of 44.1Khz audio and constantly checking a rotary encoder I hit the processing limit as close as I can tell. Or the rotary encoder blocked long enough (and I was checking it often enough) to slow the audio down. So at this point seems to be a non-issue.

#

Things are close now. I still want to see if I can tell why MP3s are not working (they should be don't think it is a processing limit).

MP3Decoder as a source works now. Was a bug I just hadn't ran into. Also samples of unusual lengths work now (wasn't update the remaining sample buffer correctly, and most samples use values that just happened to work).

lone axle
#

A little bit more info about the adabot / github rate limit issue discussed above: I actually mis-read a detail the headers print out yesterday. It's not the case that the headers contain keys without values as I stated before. What's actually the case is there is a Access-Control-Expose-Headers header which contains a long string of comma seperated strings which are a list of other Headers that are presumably meant to be present in the response. I was seeing X-RateLimit-Remaining and X-RateLimit-Reset in that list without a colon and a value and mis-interpreting it.

So those X-RateLimit headers seem to be not present in the response, but are listed in the. They don't have keys or values, which does make sense as the exception that bubbles up is a KeyError.

#

Another small difference I just noticed in the headers: For the pen-ultimate request (that succeeds and contains all expected headers) one of the headers present is this: 'X-Accepted-OAuth-Scopes': '', But in the following request which succeeds but seems to be missing those headers the value is different: 'X-Accepted-OAuth-Scopes': 'repo' I'm not sure if it's really related or not though. Perhaps it's just due to the different resources being requested.

#

I am thinking one option to resolve it is to keep local variables storing the value of the relevant headers. Then if we find they are missing from the response just refer back to the ones we stored from the previous request and "manually" decrement the remaining value to account for the requests we send that don't contain the response header. Based on the discussion and which request it's failing for us on, it seems like requests to /releases endpoints are the ones with this issue currently.

tulip sleet
#

base don the discussions link, it sounds like a change

lone axle
tulip sleet
lone axle
#

Okay, I was able to distill it down to this reproducer:

import os
import requests

no_token_resp = requests.get("https://api.github.com/repos/adafruit/Adafruit_NeoPixel/releases/latest")
print(no_token_resp.headers['X-RateLimit-Remaining'])


auth_headers = {'Authorization': 'token ' + os.getenv('GITHUB_TOKEN')}
with_token_resp = requests.get("https://api.github.com/repos/adafruit/Adafruit_NeoPixel/releases/latest", headers=auth_headers)
print(with_token_resp.headers['X-RateLimit-Remaining'])
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/1-hJPXRQZXHs7SzZVYPoi8s2IM_5xo_gtMdRPCf_IZC0/edit?usp=sharing

slender iron
#

@lone axle are you working on fixing adabot's bundle update?

sinful spruce
#

How do you specify what state machine for the PIO's on the 2040?

lone axle
# slender iron <@382939733107408897> are you working on fixing adabot's bundle update?

yes, I think https://github.com/adafruit/adabot/pull/378 will fix the issue we saw last week with the community bundle. However there seems to be something strange going on with some responses from the Github API now that are causing the tests to fail. It's unclear at the moment if it's a bug or intentional change from Github (albeit undocumented if so).

I have in mind a way to change the logic in Adabot to hopefully be able to work around the issue of the missing headers in the responses. I've have not attempted it yet, but do intend to.

#

Oh, actually I hadn't noticed the build job failed today too

slender iron
#

it's failed the last few days apparently

lone axle
#

KeyError: 'x-ratelimit-reset' this is the same root cause of the test failing though

#

So hopefully if/when the logic in there is changed it will resolve it for anywhere that this specific issue may pop-up.

slender iron
slender iron
lone axle
slender iron
#

kk, will do shortly

manic glacierBOT
tiny peak
#

@lone axle in case it might be relevant to your rate limit thing... I noticed that when I created a PR against adafruit/circuitpython a couple days ago, and when I pushed an additional commit to that branch, GitHub kicked off 500+ workflow actions that ran for about 45 minutes each time. Perhaps that has nothing to do with the problem you are discussing.

#

... but, it does seem like the kind of thing that might put stress on rate limit quotas.

slender iron
#

I think the error might be that it no longer includes that header

lone axle
lone axle
# slender iron I think the error might be that it no longer includes that header

I believe it's specific to /releases endpoints. Those are not returning any of the X-RateLimit headers. My idea to resolve was keep local variables with the values when we do receive them and then if they're missing just keep track with local variables. Then update them as needed for requests that we do recieve values on.

#

If there are tasks that need to request only /releases endpoints that won't work though because we won't ever receive the values. The tests which I have looked most closely into so far have a mix of lots of non /releases and a few that are /releases so I think that approach can work for them.

Thinking about the build process though I'm now questioning whether that really does ask for anything other than /releases endpoints.

tiny peak
#

FWIW, poking around in circuitpython/.github/{actions,workflows}, I see several instances of uses: actions/upload-artifact@v4, which might be hitting the github API? Perhaps multiple times per port * board build?

#

I might be totally wrong about that though. This just caught my eye because one of the checks for a commit I pushed yesterday failed in a way that looked kinda mysterious. Like, maybe it had to do with some kind of rate limit or availability thing. IIRC, the check log said something about an error when attempting to upload a build to S3, so maybe it's unrelated.

slender iron
#

the S3 thing happens every so often. usually a retry fixes it

lone axle
#

Ahh, I just realized, when I tested with the reproducer code posted above I used my own private API token and saw the same behavior with the missing headers. Mine is definitely not used by anything with the core repo actions so I think the RateLimit header thing isn't tied to the core workflows.

willow totem
#

hey @lone axle , you got the adabot problem, with API rate limit headers missing. I've caught up on above (skimmed though), and I know the circuitpython library checking code works a bit differently...
Did anyone submit a support issue yet, I'm about to otherwise?
I'm just running it today for ardu libs, have patched github_requests.py to ignore if no rate info and continue on.
I play in this branch: https://github.com/tyeth/adabot/tree/arduino-ci-ver-bump
or this commit:
https://github.com/adafruit/adabot/commit/64e1b06d6090147c61c6d52ad29ea000d61be227
Also left a trail here: https://github.com/orgs/community/discussions/24760#discussioncomment-10812653

slender iron
#

maybe they removed the limit on that endpoint

lone axle
slender iron
#

(I can't see it)

willow totem
#

sorry sound on mute, I got distracted 🙂

lone axle
#

You might be right about opting that endpoint out of the limit. It doesn't appear to be counting a usage for that endpoint any more with a quick test locally. I'm getting response data and upon checking remaining count with another request elsewhere it isn't subtracting one for the /releases request.

willow totem
#

interesting

manic glacierBOT
#

I didn't really think this was ready, it does work but the following code segment isn't optimized for Micropython/Circuitpython in terms of variable/memory use:

    char cpy_default_hostname[80];
    uint8_t mac[6];
    esp_wifi_get_mac(ESP_IF_WIFI_STA, mac);
    sprintf(cpy_default_hostname, "cpy_%s_%x", CIRCUITPY_BOARD_ID, (unsigned int)mac);
    const char *default_lwip_local_hostname = cpy_default_hostname;
    ESP_ERROR_CHECK(esp_netif_set_hostname(self->netif, default_lwi...
slender iron
#

bundle is broken

tulip sleet
#

i am behind on email

slender iron
#

kk, will poke it

#

workflow_dispatch allows us to run it manually

#

bundle worked!

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 9.1.4 on 2024-09-17; Raspberry Pi Pico with rp2040

Code/REPL

a = b'A' * 32
print(a.count(b'A'))
print(a.count(65)) #A is ascii character 65

Behavior

The count function works with the byte string but not the integer. See:

32
Traceback (most recent call last):
  File "code.py", line 3, in 
TypeError: can't convert 'int' object to str implicitly```

### Description

In contrast, with cPython 3....
#
  • Fixes #9669

Characteristic was using self->current_value == NULL to indicate that the Characteristic was deinit-ed. However,
the current_value storage in a Characteristic can be the NULL pointer if the Characteristic is initialized with an initial value of None.

Change to using self->handle = BLEIO_HANDLE_INVALID as the deinit flag (similar to what nordic does), and handle an empty initial value more carefully. For instance, don't try to allocate a zero-length chun...

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

more information, I did an strace udisksctl mount and although there's too much information to copy and paste
but the relevant information is that /dev/sda1 is mounted RD_ONLY, i.e. mounted readonly by default,
and googling seems to find others with similar issues but no solution.
$ strace udisksctl mount -b /dev/sda1 -t vfat

I am going to investigate the udisk command

manic glacierBOT
manic glacierBOT
#

logging in causes something to change

I have to be (by not logging in first) missing a parameter to udisksd or to systemd

Here's logging in first, then running journalctl
$ journalctl -b | grep CIRCUITPY
Oct 02 09:27:09 nebula udisksd[1734]: mountpoint /media/rps/CIRCUITPY is invalid, cannot recover the canonical path
Oct 02 09:27:09 nebula udisksd[1734]: Cleaning up mount point /media/rps/CIRCUITPY (device 8:1 is not mounted)
Oct 02 09:28:08 nebula systemd[1]: Finished Clean the ...

turbid radish
manic glacierBOT
onyx hinge
#

sigh, adafruit playground seems to have eaten a bunch of my work this morning 😕

#

I wonder if it's related to having had multiple tabs open on the editor; I thought this was correctly managed but maybe that's only on learn.

slender iron
onyx hinge
#

no, I haven't. I decided that it was a good moment to take a break.

slender iron
#

@heady bolt I can help you here since you are compiling circuitpython yourself

#

you can do a DEBUG=1 build of circuitpython and esp builds will log to UART all of IDF logging

heady bolt
#

you mean make BOARD=x DEBUG=1?

slender iron
#

correct

heady bolt
#

i wish i could figure out how to get into bootloader mode on the esp32 s3 consistently. i have a boot and reset button . ive tried pressing boot, pressing boot and reset at the same time, double clicking reset, unplugging holding boot and plugging in. none seem to work

slender iron
#

hold boot while pressing reset

#

what board is it?

heady bolt
#

ive gotten it in boot loader mode plenty of times, it just doesnt work consistently it seems. its a custom PCB

slender iron
#

holding boot while pressing reset should get you into the rom bootloader

heady bolt
#

just tried that, still nothing

slender iron
#

probably worth checking the board design then

heady bolt
#

holding boot while pressing reset does get me access to the drive

#

but not into where i can copy a new uf2 file

#

usually it creates a volume called BOOTESP32 or something to that effect

slender iron
merry hamlet
#

Hi, moving this question over from #help-with-circuitpython :
I’m attempting to build circuitpython from source because I have some minor modifications I want to test out. However, it takes around half an hour to even get to the point where the compiler complains about my silly syntax errors on my fairly old laptop. Is there a simple way to tell the build system to reduce the amount of code it attempts to compile? I’m already building only for the specific board I want to use for testing, and I’m building from the raspberrypi port directory.
I’ve been able to compile an unmodified version of the repo by the way. But that took just as long, or probably longer.

slender iron
#

what CPU is in your laptop?

tulip sleet
#

does your laptop have a spinning hard drive or a solid state drive?

merry hamlet
# slender iron It should be fast after the first run. What command are you running to build it?

I've set up a task in vscode to build via wsl, like so:

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Build",
            "type": "shell",
            "command": "c:\\Windows\\System32\\wsl.exe --cd \\\"/mnt/c/path/to/circuitpython/ports/raspberrypi/\\\" make -j12 BOARD=seeeduino_xiao_rp2040 V=1",
            // "command": "make -j12",
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "reveal": "silent"
            },
            "problemMatcher": "$gcc",
            "options": {
                "env": {
                    "TARGET": "${workspaceFolderBasename}"
                }
            }
        }
    ]
}

I'm on a gen 8 i5, so I don't expect it to be fast, but this was a bit slower than I was hoping for.

merry hamlet
tulip sleet
#

WSL has slow disk access particularly older WSL

#

a gen 8 i5 should be fine. I do builds all the time on a gen 8 i7, and they take much less time than that (like 1/30)

merry hamlet
#

I reinstalled and set up a completely new WSL2 image specifically for this, so the version shouldn't be a problem. But the disk access speed could of course still be an issue.

tulip sleet
#

how much RAM is allocated for WSL?

merry hamlet
tulip sleet
#

I can't remember if you can specify how many cores and how much RAM

#

cat /proc/meminfo

merry hamlet
tulip sleet
#

also cat /proc/cpuinfo

merry hamlet
#
 cat /proc/meminfo
MemTotal:        3948580 kB
MemFree:         2794812 kB
MemAvailable:    3213336 kB
Buffers:           44036 kB
Cached:           528624 kB
SwapCached:            0 kB
Active:           496388 kB
Inactive:         260628 kB
Active(anon):       2328 kB
Inactive(anon):   185152 kB
Active(file):     494060 kB
Inactive(file):    75476 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       1048576 kB
SwapFree:        1048576 kB
Dirty:              7380 kB
Writeback:             0 kB
AnonPages:        182540 kB
Mapped:           137996 kB
Shmem:              3124 kB
KReclaimable:     102084 kB
Slab:             156684 kB
SReclaimable:     102084 kB
SUnreclaim:        54600 kB
KernelStack:        4004 kB
PageTables:         5012 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     3022864 kB
Committed_AS:     759812 kB
VmallocTotal:   34359738367 kB
VmallocUsed:       25712 kB
VmallocChunk:          0 kB
Percpu:             3744 kB
AnonHugePages:     71680 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
FileHugePages:         0 kB
FilePmdMapped:         0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:               0 kB
DirectMap4k:      117760 kB
DirectMap2M:     4009984 kB
DirectMap1G:     8388608 kB
tulip sleet
#

on my 8th gen i7, to compile raspberry_pi_pico:

real    0m28.957s
user    1m51.553s
sys    0m39.243s
#

so meminfo says 4GB

#

lscpu | awk -F ":" '/Core/ { c=$2; }; /Socket/ { print c*$2 }' will tell you how many cores

#

I haven't tried WSL for a while, but it was more like 3-4x slower, not 30x slower

#

and it was due to slower disk access

merry hamlet
sinful spruce
#

Any idea as to why this program only works for pin 5. The other pins 6 and 9 do not generate a square wave. I want to use mltiple state machines.

import time
import rp2pio
import board
import adafruit_pioasm

squarewave = """
.program squarewave
set pins 1 ; Drive pin high and then delay for one cycle
set pins 0 ; Drive pin low

"""

assembled = adafruit_pioasm.assemble(squarewave)

sm1 = rp2pio.StateMachine(
assembled,
frequency=1000 * 1 * 4000,
first_set_pin=board.D5,
)
sm2 = rp2pio.StateMachine(
assembled,
frequency=1000 * 1 * 24000,
first_set_pin=board.D6,
)
sm3 = rp2pio.StateMachine(
assembled,
frequency=1000 * 1 * 1000,
first_set_pin=board.D9,
)
print(dir(sm1))
print("real frequency", sm1.frequency)
print(assembled)
time.sleep(100000)

slender iron
sinful spruce
slender iron
sinful spruce
heady bolt
#

@slender iron im still getting sporadic resets on the board and i have deployed the debug version of the custom cirtcuitpython build. I will run the code a few times and then eventually it stops responding and i get this "Unable to connect to COM18: could not open port 'COM18': PermissionError(13, 'Access is denied.', None, 5)"

#

the only way to get it back is to reset the board, but this hasnt really happened before. just strange

slender iron
#

@heady bolt you'll want to monitor the debug uart output to see what is happening

heady bolt
#

where/how would i do that?

tulip sleet
#

do you have a USB/serial adapter?

manic glacierBOT
heady bolt
#

im connected to the pcb by usb

manic glacierBOT
#

I finally got around to testing out your audio_effects fork and playing around with audiodelays.Echo. I was hoping to recreate some form of chorus effect with this module, but I don't think that's possible with the current implementation. The decay parameter directly affects the level of the first repeat of the delay. Generally, I would assume that decay/feedback would only apply to additional repeats of the audio signal and the level of the initial copy would be controlled independently us...

manic glacierBOT
#

I've created a pull request on your fork for your consideration, @gamblor21. gamblor21#1

I will take a look but probably not until tomorrow. What you were saying makes sense.

One thing I do plan to do is create more effects then just this echo. This really is a proof-of-concept still. I was looking a chorus briefly last night, and want to consider others (reverb) as well.

If you are playing with it another thing you can try is ch...

#

Though the delay_ms parameter has been set up as a BlockInput object, it is not recalculating echo_buffer_len and subsequent read/write positions within audiodelays_echo_get_buffer. As a result, using a BlockInput parameter for delay_ms has no discernible affect beyond the initial value.

lfo1 = synthio.LFO(scale=250, offset=500, rate=0.5)
synth.blocks.append(lfo1)

echo1 = audiodelays.Echo(delay_ms=lfo1, decay=0.5, mix=1.0, buffer_size=4096, channel_count=CHANNELS, samp...
manic glacierBOT
#

Though the delay_ms parameter has been set up as a BlockInput object, it is not recalculating echo_buffer_len and subsequent read/write positions within audiodelays_echo_get_buffer. As a result, using a BlockInput parameter for delay_ms has no discernible affect beyond the initial value.

Oh good catch! Thanks, I'll have a fix for that soon I know what is wrong.

onyx hinge
#

@slender iron ah I think this feather (esp32s3 with 4MB flash + 2 MB PSRAM) doesn't have bleio enabled so I wouldn't be hitting the BLE / deep sleep bug with my project.

onyx hinge
#

Are there humans who understand the template language of circuitpython.org? I noticed the list of built in modules is showing wrong, with extra spaces and a trailing comma

this fixes it but .. what ???

diff --git a/_includes/download/board.html b/_includes/download/board.html
index a497f0d18..7a5ed7b74 100644
--- a/_includes/download/board.html
+++ b/_includes/download/board.html
@@ -146,7 +146,7 @@
     {% if version.modules %}
     <p>
         Built-in modules available:
-        <span class="download-modules {% if version.stable %}stable{% else %}unstable{% endif %}">{{ version.modules | join: ', ' }}</span>
+        <span class="download-modules {% if version.stable %}stable{% else %}unstable{% endif %}">{{ version.modules | join: " " | split: " " | join: ', ' }}</span>
     </p>
     {% endif %}
     {% if version.frozen_libraries and version.frozen_libraries.size != 0 %}
#

scratch that .. the diff does nothing. my local version builds right without change while the current version is different

#

it's also back from 9.0.4 days and the ruby bundler hasn't been updated, so maybe it's version churn or something

#

yes it was a bug introduced somewhere along the line...

slender iron
#

is it jinja?

onyx hinge
#

it's liquid

#

i found the bug but I haven't figured out how to fix it yet. there are two problems, one is that the "don't add comma after last item" logic is wrong; the other is that the template language is inserting a whitespace that shouldn't be there.

manic glacierBOT
manic glacierBOT
manic glacierBOT
heady bolt
#

@tulip sleet can you point me to how i can monitor the uart output to capture why this board keeps disconnecting?

slender iron
#

haha, I asked you yesterday 🙂

#

it is custom

#

do a debug build and then monitor the TXD pin

#

for uart0

blissful pollen
#

@slender iron I think it makes sense to take effects out of draft now. I'm not sure how many extra effects I can get done now but those can be other PRs easily enough and gives a guideline to others. Does that make sense?

manic glacierBOT
#

I think it's safe to say that eightycc isn't available and that pinging them isn't helpful. If they were online, then they would have replied here by now. This happens from time to time as volunteers get busy.

I'm happy to guide anyone who wants to take on this work (though I'll soon be out as well for paternity leave.) Otherwise, there are plenty of other nRF52840 and ESP* boards that can already be used for BLE from CircuitPython.

slender iron
#

I'll do a review too

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 9.1.4 on 2024-09-17; Adafruit Metro RP2040 with rp2040
Board ID:adafruit_metro_rp2040
UID:DF6260785F3B3E2B

Code/REPL

# SPDX-FileCopyrightText: 2022 Jeff Epler, written for Adafruit Industries
#
# SPDX-License-Identifier: MIT

import array
import board
import supervisor
from rp2pio import StateMachine
from adafruit_pioasm import Program

# Pixel stream is very similar to NeoPixel WS2812B, but inverted....
manic glacierBOT
#
  • Fixes #9626.

ble_serial_connected() was checking _tx_packet_buffer.conn_handle as an indicator of whether BLE was connected. But that value was not initialized when BLE hadn't started up at all, and so ble_serial_connected() was returning true incorrectly in that case. The check should have also included a check for deinited. I added that and refactored it into a common-hal routine.

manic glacierBOT
#

While debugging, I found that on RP2040 the first looped background write on a StateMachine would be garbled: It the first few outputs would be as expected, but then the data would go back to the start of the buffer.

I realized that this could be due to there already being a pending interrupt on this DMA channel that had occurred previously but never been acknowledged. In fact, by printing the value of dma_hw->intr before this, I could see that it was the case.

After this change, both...

manic glacierBOT
#

CircuitPython version

CircuitPython 9.2.0-beta.0 on 2024-09-17; Raspberry Pi Pico 2 with rp2350a
CircuitPython 9.2.0-beta.0-15-gca25c602a8 on 2024-09-27; Raspberry Pi Pico 2 with rp2350a
CircuitPython 9.2.0-beta.0-16-gec5cca6983 on 2024-09-27; Raspberry Pi Pico 2 with rp2350a

Code/REPL

import rotaryio
import board

encoder = rotaryio.IncrementalEncoder(board.GP15, board.GP14)
last_position = None
while True:
    position = encoder.position
    if l...
lone sandalBOT
manic glacierBOT
#

This was already reported & fixed upstream, but the fix will not be in a released SDK until 2.0.1. It's easy enough to use our own workaround.

Testing: without this bug fix, rotaryencoder did not work on a pico 2

Note: the cut&paste code was reindented by uncrustify, giving it a slightly different style than the upstream sdk code.

Closes: #9681

I thought I had PRd this two weeks ago, but apparently I didn't. The problem was independently rediscovered by @d3fq, thanks for the report.

manic glacierBOT
#

For instance, if you wanted to create a strong "slapback" style delay, this is what I would expect to work in that scenario (I'm excluding buffer_size, channel_count, and sample_rate as they aren't relevant):

The expected outcome would be a full volume repeat of the audio after 500ms and then no additional feedback/decay of that audio. Instead, there is no effect on the audio output because the decay parameter silences out all delayed audio including the first repeat.

Firs...

manic glacierBOT
#

https://forums.adafruit.com/viewtopic.php?t=213955 by blakebr notes that os.uname().sysname and .nodename say rp2040 even for rp2350boards. Fix this by usingMICROPY_HW_MCU_NAMEinstead. Note that it would berp2350aandrp2350b`.

Note that on some ports, the name is more generic, such as samd21 and samd51 for atmel-samd. But espressif and broadcom use MICROPY_HW_MCU_NAME. In the long run, maybe that is better, since it's more informative, instead of using a generi...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

I will admit that the example I provided was an extreme use-case and not a good representation of the problem at hand. I still think this is an issue that should be addressed regardless of our interpretation of "echo" vs "delay". I will do my best to demonstrate the issue here.

echo = audiodelays.Echo(delay_ms=250, decay=x, mix=y)

| Desired Outcome | T=0ms | T=250ms | T=500ms | Current decay (x) | Current mix (y) | Proposed decay (x) | Proposed mix (y) |
| --- | --- | --- | -...

lone axle
#

The X-RateLimit headers have re-appeared in the responses from /releases endpoints from Github API.

#

and they are subtracting API requests from limit now. I guess it was unintentional that they were opted out of that for a few days.

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
tulip sleet
#

@onyx hinge @slender iron for the remaining 9.2.0 bugs, could I assign some to you two? e.g picodvi and usb host bugs to Scott, MP3 bug to jeff, etc. I can take the BLE and Matrixportal bug.

slender iron
#

yes but I might punt them

tulip sleet
#

I would understand that, if they are not blockers

manic glacierBOT
#

@danielmader There are actually two problems going on here:

  1. You are specifying a matrix of height 32, but you're specifying 5 address lines. That is one too many. See the documentation here about how many address lines are used: https://docs.circuitpython.org/en/latest/shared-bindings/rgbmatrix/index.html#rgbmatrix.RGBMatrix
  2. A ValueError is thrown to tell you about that problem. However, when the VM restarts, there is a hard memory error, and, it goes into safe mode. The memory error ...
manic glacierBOT
#

A decay of 1.0 will cause an infinite repeat of the audio signal. It shouldn't have any effect on buffer size. I think it's better to allow for this value rather than prevent it. There are some situation where infinite repeat is desired (imagine a momentary "infinite" button). Some analog delay effects actually allow for a feedback/decay value greater than 1.0 to cause self-oscillation. That's something we want to avoid here, but just a bit of context.

lone sandalBOT
manic glacierBOT
manic glacierBOT
#

@todbot A question came up about the mix parameter and how it should work. If we speed things up at value 0 and pass the sample straight through, with an effect like echo the sample will not be placed into the echo buffer so if mix is then increased the echo is lost. Is this what you intended?

Versus if mix is 0 you pass the sample straight through but still inject into into the echo buffer, but never hear that play, unless mix is increased?

Any thoughts? I also realize this functiona...

blissful pollen
#

Can anyone point me to what may be wrong for this error when I am building the docs.

audiodelays/__init__.pyi:17: error: Name "BlockInput" is not defined [name-defined]

For an area like:

//|         self,
//|         max_delay_ms: int = 500,
//|         delay_ms: BlockInput = 250.0,
...```

The stubs build locally for me, I know other modules (synthio) use BlockInput as a type. I cannot see what I need to include so it builds.
stuck elbow
blissful pollen
#

This is in the core though, that's what I cannot figure out.

#

Ah think I have it. wifi uses ipaddress and just has ipaddress.IPv4Address prefacing it with the module it is defined in.

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

@dhalbert Thank you for giving this issue attention!

I understand issue 1. However, I am still clueless how I can specify the different pinouts from the male plug of the MatrixPortal M4 board to the female socket of the WaveShare RGB matrix. I thought, the only way to do so is to pass the full list of address lines in the order of the pins.

Pinout MatrixPortal M4 vs  WaveShare RGB

manic glacierBOT
#

CircuitPython version

documentation

Code/REPL

none

Behavior

The description of the displayio.Display class is missing from the 9.1.x branch ReadtheDocs pages, but is present in earlier versions: e.g. https://docs.circuitpython.org/en/8.2.x/shared-bindings/displayio/index.html
Perhaps it was lost during the reorganization of displayio for version 9.

Description

No response

Additional information

No response

manic glacierBOT
lone sandalBOT
manic glacierBOT
#

I thought, the only way to do so is to pass the full list of address lines in the order of the pins.

You should only list as many address pins as are needed -- in this case, four pins. The alt address pins are just substituted for the ones that would be chosen by the library. With an Adafruit matrix the pins used would be [board.MTX_ADDRA, board.MTX_ADDRB, board.MTX_ADDRC, board.MTX_ADDRD]. That is the default chosen by adafruit_matrixportal based on the given parameters.

The scree...

manic glacierBOT
#

Adafruit CircuitPython 9.1.4 on 2024-09-17; Adafruit QT Py ESP32-S3 4MB Flash 2MB PSRAM with ESP32S3

I tried the "lowering tx_power" trick and could not connect at all.

If I hard-reset, I will usually get a connection on the first try. Interestingly, the "Unknown failure -2" alternates sometimes with "No network with that ssid".

I'm wondering if (in my case) since the connection isn't used for a long period of time, the socket appears to go "stale" (the connection is dropped a...

manic glacierBOT
#

Thanks again, and yes, you were fully right about me posting a wrong pinout. I've taken it for this post only from an older version of the wiki without checking, please excuse.

Unfortunately, your suggestion still yields a broken display, at least when I use the higher-level class adafruit_matrixportal.matrix.Matrix instead of your suggested
rgbmatrix.RGBMatrix:

from adafruit_matrixportal.matrix import Matrix
[...]
addr_pins = [
    board.MTX_ADDRA, 
    board.MTX_ADDRD, 
...
manic glacierBOT
#

Thanks Dan -and on a weekend too...
I think cross-references are essential -there is a tremendous amount of documentation that references the depreciated way of doing things. Knowing now to look for the busdisplay docs helps to put the pieces together. Much of this complexity is hidden on boards with integral displays, but when adding displays to other boards, it's essential.
Old syntax:

display_bus = displayio.FourWire(spi, command=tft_dc, chip_select=tft_cs, reset=tft_rst)
displa...
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 9.1.4 on 2024-09-17; Adafruit Feather ESP32S3 4MB Flash 2MB PSRAM with ESP32S3

Code/REPL

# full context: https://github.com/skjdghsdjgsdj/babypod-software/blob/main/power_control.py#L65
alarm.exit_and_deep_sleep_until_alarms(pin_alarm, time_alarm, preserve_dios = [i2c_power])

Behavior

The board resets into safe mode and requires a reset. The console output shows:

Enabled interrupt for center b...
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

I believe this is related to: https://github.com/adafruit/circuitpython/issues/7447

I have a global exception handler in my code.py. This commit makes deep sleep perform as expected when connected to USB: https://github.com/skjdghsdjgsdj/babypod-software/commit/061031acb539283232860684e88eaaf88ca12ee4

Output is now:

Enabled interrupt for center button
Cleared encoder read queue
Waiting a few seconds for deep sleep
Creating time alarm
Preserved I2C_POWER
Created pin alarm
...
manic glacierBOT
manic glacierBOT
#

Confirmed it's specifically something to do with printing a DeepSleep exception.

some random old FW on a board I grabbed:

Adafruit CircuitPython 9.1.0-beta.3-50-g9b85fe5766-dirty on 2024-07-09; Adafruit MagTag with ESP32S2
>>> import alarm
>>> try:
...     alarm.exit_and_deep_sleep_until_alarms()
... except BaseException as e:
...     ee = e
...     
...     
... 
>>> id(ee)
1065359200
>>> type(ee)
<class 'DeepSleepRequest'>
>>> print(ee)

[08:31:34.335] Disconnect...
manic glacierBOT
#

Before, this would crash trying to print a NULL object. mp_raise_type is the correct way to raise an exception without an associated object or message.

>>> import alarm
>>> try:
...     alarm.exit_and_deep_sleep_until_alarms()
... except BaseException as e:
...     ee = e
... 
>>> ee
DeepSleepRequest()

I also looked at including the deep sleep arguments in the args, but it was confusing because it would seem to print the TimeAlarm rather than the DeepSleepRequest:

...
onyx hinge
#

@tulip sleet I don't know why the doc build is failing in that PR. Whether it is more readthedocs churn? There are multiple things in the log that say "warning". But I think this one is new:

#

WARNING: Calling get_html_theme_path is deprecated. If you are calling it to define html_theme_path, you are safe to remove that code.

lone axle
onyx hinge
tulip sleet
#

I think they sent us a warning but it was not clear it was applicable

lone axle
#

I will look into it and see if I can find the fix unless one of you is already on it?

onyx hinge
#

I'll try removing the call to that function within that PR

onyx hinge
#

that seems to be something else, not 100% sure though

lone axle
#

Removing that line does appear to work in a library as well. I'll prepare a patch that adabot can run to get it fixed in the libraries.

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.1.0-beta.1-48-g98a1083d6-dirty on 2023-08-22; ESP32-S3-DevKitC-1-N32R8 with ESP32S3

Code/REPL

import time

LOOP=200
acc = 0
for i in range(LOOP):
    t = time.monotonic_ns()
    time.sleep(0.01)
    t2 = time.monotonic_ns()
    diff_us = (t2-t) // 1000
    acc += diff_us
avg = acc / LOOP
print(f'expected 10000 us, got {avg} us')

Behavior

The result shows:
expected 10000 us, got 9799.07 us...

manic glacierBOT
tulip sleet
manic glacierBOT
austere acorn
wraith crow
austere acorn
#

Ah, I see ... I guess I should have scrolled up in the channel, lolz

#

So there is nothing I have to do about it? It's getting fixed ?

wraith crow
#

You may be able to simply remove this line "html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."]" from docs/conf.py as I think that's what foamyguy is planning on doing across all the libraries but I'm sure it will be solved pretty soon anyway.

austere acorn
#

Got it, thank you!

lone axle
#

There is a patch PR in to adabot now with the fix for it: https://github.com/adafruit/adabot/pull/381

For the moment it's fine that PRs are failing th actions due to that change in sphinx-rtd-theme. It should get resolved once this patch is run.

manic glacierBOT
manic glacierBOT
manic glacierBOT
onyx hinge
#

and in fact news of its release just came out on the Python discord

lone axle
manic glacierBOT
onyx hinge
#

and thanks to Foamyguy for taking on that same readthedocs problem across the libraries!

slender iron
#

I approved the adabot PR

#

(and merged)

lone axle
#

Thank you! I can run the patch this afternoon.

slender iron
#

👍 I'll be around to get things merged if need be

#

thanks for hosting!

lone axle
#

Thanks for hosting Dan, have a great week everyone.

tulip sleet
#

yw, and thanks everyone for attending!

onyx hinge
#

@slender iron did you ever run into this? in a pico-sdk project I am generating video on core1. Something in there is doing a modulo, which calls into __aeabi_uidivmod through veneer, which I think means it goes into the slow flash .... ? anyway, I am getting video tearing because of that, I think.

#

what's weird is it was working until I made some changes in my CMakefile

slender iron
#

I have CP setup to crash if the flash is accessed. That'll tell you exactly where it is happening

#

this is why I want the compiler to be smarter

#

the veneer would be used if your main code is in ram

onyx hinge
#

well I guess my question is, do you know how to move __aeabi_udivmod into RAM?

#

the code is just doing a % modulo operation but I guess that is a function call

slender iron
#

I don't know if pico-sdk has a flag for it. you can check the map file to see where it is placed

#

it might be in ROM instead of flash

tulip sleet
#

maybe this is an accidental cache-line-boundary change?

slender iron
#

ya, definitely compare map files to see what changed re:placement

manic glacierBOT
#

Right, thanks I see that now. Also, thanks @anecdata. In my experience trying to do tight-timing on CircuitPython this isn't very surprising. CircuitPython has no concept of atomic or critical sections so who knows what happens during those three function calls: USB handling and garbage collection come to mind as tasks that eat up several milliseconds.

Perhaps a similar test that was disconnected from USB, does a gc.disable() before starting, and then logs the final results to a file ...

#

@todbot A question came up about the mix parameter and how it should work. If we speed things up at value 0 and pass the sample straight through, with an effect like echo the sample will not be placed into the echo buffer so if mix is then increased the echo is lost. Is this what you intended?

Versus if mix is 0 you pass the sample straight through but still inject into into the echo buffer, but never hear that play, unless mix is increased?

Any thoughts? I also realize this...

onyx hinge
#

@slender iron ```#include "src/rp2040/hardware_structs/include/hardware/structs/mpu.h"
#include "src/rp2_common/cmsis/stub/CMSIS/Device/RP2040/Include/RP2040.h"

#

OK got it 🙂

lone axle
#

Test run of the patch finished with 343 successful, 9 skipped for that different conf.py file, and 8 failed seemingly they're missing the docs conf file.

I'm going to start the real run in a moment and I'll check into the remaining failures, I think some may be newer minimal repo's without their cookiecutter files yet and no releases / not in bundle.

#

A handful of the ones that successfully commited then had this very generic actions failure.

I'm going to try re-running to see if maybe it was just a transient issue caused by having committed to so many repo's in a relatively short time window.

slender iron
#

maybe I omitted it there

lone axle
light scroll
#

Thanks for the pointer to ../contributing. I As a retired engineer who spent far too much time in unfocused meetings at big companies, your focused & efficient meeting is a breath of fresh air. (even though the baby-project statu should have been first item. 😄 ❤️

#

(I hope to get around to contributing in a couple months)

slender iron
manic glacierBOT
#

I would say it's generally stable. After about 3 hours or so, started getting more of these:

26532.219: INFO - Connecting to WiFi
26535.633: ERROR - Error connecting wifi - Unknown failure 2
26535.641: WARNING - Attempting to re-connect
26537.641: INFO - Connecting to WiFi
26540.055: ERROR - Error connecting wifi - No network with that ssid
26540.055: WARNING - Attempting to re-connect
26540.297: WARNING - Weather waiting on connection
26542.055: INFO - Connecting to WiFi
2...
#

@tannewt which board(s) should I enable this for? Right now I only have it for the Pico2. I could for an 2350 board. I haven't tried it against any others yet.

At least all RP2350. Then folks can enable it for other chips after they test it.

I've tested this board on the original Raspberry Pi Pico (RP2040) with an I2S DAC (PCM5102). It can run through the examples at stereo 44.1k without any issue.

But when I tried adding audiodelays.Echo to a bigger audio project of mine, ...

lone axle
#

This library seems to have some issue with the github release action. https://github.com/adafruit/Adafruit_CircuitPython_CST8XX Both of it's releases failed that action. The error for the recent release is:

Error: Error: unexpected status code: 403
{"message":"Resource not accessible by integration","request_id":"9940:38FE6F:12BA518:145FF8A:6704567A","documentation_url":"https://docs.github.com/rest"}

It seems like maybe there is something different in the permissions or setup of the token that gets used inside of actions perhaps?

lone axle
#

The rest of the first group of 343 have all been released after the patched docs config.

crimson ferry
#

@lone axle the VEML7700 library has some kind of sphinx issue on a PR,... is it the same thing?

lone axle
crimson ferry
#

OK, I'll see if I can figure out how to do that, this was an in-place patch edit on github.com (I thought it would be easy. Narrator: It's never easy.)

crimson ferry
#

That worked.

manic glacierBOT
#

Almost all of my boards (including S3, Pico-W) need more than a single attempt to connect to my AP. wifi.radio.connect() does have a timeout-parameter, but I don't think this is implemented in the way you expect it to work (if implemented at all). So I also use a retry loop for connecting.

Otherwise my S3 board is very stable. Running for days, connecting every 15 minutes to an URL fetching data.

If possible, you should check the logs of your AP to see if the AP actively stops the con...

manic glacierBOT
#

When playing around with custom LUT waveforms on an epaperdisplay, I needed two_byte_sequence_length=True, in order to be able to send more than 128 bytes of start_sequence data. However, I noticed that the delays between commands were read incorrectly in this case.

When two_byte_sequence_length=True, the adress of the delay (if present) is shifted back by 1 byte as compared to when two_byte_sequence_length=False, but prior to this PR the delay was always read from the same adress....

manic glacierBOT
#

I can't comment directly on this line of code because it's not touched by the change .. anyway, the position within the init sequence is advanced by i += 2 + data_size; and then an additional byte in the case of 2-byte lengths. This doesn't seem to take into account the presence of a delay value at all. I'm probably overlooking something, but just in case it jiggles someone's brain I wanted to mention it.

#

I can't comment directly on this line of code because it's not touched by the change .. anyway, the position within the init sequence is advanced by i += 2 + data_size; and then an additional byte in the case of 2-byte lengths. This doesn't seem to take into account the presence of a delay value at all. I'm probably overlooking something, but just in case it jiggles someone's brain I wanted to mention it.

data_size in incremented half-way through the loop to include the delay byte co...

manic glacierBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 9.2.0-beta.0 on 2024-09-17; Raspberry Pi Pico 2 with rp2350a

Code/REPL

import rotaryio
import time
import board

enc = rotaryio.IncrementalEncoder(board.GP16, board.GP17)
last_position = None
while True:
    position = enc.position
    if last_position == None or position != last_position:
        print(position)
    last_position = position

Behavior

Print initial 0 and then no changes to `...

manic glacierBOT
manic glacierBOT
tulip sleet
#

@slender iron I have draft release notes for 9.2.0-beta.1 and can wait for any imminent PR's.

#

@onyx hinge 👆 too - I see some PR's by or of interest to you.

slender iron
#

I won't be able to review PRs until this afternoon. I wouldn't wait

#

we can always do another release

#

I intend on doing the picodvi bugs this afternoon too

tulip sleet
#

but sure, I could do another beta soon anyway

orchid basinBOT
manic glacierBOT
#

I tend to view freezing a module in as the last step, after it's able to be built with circuitpython-build-tools and installed with circup & the adafruit internal bundlefly tool. Once it's showing its usefulness within the circuitpython ecosystem then it might make sense to freeze it in on a board for a specific reason. But, maybe that is incorrect.

There's also not a lot of motivation given within this PR for requiring a different repo organization than the one standardized by the ada...

onyx hinge
#

@tulip sleet did you have other PRs in mind as ones I might be interested in?

tulip sleet
tulip sleet
#

9644 and 9662

onyx hinge
#

9644 I need to look at for sure

#

9662, no idea what to do. I don't think it's a code problem since my setup ran fine for days.

tulip sleet
#

i'm not sure either if you can't reproduce

tulip sleet
#

"needs retest" 🙂

onyx hinge
#

thanks

manic glacierBOT
manic glacierBOT
#

Hi,

I'd like to see support for USB host dual role in CircuitPython, something that was mentioned on the Feather product page is already supported in Arduino. Arduino seems to be using TinyUSB for this, the same as CircuitPython.

My specific use-case is this; I use CircuitPython to drive a keyboard, and I'd like to extend this keyboard with one or two USB host ports. I'd connect a mouse to one port, and a more generic HID device to the 2nd port (like a USB flash drive or a yubikey).

...

slender iron
slender iron
#

👍

manic glacierBOT
#

Could you give more detail about what you tried, what worked, and what didn't work? Maybe with some sample code?

I was just running the tests found here: https://github.com/adafruit/circuitpython/tree/main/tests/circuitpython-manual/usb

With device_info.py I was able to detect the devices no problem. With basic_keyboard.py I was able to read the OTP event from the yubikey. With basic_mouse.py I could read the vectors from the mouse.

On the side of CircuitPython acting as USB host...

#

oh... okay, so by passthrough for HID CDC, do you mean you want to bridge a serial port connection between the RP2040's USB Host port and its upstream connection to the computer? In that case, I have no idea if that's possible, or how to go about it. I've never tried to make a USB serial port connection over a CircuitPython USB host port. You could try #help-with-circuitpython on Adafruit Discord to see if anybody there knows about doing that.

Or do you suggest that I rather do this?: ....

#

oh... okay, so by passthrough for HID CDC, do you mean you want to bridge a serial port connection between the RP2040's USB Host port and its upstream connection to the computer? In that case, I have no idea if that's possible, or how to go about it. I've never tried to make a USB serial port connection over a CircuitPython USB host port. You could try #help-with-circuitpython on Adafruit Discord to see if anybody there knows about doing that.

Not specifically, but it'd be one of the thi...

lone axle
#

I got a reply today on the Github ticket about the X-RateLimit headers, confirming the change we saw to the headers and the resolution a few days later:

Sorry for the delayed response—we're currently handling a high volume of support inquiries, which has impacted our response times.

I wanted to follow up on your concern. There was indeed a change in the behavior of the Releases endpoint around the time you mentioned, and it was resolved on October 3rd.

If you have any more questions or need further assistance, feel free to reach out. Happy coding! 🚀👨‍💻

Cheers,
Rocky

tulip sleet
#

does it work the old way now?

lone axle
#

That is my understanding of what they mean, and yes it's back to behaving the old way.

manic glacierBOT
manic glacierBOT
#

MDNS defaults to the hostname used by DHCP/LWIP since it is now unique. This makes it the same either way.

This also updates esp-protocols (used for mdns) with a patch to ensure that mangled names are the ones that collide. (circuitpython.local collides but was causing cpy- to be mangled.)

Fixes #6869 again.

@retiredwizard this changes the hostname slightly because it hit an assert when over 32 characters. cpy, board and mac are now dash separated too. That way the board's _ don't co...

slender iron
#

@wraith crow just pinged you on github

#

@tulip sleet just sent out a PR for the MDNS fix. picodvi is all looked at too

tulip sleet
#

Yup, looking good. I think I will go ahead and make a beta release.

#

thanks for the quick fixes and diagnoses

slender iron
#

np! I want to get 9.2 stable

wraith crow
#

Scanned the code quickly, looks good to me, I'll give it some light testing tonight just for fun 😁

slender iron
#

main switch was to using dashes between hostname components

#

(for you)

manic glacierBOT
tulip sleet
#

@slender iron ok sure -- i'll merge and make a beta

slender iron
#

👍

#

easier to test then too

manic glacierBOT
tulip sleet
slender iron
#

ya, it'll change the mdns hostnames

#

should we wait for 10? I assume these names are usually discovered instead of hard coded

tulip sleet
#

I think it's ok. The removal of all those LWIP board-specific names is also an incompatible change.

#

maybe a more surprising one.

slender iron
#

ya

#

I think it is good to standardize though

wraith crow
#

Running out of flash on the c3s?

slender iron
#

👀

#

groan

tulip sleet
manic glacierBOT
tulip sleet
slender iron
#

mdns I presume

tulip sleet
#

these have dualbank turned on, does that make sense in the long run? Also ps2io is on, but they dont' have full USB, so maybe not very useful

slender iron
#

no, I think we'll want dualbank off for these with 10 too

#

I'm changing some mdns config to see if it helps size

tulip sleet
#

i have a guitar class in a few minutes, until 6pm PT, so not chomping at the bit for a release.

slender iron
#

kk, I'm about to leave too

slender iron
#

no luck with mdns settings

#

will look more tomorrow

manic glacierBOT
manic glacierBOT
wraith crow
#

I'm sorta glad the C3's didn't fit, I'll be much happier with working hostname/MAC addresses in the beta release

crimson ferry
#

the good news is... I haven't seen any mdns hostname mangling 🙂

#

(well, other than the -2, -3, etc. b/c the hostnames are the same - and, oh my, the hostnames and instance names increment differently, e.g., Adafruit QT Py ESP32S2-2 (cpy-t_qtpy_esp32s2-3ffe2e90-4))

wraith crow
#

I assume the goal of the unique MAC addresses in the host name is to avoid all the mangling issues 🤞 I built Scott's PR with fixed MAC address conversion:
cpy-bpi_picow_s3-7cdfa1f23d14 MAC Address:7c:df:a1:f2:3d:14
cpy-8r8_hacktablet-7cdfa1e15694 MAC Address:7c:df:a1:e1:56:94

crimson ferry
#

last three octets should be sufficient

#

there will be a lot of overlap in the first three (espressif owns 208 OUI ranges, raspberry pi only 7 ...out of 16+ million)

manic glacierBOT
wraith crow
#

I was thinking that also, but figured I'd let Scott decide, if he drops three of the octets he also has the option to add three more characters to the board name so your t_ would turn into ruit_ 😁 The practice of using the last three octets is what allowed my coding mistake to slip through, I converted part of the hex encoded mac address into an unsigned integer and then back to a hex value which just happened to turn out to be 6 didgets (hexets?) long ☹️

manic glacierBOT
manic glacierBOT
#

Mixed results early on today, but after I moved the I2C display cable off of the chip within the enclosure, I've had 12 hours of nonstop service, which is 👍 from me.

This is very interesting. Do you just mean it was close to the ESP32-S3 chip or do you mean you unplugged (or disconnected) the I2C display?

Part of it was laying "over" the board and I managed to coil it all under the display, next to the STEMMA port. It's a bit easier to explain in relation to this picture:

!...

manic glacierBOT
manic glacierBOT
onyx hinge
#

@lone axle soooo it looks like adabot added some files it shouldn't have, due to testing before pushing. 🤯 ``` build_deps/mpy-cross-8.x | Bin 0 -> 1427128 bytes
build_deps/mpy-cross-9.x | Bin 0 -> 354520 bytes

#

and that made the build in the actual bundle repo fail 😠

#

the overnight release does actually have files so that's good I guess, but there's more work to be done.

#

@lone axle I tagged you for review on some PRs to fix this. Thank you for working on the adabot, everybody understands it's hard to get right on the first try!

lone axle
onyx hinge
lone axle
#

Yep, done.

icy saffron
#

hi! I've been trying to get CircuitPython building for the ESP32-S3 (specifically for the Memento board) with ustack enabled so I can check how heavy my resource usage is, but enabling it in py/circuitpy_mpconfig.h causes linking to fail. is it not supported on Espressif platforms? the documentation doesn't include a supported-boards list for either it or uheap

onyx hinge
# icy saffron hi! I've been trying to get CircuitPython building for the ESP32-S3 (specificall...

It looks like uheap is definitely broken due to incompatible changes in the core. However, I can successfully compile for adafruit_magtag_2.9_grayscale with ustack enabled, so you may have done the procedure incorrectly.

CircuitPython almost always enables modules by editing a .mk file, not a .h file. It's necessary to manually make BOARD=... clean after changing mk files.

So I added the line CIRCUITPY_USTACK = 1 at the end of ports/espressif/mpconfigport.mk, then did make BOARD=adafruit_magtag_2.9_grayscale clean and finally make BOARD=adafruit_magtag_2.9_grayscale.

I'll load it on my board in just a second and see if it imports/works.

I'll investigate uheap a little more too and file an issue if it is for sure not working. It is likely due to the "split heap" code that @slender iron switched us over to in the last months...

icy saffron
#

I had to guess how to enable it since I'm not much of a C developer

onyx hinge
#

When it comes to how-to documents they are often on the Adafruit Learn system. There's this (though it doesn't cover the need to make clean so it could be improved)
https://learn.adafruit.com/building-circuitpython/customizing-included-modules

You may want to include a particular module that is not included by default for the board for your board. You can customize which modules to include in your CircuitPython build by adding or changing settings in the mpconfigboard.mk file for your board.

How to build CircuitPython yourself on different platforms

icy saffron
#

alright

onyx hinge
#
>>> import ustack
>>> ustack.stack_size()
15360
>>> ustack.stack_usage()
948
```ustack does work on my board so hopefully you can get it going too
icy saffron
#

let me see if it'll work

#

where would I find a list of the allowed options for port makefiles?

onyx hinge
#

the closest to that is the source file py/circpy_mpconfig.mk which provides defaults and often small comment blocks about what can be enabled/disabled

#
CIRCUITPY_UHEAP ?= 0
CFLAGS += -DCIRCUITPY_UHEAP=$(CIRCUITPY_UHEAP)
```for instance from this plus my experience, I inferred that I could enable the `uheap` module by setting `CIRCUITPY_UHEAP` in the right `.mk` file. but without experience you wouldn't just guess it.
manic glacierBOT
#

CircuitPython version

9.2.0-beta.0-72-g5b771569d8

Code/REPL

diff --git a/ports/raspberrypi/mpconfigport.mk b/ports/raspberrypi/mpconfigport.mk
index 81913bde01..28ef3c5eb7 100644
--- a/ports/raspberrypi/mpconfigport.mk
+++ b/ports/raspberrypi/mpconfigport.mk
@@ -81,3 +81,5 @@ CIRCUITPY_MESSAGE_COMPRESSION_LEVEL ?= 1
 
 # (ssl is selectively enabled but it's always the mbedtls implementation)
 CIRCUITPY_SSL_MBEDTLS = 1
+
+CIRCUITPY_UHEAP = 1

#...

onyx hinge
#

I have to step away for now. If you're a github user you can track the uheap build problems on that issue. You can always ask more questions here or in #help-with-circuitpython and hopefully someone else can step in to answer.

icy saffron
#

mhm, thank you for your help!

onyx hinge
#

👋

icy saffron
#

it works, hooray

#

although the reported values don't actually seem to... change? weird

#

and max_stack_usage() just doesn't exist

tulip sleet
icy saffron
#

of course :p

#

it's a shame that os is missing stuff like makedirs... and os.path

manic glacierBOT
icy saffron
#

calling it os feels like a bit of a misnomer really, since most of what it actually does is filesystem stuff; it's not even under the Standard Libraries section with the rest of the CPython analogues

tulip sleet
icy saffron
#

what's the distinction? the reason I'm interested at all is because I had to increase the max size of pystack, but I don't really get what it does

tulip sleet
manic glacierBOT
#

I tend to view freezing a module in as the last step, after it's able to be built with circuitpython-build-tools and installed with circup & the adafruit internal bundlefly tool. Once it's showing its usefulness within the circuitpython ecosystem then it might make sense to freeze it in on a board for a specific reason. But, maybe that is incorrect.

I think freezing of modules is a way to add (software-) features to a board, necessary for the operation of the given hardware. Mainly to ma...

manic glacierBOT
slender iron
#

takes the cats to the vet

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 9.2.0-beta.0-25-g7f14b9c49a on 2024-10-04; Raspberry Pi Pico 2 with rp2350a

Code/REPL

import time, board, busio, adafruit_ssd1306
from digitalio import DigitalInOut
i2c = busio.I2C(board.GP17, board.GP16)
display = adafruit_ssd1306.SSD1306_I2C(128, 64, i2c)

Behavior

SSD1306 display properly attached
First time works, then if we reload and run it again:

ValueError: I2C peripheral in use

Desc...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 9.2.0-beta.0-3-g3a189e75d9-dirty on 2024-09-23; Raspberry Pi Pico 2 with rp2350a

Code/REPL

# https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/circuitpython-audio-fx/polyphonic/code.py

Behavior

Install the project and hook up a button to GP4. When pressed and held, this says "track 4 hold loop".

Repeatedly press and release the button. Press for about 1 second at a time, trying t...

#

You can also hear this if you use GP4 to trigger "track 4 hold loop", release mid-sample, and then press GP3 to trigger "track 3". However, you don't hear anything when going from GP3 to GP4, i.e., it's either only affecting looping samples OR samples that are stopped mid-playback. This also shows it's likely not a special case error of playing the same sample twice in a row.

manic glacierBOT
tulip sleet
#

@slender iron in the circuitmatter README, if I do python -m circuitmatter test_data/recorded_packets.jsonl, I get

FileNotFoundError: [Errno 2] No such file or directory: '../esp-matter/connectedhomeip/connectedhomeip/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-Key.der'
#

it looks like I need to clone esp-matter next to circuitmatter?

#

I haven't yet done anything with esp-matter

slender iron
#

yup! sorry about that

tulip sleet
#

np, just wanted to make sure you knew

slender iron
#

it is documented under the chip-tool section

#

please update the readme as you find these things

tulip sleet
#

@slender iron did you have any trouble with cffi during the esp-matter install.sh? It's complaining it wants it to build wheels but it's not installed. from pip's point of view it is installed

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 9.2.0-beta.0-35-g6f6b8b03a6 on 2024-10-09; ESP32-S3-DevKitC-1-N8R8-with-HACKTABLET with ESP32S3
Adafruit CircuitPython 9.2.0-beta.0-31-g14d3f2e839 on 2024-10-08; Raspberry Pi Pico 2 with rp2350a (using dvi sock)

Code/REPL

import displayio

databytes = bytearray(64)
for i in range(64):
    databytes[i] = i+1

for i in range(2,64):
    bitmap = displayio.Bitmap(i,i,255)
    mem = memoryview(bitmap)
    me...
manic glacierBOT
#

Modifying the Matrix dump routine so it performs all the copies first and then dumps the matrix, results in the following:

Memoryview copies into bitmap of width 10
1:2:3:4:5:6:7:8:9:10:
13:14:15:16:17:18:19:20:21:22:
25:26:27:28:29:30:31:32:33:34:
37:38:39:40:41:42:43:44:45:46:
49:50:51:52:53:54:55:56:57:58:
61:62:63:64:65:66:67:68:69:70:
73:74:75:76:77:78:79:80:81:82:
85:86:87:88:89:90:91:92:93:94:
97:98:99:100:0:0:0:0:0:0:
0:0:0:0:0:0:0:0:0:0:
manic glacierBOT
#

I don't agree. With this emulation, libraries like adafruit_connectionmanager, adafruit_requests, adafruit_httpserver (actually every library and program that uses wifi) just work. If you look at the adafruit libs and how much additional code they need to support adafruit_esp32spi then you know how unattractive it would be to add another incompatible api/implementation.

Yes, web-workflow does not work, but you can expect users that add an external co-processor to know that there are di...

manic glacierBOT
#

I think tracked down my issue. It looks like Displayio fills each bitmap row to end at an even 4 byte boundary. So when using memoryview to copy data into the bitmap, you need to adjust the destination after each row by any filler space.

There still seems to be an issue using memoryview for bitmaps with a color depth of 4 or less. If I can't figure that out it may warrant a separate issue.

orchid basinBOT
stuck elbow
#

doesn anybody know where common_hal_displayio_bitmap_load_row is implemeted? it's defined in shared-bindings/displayio/Bitmap.h but I can't find the implementation

onyx hinge
#

@stuck elbow looks like there's a declaration in Bitmap.h but no definition & no uses.

icy saffron
#

would there happen to be a way to interrogate a CircuitPython microcontroller about its capabilities that isn't "send Python over the raw REPL?" I'm considering remaking the vscode extension because it's pretty broken right now

#

a machine-readable list of USB vendor/device IDs would also be cool

tulip sleet
icy saffron
#

right

#

I suspect the problem will be finding the serial port corresponding with a USB drive

tulip sleet
#

the serial ports have certain names. If you have multiple devices connected, that is a bit more of a problem, but for one device, it's easy

#

using that library or that tool (they use the same techniques)

icy saffron
#

cool, thanks

icy saffron
tulip sleet
#

looking for something...

tulip sleet
icy saffron
#

I'm not sure if Biden has webserial?

#

uh. Node

tulip sleet
#

that code is all js, running in the browser

icy saffron
#

Node isn't quite the same as Chrome, though :p
let me see if I can find my code

tulip sleet
#

no, it isn't, but does the vscode plugin use webserial?

#

for its terminal window?

icy saffron
tulip sleet
#

this is equivalent to the list shown by webserial in the browser

icy saffron
#

okay, I can get a vendor and product id from that

#

now I just need to find a node USB library that isn't broken

manic glacierBOT
slender iron
#

@tulip sleet I didn't have cffi trouble but esp-matter is a pain.

tulip sleet
#

i will check their issues, etc.

empty salmon
#

If I were to make a "very similar board" to an existing CircuitPython board but use 4MB flash in place of the original board's 2MB flash, will CircuitPython still load and work? or is CircuitPython expecting an exact match for the flash chip?

slender iron
slender iron
empty salmon
#

Ah. Sorry about that.
@tulip sleet - I am working with the SAMD21 and used a 4MB flash rather than the 2MB. I did try to use the same vendor/manufacturer for the flash and stay in the same family of chip. (aka I used a W25Q32JVSS vs the W25Q16JVxQ for the itsy bitsy M0).

#

I wasn't sure if my problem is the flash size or if it's not close enough to the same model

slender iron
#

you can add a second flash to your list

#

and it should detect which is used

empty salmon
#

Yeah. I was trying to cheat and reuse the itsy bitsy M0 since there will only ever be about 100 of this board in the wild.

#

I'll go ahead and build a new board.

manic glacierBOT
manic glacierBOT
#

If you look at the adafruit libs and how much additional code they need to support adafruit_esp32spi then you know how unattractive it would be to add another incompatible api/implementation.

I thought the intent of ConnectionManager was to centralize this so it didn't need to go in many places. The adafruit examples likely predate connection manager.

I think this is too confusing. It isn't a native implementation. Why not do a native implementation so that web workflow works?

manic glacierBOT
#

I don't understand the reasoning. There are currently 326 py-files distributed by circup that do an "import wifi". They will only work if they find a module called wifi. And this is not only because they predate the connection manager, but because the connection manager does not provide any support for the many methods of wifi.radio that deal with starting/stopping AP, stations, setting IPs, DNS and so on.

Currently, I can add an ESP32Cx to whatever board provides a free UART simply by ins...

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 9.2.0-beta.0-33-g52602caae4-dirty on 2024-10-10; Adafruit Camera with ESP32S3

Code/REPL

# See https://gist.github.com/gingershaped/d0336649c3da9f89775b22fcb78ea451

Behavior

Under specific conditions, connecting to the Memento board over Bluetooth Low Energy causes CircuitPython to hard fault and enter safe mode. Usually it happens after doing some variation on these steps:

  1. put this code in `c...
manic glacierBOT
#

Sphinx 8.1.0 just came out today. It breaks the latexpdf build, and also causes new messages like:

checking consistency... /home/halbert/repos/circuitpython/BUILDING.md: document is referenced in multiple toctrees: ['docs/index', 'docs/pdf'], selecting: docs/pdf <- BUILDING
/home/halbert/repos/circuitpython/CODE_OF_CONDUCT.md: document is referenced in multiple toctrees: ['docs/index', 'docs/pdf'], selecting: docs/pdf <- CODE_OF_CONDUCT
/home/halbert/repos/circuitpython/CONTRIBUTING...
manic glacierBOT
tulip sleet
tulip sleet
#

thanks!

slender iron
#

caught me right before I left 🙂

tulip sleet
manic glacierBOT
#
[adafruit/circuitpython] New tag created: 9.2.0-beta.1
onyx hinge
#

thank you! so excited to be at "beta" 💜

orchid basinBOT
manic glacierBOT
atomic summit
#

Howdy folks 🙂
I've had reports from 2 different people in the last week or so stating similar to this...

Is there a known bug with wifi on feathers2 with circuitpython 9.1.x? I've been trying to get some of my older code working on 9.1.4 and realized that as soon as 'import wifi' runs things lock up. Can easily replicate it in the REPL, just import wifi. I tracked it down to the 9.1.0 release. Previous version 9.0.5 works, 9.1.0 locks up. To make things worse after power cycling the flash comes up empty and possibly corrupted.

Have there been any other reports of anything like this since 9.1x shipped?

I'm, flashing 9.1.3 on all of my boards on my test jigs, and I am not experiencing any wifi issues or flash corruption issues, but that's all in a controlled environment.

manic glacierBOT
#

Ah yes, I have experienced this. In #9237 I was convinced it was a problem with floats in CircuitPython because 0.004 seconds / 1000 != 4 milliseconds.

My favorite quote from the discussion:

"Note that this is in the very nature of binary floating point: this is not a bug in Python, and it is not a bug in your code either. You’ll see the same kind of thing in all languages that support your hardware’s floating-point arithmetic" (emphasis mine)

atomic summit
#

I can repo this on a FeatherS2 running 9.1.3... simply go to the repl and import wifi

#

and it hangs... doesn't come back. If I reset it, I don't get flash corruption, but I've only done this twice.

manic glacierBOT
tulip sleet
atomic summit
tulip sleet
manic glacierBOT
manic glacierBOT
#

I think this is still something to follow up on. We might round instead of truncating. And I am still suspicious of 1024 vs 1000. 9.7 vs 10 is not a few least-significant bits of difference.

I had played around with altering the value given time.sleep; the handful of substitute values tried were enough to suggest that expressions are perhaps being evaluated according to The Price is Right rules, which is to say what it returns is as near as possible the specified value without going ov...

empty salmon
#

What (or where) is the process for requesting a USB PID for a new SAMD21 (M0) board?

stuck elbow
#

is it open source?

empty salmon
#

@stuck elbow - all the hardware will be published. I use the MIT license for my stuff.

When I did a search on "SAMD21", I found references to PID requests within CircuitPython but they were from a few years back. Hence, my question.

Thanks.

tulip sleet
#

https://blog.adafruit.com/2024/10/10/circuitpython-9-2-0-beta-1-released/
Highlights of this release

  • New busio.I2C.probe() and bitbangio.I2C.probe() methods to check for a single device address.
  • Use new ESP-IDF I2C driver.
  • ESP32-S3: implement sdioio.
  • Incompatible change: Change default hostname for all Espressif boards to the ESP-IDF default, which is espressif. Previous board-specific names were not applied consistently. Use wifi.radio.hostname to set a custom hostname.
  • Incompatible change: Use default hostname for mDNS. Fix mDNS collision mangling.
stuck elbow
lone axle
#

For the Spirit Board that I am working on I created a helper class AnchoredTileGrid that extends TileGrid and adds the anchor_point and anchored_position behavior from Display_Text and a few other widget libraries.

I think it has the potential to be useful more generally than just for the Spirit Board. I'm curious if there is any interest in having those properties added directly to TileGrid within the core? Or creating a library to hold the AnchoredTileGrid class so that it's easy to re-use outside of this specific project.

manic glacierBOT
#

This discussion has somehow deteriorated, we should instead discuss this PR.
To sum up:

  • the script tools/preprocess_frozen_modules.py is small and has a very limited functionality
  • it uses heuristics to autodect py-files from library-projects for freezing
  • this heuristics uses some seemingly random choices about which directories are valid and which are not, e.g. docs vs. doc or tools vs. utils
  • the PR adds three lines of code that optionally enables library developers t...
manic glacierBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 9.2.0-beta.0 on 2024-09-17; Raspberry Pi Pico 2 with rp2350a

Code/REPL

# boot.py
import usb_cdc
usb_cdc.disable()

Behavior

After power-cycling the Raspberry Pi Pico 2, as instructed in https://github.com/adafruit/circuitpython/issues/990#issuecomment-444643691, the boot.py still runs.

Description

I was expecting a REPL prompt similar to this, but more applicable to the actual situation:

...
manic glacierBOT
#

I have reproduced this. I'm thinking that the magic word that detects repeated resets is not being saved for some reason (does reset on the RP2350 clear RAM)?

If that's actually the situation, maybe safe mode could be entered by pressing BOOTSEL during the initial 700ms timeframe. At least on the original Pico, the BOOTSEL button could be read, albeit slowly: https://arduino-pico.readthedocs.io/en/stable/bootsel.html

manic glacierBOT
lone sandalBOT
tiny peak
lone axle
# tiny peak Do you have a sense of how that might impact runtime performance, memory allocat...

If it were a library it would be no impact unless you choose to use it instead of the standard TileGrid. If you did choose to use it I'm not sure of the impact it would have, I wouldn't expect it to be drastic but I haven't done any measurements.

If it were implemented in the core directly on TileGrid I would expect it to increase flash size, and memory usage slightly due to the code to support the new properties, and the values those properties hold. But the code needed won't be that much I think, the python implementation is here: https://github.com/FoamyGuy/Adafruit_Learning_System_Guides/blob/tft_spirit_board/TFT_Spirit_Board/shared/lib/anchored_tilegrid.py In the core it would probably expand a bit further due to handling of the tuples, but still shouldn't be that big.

I would not expect it to impact the rendering framerate of cycling through tiles in the TileGrid if the TileGrid is not moving also. If the TileGrid were moving, and you choose to move it with the new properties I would expect it to be ever so slightly slower than moving it with the x and y properties directly because it has to do a bit of math to calculate the position and then set the x and y properties.

tiny peak
#

The frame rate I managed to get on an ESP32-S3 was mostly plenty fast enough, but with the occasional glitch once in a while. I don't really have a sense of how much of that was due to garbage collection pauses, time spent on data transfers over the SPI bus, or whatever else. But, my impression was that I was pushing the system close to the limit of what it could animate smoothly.

lone axle
tiny peak
#

I'd be very curious to hear how it goes if you try it.

lone axle
# tiny peak I'd be very curious to hear how it goes if you try it.

I don't think I have a USB gamepad to try it with. I'll poke around and see if one comes up though. It looks like the way you've got the code factored out should make it easy enough to mock the controller inputs if I don't find one. Although it perhaps lessens the meaningfulness of the test outcome for your use-case since I'd be removing the USB Host operations from the equation.

tiny peak
#

you might be able to make do with a USB numpad or keyboard. like, just read 8 bytes or whatever from endpoint 0x81 and look for anything that's not 0

#

anyhow... hope the spirit board thing goes well. I'm headed afk.

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 9.1.3 on 2024-08-30; Seeed Xiao ESP32-C6 4MB Flash 512KB SRAM with ESP32-C6FH4

Code/REPL

socketpool = socketpool.SocketPool(wifi.radio)
addressInfoTupple = socketpool.getaddrinfo("cats.com", 80)
for individual_addressInfo in addressInfoTupple:
        print(f"individual_addressInfo: {individual_addressInfo}")

Behavior

individual_addressInfo: (2, 1, 0, '', ('172.67.39.47', 80))

Description

I ca...

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 9.2.0-beta.1 on 2024-10-11; Adafruit MagTag with ESP32S2

Code/REPL

>>> wifi.radio.addresses
('10.0.3.28',)
>>> wifi.radio.dns
('FD5F:3F5C:FE50::1',)
>>> wifi.radio.ipv4_dns
>>> wifi.radio.ipv4_dns = ipaddress.ip_address("1.1.1.1")
>>> wifi.radio.ipv4_dns
>>> wifi.radio.dns = ('1.1.1.1',)
>>> wifi.radio.dns
('FD5F:3F5C:FE50::1',)

Behavior

I was trying to reproduce #9771 and I grabbed this recen...

manic glacierBOT
#

Actually it appears that the address is being continuously overwritten ...

>>> wifi.radio.dns = ('10.0.2.76',); wifi.radio.dns
('10.0.2.76',)
>>> # Wait 10 seconds
>>> wifi.radio.dns
('FD5F:3F5C:FE50::1',)

This is due to the IPv6 "neighbor discovery"; my router sends a RNDSS (recursive DNS server) announcement. lwip unconditionally overwrites the DNS server list with this. IPv6 neighbor discovery cannot be runtime disabled, so it runs even if IPv6 DHCP is not enabled and the...

#

This is a limitation of lwip, the socket library that is used by Espressif devices (and RP2040 wifi devices, when it comes to that). Their source code .../lwip/src/api/netdb.c states:

 * Due to a limitation in dns_gethostbyname, only the first address of a
 * host is returned.
 * Also, service names are not supported (only port numbers)!

CircuitPython's implementation of getaddrinfo is prepared to return multiple addresses when you call socket.getaddrinfo but the underlying ...

#

Recursive DNS Server (RDNSS) is an extension of IPv6 Neighbor Discovery. It is one of several ways (in addition to DHCPv6) to inform a network node of a usable DNS server.

In LWIP, it appears any RDNSS DNS server will overwrite a DNS server from DHCPv4 or manual configuration, whether or not CircuitPython has an IPv6 address configured.

In the (default) case where DHCPv6 is disabled in CircuitPython, but the (apparently rare) case where a RDNSS advertisement is broadast, this means that...

lone axle
#

@tiny peak is the YT video of your game here: https://www.youtube.com/watch?v=QStcSDSYKOE a realtime representation of how it looks when you play it? Or is that slowed down any?

I was able to get a modified version of the game working using a joy featherwing (connected via I2C) for input instead of a USB gamepad device.

I have the host featherwing connected and initialized and I have a device plugged in, but I think that device is presenting as a keyboard, not a gamepad and I don't think it would be sending much data.

In mine the pumpkin flying seems to render a fair bit faster. I'm guessing due to not really having to share the SPI bus between the gamepad and the display, but I'm not certain.

#

@tiny peak I've done a bit more testing now with pythom implementation of AnchoredTileGrid swapped in for the pumpkin tilegrid in your project.

I do not see any appreciable different in the rendering framerate when using AnchoredTileGrid vs. normal TileGrid. I did not measure scientifically though, just by eye.

I also tried changing the code that moves the pumpkin to use anchored_position instead of x and y To my eye, I still do not really perceive a difference in framerate rendering it looks visually the same as the normal TileGrid version to me.

All of the ones I've gotten running do seem faster to me than the one depicted in your YT video. If you're interested in seeing the difference let me know and I can get you some timestamped links to my stream this morning to where I ran the different versions.

tiny peak
tiny peak
lone axle
#

I struggled for a bit on a USB solution that didn't pan out. The back half contains all of the bits relavent to displayio and tilegrid.

tiny peak
#

yeah, the USB protocol for Xbox 360 gamepads is a bit of a head-scratcher until you get used to it

lone axle
#

Running it on a USB Battery instead of plugged into the Hub / PC actually seem sto make the pumpkin fly a bit slower strangely. It looks closer to the speed of your video this way, but still maybe a tad bit faster.

tiny peak
#

I think USB IO has a big impact on overall system timing

lone axle
#

Ahh, actually I was wrong. Changed too many variables at once.

#

I had unplugged the gamepad that I tried to use. (I left it plugged in to so that the game would detect it and let me start). It turns out if I unplug that after the game lets me start the pumpkins fly a bit slower than if I have it plugged in.

I guess unplugged it's spending a tad more time "looking" for that device or trying to read from it than doing the same when it remains plugged in (even though I'm not actually using it for the game)

#

battery doesn't make any difference, only whether or not I leave the gamepad plugged in.

manic glacierBOT
#

I was looking into using keypad.ShiftRegisterKeys and found the documentation confusing. I had to check the source code to understand how it works.

Says:

//|         Create a `Keys` object that will scan keys attached to a parallel-in serial-out shift register
//|         like the 74HC165 or CD4021.
//|         Note that you may chain shift registers to load in as many values as you need.
//|         Furthermore, you can put multiple shift registers in parallel and share clock ...
#

OK retested with just one connection. Still crashing once a message is sent from the peripheral.

Adafruit CircuitPython 9.2.0-beta.0 on 2024-09-17; FeatherS3 with ESP32S3
>>>
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.

also tried the latest beta and same behavior

Adafruit CircuitPython 9.2.0-beta.1-1-...
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
onyx hinge
#

<@&356864093652516868> A gentle reminder that there is no meeting today, as Adafruit observes Indigenous Peoples' Day. The meeting is 24 hours later than usual, at 2PM ET / 11AM PT. See you tomorrow!

lone axle
manic glacierBOT
manic glacierBOT
#

I was able to reproduce the firmware error: 2 easily. I have not yet tried to reproduce the crash in earnest.

Some observations on the code:

Error2 is EALREADY, that is, pairing is already in progress. You do not need to call .pair() yourself, because pairing is being initiated by the Android central, when it brings up the "Pair?" dialog box. If I run the same program on an nRF board with CircuitPython, I get an "invalid state" error, which I think is trying to indicate the same t...

tulip sleet
lone axle
manic glacierBOT
manic glacierBOT
manic glacierBOT
#
  • Fixes #9718

When keypad.ShiftRegisterKeys(..., key_count=some_integer, ...) had an integer argument, the argument was not correctly converted to an integer. This error was inadvertently introduced by #8143.

Testing:

import board
import keypad

keys = keypad.ShiftRegisterKeys(
    data               = board.GP0,
   clock              = board.GP1,
   latch              = board.GP2,
   key_count          = 8,
   value_when_pressed = True,
   value_to_latch     = True,...
manic glacierBOT
manic glacierBOT
#

The fix looks good.

manic glacierBOT
manic glacierBOT
nocturne sequoia
#

Hello everyone
I'm just starting out in circuitpython
I am currently making this project : here is the link:
https://learn.adafruit.com/matrix-portal-scoreboard/code-the-scoreboard?embeds=allow
I installed everything, I'm at: Adafruit IO Setup
But I don't understand where to install or copy the secrets.py file
Thank you for the help sorry for the translation I am French

Bonjour a tous
Je debute juste dans circuitpython
je suis en train de faire ce proget : voici le lien:
https://learn.adafruit.com/matrix-portal-scoreboard/code-the-scoreboard?embeds=allow
J'ai tout installer j'en suis a: Adafruit IO Setup
Mais je ne comprend pas ou il faut installer ou copier le fichier secrets.py
Merci pour l'aide desoler pour la traduction je suis francais

Take your games to the next level with a remote scoreboard!

Take your games to the next level with a remote scoreboard!

random junco
nocturne sequoia
#

sorry thank you I will do it

desoler merci je vais le faire

manic glacierBOT
#

I think this is the warning you mean:

WARNING: Calling get_html_theme_path is deprecated. If you are calling it to define html_theme_path, you are safe to remove that code.

Yes, this is something that changed in the meantime, not due to your changes.

This warning should be resolved if you merge the Adafruit main branch into your PR branch, if you're comfortable doing that.

blissful pollen
#

@onyx hinge to merge main into my PR is it just fetch adafruit/main and then merge adafruit/main? I have a less then stellar track record with not breaking my PRs with merges 🙂 If you don't have it off the top of your head don't worry I'll look into it more today.

onyx hinge
lone axle
#

It seems that RTD is unhappy with ubuntu-latest as the value for build.os in our readthedocs config file now.

Error

Config validation error in build.os. Expected one of (ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, ubuntu-lts-latest), got type str (ubuntu-latest). Double check the type of the value. A string may be required (e.g. "3.10" instead of 3.10)

I assume it had worked in the past but it looks like they've changed to ubuntu-lts-latest I'm going to try it out on one and if it builds with no issues I could work on a patch for it this week. Though I think some of the libraries are still set to older hardcoded versions as well so it may take a few passes to get them all updated and back into alignment.

onyx hinge
#

@lone axle do you think this is a recent change on their part?

lone axle
#

I would guess that it's somewhat recent. our cookiecutter and newest libraries that I could find are using the value ubuntu-latest

#

Welp another moment of poking into the git history and I'm fairly confused about how it was working in the past. It looks to me like the last change to the "latest" build version was 2/5/24 which appears to be when it was added as an option, however at that time it already seems to have the value ubuntu-lts-latest. So maybe ubuntu-latest never worked. I'm not sure how widespread that value is in our libraries. I've only checked a few but have seen mostly ubuntu-20.04.

candid sun
#

<@&356864093652516868> here is the notes doc for today's meeting: https://docs.google.com/document/d/1UY8EJC4OuO3upz7Wcdu8zkrxFtqC0utJWgaZ2GLybkA/edit
We'll have our weekly meeting in about 2 hours from now in this text channel and in the circuitpython voice channel. Please take the time to add your notes in advance to the document -- I look forward to everyone's updates!

lone axle
#

I think it's most likely that the cookie cutter was updated erroneously to ubuntu-latest I made that change back in july, I assumed RTD version constants were the same as github actions one, but they differ in this case. Scanning the bundle it appears there are only a few libraries that have the incorrect value. The vast majority have ubuntu-20.04 so they could stand to be updated still.

manic glacierBOT
slender iron
lone axle
tulip sleet
#

maybe because all the libraries were updated

onyx hinge
#
  • Total Library Stats
    • 1304306 PyPI downloads over 334 libraries
#

no that's what it says in the report

lone axle
#

Ahh, yeah that could be. The actions install some of them I think.

tulip sleet
#

there must be many mirrors

lone axle
#

Thank you 👻

onyx hinge
#

thanks liz!

random junco
#

Thanks Liz! Have a great week everyone

lone axle
#

Thanks for hosting Liz, have a great week everyone!

candid sun
#

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

manic glacierBOT
slender iron
#

@tulip sleet have time later to figure out my next step for circuitmatter?

#

(after I get lunch)

tulip sleet
#

sure

slender iron
#

kk, will ping you when I'm ready

slender iron
#

@tulip sleet I'm back now and free whenever

orchid basinBOT
slender iron
tulip sleet
manic glacierBOT
manic glacierBOT
#

@tannewt I plan to simplify and add a new version to the community bundle. I'm using the library myself to drive some DMX strip lights, and I have some lessons learned that I will incorporate, but will change the interface a bit thereby making it more compatible with the Adafruit animations.

@maxaitel if you haven't done it already, please create a folder called dmx_transmitter into your microcontoller's lib folder, and copy all the .py files from dmx_transmitter folder in the GitHub repo...

manic glacierBOT
lone axle
#

Driver code style question: For a device like this: https://www.adafruit.com/product/6062 with 3 channels that it can read from. I know generally we prefer properties for accessing data in the drivers. Would it be preferrable to have 3 properties (one for each channel), or to have 1 function which accepts the channel as an argument?

slender iron
#

each object looks like one sensor

lone axle
slender iron
#

I'd do channel[0] probably

#

or you can do ina[0]

#

both of those would allow you to iterate over the channels

manic glacierBOT
manic glacierBOT
#

Is RP2040-only library suitable for for bundle? Or do you have a fall-back like @Tasm-Devil's for others?

Some of my code:

import busio
import time
import digitalio

def delay_us(us):
    w = time.monotonic_ns() + us * 1000
    while time.monotonic_ns() < w:
        pass

class DMXSerial:
    def __init__(self, txpin):
        self._start = bytearray(1)
        self._txpin = txpin
    def send(self, data):
        with digitalio.DigitalInOut(self._txpin) as dio:
      ...
manic glacierBOT
#

We want to control mouse and keyboard on tablets connected via USB to an ESP32 S3 Box (or similar).

adafruit_hid supports keyboard and relative mouse. As in another issue mentioned, sometimes the need arrises to move to absolute positions to know where the mouse really is.

Work-arounds, like moving relative to (-5000;-5000) all the way top left to get to a fixed point, some...

manic glacierBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 9.2.0-beta.1 on 2024-10-11; Raspberry Pi Pico W with rp2040

Code/REPL

#import helpers
#helpers.connect()  connect to AP with wifi.radio.connect
import wifi
wifi.radio.dns
wifi.radio.dns = ('8.8.8.8',)

Behavior

>>> import helpers
>>> helpers.connect()
connecting to AP wlan-xxx ...
  connected: False
Unbekannter Fehler 205
  connected: True
>>> import wifi
>>> wifi.radio.dns
('10.1.2.1',...
manic glacierBOT
#

The reason wifi.radio.dns is different is that it can support IPv6 addresses, and is even prepared to support multiple DNS servers when the underlying IP stack supports it as well. That said, it's clearly a bug when setting the property causes a crash.

It would be useful to know if setting the ipv4_dns property, which does have to be an IPV4Address, is also crashing; and it might serve as a workaround for you in your code.

#

Looks like maybe a conversion to "char *" is missing, and not caught by the compiler. If you're able to build circuitpython please try with:

diff --git a/ports/raspberrypi/common-hal/wifi/Radio.c b/ports/raspberrypi/common-hal/wifi/Radio.c
index 3250ed4d7c..b34a7670b8 100644
--- a/ports/raspberrypi/common-hal/wifi/Radio.c
+++ b/ports/raspberrypi/common-hal/wifi/Radio.c
@@ -574,7 +574,7 @@ void common_hal_wifi_radio_set_dns(wifi_radio_obj_t *self, mp_obj_t dns_addrs_ob
      ...
tulip sleet
#

@slender iron I have a BLE MTU/NUS change I would like to bounce off you, when you have time.

manic glacierBOT
slender iron
tulip sleet
#

tnx!

slender iron
#

just got to that portion of the video

#

overview is pretty brief

tiny peak
#

has anybody done any previous work on building gamma correction into displayio? I'm particularly interested in ST7789, but also generally interested in anything that goes from 24-bit rgb displayio.Palette colors to RGB565 using busdisplay.BusDisplay under the hood. I see lots of stuff in old guides about gamma correction for arduino with NeoPixels, but haven't found that much related to CircuitPython.

slender iron