#circuitpython-dev

1 messages · Page 39 of 1

jaunty juniper
#

can we rerun the action maybe ?

#

those missing assets are gonna make circup fail too

06/24/2023 16:45:08 WARNING: Unable to connect to https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/download/20230624/adafruit-circuitpython-bundle-py-20230624.zip
#

(by the way I just realized that my circup.log is 1.47 GB)

#

do you think it could be a change in the "shogo82148/actions-upload-release-asset" action ? It doesn't look like there was one between yesterday and today. Want to try rerunning it ?

#

oh wait that was already rerun

#

so maybe we should delete the release, remake it or make a new release

lone axle
#

Yeah, it looked to me like the re-run failed for a different reason, because some of the files already exist. Although oddly it looked like one of the one it said already existed is the one from the XML file not found error if I understood them correctly.

#

I'm wondering if the root cause was just something transient and tomorrows will work fine (or whenever the next one builds. Maybe we should merge something today in order to ensure there is one tomorrow)

jaunty juniper
#

I think the it's the assets from the github release that "already exist", those ones ?

lone axle
#

Ohhhh, it was saying they exist in the release assets already, not in AWS.

jaunty juniper
#

I think we can delete the release and wait for tomorrow ? that should fix circup

#

though I'm not ready to delete a release/tag in github...

lone axle
#

I do think those are the ones. I don't know how it works but possible if those assets were deleted and then the action re-run maybe it could succeed.

#

Yeah, same. Not sure what other ramifications of deleting the release entirely, could cause more trouble than fix.

jaunty juniper
#

there's a little trashcan icon, so tempting 😅

slender iron
#

The boot drive won’t disappear if it doesn’t get all of the data. I’ve never seen an actual failure

manic glacierBOT
#

@RetiredWizard based on what I'm seeing in the meter displays between the two versions, the distorted one is 1.89W vs 2.17W in the non-distorted version. I'm using this Adafriut https://www.adafruit.com/product/658 5V/10A power supply. Given that it's their power supply, I would have thought it was more than sufficient to drive two of these panels. I know you didn't think your issue was voltage, but I'm wondering if the higher current draw of the 2 panels is causing a voltage drop that is eno...

manic glacierBOT
lone axle
#

I'm attempting to build a very old commit in order to track down a bug that I've found. But I'm getting this error about no make target for protomatter:

circuitpython/ports/atmel-samd (37e85ae) [!?] via C v11.3.0-gcc 
❯ make BOARD=pyportal
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
make: *** No rule to make target 'lib/protomatter/core.c', needed by 'build-pyportal/genhdr/qstr.i.last'.  Stop.

My best guess is that my submodules are not "sync'd" properly in order to make the build on this random old commit. I tried getting a fresh clone and doing make fetch-all-submodules, then checking out this commit and running the build and it outputs the above error.

Is there some other process I need to use in order for making builds from very old commits to get my submodules set to the proper revision in order to work?

blissful pollen
manic glacierBOT
#

CircuitPython version

Pyportal `8.1.0`, `8.2.0-rc.0` and others.

The last tag where it works successfully is `8.0.0-beta.0`

The first tag where it does not work is `8.0.0-beta.1`

Code/REPL

import board
import displayio

SHAPE_WIDTH = 100
SHAPE_HEIGHT = 100
display = board.DISPLAY

shape = displayio.Shape(SHAPE_WIDTH, SHAPE_HEIGHT, mirror_x=False, mirror_y=False)

palette = displayio.Palette(2)

palette[1] = 0x00FFFF  # shape color

tile_g...
lone axle
#

I think that did end up being the fix for me (remove and re-sync) But it was a little more convoluted because it turned out the commit I was at was from before make fetch-submodules existed, so I had to track down the old way to do that (Hug report is in order Tyeth for help with that.)

#

it also turned out that commit was way older than where I needed to be looking to find the issue I was looking into though so I was able to "jump forward" pretty far in time and didn't have any more submodule weirdness.

pallid creek
#

It looks like circup is still failling because of the broken release 13hrs ago. Is there a way to tell circup to use the previous release instead?

jaunty juniper
#

we could still try removing the latest release, it can't make things worse, can it ?

pallid creek
#

I wouldn't think so.

lone sandalBOT
tulip sleet
#

@lone axle @jaunty juniper I am trying to re-run the bundle build. I deleted today's release.

jaunty juniper
#

ah you did 👍

tulip sleet
#

i made a change yesterday in the assigned user for something else (updating circuitpython-org pages as adafruit-adabot instead of blank, which was registering as ladyada), but I didn't think it would affect this. The

#

build failed again in same way.

#

I will undo my previous change, jsut in case. It was only cosmetic (Limor sees way more commits by her than she would like)

#

hmm, it wasn't really blank: I can't set a blank one. I'll set it to myself and see what happens.

#

running yet again

#

this run is without deletion, so I will probably get a different error. Then I will delete the release and try agian.

#

... release is still gone, failed the same way, trying some other actions for bundle

pallid creek
#

whatever you did seems to have fixed circup. I can now list my local modules

tulip sleet
#

@idle owl I was going to re-run the regular job. Should I re-run with your push?

#

some discussion above

#

i am going to be afk in less than an hour

idle owl
#

Oh you did do someting somewhere.

#

Regardless, that TOKEN doesn't exist anywhere, so I'm not sure how it ever worked without the change I made.

tulip sleet
#

all I did was set the circuitpython-org user name to adafruit-adabot; I don't really think it has to do with this.

#

I changed it to myself just in case that affected it, but it's not even used in this repo

idle owl
#

That sounds unrelated.

tulip sleet
#

if it doesh't work, you can just delete the bundle release and tag, and yesterday's bundle works.

#

I did that once already.

idle owl
#

Hold on trying to add a thing and not figuring out how

#

@tulip sleet Wondering if I have to give workflow_dispatch parameters if there is something else in the on: section. I can give it a specific branch easily which is fine because we want it run against main anyway. If that doesn't work, I'll toss it to you to get it to trigger another run that actually uses the updated file. tl;dr: If this build fails, I have one more thing to try, and if that fails, I'm returning the file to my original push.

#

@tulip sleet It worked! You can now manually trigger the Release Actions run from the GitHub UI. Triggered a new run. (Triggering a run on the previous job was not using the updated release.yml file.)

#

Well, new failure this time. Rerunning with debug enabled.

#

Might be the TOKEN change.

lone axle
idle owl
#

Hmm.

#

I don't really understand what all of that means.

#

(It failed sooner than before, so I'll swap the token back to what it was once this fails, if it seems like that's probably the issue now.)

#

This all seems like we're going after red herrings because the failure is obtuse.

#

This is the result of generating the upload_url with the updated token: ##[debug]..=> null ##[debug]=> null ##[debug]Result: null

#

Reverting that.

tulip sleet
#

i'd say switch it back; in the morning I'll see if the new bundle fails, and if so, I'll just delete it again, same Monday morning, and we'll get other eyes on it on Monday

idle owl
#

Though I wish I understood how it worked.

lone axle
#

It's a shorthand notation for URLs that can get specific fields populated with variables by some system. I think in our case they aren't problematic, the log printout doesn't seem to be able to handle it so well but the underlying system should be fine with it if I am understanding.

idle owl
tulip sleet
#

no vital bundle updates

idle owl
#

Ugh, I wanted to run it with debug. Can only do that on rerun apparently.

idle owl
#

@lone axle Thanks so much for looking into this with me. If nothing else, I now know a few more things about how this works.

#

@tulip sleet I saw you had triggered one of the runs, I should have messaged you. But I think you were idle, so I wrote it off as maybe you didn't trigger it and I didn't see it right. Parallel debugging happening here.

tulip sleet
#

i was in this channel with neradoc but then went away and saw it didn't work, but no problem, because older bundle was fine

#

once I deleted the partial new bundle

idle owl
#

I messaged Tekktrik about it. He's way more up on CI shenanigans than I am. He's not around right now though. If he can get eyes on it at some point, he might have some insight we didn't think of.

#

@tulip sleet Failed. On the new failure. Uh oh. I have no debug to know if it used the new file or not. Rerunning one more time with debug to check that.

#

Then I swear I'm done.

tulip sleet
#

then you'll revert?

idle owl
#

Already did!

#

But it now has the failure it did after I made the change.

#

So I'm not convinced it is using the reverted file.

#

That's why enabling debug logging.

#

It told me before when it wasn't using the new file.

tulip sleet
#

where did you make the change? I see no PR or revert PR in Bundle repo?

idle owl
#

Where I made it in the first place.

#

Directly. Did not PR.

#

@tulip sleet It is using the reverted file. So... at this point, the only change from before is including the workflow_dispatch which is completely unrelated to any of the rest of the Actions file. What I'm saying is, there are ostensibly no changes, and now it's not generating the upload_url, which it was doing earlier today.

#

(╯°□°)╯︵ ┻━┻

#

I'm done with this until Alec can take a look at it. Or until Monday. Whichever is soonest.

tulip sleet
#

let's just wait and see what happens tonight ... yeah

idle owl
#

I'm on board with this.

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.2.0-rc.0 on 2023-06-23; Raspberry Pi Pico W with rp2040

Code/REPL

from wifi import radio
from socketpool import SocketPool
from builtins import bytearray
from time import sleep
from secrets import secrets

radio.connect(secrets['SSID'], secrets['PASSWD'])

while not radio.connected:
    print("Connecting...")
    sleep(1)

print(f"Connected at address: {radio.ipv4_address}")

socket = SocketPool(r...
manic glacierBOT
timber ivy
#

Howdy 👋 - I am trying to add support for the M5Stack Stick C Plus. The M5Stack Stick C (not Plus) firmware, when loaded on the Plus, gives a garbled display and I think might not be booting all the way. I spent a few hours running down cross-compiler stuff but I'm hung up on:

"/usr/bin/xtensa-esp32-elf-gcc" is not able to compile a simple test program.
once I use make BOARD=m5stack_stick_c_plus (referencing a new directory I made with a few tweaks to the stick c directory)
Is this channel the right place to seek advice on getting my toolchain working?

jaunty juniper
#

did you follow the guide to build CP ?

timber ivy
#

yes, this was after I got mpy-cross going

jaunty juniper
#

(what platform are you on ?)

timber ivy
#

I did not see that. I don't use Linux daily, but we have a gaming laptop dual-boots Manjaro, so that's what I'm using. Aside from having to compile xtensa-esp32-elf-bootstrap and xtensa-esp32-elf-gcc from AUR, most of that guide looks like what I fumbled through to get to where I'm at.

#

I didn't do the install.sh on the espressif ports dir, looking at that now, and any other hints on this page.

jaunty juniper
#

you shouldn't need to compile or do anything for gcc

#

esp-idf will download all you need to ~/.espressif includding all the binaries for gcc

#

plus its own python venv (in which you need to install the requirements-dev.txt)

#

also I gotta sleep, but more people will be there tomorrow in a few hours

#

(or monday for sure)

timber ivy
#

I think my problem was I started immediately trying to fight my way through errors after make BOARD (oh gosh, gotta install ninja, oh gosh, gotta install xtensa-esp32-elf-gcc) and never found this espressif-build guide. Thanks again!

#

Success! Cheers

#

I'm un-blocked. I'll try actually loading the firmware tomorrow. It is also late here.

lone axle
#

At first glance it looks like todays auto-release for the library bundle did succeed.

tulip sleet
#

i have no idea what that hiccup was

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.1.0 on 2023-05-22

Code/REPL

# Documentation issue; Not in Code/REPL

Behavior

# Documentation issue; Not in Code/REPL

Description

This is a CircuitPython API documentation issue.

In the latest and releases after 7.2.x, the API reference docs no longer have links for the circuitpython_typing types.

For example, in docs for the latest version see `circuitpython_typing.Write...

#

CircuitPython version

Adafruit CircuitPython 8.2.0-rc.0 on 2023-06-23; Hardkernel ODroid Go with ESP32

Code/REPL

None

Behavior

After a powerup and connection via the UART, characters typed in the REPL show up on the screen, but are not echoed to the host PC.

Issuing commands import os os.listdir() causes screen garbage.

import wifi still hangs.

Description

No response

Additional information

Is there a way to disable the ...

manic glacierBOT
#

CircuitPython version

8.2.0-rc.0

Code/REPL

# Run any code using audiobusio
# and at the same time, perform a lengthy write to the CIRCUITPY drive

Behavior

The audio mostly works fine, however, when the audio dma underflows due to not running background tasks frequently enough, unrelated memory is treated as audio data. This can sound like static, a chirp, a honk, etc.

This happens especially frequently when writing to the CIRCUITPY drive, bec...

manic glacierBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.1.0 on 2023-05-22; Raspberry Pi Pico W with rp2040

Code/REPL

# SPDX-FileCopyrightText: 2017 Limor Fried for Adafruit Industries
#
# SPDX-License-Identifier: MIT

"""CircuitPython I2C Device Address Scan"""
# If you run this and it seems to hang, try manually unlocking
# your I2C bus from the REPL with
#  >>> import board
#  >>> board.I2C().unlock()

import time
import board

# To use default I2C bu...
manic glacierBOT
lone sandalBOT
manic glacierBOT
#

By pausing audio during flash writes, the worst screeching of #8121 is avoided. I don't consider this a full fix, but it greatly improves the by far most common scenario in which the problem occurs, and can't otherwise be worked around

Tested on rp2040 prop feather with a midi synth playing arpeggios. When writing to the flash e.g., with

dd bs=512 count=32 if=/dev/zero of=/media/jepler/CIRCUITPY/boop

the audio goes "tap tap tap tap" during the flash write instead of the squawki...

tulip sleet
proven garnet
#

@tulip sleet @idle owl sorry I was camping this weekend, I heard the CI went wonky, it seems like everything is fixed now?

tulip sleet
manic glacierBOT
#

Just tested this on a QTPY RP2040 w/ I2S DAC (PCM5102A) and, yes, SO MUCH BETTER.
(in general, I've found I2S to be more screechy than PWM, with M4 built-in DAC being least screechy).

Now, on reset with USB connected to MacOS: it's mostly quiet with maybe a small bit of chugga-chugga noise (that hilariously to me, sounds reminiscent of GSM cell interference)

This is a great improvement. I may still tell people to include a 5-second delay at the top of their code.py so they don't ge...

proven garnet
#

Sweet! Glad to hear!

slender iron
#

@onyx hinge yup, single buffer mode is basically what I was thinking but it'd DMA two different addresses instead of the same one

turbid radish
lone axle
#
lone axle
idle owl
#

Neither am I.

gilded cradle
#

New computer...

#

yes

onyx hinge
#

[background: pipewire is the newer audio library/api/server for linux and many linux distros are in the process of replacing the old software, pulseaudio]

idle owl
#

@onyx hinge Wait what? USB A doesn't fit?

onyx hinge
#

@idle owl it didn't seem to

idle owl
#

I have a bare usb A to C adapter here, and a NeoKey BFF. Holding the entire A connector over the BFF and it fits. Obviously that doesn't take into account connecting the pads up...

#

Hmm.

onyx hinge
#

is .6 the right spacing between the inner pin rows?

#

seems to be

idle owl
#

Should be.

#

This fits.

#

Which has pins coming out the back on both sides of the little PCB in there.

tulip sleet
idle owl
#

@onyx hinge Mostly wondering if there's another USB footprint part to use.

#

I will be out. I don't think moving it to Wednesday makes sense.

#

Also an option.

#

That's what I would suggest.

devout jolt
#

Thanks @tulip sleet !

gilded cradle
#

Thanks everyone

idle owl
#

@onyx hinge Can you also remove it from the hosting calendar?

lone axle
#

Thanks for hosting Dan! Have a good week everyone.

idle owl
#

Thanks everyone!

onyx hinge
#

@idle owl yes

slender iron
#

thanks!

onyx hinge
#

if I have permissions anyway

idle owl
crimson ferry
#

@slender iron right before the meeting recording started, I wasn't fully tuned in, but you mentioned me and someone else... maybe some technical issue with my connection to the meeting? It looked fine and muted at my end.

slender iron
#

@crimson ferry just how discord hides your username when in streaming mode

onyx hinge
#

@timber mango you were scheduled to host the meeting on july 3, note that we canceled it so you get a pass.

idle owl
#

@onyx hinge Wrong person.

onyx hinge
#

oops sorry!

#

@candid sun you were scheduled to host the meeting on july 3, note that we canceled it so you get a pass.

candid sun
#

@onyx hinge ah okay, thanks!

tulip sleet
#

Here is the notes document for the next CircuitPython Weekly meeting, which will be on July 10, 2023. ***Note that we are skipping the week of July 3 due to a US holiday. *** The meeting will be 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/1ajdwXoubhG86rUVabqTcEzHvOKfUgK9TgPdDxqBDlSc/edit?usp=sharing

lone sandalBOT
slender iron
#

for usb host on rp2040 I've run into the issue that making a non-default alarm pool (in order to run on core 1) requires malloc

#

I could 1) change pico-sdk to allow for a statically allocated pool or 2) remove the need for alarm pool in pio usb

tulip sleet
slender iron
#

I've also gotta see how many changes I have for placing stuff in RAM

#

I'm leaning 2 which changes the PIO USB library

#

skipping the alarm stuff simplifies all of that I think

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.1.0 on 2023-05-23; ESP32-S3-Box-Lite with ESP32S3

Code/REPL

# Circuit Playground Express Demo Code
# Adjust the pulseio 'board.PIN' if using something else
import pulseio
import board
import adafruit_irremote

pulsein = pulseio.PulseIn(board.G38, maxlen=120, idle_state=True)
decoder = adafruit_irremote.GenericDecode()


while True:
    pulses = decoder.read_pulses(pulsein)
    print("Heard", len(pul...
manic glacierBOT
#

fwiw I briefly tried implementing the "DMA controller sets its own next-DMA address" scott suggested but it didn't work right off the bat as a simple change.

It seems like either you'd end up using 4 DMA channels (2 to actually do transfers + 2 to set transfer start addresses), or you would have to use a different method than checking which DMA interrupt fired to know which memory buffer to fill.

manic glacierBOT
manic glacierBOT
#

Noticed this while working on the zlib module in MicroPython. FYI we're working on adding compression support -- see https://github.com/micropython/micropython/pull/11879 -- and was looking to see if CircuitPython implemented this already.

The docs say the method is called zlib_decompress but should be just decompress. (See https://docs.circuitpython.org/en/latest/shared-bindings/zlib/index.html )

#

Actually, that reminded me I still have some local changes in need of committing. Frustratingly I had to use --no-verify as the pre-commit checks failed because they require Uncrustify 0.71, but I have 0.69 but have no way of upgrading WSL.

I can't foresee there being any more functional changes needed to this PR. The question still remains though, of the best way to support the tca9555 without my approach cluttering up the code base as it does now.

#

they require Uncrustify 0.71, but I have 0.69 but have no way of upgrading WSL

Do you mean you are on Ubuntu 20.04 instead of 22.04? You can upgrade:
https://askubuntu.com/questions/1428423/upgrade-ubuntu-in-wsl2-from-20-04-to-22-04
22.04 has uncrustify 0.72.0.

if you want to stay on 20.04, you can install the pybricks ppa to get 0.71.0:
https://launchpad.net/~pybricks/+archive/ubuntu/ppa

manic glacierBOT
manic glacierBOT
#

OK, the test failure is wild

Any change can add or remove qstrs, which also changes the numbering of qstrs. Strings used as identifiers also get added as qstrs.

The line \.\+63 is intended to check that the bytecode of the function ends with a 63 instruction, AKA RETURN_VALUE. However, with this exact set of qstrs the identifier g gets the qstr number 0x0463 which appears in the instruction bytecode as 04 63, which gets matched by the regular expression.

That causes the rem...

slender iron
#

@lone axle need me to look at your esp32spi changes?

lone axle
#

Thank you

slender iron
#

@lone axle what order should I look at them in?

slender iron
#

👍

lone axle
slender iron
#

@tulip sleet looks like 167 is your PR. Do you want to circle back to it or pass it off to foamyguy and I?

#

@lone axle is there a way we could change requests and wsgi first so that we don't need to do all three at once?

tulip sleet
#

@lone axle I was just going to drop the WSGI server from the ESP32SPI library. If you move any additional functionality to anothe repo, that's fine, but at this point maybe HTTPServer is sufficiently functional?

#

Are there any changes to be made in #167? I'm not sure I can reassign it to you, but you could push changes to it.

slender iron
#

foamyguy did already

lone axle
#

I have committed all changes that I was able to find that it needed to the PR branch.

tulip sleet
#

ok, now I remember. I kind of remember wondering whether we could a have dummy bind(), but it seemed tricky. It's fine to me to merge my PR when you are ready.

slender iron
#

Should we wait to do this switch until after the 4th of July to make sure we're around to fix things that come up?

tulip sleet
#

i am not going away

lone axle
tulip sleet
#

so do all of them in one bundle release, right, that's what your proposing?

lone axle
#

Yep, I think that would be ideal. That way when someone does get get the newer ones installed via default means they'll be getting ones that co-exist and function together.

#

It wouldn't be the end of the world if it's not done in the same release, but it would mean some folks may need to track down older releases of one or the other of the libraries in order to get things running.

tulip sleet
#

we have to do it some time. You've done a lot of testing, so I think we're ready. Then we also need to make Guide changes of some kind, right?

#

for doc purposes

lone axle
#

Possibly, it will depend what all is covered in the guides. If there is anything that covers the inner workings of ESP32SPI library, it would probably need some changes to reflect the new functions and behaviors that it has now.

But many / most of the guides are built on higher level libraries like adafruit_requests or adafruit_pyportal which abstract away the details anyhow, so project guides using these higher level libraries may not have anything to change.

#

I tested a small handful of the projects based on those higher level libraries like requests, and pyportal and all the ones I found were working as expected with the new versions. They didn't require any change in the actual project code. I didn't check all of the guide pages for the ones I tested though, it's possible there may have been explanations in there that could need tweaked, though I think it's likely many of them don't go down into the details enough to have info that would need changed.

jaunty juniper
#

which ESP32SPI boards have it frozen in, as well as the requests library (so compatible versions) ?

tulip sleet
#

matrixportal, I think

lone axle
#

Good thought. I'm pretty sure pyportal does have both frozen in as well.

tulip sleet
#

pyportal, pyportal titano, matrixportal have requests and ESP32SPI frozen. lots more too but they are Espressif

lone axle
#

Actually come to think of it, the fact that those are frozen in to many of the devices they're used on means that the bundle being all updated at once is perhaps a little less critical. The vast majority of people will just be using the frozen in versions rather than installing them anyhow.

jaunty juniper
#

did you want to wait for that update before 8.2.0 so we can update the frozen libraries ?

tulip sleet
#

i.mx boards also have those frozen

#

waiting for 8.2.0 final is probably better

slender iron
#

I just approved all three PRs but didn't merge

tulip sleet
#

it's way too much churn to update the frozen libs in the rc

#

i was going to make rc.1 today with the few new changes since Friday. i could do 8.2.0 final Wednesday or Thursday morning, but could also wait until next Wednesday

#

@onyx hinge do you want the ulab update to be in 8.2.0? Does it fix significant bugs?

onyx hinge
#

@tulip sleet no, I don't think it's critical

#

if I'd thought of doing it a week ago I'd sing a different song

tulip sleet
#

the shape.set_boundary() fix, the no-screech rp2040, and a minor board fix are all interesting for 8.2.0 final and are merged. There isn't an unmerged PR left that is significant, then. The zlib doc fix does not need to be in 8.2.0 final.

#

I will make an rc.1 with the current set of merged PR's, and do 8.2.0 final tomw as a new name for rc.1, barring new issues.

#

I'll start on release notes, should be quick

slender iron
#

thanks!

onyx hinge
#

thank you for release-wrangling, Dan!

manic glacierBOT
#
[adafruit/circuitpython] New tag created: 8.2.0-rc.1
#

One more comment. The clean refresh time is still incorrect.

I still disagree on that. I have two of these Inkys running here with my patch without any problems. It saves me 26s of update time without any problems.

Can you please post some test-code that demonstrates the need for a refresh_time value of 28? If there is no code that fails with 2s then there is no reason to use 28s.

orchid basinBOT
manic glacierBOT
idle owl
#

@onyx hinge Do you have a few minutes to go through a piece of code with me to help me explain it in the guide? It involves seesaw firmware if that matters. Basically I don't get button masking well enough to explain it. Or really at all.

onyx hinge
#

@idle owl I think I have to leave in about 10 minutes so unfortunately not

idle owl
#

Ok, no worries. Thanks, anyway.

idle owl
#

Looking elsewhere also. No worries.

idle owl
#

@tidal kiln Hello! So... it has been requested that I actually explain what's going on in the code in the guide containing this demo, because Anne has run into multiple support issues with this type of code before because it's usually glossed over. I have a starter explanation that Anne wrote up, but she said verify it, and I don't understand any of the button parts well enough to verify anything. I do get the joystick code. But not the button code. https://github.com/adafruit/Adafruit_CircuitPython_seesaw/blob/main/examples/seesaw_gamepad_qt.py

idle owl
#

You set up variables that are set to the seesaw firmware pin they are attached to. Then.... button mask is where I get lost.

tidal kiln
#

first - that approach is only needed when using the "bulk" methods

tidal kiln
#

it could be done without a mask, but then would require multiple reads, each being I2C traffic, to read all the pins

idle owl
#

Hmm ok

tidal kiln
#

so it's not like it's a required all the time sort of things

idle owl
#

Ok got it

tidal kiln
#

it just helps speed things up, since it can get multiple pin states in a single I2C xfer

idle owl
#

Ah ok yeah

tidal kiln
#

if you did it without mask and separate calls, under the hood it'd be reading the same register each time, but then only returning the pin of interest - the masking stuff would be happening inside the firmware running on the seesaw chip

#

with the "bulk" access, the seesaw chip just returns the full register value and leaves it up to user code to deal with

idle owl
#

Ohhhh. So it does the work, and only speaks up when something important happens?

#

Wait no.

#

Oh! Ok, I think I get what's happening with bulk. The full value would be different with one or more buttons pressed, and the code is written to be aware of that?

tidal kiln
#

yah. easiest to think of just 8 pins as an example.

tidal kiln
#

digital pins are either high/low so a single pin state can be represented by a single bit 0 or 1

#

and a single byte register could then hold the pin state for 8 pins, with each bit representing 8 different pins

#

and for 32bit MCU's, it's same deal, just 4 bytes / 32 bits

#

so the non-bulk would
(1) read register PIN_STATE (which has the state of 8 pins)
(2) do some mask foo stuff to figure out if pin X is 0 or 1
(3) return true/false depending

#

so if you wanted pin Y, it'd read the same register again and do the same thing

#

and the I2C traffic could end up being a bottle neck

idle owl
#

Ahhhhh ok

idle owl
#

Oh ok

tidal kiln
idle owl
#

Fair enough

tidal kiln
#

it reads the 0x04 register - which, per the seesaw spec, is a 4 byte return

#

so after this call:

    buttons = seesaw.digital_read_bulk(button_mask)

think of buttons as a string of 1's and 0's representing the pin state of 32 digital io pins

idle owl
#

Ok.....

tidal kiln
#

the masking is how to check for a given pin's 1 or 0

idle owl
#

Oh!

#

And it doesn't need to be 32 pins......

#

?

tidal kiln
#

yep. there's room, per the seesaw spec, for 32 pins.

idle owl
#

Ahhh ok

devout jolt
#

print(bin(buttons)) I find helpful after getting digital_read_builk()

tidal kiln
#

but what it actually is can be port specific - note the separate sections for SAMD and ATTINY with specific details

tidal kiln
#

and then the other thing to keep in mind is that for the ifs, 0 is False and anything else is True

idle owl
#

oh!

#

What else might it return?

tidal kiln
#

thats how you can just logical & with the mask and that's enough

idle owl
#

Because it will only be 0 or 1?

tidal kiln
#

nope. it'll be 0 or something other than 0

#

for example, let's say it's button 4 you're after

idle owl
#

OK

tidal kiln
#

bit 3 would be what you'd look at

idle owl
#

Ok

tidal kiln
#
0b00000000 # nothing pressed
0b00001000 # button 4 pressed
idle owl
#

Right!

#

ok

#

ohhhhhhhhhhhh

#

That's not 1.

tulip sleet
idle owl
#

That's something other than 0.

tidal kiln
#
>>> mask = 0b00001001
>>> button = 0b00001000
>>> if button & mask:
...    print("button pressed")
... 
button pressed
>>> print(button & mask)
8
#

that would be a mask where buttons 4 AND 1 are of interest

idle owl
#

Ok I was confused there for a moment.

tidal kiln
#

but the button value itself is only showing button 4 is pressed

idle owl
#

OH! print(bin(buttons)) suddenly makes sense.

tidal kiln
#

but the logic was true, and the actual value it dealt with was 8

idle owl
#

The gamepad is 16 bits right? Because the Gamepad buttons are on pins between 0 and 16 inclusive. So, when no buttons are pressed, the mask looks like this becuase 0, 1, 2, 5, 6, 16 are of interest? 0b10000000001100111

#

And then the associated button is pressed, the 1 in those places become 0?

#

(at least that's what it's doing)

#

Sorry if I'm getting ahead of myself here. It clicked when you explained your example mask there.

#

I was confused before that moment.

#

about the value I posted above.

tidal kiln
#

the read_bulk is still return 32 1s and 0s

#

the mask can be a subset of that

idle owl
#

Ahhhhhhhh

tidal kiln
#

the gamepad just isn't using any pins above 16

idle owl
#

Ok got it

tidal kiln
#

the simple example above would have also printed button pressed if button 1 was pressed instead of 4

#

so the example has:

    if not buttons & (1 << BUTTON_X):
idle owl
#

Oh hmm.

tulip sleet
#

I visualize it with diagrams like this, each bit in its own box

tidal kiln
#

to check for specific buttons

#

yep. and binary format print in python if you're at a repl is also helpful.

#
>>> BUTTON_X = const(6)
>>> BUTTON_Y = const(2)
>>> BUTTON_A = const(5)
>>> BUTTON_B = const(1)
>>> BUTTON_SELECT = const(0)
>>> BUTTON_START = const(16)
>>> button_mask = const(
...     (1 << BUTTON_X)
...     | (1 << BUTTON_Y)
...     | (1 << BUTTON_A)
...     | (1 << BUTTON_B)
...     | (1 << BUTTON_SELECT)
...     | (1 << BUTTON_START)
... )
>>> print("0b{:016b}".format(button_mask))
0b10000000001100111
>>>  
#

can think of this as being another mask: (1 << BUTTON_X)

#

being created in place

#

using the << left shift operator

#
>>> print("0b{:016b}".format(1 << BUTTON_X))
0b0000000001000000
idle owl
idle owl
tidal kiln
#

hey! that's new to me 🙂 knew about hex() figures theres also a bin()

idle owl
#

Or whatever the right word to use there.

tidal kiln
#

the_more_you_know.gif

idle owl
tidal kiln
#

keen

idle owl
#

When printed there, it updates when you press the buttons. It's nice.

#

Once I understood the base value anyway.

tidal kiln
#

masks are general - don't always have to be for a single bit

idle owl
#

Ok

tidal kiln
#

but in the case of checking for a specific pin, they are. that is, all 0s except for the bit with the pin of interest

idle owl
#

Ok

tidal kiln
#

i guess it could be argued that the example could be written without using masks, to be more beginner friendly readable? or somehow show both, since there are those that would want to also see this approach. multiple examples?

idle owl
#

Eh...?

tidal kiln
#

for example:

    if not digitalRead(BUTTON_X):
        print("Button x pressed")

    if not digitalRead(BUTTON_Y):
        print("Button Y pressed")

    if not digitalRead(BUTTON_A):
        print("Button A pressed")

    if not digitalRead(BUTTON_B):
        print("Button B pressed")

    if not digitalRead(BUTTON_SELECT):
        print("Button Select pressed")

    if not digitalRead(BUTTON_START):
        print("Button Start pressed")
idle owl
#

We use this in all of the guides for things using seesaw

#

I am unaware of us showing the other way.

tidal kiln
#

it's a tradeoff. the code above would just generate other feedback, since each digitalRead() call is I2C traffic.

idle owl
#

Agreed.

#

So I'd rather explain the existing code.

#

Anne's point is the seesaw firmware pins are magic numbers to people not In The Know, and then that leads to the rest of the issues with the code. In terms of support problems.

#

So is it ok to refer to a 16 bit value when referencing the button_mask creation? Or should I refer to 32 bit, and explain that this code isn't using anything over 16.

#

That the mask can be a subset.

tidal kiln
#

this is guide specific to gamepad?

manic glacierBOT
idle owl
#

Gamepad only.

tidal kiln
#

hmm...maybe dont say one way or the other. just call it a mask.

idle owl
#

Ok

tidal kiln
#

so don't want to give too much importance it being 16 bit

idle owl
#

Got it

#

Can I ping you after I try to write this up? So you can tell me where I didn't quite get it?

tidal kiln
#

sure

idle owl
#

Thanks. Will do.

tidal kiln
#

and hopefully explanation above helped?

idle owl
#

Hoping so. We'll find out!

manic glacierBOT
idle owl
#

@tidal kiln DMing you the preview link. Hopefully this is good enough. Hoping to get it back to Anne today.

manic glacierBOT
manic glacierBOT
timber ivy
# manic glacier

This is my open PR. Does anyone have an original M5Stack Stick C (not plus) to test the latest stable CircuitPython on? Specifically:

  • Does REPL work over USB serial?
  • Does it show up as a mass storage circuitpy drive?
jaunty juniper
#

if ampy works to list files, the REPL works, how did you try to connect to it ?

#

ampy needs to be changed to use binascii instead of ubinascii, I don't know if there's a version somewhere that does that, I know there was a PR to make it fallback to it but 🤷

#

thonny should work, our official solution is the web workflow

manic glacierBOT
#

@gamblor21 Some notes based on our experiences with this in MicroPython:

Implement decompressing data streams via the zlib.decompressobj style function like in CPython.

The API for {decompress,compress}obj seems backwards to how I imagine most people want to use this (i.e. reading/writing compressed data to a stream/socket/file). I'm not convinced there's any value in implementing these for a microcontroller target.

GzipFile provides a much better interface.

Unfortunately Gz...

manic glacierBOT
#

Is there any way that I can help out in implementing this? I'm interested in using the ESB on the NRF52840 for a low latency HID project (BLE is capped at 7.5ms latency). I was looking at the Nordic's ESB protocol docs/examples and was hoping if I could implement it for circuitpython since @dhalbert seems to be busy implementing more important features 👍 . I own a NRF52840DK and the NRF52840 dongle if that is helpful at all.

Hi, have you gotten anywhere with this? I have a project I woul...

timber ivy
timber ivy
#

We got signal. Needed to manually set baud rate. And the web esp tool works.

manic glacierBOT
#

No, not in CirPy. We (me and TMRh20) made some progress as an Arduino Lib (C++). Checkout nrf_to_nrf. We also added support in the network layers' v2.0 (RF24Network and RF24Mesh) for the nrf_to_nrf lib. But that nrf_to_nrf lib is still in its infancy - no TX FIFO implemented and no interrupt support (both of which would depend on the RTOS used).


It turns out that the ESB protocol implemented in the nRF Connect SDK (& nRF5 SDK) cannot behave iden...

empty stirrup
#

[just curious, I was trawling the github repo] and couldn't figure out how code that crossed the python/C boundaries was being tested (e.g. bitbangio.I2C). Is there some magic workflow that's testing these in some other way?

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.1.0 on 2023-05-23; ESP32-S3-Box-Lite with ESP32S3

Code/REPL

#The default sdkconfig:
CONFIG_ESP32S3_SPIRAM_SUPPORT=y

CONFIG_SPIRAM_TYPE_ESPPSRAM64=y
CONFIG_SPIRAM_SIZE=8388608
CONFIG_SPIRAM_MODE_OCT=y
CONFIG_SPIRAM_SPEED_80M=y

CONFIG_DEFAULT_PSRAM_CLK_IO=30
CONFIG_DEFAULT_PSRAM_CS_IO=26

CONFIG_SPIRAM=y
CONFIG_SPIRAM_BOOT_INIT=y
CONFIG_SPIRAM_USE_MEMMAP=y
CONFIG_SPIRAM_MEMTEST=y

CONFIG_LWIP_LO...
desert tartan
#

What trips Halfkay mode in Circuitpython8.0 on Teensy 4.0

manic glacierBOT
tulip sleet
empty stirrup
tulip sleet
empty stirrup
#

got it - thanks for the insights!

jaunty juniper
#

was it Tekktrik who looked into using wokwi for things like library tests ?

tulip sleet
#

maybe - I don't remember

slender iron
#

I think it was

devout jolt
#

I use wokwi to for basic "tests" on how CirPy differs from normal Python, and for that it's very handy

manic glacierBOT
manic glacierBOT
#

One more comment. The clean refresh time is still incorrect.

I still disagree on that. I have two of these Inkys running here with my patch without any problems. It saves me 26s of update time without any problems.

I also have one running here with the 28s clean. Just like I posted a video of.

Can you please post some test-code that demonstrates the need for a refresh_time value of 28? If there is no code that fails with 2s then there is no reason to use 28s.

It's the cu...

empty stirrup
devout jolt
#

by hand, I use it to learn Python really

manic glacierBOT
manic glacierBOT
#

I don't have a ESP32-S3-Box-Lite to test with; but running CircuitPython 8.1.0 on an ESP32-S3-DevKitC-1-N8 I was able to see pulses correctly using the provided script. All I can suggest would be to make sure you are on the correct pin. Perhaps just using digitalio on the pin to verify? Something like:

import digitalio
import board
import time

pin = digitalio.DigitalInOut(board.G38)
while True:
    print(pin.value)
    time.sleep(.1)

Should show state changes when you use ...

manic glacierBOT
#

we tried to correct a related problem in #5541 -- in that case, it was reported that the returned value could be negative. It looks like there must still be a case where the returned value can unexpectedly be an erroneously positive number instead.

I think #5541 is probably a mistaken change; the comment above the original return statement outlines why the result of LPUART_TransferGetReceiveCount was not used to give the amount of data actually transferred.

`LPUART_TransferGetReceiv...

tulip sleet
#

@onyx hinge hi -- you had a comment about why I'm seeing merge conflicts for files like shared-bindings/canio/Message.h snd other files that have no counterpart in MicroPython. Something about them being copied?? Could you re-explain? I would like to have these not appear in the future.

onyx hinge
#

That seems familiar but I am not remembering right now

tulip sleet
#

not a big deal. I've dealt with them now, just merging them back to "ours". the other file is some random one.

onyx hinge
#

looks like there are ways to make merge not look for renames -- see man git-merge down at merge.renames and merge.directoryRenames.

tulip sleet
#

I'm not sure I want to suppress that in general...

#

I will keep chugging along for now.

#

these are spurious renames, and I was not sure how to understand the cause.

slender iron
#

@onyx hinge want to get my rp2040 usb host code going?

#

it is in my imx_usb_host branch

#

(just pushed it)

onyx hinge
#

I'll have a look -- that's in your fork?

slender iron
#

yup

onyx hinge
#

fetching .. looks like broadcom decided to update so it'll be a minute

slender iron
#

hrm, I didn't touch it at all. maybe you are fetching all of my branches 😬

onyx hinge
#

soemthing else to push?

$ git submodule sync; git submodule  update
fatal: remote error: upload-pack: not our ref 1e960631fb4237b18436435ad43ed0f826993d94
Fetched in submodule path 'lib/tinyusb', but it did not contain 1e960631fb4237b18436435ad43ed0f826993d94. Direct fetching of that commit failed.
#

yeah I asked git to fetch all from you

slender iron
#

lemme look

onyx hinge
#

do I need to switch tinyusb to your fork?

#

no, the origin remote is 'tannewt'

slender iron
#

looks like I have some debugging stuff in it

onyx hinge
#

OK advise what I should try next

slender iron
#

@onyx hinge try fetching from my tinyusb again. I pushed to a branch

onyx hinge
#

OK checkout works

slender iron
#

pushed another commit to the cp branch to include the tinyusb commit

onyx hinge
#

OK, I have a binary. what should I expect to work / not-work?

#

I won't get out HW right now but just wanna know where it makes sense to start working..

slender iron
#

you should be able to import usb.core and usb_host

#

the regular feather and feather usb host have board_init code for it

onyx hinge
#

I have the usb host feather

#

(but not in hand)

slender iron
#

I was able to get serial input via HID reports

#

code is in supervisor/shared/usb/host_keyboard.c

onyx hinge
#

the core takes over the HID device entirely, as it stands?

slender iron
#

yes but the pyusb api has functions to disconnect to and from the kernel

#

(I haven't tested it.)

onyx hinge
#

hah OK

#

if it was about writing python code to interact with a usb device I was thinking about biting off USB MIDI but that may not be a good idea

slender iron
#

you could try it

#

I'm doing code for the intellikeys

#

(and totally found an issue with ctrl_transfer)

onyx hinge
#

I'll play with that and see where it leads me, then.

#

that's the adaptive keyboard?

slender iron
#

it is very slow so I'm not sure its working exactly right

#

yup

onyx hinge
#

MIDI's also pretty time sensitive..

slender iron
#

intellikeys is ctrl transfer. I think midi would be interrupt

#

intellikeys firmware loading at least

onyx hinge
#

once I learn more about USB I'll be able to put that statement into context

onyx hinge
#

cool! you can hear all about my progress, or lack of, next week this time!

slender iron
#

want to video a bit to chat more usb?

#

before show and tell?

onyx hinge
#

just for a few minutes? I'm not on S&T tonight and I'm itching to go up and have dinner

slender iron
#

we don't need to if you feel like you are ready to poke at it

onyx hinge
#

I think either I'll be OK, or else just a few minutes video chat will not be enough to get me going. Leaning towards the former.

blissful pollen
#

Is the RP2040 USB host for CP still a WIP? had a thought on something to use it for whenever I get two minutes for projects again

onyx hinge
#

so I'll let you get prepped instead. make good use of your time away from all this!

slender iron
#

kk, we can just sync next week

onyx hinge
#

@blissful pollen I think if you tune in to S&T you'll get an update.

slender iron
#

@blissful pollen it is in progress but does seem to work now

#

see above for where to find it

onyx hinge
#

🤤 hungry, ttyl

blissful pollen
#

Thanks I think I have the stuff to wire up to a RP2040 device to try it out. Sadly haven't had much time / energy for projects the last couple weeks

slender iron
#

I've been in a lull too so I feel ya

manic glacierBOT
#

Bumping this because I'm eunning into it on a new (to me, and CircuitPython) esp32 dev kit, the M5Stick C Plus, and it affects both the LED and the IR, both for PulseIO and DigitalIo, for example, this will turn the LED on:

led = DigitalInOut(board.LED)
led.direction = Direction.OUTPUT
led.value = False

For things like digitalIO it's mostly just annoying and easy to work around. For trying to control IR devices, it makes the IR transmitter unusable. When I use pulseio on either...

slender iron
#

@onyx hinge one last cp push for you to snag. fixes the slowness

onyx hinge
#

yay!

lone axle
#

I've got blank lists for PRs and issues.

tulip sleet
tulip sleet
#

@idle owl not urgent, but the PAT issue seems to be showing up, or maybe this should be fixed now ^^

idle owl
idle owl
tulip sleet
#

I'm doing a re-run, but I'm not sure it will work.

idle owl
#

Keep me posted. I'll check in tomorrow. Thanks.

manic glacierBOT
manic glacierBOT
#

It's the currently checked in code.

I would like a code.py example that demonstrates failure.

Your 2s setting is interrupting the process.

Have you tested the busy-pin with the updated PSR setting? And what consequences does "interrupting the process" have? Visually, I see no difference between 2s and 28s: the display is doing nothing until the real update starts. After the clean, during the real update, this is different: the display is indeed flashing for about that time-perio...

manic glacierBOT
lone sandalBOT
timber mango
#

So I added CircuitPython support for an ESP32-PICO-D4 based board and built successfully. How do I know where to upload my new firmware file to?

#

I mean, what offset should I use?

#

0x0? 0x1000?

#

The build documentation doesn't seem too helpful in this regard.

#

I uploaded a different firmware with the web uploader that was obviously not designed for my board there's a terminal at least. Mine is just dead I don't know if it's the wrong offset or another problem with my code.

#

Yeah, it seems 0x0 works for other firmware. Well mine is just borked then. 🙃

brazen hatch
#

TinyUF2 is the complicated one not CP

tulip sleet
manic glacierBOT
idle owl
#

@tulip sleet Looks resolved. PRs etc are listed now.

#

Is GitHub down for anyone else?

#

Status is green across the board.

#

But git pull is doing nothing, and visiting in browser says server not found.

idle owl
#

Their system finally caught up.

tulip sleet
#

We're having a really bad day.

timber mango
#

I've checked over my code a few times, I can't figure it out.

tulip sleet
#

compare your board files with the other one, particularly the sdkconfig

timber mango
#

All I have in the sdkconfig file is the hostname. The other build has lots of lines about SPIRAM, but I don't have any so I didn't define it.

#

I'll take another look at my files.

tulip sleet
#

try the HUZZAH32 breakout build too, and make sure the serial lines you chose are correct

timber mango
#

I'm using an ESP32-PICO-D4, is that compatible with an ESP32 build?

idle owl
#

GitHub appears to be up again.

timber mango
#

I'll try building something that definitely works on my board and see if the build environment is the issue.

timber mango
#

Ah, thanks. I wasn't sure.

worn eagle
#

Any one know how to fix ESP_RESET in use error?

timber mango
#

Yep, looks like it's my build environment. A prebuilt binary that was previously working doesn't work after I build it.

#

Oh, hang on. I was uploading circuitpython-firmware.bin rather than firmware.bin. Well... now I just feel silly.

#

My code works perfectly fine.

manic glacierBOT
manic glacierBOT
#

@kub3let you could try changing CIRCUITPY_WEB_API_PORT in settings.toml to be a value other than 80 (guide page: https://learn.adafruit.com/getting-started-with-web-workflow-using-the-code-editor/device-setup#creating-a-settings-dot-toml-file-3125968)

Or you could use different names for your WIFI credentials inside settings.toml. If the core system can't find the credentials under those names then it won't start the web workflow server I think.

manic glacierBOT
timber mango
#

Is the web interface something you just get out of the board with CP 8.2.0 or do you need to enable something in the board config?

stuck elbow
timber mango
stuck elbow
#

I think it's enabled by default on supported boards

timber mango
#

Doesn't seem to be working on my build. Maybe it's something I did wrong. Not sure.

stuck elbow
#

what's the board?

timber mango
#

SQFMI Watchy. An ESP32 board. Something I just added.

stuck elbow
#

esp32 definitely has it enabled by default, otherwise it's a pain to interact with it

#

but setting up the wifi is still a bit of a pain

timber mango
#

WiFi connection is working.

stuck elbow
#

from settings.toml?

timber mango
#

Yes. It's got an IP address.

stuck elbow
#

then just go visit circuitpython.local from your browser in the same network

timber mango
#

That's the problem. It's not working, it just times out. Just trying to see if I need to enable something.

#

I'll check my sdkconfig

stuck elbow
#

I'm looking on other esp32 boards and they don't seem to have anything enabled explicitly in their files

timber mango
#

Hmm, I rebuilt and reuploaded. Seems to work now. Not sure if it's what I changed or the board just needed a hard reset.

stuck elbow
#

ah, yes, after changing the settings.toml, you need a reset

#

but if you got an ip address...

#

in any case, the setting is CIRCUITPY_WEB_WORKFLOW, you can add it to the .mk file if you want to be explicit

timber mango
#

I did reset several times, but I think that was just a soft reset. Well I don't know. I also changed my mpboardconfig.

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.2.0-rc.1 on 2023-06-27; Adafruit Feather ESP32-S2 TFT with ESP32S2

Code/REPL

import time

while True:
    print("Hello World!")
    time.sleep(1)

Behavior

Using a Web Workflow serial connection, pressing Ctrl-C does not work as expected. It occasionally works, but not most of the time.

Description

I verified that this works as expected in 8.0.0-beta.6, so it broke along the way. I'm pretty ...

tulip sleet
#

@onyx hinge @slender iron My plan is to wait until Wed July 5 for 8.2.0 final, given that Jeff was mostly off today and it would be good to have normal coverage for the stable release.

onyx hinge
manic glacierBOT
manic glacierBOT
#

Add support for more configurations of shift registers to be used, mainly a shift register matrix with GPIO outputs and shift register inputs;

How do you mean this? I have a board where I have 4 HC165 in parallel, sharing the same CLOCK and LATCH, but each on a different DATA. To make this supported I was thinking about adding a function ShiftRegister.addDataPin(data: microcontroller.Pin, keycount: int) that would resize scanarrays and increase the key_count after the initial set-up....

manic glacierBOT
#

CircuitPython version

CircuitPython 8.2.0 Release Candidate 1

Code/REPL

no code

Behavior

Circuitpython FW DFU flashing fails and is not working

Description

download 8.1.0 and 8.2.0-rc1
plug in usb and double tal reset for DFU
move 8.2.0-rc1, see copy process work until 80% and abort connection with a file copy error (donwloaded and checked the file integrity)
move 8.1.0, see copy finish normally and circuitpython launching

Additiona...

manic glacierBOT
#

This is actually due to a bug in the UF2 bootloader on the board. Double-click to get to the FTHR840BOOT drive, and check the bootloader version in INFO_UF2.TXT. It is probably 0.2.6 or 0.2.9. Any version below 0.6.1 cannot load UF2's that contain more than 512kB of payload. CircuitPython 8.2.0 is more than 512kB.

To update the bootloader, follow the instructions here:
https://learn.adafruit.com/introducing-the-adafruit-nrf52840-feather/update-bootloader

The Arduino method is probably ...

orchid basinBOT
orchid basinBOT
#

Is it worth providing a note here like the one you'll put in the release notes? I don't know if you have written that language yet but something like

TinyUF2 bootloaders below version 0.6.1 cannot load CircuitPython 8.2.0. Many boards are factory programmed with an older TinyUF2 version. In bootloader mode, check your TinyUF2 version by looking in the file INFO_UF2.TXT and upgrade if necessary.

orchid basinBOT
onyx hinge
#

ah OK I don't know the difference between TinyUF2 and the others .. I guess some ports were made before the "tinyusb-ification" that made porting easier?

tulip sleet
#

Adafruit_nRF52_Bootloader does use tinyusb

timber ivy
#

@tulip sleet you pointed out that the M5StickC-Plus LED outputs are active low, is there a standard way to deal with that so things like PulseIO work properly? I'm pretty new to this.

timber mango
#

Can I put my own board specific library in the firmware by default?

manic glacierBOT
stuck elbow
manic glacierBOT
tulip sleet
#

Most of the time for simple GPIO-driven LED's, you can just invert the logic in the program.

kind river
#

Any interest in a port for the ESP32-S3 on the new UNO R4 wifi? I'm currently running the devkit port on it and starting to work on a library for the RA4M1's UART bootloader.

tulip sleet
#

You could try one of the existing builds for that module.

#

espressif_esp32s3_devkitm_1_n8

manic glacierBOT
#

This change adds skip_self_index argument to bitmap.blit() this argument functions similarly to the existing skip_index argument, but instead of checking in the source bitmap it checked inside the self (destination) bitmap and if the index at the current location is this value then it will get skipped instead of overwritten from the source.

This allows bitmap.blit() to be used to provide a pretty significant speed up in this example script which is using a process called "morpholog...

kind river
tulip sleet
kind river
tulip sleet
#

are you interested in the board because it's 5v? Otherwise it's just kind of an engineering challenge/puzzle

kind river
#

Mainly so I can run realtime control and sensor fusion for IMU corrected steering in arduino. The 5v is also handy for Pololu's sumo bot

tulip sleet
#

have you chosen an existing protocol for communication between the two processors, or are you doing something bespoke for your purposes? (I mean higher level than SPI or whatever.)

kind river
#

I need to dig into the SCI pins and see if I can do SPI or just UART over the shared pins and look into existing RPC solutions once I get program loading working

#

my eventual goal is to write some wrappers that will let me basically just call exposed arduino functions from circuitpython but that's a ways off

tulip sleet
#

one more note: we have been trying to label pins that are (unusually for the application) the opposite of what one would expect. We add the suffix _INVERTED on the pin name. So the M5StickC-Plus LED pins would be LED_INVERTED, etc.

manic glacierBOT
#

I think the nrf change is buggy. It's a 14 bit value but it always has bits 0 and 1 as 00 because the ADC is 12bit in this mode of operation. I noticed this from some real tests (everyone needs a hobby):

Adafruit CircuitPython 8.1.0 on 2023-05-22; Adafruit CLUE nRF52840 Express with nRF52840
>>> import board, analogio
>>> adc = analogio.AnalogIn(board.P4)
>>> value = adc.value  # Measure AA battery
>>> conversion = adc.reference_voltage / (2**16 - 1)
>>> value = adc.value   # M...
timber mango
#

How long do these usually take to get addressed?

jaunty juniper
#

it's still good to fix the type hints, provided it works, though I suspect it actually needs to be converted to int after converting to seconds or there might be some precision loss later

timber mango
#

Oh, huh you're right. Well it must've been something else then? mpy-cross do anything with these hints does it?

jaunty juniper
#

nope it's all discarded

#

are you getting an error ?

timber mango
#

Yeah, it's half an hour off when I pass in the timezone. UTC is correct.

#

I'll take a look at my code...

jaunty juniper
#

I think you'll want line 59 to say

self._tz_offset = int(tz_offset * 60 * 60)
timber mango
#

Yeah, that seems to fix the inaccuracy.

#

But hmm, it shouldn't have been that bad???

jaunty juniper
#

Circuitpython floats are 30 bits, which makes the math later lose precision

timber mango
#

Anyway I guess I need to push the commits to my branch and submit a new pull request? I'm not really an expert in this kind of Git.

jaunty juniper
#

as the epoch timestamps are generally larger than what fits a CP float (which is why time.time() is an int for example)

#

you can push on your branch, it will update the pull request

timber mango
#

Uh, done. Did that work?

midnight ember
#

tz_offset is supposed to be an int? didn't even know there were offsets that required a float.

#

offsets are usually unix offsets in seconds like minus or plus hours done in seconds.

timber mango
#

The parameter is passed to the API as an hour, so it's obviously going to need a float.

jaunty juniper
#

it's assumed to be an int in the code

timber mango
#

Anyway the docstring below says it's a float.

midnight ember
#

weird, maybe docstring is incorrect?

jaunty juniper
#

the issue is that math later, that becomes wrong because the sum is made a float, losing precision

            self._monotonic_start = (
                seconds
                + self._tz_offset
                - NTP_TO_UNIX_EPOCH
                - (destination // 1_000_000_000)
            )
midnight ember
#

ah yes if using monotonic seconds sometimes aren't really truly seconds

timber mango
#

I was talking about the NTP module init function.

#

Ah, sorry.

midnight ember
#

i've never used ntp library, nvm

jaunty juniper
#

CP floats be like that:

>>> 3897377815
3897377815
>>> f"{3897377815.:f}"
'3897376768.000000'
>>> 3897376768 - 3897377815
-1047
timber mango
#

Maybe we should just... pass the argument in seconds in the first place?

jaunty juniper
#

that would be an API breaking change, I prefer fixing float values

timber mango
#

Yeah, true.

jaunty juniper
#

PR tested and approved, someone will come and merge and release (maybe not now, it's ID4 weekend for some people)

timber mango
#

It just feels kinda dumb that I converted the UTC seconds offset to an hour float with division only for this library to convert it back again, with all that accuracy loss. 😆

#

Anyway... I suppose I could just do a hack of setting the _tzoffset property directly. 🤔

jaunty juniper
#

eh the resulting seconds don't actually lose accuracy

timber mango
#

Ah yeah, it's the same, I tried it.

#

It's more the conversion later then.

jaunty juniper
#

yeah, it's big numbers

#

3600 * timezone is not big enough

timber mango
#

Any advice or merging a new board definition in? Defs are done and nearly done making a custom library for it.

jaunty juniper
#

um make sure to run pre-commit I guess ?

timber mango
#

Will do, well, thanks for floating a pull request for me.

#

I love it how whoever made this guide assumed there was absolutely no possiblility your board wouldn't have a status LED, probably several! 😆

onyx hinge
#

@timber mango thank you for the PR! I'm glad you & @jaunty juniper got to the root of the problem.

@midnight ember there are not only half-hour offset zones but also at least one quarter-hour offset zone (Nepal).

tulip sleet
#

<@&356864093652516868> Anti-reminder that there is no CircuitPython discord meeting today, due to the US holiday tomorrow. The meeting will resume next week, on Monday, July 10.

midnight ember
#

didn't know that, should still be able to do offset in seconds though even with a float.

#

my only experience with tz offset is with requests library stuff. using seconds for offset is very easy. converting fromfloat to int back to float with ntp module seems unintuitive in comparison?

jaunty juniper
#

yeah as long as we don't have millisecond time zones we should be set for now 😉

#

I'm thinking if a x * 3600 could result in a float ending in 999.99999 dropping the last second in conversion, maybe we should use round() instead of int() but it doesn't seem to be the case anyway

errant grail
manic glacierBOT
onyx hinge
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.2.0-rc.0 on 2023-06-23; Raspberry Pi Pico W with rp2040

Code/REPL

import time
import wifi

time.sleep(3)  # wait for serial
ap_ssid = "PicoWAP"
ap_password = "picow1234"
print("Stopping station mode.")
wifi.radio.stop_station()
print("Starting AP mode.")
wifi.radio.start_ap(ssid=ap_ssid, password=ap_password)
print("Access point created with SSID: {}, password: {}".format(ap_ssid, ap_password))
print...
manic glacierBOT
#

ROS - the Robot Operating System - is a powerful open source collection of software for the development of advanced robotics. The core appeal of the system is that it can tie many different pieces of robotics software together across a shared network, such as navigation, prediction, machine learning, motor control, etc, without needing a bunch of custom communication software. This is obviously super important for commercial robotics teams, but it's also used by smalle...

brazen hatch
#

Uhh, I never quite.. Noticed..

#

v0.3

manic glacierBOT
manic glacierBOT
#

Given that the MicroPython isn’t currently supporting any of the rtl chips (they supported the ameba boards at some point but I don’t see it in the ports anymore), it’s probably not likely unless Realtek adds support themselves. Having worked on Realtek chips, there’s quite a bit behind NDA that could be a hurdle for being support.

lone axle
#

is there a comprehensive listing anywhere all modules that are possible to enable/disable with these flags in the .mk file? https://learn.adafruit.com/building-circuitpython/customizing-included-modules Or anywhere that lists the size of those modules to help someone trying to make a build with certain module figure out what is best to cut based on their needs and the size of the modules?

brazen hatch
#

You can pretty much disable everythin. Some just need others to be disabled too.

#

A dependency chain if you will.

jaunty juniper
#

the list of what can be enabled/disabled in mpconfigboard.mk is pretty much the things in py/circuitpy_mpconfig.mk

#

then there's the .h

brazen hatch
#

I cannot, emotionally, physically or spiritually fix this.
Left is esp32, right is esp32c3. Same files.
C3 just decided to just ignore all .flush and not print out the line. The line only shows up after you start typing.

#

How does one man bugreport this even. It's not my stuff. it works on all other mcus. But I have no hope of singling it out.

#

Of course in repl the virtual console works fine. C3 is gonna be the end of me.

plucky tulip
#

Does anyone know whether ESP32-S2 have a limit on open sockets, or maybe CircuitPython limits them? I am working on Server-Sent Events on adafruit_httpserver and maximum number of connected client I can have is two, then the server does not accept connections, like it does not have available sockets.

EDIT 1: To be precise a am saving open sockets to a list. If there are more than two clients, server does not respond, if I disconnect one, responds normally. Considering that one socket is reserved for served the theoretical limit I am facing might be 3 not 2.

EDIT 2: If I create 3 separate servers, none of them respond to requests. 2 servers respond normally. Behaves similar to problem with SSE.

crimson ferry
#

@plucky tulip is web workflow enabled?

plucky tulip
#

yes

crimson ferry
#

that's eating up something, checking to see if I can give a better answer...

plucky tulip
#

I will test how it behaves with web workflow disabled

crimson ferry
#

I get stream=8, dgram=8, raw=8 (w/o web workflow)

#

CONFIG_LWIP_MAX_SOCKETS=8

plucky tulip
#

With web workflow enabled max 3 servers, but web workflow does not work.
Without web workflow same.

2 servers work with and without web workflow.

crimson ferry
#

web workflow and servers use different ports?

plucky tulip
#

yes, web workflow on 80, servers on 5000, 8000, 9000

#

no matter what 4th connection does not work

crimson ferry
#

I get 7 sockets with web workflow on (stream, dgram, or raw... same)

#

maybe there is some other limit

#

listen is one, each accept is (presumably?) one

#

(https requests use two each)

#

could run the socket counter after each accept to see how many are left

plucky tulip
#

each server closes socket after sending response, so they do not stack

crimson ferry
#

curiouser and curiouser

plucky tulip
#

keeps alive the listen one though

#

I wonder whether it is a hardware limit or a software lock, either way, 8 != 3

crimson ferry
#

if something was leaking sockets, I think we'd expect that after several iterations, no connections could be made

#

the stable 2 connections is... interesting

#

not even simultaneous

#

listen(1)?

plucky tulip
crimson ferry
#

hmmmm:```
CONFIG_LWIP_MAX_ACTIVE_TCP=4
CONFIG_LWIP_MAX_LISTENING_TCP=4

plucky tulip
#

well, at least it is good to know that is is not user error what I am experiencing, the 4 max sockets kind of limit the usage of SSE to only one client (each client needs an open socket), because one is for server and one for incomming requests, maybe the 4th one is used somewhere else or simply this limit is sockets<4

#

Thank you @crimson ferry for you help! adabot

manic glacierBOT
#

It is on my plans to learn ROS. The idea to use an ESP32 with CircuitPython for reading sensors and send to ROS, is great!! Even because if I understand correctly, ROS can be programmed in Python also.

Note that CircuitPython do not support Bluetooth on ESP32. The wireless communications can then be wifi or ESPNow. I am being using ESPNow on CircuitPython and works very well.

empty stirrup
onyx hinge
#

@tulip sleet did you intend to close #8135 vs leaving it open as long-term?

tulip sleet
#

i did not intend to close it, thanks.

onyx hinge
empty stirrup
#

Ah! Thx for the tip.

onyx hinge
#

and thank you for the contribution.

empty stirrup
#

It's a fantastic project - thanks to all of you

onyx hinge
#

Is there a non-blocking stdin read in circuitpython? usb_cdc.console because the goal is to use any console-ish source of input, such as a USB HID keyboard with USB host..

tulip sleet
onyx hinge
#

OK maybe something will need to be added..

tulip sleet
onyx hinge
#

@tulip sleet I'd like to keep it open at the moment but move it to long term

tulip sleet
#

done

onyx hinge
#

thanks

#

@tulip sleet select.poll works with sys.stdin, which will read a char from USB CDC 0 or from the USB HID keyboard attached on USB host.

#

so a nonblocking or timeout read can be created based on poll

tulip sleet
#

Great! I didn’t know select was functional

tulip sleet
#

@onyx hinge @slender iron I could make 8.2.0 final today. There are a few new bugs noted, but nothing I see that is a showstopper. What think you?

onyx hinge
#

@tulip sleet it's fine by me, I don't have anything that I'm working on for 8.2.0.

manic glacierBOT
#

The more recent commits in this branch have refactored bitmap.blit() function out of the Bitmap class in displayio and over into the bitmaptools module. It now accepts two Bitmap arguments instead of using self as destination bitmap.

I made that move because adding this new functionality inside of the Bitmap class in displayio caused a few of the SAMD21 builds in some languages to go over the size limit.

The devices that had problems already seem to have bitmaptools disabled, so ...

onyx hinge
#

@idle owl do you know if all our circuitpython projects have "adafruit-travis" as the maintainer? seems weird. I was trying to figure out who/what to add as a co-maintainer for a pypi project I need to put under adafruit control

idle owl
#

Wait that's RTD

#

I accepted the invite.

onyx hinge
#

@idle owl are you able to accept the invitation "[PyPI] jepler has invited you to join the g722-1-mod project" that you probably got in your adafruit e-mail? the link doesn't work for me but I don't think I have access to log into pypi with that account.

#

thank you!

manic glacierBOT
#
[adafruit/circuitpython] New branch created: 8.2.x
#
[adafruit/circuitpython] New tag created: 8.2.0
orchid basinBOT
tulip sleet
idle owl
#

Yeah it is.

#

I was thinking RTD.

#

I'm going to see if the PyPI folks can help with a username update, but it's a huge manual process, so the only way they could help is if they have some way to bulk add a maintainer to a huge list of projects. Based on the username-change issues on GitHub, I imagine they do not.

#

Worth asking anyway.

tulip sleet
#

I don't think it's that important, because it isn't tied to github.

idle owl
#

It bugs me. 😄

tulip sleet
#

i have the credentials, I assume you do too

idle owl
#

Yes.

onyx hinge
#

did we ever look into whether pypi organizations help us? wasn't that announced at pycon2023?

#

I mean there is probably still a terrible manual procedure to suffer through but

tulip sleet
#

I asked for it or voted for it or something. Yes, we could start to use that

onyx hinge
#

no, autocorrect, I was not searching for information about "pipe organ"

idle owl
#

Yes they're in the settings.

tulip sleet
#

I am quite willing to work on transitioning to that, maybe using RTD and github as models. I am willing to do the tiresome click work.

idle owl
#

I want to ask about the username thing first, please.

#

Because the only way to do it is create a new account.

onyx hinge
#

sure, I don't want to step on any toes here

idle owl
#

I don't want to get this all set up and have to do it again.

slender iron
#

@tulip sleet thanks for making 8.2. It was fine with me. I was busy with daycare stuff.

#

still on Ari duty while he naps until Becca's parents get back

tulip sleet
#

yw - no surprises since last week

slender iron
#

👍

onyx hinge
onyx hinge
#

I found some very minimal editor to build on, github has everything 🙂

slender iron
#

I was thinking you'd track the start of the keypress and the last time you emitted one.

#

Then when you get a "is there something?" or "give me the next char" you'd check the repeat

onyx hinge
#

hmmmm so move the repeat logic into the receive side instead?

slender iron
#

ya

onyx hinge
#

instead of that code running on the other core, hm

#

I'm not immediately in love with that idea, but I will keep it in mind..

slender iron
#

I don't think the HID report to serial code is running on core 1

#

it runs in tuh_task on core 0

onyx hinge
#

oh, I thought the usb host was on core 1...!

slender iron
#

core 1 is doing low level host stuff

onyx hinge
#

oh okay

slender iron
#

basically that a peripheral would do

#

every 1 ms send the usb packets and then queue stuff into tinyusb from the "interrupt"

slender iron
#

@onyx hinge how do you switch between running your code and editing it?

onyx hinge
#

@slender iron that's not implemented

slender iron
#

😄

#

first things first 🙂

onyx hinge
#

Thank you Dan! So excited for this new release, it is yet another great step for audio synthesis especially on rp2040.

manic glacierBOT
#

It's the currently checked in code.

I would like a code.py example that demonstrates failure.

As far as I know, they all should. The clean code is part of the C module and every refresh.

Your 2s setting is interrupting the process.

Have you tested the busy-pin with the updated PSR setting?

No. I have no idea why rotation would effect the refresh time.

And what consequences does "interrupting the process" have?

I don't know what the consequences are b...

tulip sleet
manic glacierBOT
cunning orchid
#

Out of curiosity, is https://github.com/adafruit/circuitpython/issues/4106 mainly waiting for someone to diff with MicroPython, and test? Or is the idea to wait until the threading API stabilizes more before even thinking about PRs?

I ask because I may look at poking at it once I grab a Pico W and an ESP32-S3 board, supposing the API stability isn't a blocker.

I've also been thinking about going a route similar to what was mentioned in the issue thread and treating the second CPU as a co-processor, rather than first-class CPU and providing a Python API as well as maybe a Rust/C API (I've become rather enamoured with Rust on embedded after seeing how easy it was for a POC on a SAMD21) to assign it async tasks.

GitHub

The Pi Pico has 2 physical cores, but only one core is usable in CircuitPython. Micropython has limited multicore functionality when used with the pico, allowing the user to start a separate task w...

onyx hinge
slender iron
#

while we haven't worked on the python api, we have recently started using the second core internally for picodvi and (soon) usb host

cunning orchid
slender iron
#

it doesn't really help solve the issue of code location and communication between processors

#

since those two examples use code compiled into the binary

#

the closest existing APIs for circuitpython is the ULP coprocessor API for ESP and the PIO API on rp2040

cunning orchid
#

Will take a look at those, thanks!

slender iron
#

here and the issue are the best places to discuss

#

(though the issue has some unproductive people involved)

timber mango
#

Can I include a default code.py with a CircuitPython build?

slender iron
#

there is a simple hello world on put into the build

#

but not from a separate file

jaunty juniper
#

but if you want specifically to make a uf2 with default files, on many ports you can save the flash into a UF2 that will then install everything when flashed on a board

#

so you prepare the content you want on a live board, save the UF2, and distribute that

#

the content of the flash won't survive a erase_filesystem, but the UF2 can be reapplied instead

timber mango
#

So are you talking about flashing them with a build before distributing or it that something I should include in the board definition?

jaunty juniper
#

yeah flash them with a build on manufacturing

timber mango
#

Ah, well no probs then.

onyx hinge
#

@slender iron earlier elsewhere I mentioned I was seeing spontaneous resets from the USB Host feather but now I wonder if it wasn't just me bumping the magnetic USB cable. I'll try again with a non-magnetic cable and see if it keeps happening

jaunty juniper
#

UnexpectMaker distributes his boards with default files, but he might just have a script that copies them over mass storage, I think his test jigg uses a Raspberry Pi

#

you can ask him on his discord

#

other that that you can do picotool save --all my_full_board.uf2 for RP2040
and esptool can get you a dump of the whole flash as a bin

timber mango
#

Yeah, I might do that. I was checking out his builds for clues but I don't see anything out of the ordinary so he's probably just putting the files on after the fact.

jaunty juniper
#

also kattni has some script that she uses to help flash and prepare boards that she takes to conventions and stuff for workshops

#

but that's probably not practical for production quantities

timber mango
#

(I mean, I just realised that I could put some sneaky bootstrap into the init code in board.c, it's just a matter of whether I should.)

empty stirrup
#

[ apologies if I missed an existing answer] - is there an existing CP library to run ML inference? If not, is there someone currently working on something like this?

tulip sleet
empty stirrup
#

Ack - thanks for the info!

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

the current content seems to be:

    config ESP_PHY_ENABLE_USB
        bool "Enable USB when phy init"
        depends on USB_OTG_SUPPORTED || IDF_TARGET_ESP32C3

which is different than either side of #5858. It may have been changed by

commit d3d5e36548fdaf7b0d3b7bce7861986ed8080829
Author: Dan Halbert <halbert@adafruit.com>
Date:   Tue Aug 2 22:37:06 2022 -0400

    update adafruit/esp-idf for ESP32_ECO3_CACHE_LOCK_FIX fix

and/or

commit 96dd11a1986ad990...
manic glacierBOT
manic glacierBOT
manic glacierBOT
slender iron
#

@onyx hinge I'm at my desk now if you want to sync up on usb host stuff

onyx hinge
#

@slender iron sure. I went down a non-circuitpython rabbit hole this afternoon but I can wrap that up in 10 and then get on video with you.

slender iron
#

👍

onyx hinge
#

@slender iron thanks for your patience, i'm at my desk now

idle owl
#

@onyx hinge @slender iron I have a question about the swirly grids. Product copy says "you can pretty much make anything on a 0.1 grid fit". The separate usage of "grid" there is confusing me a bit, and will ultimately confuse others. What is that sentence trying to say? Can you please assist with wording it better?

onyx hinge
#

@idle owl I'll try

idle owl
#

Thank you

onyx hinge
#

You know about placing things "on the grid" in fritzing, right?

idle owl
#

Ohhhh

#

Yes

onyx hinge
#

"on a 0.1 grid" means "if everything was placed on that kind of grid, like in an art or drafting program"

#

but I do not know a good way to explain that to humans who don't draw the connection

idle owl
#

Uff. ok.

#

Yeah, neither do I yet.

onyx hinge
#

Most boards with hole spacing that is a multiple of 0.1 inch will fit on the swirly grid

#

This includes Feathers, FeatherWings, and most Stemma QT boards

#

an examples of things that are NOT on an 0.1" grid would be arduino/metro

#

an example NOT on a 0.1" grid, because the horizontal distance is 1.15in ..

slender iron
manic glacierBOT
#
#

Added support for multiple data pins which share the same latch and clock, e.g.

k = keypad.ShiftRegisterKeys(
    clock=board.GP3,
    data=[ board.GP10, board.GP0 ],
    latch=board.GP2,
    key_count=[ 32, 16 ],
    value_when_pressed=False,
)

Backwards compatible, data can also be a single pin instead of a list. The key_count numbers are consequetive, e.g. in the example the first key of GP0 will have number 32.

onyx hinge
#

of course devkitC3 has an S3 on it. 🤯 sorry for confusing that issue further.

manic glacierBOT
#

I think this might be to do with the byte compiler - code is dynamically compiled as the script runs so I wonder if the "code for a range" or "code for a for function" is taking up that memory
If you put all the code above in a function, then the memory usage stays static:

from gc import mem_free, collect
from sys import stdout

def primem():
    collect()
    a = mem_free()
    stdout.write(str(a))
    del a # a is used to not account for the str() in ram

stdout.write(...
idle owl
#

@onyx hinge @slender iron Another swirly grid question. Do either of you have any tips or tricks about them yet? A page of them is to be included in the guide, and I am wondering if there's anything to include, or simply make it a placeholder for now.

#

I figured out that, if done carefully, you can push the STEMMA QT cable connectors through the slots. Means it's easier to mount things on both sides, or create a cleaner look on the top. I'll add that at least.

onyx hinge
#

I .. haven't actually used the swirly grid yet for a "real project"

#

but that sounds like a good idea

manic glacierBOT
#

@casainho I have both the N32R8 board and the N8R2 board. If you look on the tin case of the module in the lower left, there is a stamping that includes either N32R8 or N8R2. Could you look at the the one that you have and see what it says. Also the N8R2 says ESP32-S3-WROOM-1 on the N8R2 board, and ESP32-S3-WROOM-2 on the N32R8 board.

I am not sure which line is causing the issue from the screen shots. Could you give me a source link to the line in the repo? Click on the line number to get...

slender iron
ornate breach
#

but pretty impressive regardless

#

one small hiccup that's easy to remedy

slender iron
#

I think it's fixed after the second prompt

ornate breach
#

Enum looks good

#

just the yaml table has that one small issue.

manic glacierBOT
manic glacierBOT
#

@casainho I have both the N32R8 board and the N8R2 board. If you look on the tin case of the module in the lower left, there is a stamping that includes either N32R8 or N8R2. Mine identify properly in lsusb. Could you look at the the one that you have and see what it says? Also the N8R2 says ESP32-S3-WROOM-1, and ESP32-S3-WROOM-2 on the N32R8 board.

lsusb says "303a:7003 Espressif ESP32-S3-DevKitC-1-N8R2", so I guess that plugin for Visual Code Studio is showing the wrong data.

Pict...

stuck elbow
manic glacierBOT
digital shoreBOT
#
adafruit
Owner

.adafruit#0

Category Channels

8

Text Channels

63

Voice Channels

7

Members

37502

Roles

38

manic glacierBOT
manic glacierBOT
onyx hinge
slender iron
#

@onyx hinge the hid protocol does have a spot for country code

onyx hinge
#

@slender iron was it only in a dream that you coded an in-place base64 decoder, that re-used the input area as the output?

slender iron
#

I did! in the web workflow file

onyx hinge
#

oh for password?

slender iron
#

yes....

#

I think so

onyx hinge
#

doh, my greps weren't finding things because I was bisecting a problem and was in some early 2022 commit

#

_base64_in_place(_api_password, strlen(_api_password), sizeof(_api_password) - 1);

slender iron
# manic glacier

@tulip sleet this might be the issue the person is having on the odroid go

#

(zero byte settings.toml)

onyx hinge
#

@slender iron uff .. what's happening with zero-byte settings.toml?

slender iron
#

and I suspect that might be the issue with odroid go too

#

may be worth testing it with an empty file

onyx hinge
#

was there a particular clue that leads you to this line of thought?

#

shared/filesystem.c: make_empty_file(&vfs_fat->fatfs, "/settings.toml"); many devices have empty ones

slender iron
#

ah, I didn't realize we made it

#

I was bringing it up based on the last comment of the issue

#

I don't think I've tested an empty one myself

onyx hinge
#
From e8c7b4a9f4d448dd5ecee5ba9ea7c46161e7c2e9 Mon Sep 17 00:00:00 2001
From: Jeff Epler <jepler@gmail.com>
Date: Fri, 7 Jul 2023 11:28:42 -0500
Subject: [PATCH] test a zero-byte environment file

---
 tests/circuitpython/getenv.py     | 2 ++
 tests/circuitpython/getenv.py.exp | 1 +
 2 files changed, 3 insertions(+)

diff --git a/tests/circuitpython/getenv.py b/tests/circuitpython/getenv.py
index 68dd328cfb..f01189a551 100644
--- a/tests/circuitpython/getenv.py
+++ b/tests/circuitpython/getenv.py
@@ -72,6 +72,8 @@ def run_test(key, content):
         print(key, str(e))
 
 
+run_test("key", b"")
+
 for i in range(13):
     run_test(f"key{i}", content_good)
 
diff --git a/tests/circuitpython/getenv.py.exp b/tests/circuitpython/getenv.py.exp
index ba1b1b3f90..925dafb469 100644
--- a/tests/circuitpython/getenv.py.exp
+++ b/tests/circuitpython/getenv.py.exp
@@ -1,3 +1,4 @@
+key None
 key0 'hello world'
 key1 7
 key2 '\n'
-- 
2.39.2

```I just wrote a test  for an empty settings.toml and it didn't immediately turn up a problem
slender iron
#

👍

onyx hinge
#

urgh I have to stop worrying about making this the ultimate keyboard mapping and just consider that I can probably write something good enough... (like support for dead-keys and shift-altgr ... altgr support is needed for e.g., {} on french keebs though)

slender iron
#

🙂 ya, its a tricky balance

#

maybe focus on the languages that we support already

manic glacierBOT
#

@tannewt wondered if this could be a cause of instability. Many boards in the wild are probably running with an empty settings.toml, since formatting the CIRCUITPY drive creates one

shared/filesystem.c:        make_empty_file(&vfs_fat->fatfs, "/settings.toml");

but it also wouldn't hurt to add a test for it in the core tests.

This also adds an expected-result file for the test basics/string_format_error, because the behavior of the test under python 3.11.2 (debian bookworm) dif...

tulip sleet
slender iron
#

no, I didn't

timber ivy
#

FYI, I was able to build 8.2.0 proper for my M5Stack Stick C Plus this week and test it out. Would you like me to start building out a board page for it in circuitpython-org?

tulip sleet
slender iron
tough flax
#

Hey! That's awesome, @slender iron !

#

I didn't know the host API was done!

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.1.0 on 2023-05-22; Adafruit Feather ESP32-S3 TFT with ESP32S3

Code/REPL

import board
import audiocore
import audiobusio
import digitalio

import busio
import storage
import adafruit_sdcard

import os
import sys
import time

print("start")
spi = board.SPI()
cs = digitalio.DigitalInOut(board.RX)

print("connect")
sdcard = adafruit_sdcard.SDCard(spi, cs)

print("VfsFat")
vfs = storage.VfsFat(s...
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

I wonder if this has any relation to #8041
On adafruit_feather_esp32s3_tft, or on S3 Box Lite, I've tested, but none of the problems described in that article occur.
However, the cause of the problem may be really similar.

In addition, my problem will also appear on 8.2.0.
Adafruit CircuitPython 8.2.0 on 2023-07-05; Adafruit Feather ESP32-S3 TFT with ESP32S3.

slender iron
thorny jay
#

Hi, is it possible that the toml parsing and os.getenv does not work on Trinket M0?
At least that is what my test comparing behavior on M0 and RP2040 reveal.
It would make a lot of sense if there is no space left for that on M0, but how am I supposed to know if it is available or not? Both seems to implement "os".

onyx hinge
#

@thorny jay yes, it's not supported there. no, the docs don't reflect it well.

#

if "well" means "at all"

#

due to technical limitations we don't have a way to put individual functions in the support matrix

thorny jay
onyx hinge
#

whee now you can type on a french-layout keyboard (among hopefully many others) with a USB keyboard & CircuitPython in USB host mode! but it depends on Scott's ongoing not yet merged work too .. https://github.com/tannewt/circuitpython/pull/19

manic glacierBOT
#

CircuitPython version

8.2.0

Code/REPL

# weather station for disabling automatic sprinklers
# https://learn.adafruit.com/weather-wise-wifi-umbrella-stand/code-install-walkthrough
import os
import ssl
import microcontroller
import board
import wifi
import socketpool
import adafruit_requests

if __name__ == '__main__':
    def connect_to_network():
        #  connect to SSID
        wifi.radio.enabled = True
        wifi.radio.connect(os.getenv('...