#circuitpython-dev

1 messages · Page 15 of 1

onyx hinge
#

the brew page said something about being able to alias it as make but I didn't read that part for comprehension

idle owl
#

Heh yeah

#

It's a thing

#

That I don't know how to do without explicit instruction.

#

Do I need new make? Uff, probably.

#

I have an existing PATH somewhere, and it's not in my .bashrc which is where the instructions tell you to add PATH="$(brew --prefix)/opt/make/libexec/gnubin:$PATH" to alias it. I am confuse.

manic glacierBOT
#

I was working with Kattni, who eventually ran into trouble building CircuitPython:

make BOARD=raspberry_pi_pico
...
../../py/qstr.h:42:14: fatal error: genhdr/qstrdefs.enum.h: No such file or directory
   42 |     #include "genhdr/qstrdefs.enum.h"

We eventually established that:

  • she's on a mac, so make --version is 3.81
  • brew install make got her gmake --version of 4.3. Then, using gmake BOARD=... worked across 3 full builds
  • I built 3.81 on my linux box, an...
idle owl
#

Found it.

#

💃🏻 Worked!

onyx hinge
#

that's good, because you know you're likely to end up working on the guide text

onyx hinge
#

the part I didn't say is that you know you're well-suited to writing stuff like that up

manic glacierBOT
manic glacierBOT
#

I tested this on the same board. I added a little code to the test program to turn on the LED for two seconds before sleeping to make sure I knew when the program was running.

  • If I set value=True, jumper D12 to GND, and hard reset, then, as reported, the "Pretending to deep sleep..." does not show up until after I move the jumper to 3V to wake things up. If I leave the jumper on 3V then it loops waking up and "Pretending", as expected.
  • If I set value=False, jump D12 to 3V, and har...
onyx hinge
#

I didn't get the multitouch stuff to work but I didn't try too hard.

manic glacierBOT
proven garnet
#

What's more beginner friendly - requiring an input be str or calling str() on inputs to turn them into strings?

random junco
#

the latter

proven garnet
#

Context is they provide something to be pasted to a site like PasteBin

crimson ferry
#

hmm...```py

os.statvfs("/")
(512, 512, 1881, 1665, 1665, 0, 0, 0, 0, 255)
storage.erase_filesystem(extended=True)

[20:23:34.895] Disconnected
[20:23:44.929] Connected

os.statvfs("/")
(1024, 1024, 2348, 2344, 2344, 0, 0, 0, 0, 255)

copy half a meg of files to CIRCUITPY

os.statvfs("/")
(1024, 1024, 2348, 2344, 2344, 0, 0, 0, 0, 255)

onyx hinge
#

is the statvfs information cached or something?

#

I could see that being the case

crimson ferry
#

ah, after a[nother] reset, it updates```py

os.statvfs("/")
(1024, 1024, 2348, 1681, 1681, 0, 0, 0, 0, 255)

#

Nice feature, <1MB flash is tight

graceful rain
#

Hi all, apologies for cross-posting a Git problem, but Paul directed me to post here, so here goes:
I'm in Ubuntu 22.04.1 LTS and made some CP changes and trying to commit to my branch, and getting an error I've never seen before:

[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: AssertionError: BUG: expected environment for python to be healthy immediately after install, please open an issue describing your environment

more info:

virtualenv python version did not match created version:
- actual version: <<error retrieving version from /home/gpeyton/.cache/pre-commit/repodk7pays9/py_env-python3/bin/python>>
- expected version: 3.10.6.final.0

Check the log at /home/gpeyton/.cache/pre-commit/pre-commit.log

Any tips? I'm on an almost brand-new install of Ubuntu and clean branch with only a ports folder added. I'm working with ESP32, so same error before and after I export.sh to setup the environment, so it looks unrelated to that.

proven garnet
onyx hinge
#

@graceful rain yes this is familiar, but let me see if I can find the chat about it

#

In ubuntu 22.04 or the analogous Debian release, you may see the error "expected environment for python to be healthy immediately after install" when trying to use pre-commit. To fix this, add this line to your .bashrc or .bash_aliases file, or other shell startup file. Restart your shell as necessary to pick up this setting.

export SETUPTOOLS_USE_DISTUTILS=stdlib

This export must be present before pre-commit sets up its virtualenv environment, which happens the first time you do pre-commit run or you try to push a commit. If the virtualenv is already set up, do pre-commit clean, which removes the existing virtualenv.

See the instructions from the pre-commit project for installation for alternative ways of installing pre-commit.

#

I think this may still be the best workaround for the problem, you can read more about it near this in old messages to find links to more info about it

graceful rain
#

wow, it's a long thread. Ok, let me take a look at that article first. Thx!

onyx hinge
#

yeah it puzzled some of us for days. even when we started finding all the related issues on github it was still unclear. and most of us had installs old enough to not be affected no matter what we tried.

graceful rain
#

Thanks I think that did it!

onyx hinge
#

yay! goodnight!

spiral elk
#

Is the update to esp-idf 5.0 intended to be a pre or post-8.0 thing?

proven garnet
#

Does the QT Py S2 (and possibly other related boards) have an issue connecting to wifi when connected to serial as well? I noticed during my CircuitPythonukiah project I can connect to networks when hooked into the board as a USB, but it works fine if I power the board via the pins.

#

Also seeing it an another one of my QT Py S2 boards

jaunty juniper
#

can't connect ?

midnight ember
#

Are you running 8.0 beta 2 or above on it? Wifi issues should have been fixed with the beta 2 release. I didn't have any issues on the QT Py S3 running an open weathermaps script even during the beta 1 hard reset bug issue. It was the only board I had that was unaffected. It's not an S2 though.

manic glacierBOT
#

In case it helps i'm using non-blocking server sockets outside of the HttpServer and they work fine:

`
import socketpool
import wifi
import time

from secrets import secrets

Connect to WIFI

print()
ssid = secrets['WIFI_SSID']
print("Connecting to Wifi")
wifi.radio.connect(ssid, secrets['WIFI_PASSWORD'])
print(f"Connected: IP address is {wifi.radio.ipv4_address}")

HOST = str(wifi.radio.ipv4_address)
PORT = 80 # Port to listen on

print("Creating server socket")
pool =...

proven garnet
proven garnet
#

But I also saw it on 2 I think

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.0.0-beta.1 on 2022-10-01; ESP32-S3-DevKitC-1-N8R2 with ESP32S3

Code/REPL

import _bleio
import binascii
import time

print('start-----------------------------------')
my_entry = None
for entry in _bleio.adapter.start_scan(timeout=3):
    # endswith b'\xc0' is for d40
    if binascii.hexlify(entry.address.address_bytes).endswith(b'c0'):
        print(binascii.hexlify(entry.address.address_bytes), entry.a...
midnight ember
#

@proven garnet apparently I do also have a qt py s2. Do you have a test script I can run to help confirm?

proven garnet
#

Not on hand, but see if you can connect a few times to your network using wifi.radio.connect() with something like tio or Mu active

#

To be fair I also had issues even if the serial connection wasn't working

midnight ember
#

Oh I have plenty of those snippets on hand. Ok will do in a little while.

proven garnet
#

I also recently changed routers and quadruple checked my credentials, for what it's worth.

midnight ember
#

I have a qt py s3, can test on both.

#

My Wi-Fi’s been pretty good with the feather s2 lately but not perfect either.

#

Do you have a bug report open for it yet where I can read up on expected behavior?

#

Or is this still pre-bug report?

proven garnet
#

Yeah I wanted to check before submitting mostly since I figured it might be a duplicate if I'm hitting it - I don't usually do a lot of wacky core testing so I'm usually last haha

#

I can submit one today

midnight ember
#

Adafruit CircuitPython 8.0.0-beta.3 on 2022-10-20; Adafruit QT Py ESP32S2 with ESP32S2

#

unknown failure 15

#
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
]0;🐍Wi-Fi: off | code.py | 8.0.0-beta.3\]0;Wi-Fi: No IP | code.py | 8.0.0-beta.3\
===============================
Connecting to WiFi...
Connection Error: Unknown failure 15
Retrying in 10 seconds
Connection Error: Unknown failure 15
Retrying in 10 seconds
Connection Error: Unknown failure 15
Retrying in 10 seconds
Connection Error: Unknown failure 15
Retrying in 10 seconds
#

same after hard reset, no joy. qt py s2 is borked in beta 3.

#

actually here's the small test script that i came up with. works on qt py s3 on beta 1, does not work on qt py s2 on beta 3.

#
# SPDX-FileCopyrightText: 2022 DJDevon3 for Adafruit Industries
# SPDX-License-Identifier: MIT
# UM ESP32 FeatherS3

import wifi
import socketpool

# Initialize WiFi Pool
pool = socketpool.SocketPool(wifi.radio)

try:
    from secrets import secrets
    timezone = secrets['timezone']
    tz_offset_seconds = int(secrets['timezone_offset'])
except ImportError:
    print("Secrets File Import Error")
    raise

# Connect to Wi-Fi
print("\n===============================")
print("Connecting to WiFi...")
while not wifi.radio.ipv4_address:
    try:
        wifi.radio.connect(secrets['ssid'], secrets['password'])
    except ConnectionError as e:
        print("Connection Error:", e)
        print("Retrying in 10 seconds")

# With the 205 Error it never reaches below this point
print("Connected!\n")
#

that's about as simple as it gets, still throws unknown failure 15

#

bug confirmed

manic glacierBOT
onyx hinge
#

@midnight ember do you have any other espressif board to test on? in any case, please file an issue on github.

#

with the simple example 🙂

midnight ember
#

im confirming for anecdata

#

can load beta 3 on the qt py s3 as well?

#

i haven't installed beta 3 on any of my boards prior to this, most are still on beta 2, been too busy with projects

manic glacierBOT
midnight ember
#

i've been trying for the past 10 minutes to get the qt py s3 into bootloader to flash to beta 3. it will not go into bootloader mode.

#

web flasher doesn't work with it either. looks like the COM port is getting locked to the device, very similar if not the same behavior i encountered with the esp32-V2 when i first got that one.

#

gonna have to use python esptools to flash it to beta 3. anyone running beta 1 on the qt py s3 is gonna be screwed if they don't know how to use esptools.

proven garnet
#

Thanks @midnight ember for helping to confirm it's not just me!

midnight ember
#

np, that's a big bug

#

i should file a bug report for the qt py s3 beta 1 bootloader issue just in case anyone runs into it. it exists so should be documented if it hasn't been already?

analog bridge
#

@midnight ember do you have CP active on qtpy s3?

midnight ember
#

yes

analog bridge
#

are you trying get into bootloader mode pragmatically?

midnight ember
#

Adafruit CircuitPython 8.0.0-alpha.1 on 2022-06-09; Adafruit QT Py ESP32-S3 no psram with ESP32S3

#

tried every reset key combination, doubled checked the qt py s3 guide just to be sure it's not me...

#

oh it's alpha 1

#

welp that one serves me right lol

analog bridge
#
import microcontroller
microcontroller.on_next_reset(microcontroller.RunMode.BOOTLOADER)
microcontroller.reset()
#

does this work

midnight ember
#

nope, refuses to show featherboot

#

had to get into safemode to get out of it, whew

analog bridge
#

featherboot? do you mean to go into UF2 bootloader? For that try, microcontroller.RunMode.UF2

midnight ember
#

yes thought they were the same mode?

onyx hinge
#

esp32s2 and s3 have two different bootloaders -- the ROM bootloader which works with esptool, and the optional uf2 bootloader that works with, well, uf2 files.

analog bridge
#

BOOTLOADER is the default rom dfu bootloader, the one used for serial flashing and UF2, as the name suggests is the uf2 bootloader which makes the drive appear

onyx hinge
#

additionally i've found that loading anything with esptool usually means the uf2 bootloader won't work anymore, until I re-load it with esptool

midnight ember
#

yeah that didn't work either, gonna have to nuke it. will do that later i'm about at the end of my day. been up all night pumpkin carving.

#

this one is on me because it's running an alpha build, will fix that in my own time. doubt it needs a bug report now.

#

will take another look at it later tonight and get beta 3 on the qt py s3 and go from there.

crimson ferry
#

@proven garnet @midnight ember this works fine for me on Adafruit CircuitPython 8.0.0-beta.3 on 2022-10-20; Adafruit QT Py ESP32S2 with ESP32S2:```py
import time, wifi, socketpool
from secrets import secrets

pool = socketpool.SocketPool(wifi.radio)

def connect():
try:
wifi.radio.connect(secrets['ssid'], secrets['password'])
except ConnectionError as e:
print("Connection Error:", e)

while True:
print(f"Connecting... ", end="")
wifi.radio.enabled = True
connect()
print(f"Disconnecting... ")
wifi.radio.enabled = False
time.sleep(1)

midnight ember
#

Cool. Can you get it to the uf2 bootloader? 😆

#

Oh wait that’s for the s2…

#

Are you using it on usb?

#

Not web workflow?

crimson ferry
#

This puts it in UF2 bootloader: import microcontroller ; microcontroller.on_next_reset(microcontroller.RunMode.UF2) ; microcontroller.reset(). It's on USB. Web Workflow is not enabled.

midnight ember
#

Weird. How are tekktric and I getting the same bug but you’re not? 2/3.

#

Different bootloader versions? Pretty sure I’m still on the one it shipped with.

crimson ferry
#

I don't have a QT Py S3, but I have. Feather S3. An S3 is an S3 imo. Same code works on the S3.

midnight ember
#

The bug tekktric had was on the qt py s2.

crimson ferry
#

right, that's the first thing I posted. I suspect the issue isn't inherently with beta.3

midnight ember
#

Oh you’re saying I don’t have to bother testing the qt py s3.

crimson ferry
#

well, you can, but without anything using pins, there shouldn't be a difference?

#

(there are flash and ram differences, but this simple code shouldn't touch that)

midnight ember
#

Thought it was a power delivery difference using pins vs usb..

#

Not a connected sensor or something.

crimson ferry
#

could be a power thing, or the flash needs erasing, or there's a network issue, or...

#

I have 99 problems, and the network is 98 of them

#

(I kid, the network is rarely my issue)

midnight ember
#

My feathers work fine but I’m still on beta 2. Don’t have boards I can free up for a thorough testing of beta 3 yet.

#

Seems like beta 3 definitely needs to be put through paces.

crimson ferry
#

I've switched over a bunch to beta.3, more solid than previous

midnight ember
#

Developers, I love you, but this cycle of a new release per week I can’t keep up with lol. Going too fast. 😂 good problem to have really.

crimson ferry
#

there's always 7.3.3 😉

#

I still have some long-running boards on 6.x o_O

#

a couple in hard-to-reach places... if it ain't broke...

midnight ember
#

Well a couple of my projects were broken so I had to. The social media tracker box for example. That’s stable now so I lost that board for beta testing as an in production project.

#

Same with another s2 & s3 I’m going to use for Halloween projects. Right now, this week in particular is a bad week to need beta testing as my boards are being used in Halloween projects.

#

I imagine at least a few other people are probably in the same boat.

crimson ferry
#

(I did get 3 Connection Error: Unknown failure among 500 connections: (1) 2; (1) 4; (1) 200)

manic glacierBOT
lone axle
onyx hinge
#

I think you have to be logged into github

lone axle
#

clicking the artifact name makes a blue progress bar at the top of the page which goes very slowly and eventually gets all the way to the right but nothing else happens.

onyx hinge
#

weird

jaunty juniper
#

I got a pink unicorn clicking on your link

lone axle
#

I am logged in. Perhaps their system is having trouble today. I just downloaded one last week and I don't think I did anything differently. I don't do it often enough to be confident I have the process right though 😅

jaunty juniper
#

there might be github issues right now ?

crimson ferry
#

github issues in general

lone axle
#

thank you

crimson ferry
jaunty juniper
#

same issue with the blue bar but I did get the zip by middle clicking the zip link/copy and pasting it

manic glacierBOT
onyx hinge
manic glacierBOT
#
crimson ferry
#

Should watchdog be triggering on a long file read?

manic glacierBOT
jaunty juniper
#

by the way I was thinking of your issue with loading a large dict, do you have the option to output it as a python file ? (and then mpy-cross on it)

#

or is it loaded through wifi from an external source you don't control

crimson ferry
#

I'm pretty sure the watchdog module is triggering because the file read is taking longer than the watchdog threshold

#

I have complete control over the large data set... I've tried large CSV, large JSON, breaking it up into smaller files, etc. The issue is trying to get all the data into memory to avoid disk accesses.

jaunty juniper
#

and it's a dictionary structure, so loading it into a bytearray is impractical

crimson ferry
#

large JSON on a Feather S3 TFT: MemoryError: memory allocation failed, allocating 292856 bytes Seems to work better when I break it up into smaller files, but then I get a lot of it, and a smaller memory allocation error, even when I load the smaller files largest first.

#

I was thinking of trying two separate lists, since the keys are already sorted

#

but I'm really not sure if that would buy anything

#

I also might try integer keys. Will also see how bad caching from some efficient file search is... pain to start up, but then should get better as more is in cache.

jaunty juniper
#

I'm curious how a python dict in an mpy file would perform here

crimson ferry
#

I could try that

crimson ferry
#

I get a memory allocation error on my Mac using mpy-cross o_O

jaunty juniper
#

on any file ?

#

which version/OS ?

crimson ferry
#

just that file (macOS 12.6) latest mpy-cross, just downloaded

#

yeah, that shocked me

jaunty juniper
#

I'm generating a python file with something like that and getting a memory error with mpy-crossed when it gets around 2600

print("data = {")
for x in range(2500):
    print(f"""    "key-{x}": "Some value that is not {x}",""")
print("}")
#

so, that doesn't help

crimson ferry
#

that's a new one

manic glacierBOT
jaunty juniper
#

I think it's file size

crimson ferry
#

memory error trying to import the .py dict, as expected

#

I could go to an 8MB RAM board, but I really want either the TFT for compact display, or QT Py for the antenna choices. Also, this is a fun challenge 🙂

#

waits patiently for N8R8 QT Py S3 with u.FL ;-)

onyx hinge
#

I love it when an unrelated realization unblocks something. It is sloowwwwwwwwwwwwwww but I can serve https from my picow now.

#

the actual problem was that blocking/non-blocking bug in the httpserver module! the rest worked

manic glacierBOT
#

Thank you. I just managed to create a build of CPY 8.0.0-beta.3-12-gf67d2794c-dirty\ with DEBUG=1.
I think I have some interesting serial output that will help us further.
However I don't understand everything from the errors printed in red but you and @Neradoc maybe will.
I made three screenshots because they show you the real problem points in red color.
Beside that I also copied the text output version. See all below please.

![2022-10-25_20h40_ESP32-S3-Box_serial_output_errors_01...

manic glacierBOT
#

This works! Before it was broken with high probability due to https://github.com/adafruit/Adafruit_CircuitPython_HTTPServer/pull/19 -- make sure you have that fix when testing.

https-server-example.zip includes a self-signed certificate for example.com from https://regery.com/en/security/ssl-tools/self-signed-certificate-generator. In my setup I could use a properly trusted certificate, but it would not be...

manic glacierBOT
thorny dove
#

@onyx hinge & @jaunty juniper as the BOT already signaled, I managed (also) to create a build with DEBUG=1. I think the serial output results are interesting, beside the fact - that also @jaunty juniper has seen in his build with DEBUG=1, that the WDT had reset the processor, this time the serial output gives more information, various Errors in red color like (3115) "HW TIMER NEVER INIT ERROR" (4x) and (5035) "phy_init: esp_phy_load_cal_data_from_nvs: NVS has not been initialized. Call nvs_flash_init before starting WiFi/BT". Also a warning: (5045) "phy_init: failed to load RF calibration data (0x1101), falling back to full calibration"

manic glacierBOT
#

I'm saying that you will probably see these same log errors on output from a board that works, such as the UM FeatherS3. It would be worth verifying that is the case, and if you see error reports that differ, to note that. For instance, I am see the HW TIMER NEVER INIT ERROR right now on a test program on a Feather ESP32-S2 that is not using wifi at all.

jaunty juniper
#

I get a freeze when I try to connect with the FeatherS3 right now >_>

D (226160) wifi:new_bss=0x3fca9c70, cur_bss=0, new_chan=<8,0>, cur_chan=1
D (226170) wifi:filter: set rx policy=5
I (226170) wifi:new:<8,0>, old:<1,0>, ap:<255,255>, sta:<8,0>, prof:1
D (226180) wifi:connect_op: status=0, auth=5, cipher=3 
D (226180) gdma: new group (0) at 0x3fcb8240
D (226180) gdma: new pair (0,0) at 0x3fcb827c
D (226190) gdma: new tx channel (0,0) at 0x3fcb80f0
D (226190) gdma: new rx channel (0,0) at 0x3fcb829c
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x40056ea0  PS      : 0x00060130  A0      : 0x8002f1fd  A1      : 0x3fcee000  
A2      : 0x00000001  A3      : 0x00000000  A4      : 0x00000000  A5      : 0x3fcee0a3  
A6      : 0x4002eb04  A7      : 0x00000000  A8      : 0x3fcf0ec7  A9      : 0x3fcf0ec8  
A10     : 0x3fceea80  A11     : 0x00000020  A12     : 0x3fcf0c44  A13     : 0x3fcee0a3  
A14     : 0x3fcee079  A15     : 0x00ffffff  SAR     : 0x0000000f  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000001  LBEG    : 0x400570e8  LEND    : 0x400570f3  LCOUNT  : 0x00000000  

Backtrace: 0x40056e9d:0x3fcee000 |<-CORRUPTED

ELF file SHA256: 77c3d51de8b98c96

CPU halted.
#

but that might be only in the debug build

manic glacierBOT
lavish saffron
#

Hi, when adding typing to a library and the doc-string has :param int timeout: ... but all the math is with time.monotonic which is float math, should I respect the doc-string because Python will cast the int as a float, or should I change the doc-string to :param float timeout ? Thx

manic glacierBOT
#

I managed to build a CPY V8b3-11 for the UM ESP32 FeatherS3 with DEBUG=1.
As soon as I try to issue wifi.radio.contact(ssid=ssid, password=password) the CPU halts and disk is lost. I have to reflash the bootloader.
The same happens as soon as I copy the file .env to the drive .

See the serial output below:

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd0108,len:0x1644
load:0x403b6000,le...
proven garnet
#

The type annotation is also about the promise to the user for what can be used, so in this case I would change the docstring to float because it's valid to use it in this case.

manic glacierBOT
manic glacierBOT
#

I've now tested this function on beta.3 and it seems to be working fine.
Thank you.

Kind regards,
Tal

On Fri, Oct 21, 2022 at 12:49 AM Jeff Epler @.***>
wrote:

It's implemented now, if you grab the very latest builds or wait for the
next beta release. If you do please let us know if it worked for you,
either here or (it it's not working for you) in a fresh issue


Reply to this email directly, view it on GitHub
<https://github.com/adafruit/circuitpython/issues/7085#issu...

lone sandalBOT
manic glacierBOT
#
Wednesday 2022-10-26 11h48 utc+1

board: Unexpected Maker FeatherS3

Flashed
1) Adafruit tinyuf2 bootloader;
2) Own build: Adafruit CircuitPython 8.0.0-beta.3-12-gf67d2794c-dirty   with DEBUG=1


Serial output using PuTTY on desktop PC MS Windows 11 Pro:

1st boot:
---------

Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd0108,len:0x1644
load:0x403b6000,len:0xf1c
load:0x403ba000,len:0x31c8
entry 0x403b63...
manic glacierBOT
midnight ember
#

Got the QT Py S3 flashed with beta 3 this morning. Connects to wifi np.

#

even after soft reboots so no hard-reset bug either.

#

immediately swapped in the QT Py S2 with the same code ```py
Connecting to WiFi...
Connection Error: Unknown failure 15
Retrying in 10 seconds
Connection Error: Unknown failure 15
Retrying in 10 seconds

lavish saffron
#

Hi, how should I type these? Thx

`
def enter(self):
return self

def exit(self, exc_type, exc_val, exc_tb) -> None:
...
`

stuck elbow
#

why would you? it's not like you are ever going to call them directly

tulip sleet
lavish saffron
jaunty juniper
#

yeah it's in many other libraries

proven garnet
proven garnet
#

Most of the "dunder" (__abc__()) methods have already been typed in at least one other library I think, as has been mentioned.

lavish saffron
#

My preference is to leave them untyped

stuck elbow
#

I wonder why mypy doesn't type them implicitly, after all it should know what their types are

proven garnet
#

I think IntelliSense just gives you the expected outputs, so I'm also surprised mypy doesn't do that.

#

I can't think of a dunder method that has a "variable" return

#

Though jepler did mention __init__() could return something other than None that could be accessed... for reasons?

#

Wanted something like a uniform API when the services vary in what knobs can be turned when uploading content.

midnight ember
#

@proven garnet sure can do

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.0.0-beta.3 on 2022-10-20; Adafruit QT Py ESP32S2 with ESP32S2

Code/REPL

# SPDX-FileCopyrightText: 2022 DJDevon3 for Adafruit Industries
# SPDX-License-Identifier: MIT
# UM ESP32 FeatherS3

import wifi
import socketpool

# Initialize WiFi Pool
pool = socketpool.SocketPool(wifi.radio)

try:
    from secrets import secrets
    timezone = secrets['timezone']
    tz_offset_seconds = int(secrets['timezon...
manic glacierBOT
manic glacierBOT
#

The CircuitPython build for Arduino Nano RP2040 Connecthas _bleio turned on for coprocessors loaded with Adafruit NINA-FW (AirLift) style firmware. I don't know that it actually works with the firmware on the Nano RP2040 UBlox module. Have you successfully used it?

Similarly, NINA-FW-style CircuitPython libraries like https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI could theoretically work with the firmware on the uBlox module. But I don't know if anyone has tried it.

Sinc...

manic glacierBOT
#

CIRCUITPY_ESP_FLASH_MODE and CIRCUITPY_ESP_FLASH_FREQ were present in all espressif mpconfigboard.mk files. They were frequently wrong, and caused confusion. They were used only to pass flash mode and frequency arguments to esptool.py, but they don't appear to be necessary (anymore?). esptool.py works fine without them, as far as I can tell. I have my own esptool.py aliases that don't use them.

This PR removes these settings and their uses in ports/espressif/Makefile.

Quot...

analog bridge
#

@onyx hinge You have marked the coproc PR as draft, are more changes in the pipeline?

onyx hinge
proven garnet
#

Remembered it because you recently made an issue in HTTPServer about WSGI stuff and didn't know if that also had an effect.

manic glacierBOT
tulip sleet
# proven garnet <@329766224093249548> I have an old PR that you think you had said you were goin...

I'm sorry I haven't acted on this. I have an incompatible potential PR for adafruit_requests in this branch: https://github.com/dhalbert/Adafruit_CircuitPython_Requests/tree/change-exceptions which I haven't finished. I didn't know whether it would intersect with the PR above. I looked briefly at your PR and it could probably stand on its own. I would really like to regularize the ESP32SPI and adafruit_requests API's, remove the all the "legacy" stuff that is a legacy of old API's in ESP32SPI (and has leaked into various other libraries) but I haven't had time to do that. The exeptions should be a lot more like the CPython ones, though there are not always obvious mappings because what's happening at the low level is different.

I was just saying in an internal staff meeting a couple of days ago that it would be great if someone with network experience could take this rather "strategic" task on. I don't know if you feel you would like to or not.

manic glacierBOT
tulip sleet
#

Some of the exception cleanup may have been done already in some other adafruit_requests PR's (or just one) this year -- I have to check

proven garnet
#

I'm a big fan of the WSGI and network PRs, though not sure if the "network experienced" part applies haha. Definitely would be open to it though.

#

Definitely good at hitting exceptions though

#

I can at least start looking into it

#

And no worries, thanks for the context!

#

Are you talking about the old legacy requests stuff like set_socket() as well?

idle owl
# manic glacier

@tulip sleet Do you still want me to test this? I see Jeff approved it.

tulip sleet
#

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

manic glacierBOT
#

The goal here was to schedule PR jobs based on file changes specific to a commit instead of diff between base and head branch of the PR, this presented two (that I know of) pitfalls:

  1. As @jepler pointed out on discord: "suppose commit 1 breaks everything and commit 2 fixes 50% of the thing"
    • Fix: Include all the unsuccessful jobs from the most recent workflow run.
  2. Only scheduling based on changes in the latest commit and ignoring changes in the previous commits.
    • Fix:...
tulip sleet
idle owl
tulip sleet
idle owl
manic glacierBOT
idle owl
#

@proven garnet I accepted that repo transfer. But the repo isn't showing up in my list. Can you check if it's still yours? And if so, send me a new link? The existing one "expired" because I already clicked it, I assume, since it hasn't been long enough for it to timeout expire.

#

It always says "This may take a few minutes" but it never does. Also it's been a few minutes at this point.

manic glacierBOT
#

I thought it worked, there are a number of issues and PRs from some time ago to add the board and tweak the config, and this Learn Guide:
https://learn.adafruit.com/circuitpython-on-the-arduino-nano-rp2040-connect
I think some of the pins are different, so the Arduino NINA firmware must be used, not the Adafruit fork. I seem to recall that the Arduino NINA firmware needed to be updated for some older boards. Have you tried it with the Arduino NINA firmware and the Adafruit ESP32SPI library?

#

The Technical Reference Manual for both esp32s2/s3 mentions the following halt sequence.

Before setting ULP-RISC-V to HALT, users should configure the register RTC_CNTL_COCPU_DONE first,
therefore, it is recommended to end the flashed program with the following pattern:
– Set the register RTC_CNTL_COCPU_DONE to end the operation of ULP-RISC-V and put it into halt;
– Set the register RTC_CNTL_COCPU_SHUT_RESET_EN to reset ULP-RISC-V.
Enough time is reserved for the ULP-RISC-V to comp...

#

So, if I understand correctly, the idea is that a new commit to a PR would run only jobs that failed due to the previous commit(s)? Suppose the new commit broke builds that passed in the previous commits? Or would the new commit still trigger a rebuild of all the affected builds based on the scope of some file change?

The jobs will be run based on the changed files between new commit and the most recent commit with a workflow run plus the jobs that failed in the previous workflow run wi...

#

I don't think I've updated the bootloader on any of these boards. The one on the testbench now is: TinyUF2 Bootloader f12dd0f - tinyusb (0.10.1-109-g9b3ec69b). This is one of the earliest units with onboard antenna I could get my hands on.

My first inclinations would be hardware issue or interference of some kind, though your proximity and the regularity of the issue don't reek strongly of interference.

it's possible something is getting stuck in the internals. You could try escalatin...

proven garnet
idle owl
#

Ok, please try again to transfer it

proven garnet
#

Zoop

#

Transfer initiated

idle owl
#

Clicked on my end. Leaving the page alone for a few minutes this time in case that's the problem.

crimson ferry
#

thanks Dan, tags and titles are really useful for future code archaeologists 😉

manic glacierBOT
#

I ran a couple of esptool.py --chip esp32s2 image_info --version 2 build-microdev_micro_s2/circuitpython-firmware.bin queries:

esptool.py v4.3

# BEFORE:

ESP32S2 image header
====================
Image version: 1
Entry point: 0x4002b814
Segments: 8
Flash size: 16MB
Flash freq: 80m
Flash mode: QIO

# AFTER:

ESP32S2 image header
====================
Image version: 1
Entry point: 0x4002bddc
Segments: 7
Flash size: 1MB
Flash freq: 40m
Flash mode: QIO

Fo...

jaunty juniper
#

@midnight ember the revision is the letter in a circle

manic glacierBOT
midnight ember
#

ahh yes it's a C

tulip sleet
#

@analog bridge so my flash-size-mode-freq PR may be all wrong. I thought the builds picked up that info from sdkconfig when they built the .bin's, but you've shown otherwise. If not, then we really need to audit all the settings in the mpconfigboard.mk files, as people frequently copy these blindly.

idle owl
#

@proven garnet Got it this time!

proven garnet
#

Huge success!

idle owl
#

And transferred to Adafruit.

manic glacierBOT
proven garnet
#

Thanks @idle owl!

manic glacierBOT
#

Updated bootloader to

TinyUF2 Bootloader 0.11.0 - tinyusb (0.12.0-203-ga4cfd1c69)
Model: Adafruit QT Py ESP32-S2
Board-ID: ESP32S2-QTPY-revB
Date: Oct 17 2022

It showed up with QTPYBOOT which was a neat difference. Also shows an Adafruit logo in device manager, very neat.

Loaded beta 3 on it

Adafruit CircuitPython 8.0.0-beta.3 on 2022-10-20; Adafruit QT Py ESP32S2 with ESP32S2
Board ID:adafruit_qtpy_esp32s2
UID:85FC97BAF1C5

Ran anecdata's regression tester ...

ornate breach
#

@idle owl I love the scorpion, did you have any hand in its creation? 🙂

idle owl
#

Alas, I cannot claim that.

#

It was probably Phil B (PaintYourDragon), as he does most of our silk stuff, but it could have also been our graphics person involved as well.

ornate breach
#

Ah well, it looks cool. Reminds me what I feel like a scorpion should look like

#

In the words of that obscure SpongeBob character: “BIG. MEATY. CLAWS”

manic glacierBOT
ornate breach
#

This being compared to the claws many scorpions have which tend to be kind of small

idle owl
#

I've only ever seen one personally in Italy. It was in the bathroom of our apartment and scared the absolute ... out of my mum. I had to go deal with it. Then the next year around xmas, she found one that looked a bit like it in resin, and bought it for me. It's lived in my bathroom on the counter since.

manic glacierBOT
idle owl
#

Hehehe.

manic glacierBOT
manic glacierBOT
ornate breach
stuck elbow
#

it lost two legs, poor thing

idle owl
idle owl
#

I had to google, but the grabbyhands are their 7th and 8th legs, at least at first glance.

ornate breach
#

Wait, don’t they have 10 appendages?

stuck elbow
#

scorpions have 8 walking legs, just like their cousins spiders

ornate breach
#

Google says 6-12

stuck elbow
#

the claws are the equivalent of pedipalps in spiders

ornate breach
idle owl
#

The thing I know about them is that the smaller and clearer they are, the more poisonous they are. The large black ones are basically the least poisonous.

ornate breach
#

The ones you don’t see and live by are the safest

idle owl
stuck elbow
#

scorpions are basically spiders with opposable thumbs

idle owl
#

That description is basically terrifying.

ornate breach
#

This will be the image you see for the rest of your life

#

Anyway, scorpions 6-12 legs and two thumbs way up

#

Depending on the specific type of scorpion

stuck elbow
ornate breach
#

Arms are legs if you walk on them

#

😬

#

Not that it’s relevant here

ember iris
stuck elbow
#

I think I still trust Wikipedia more than Wildlife Journal Junior

ornate breach
#

It’s PBS, government funded

#

They have scientists

stuck elbow
ornate breach
#

I think the answer is obvious, Rick Sanchez

#

Anyway, getting a wee bit off topic 🙂

ornate breach
idle owl
ornate breach
#

I’m glad I’m the opinion of reason there hahaha

stuck elbow
#

it's cute

ornate breach
#

Not sure I’m using the right analogy

idle owl
#

The way you worded it, it sounds like you're asking if it was denied.

ornate breach
#

Opposite, approved lol

idle owl
#

Hah

ornate breach
#

Anyway, I was thinking of Blinka racing after little green circuit bugs or something like that

#

Or maybe holding a fly swatter

idle owl
#

I kind of want a squished bug or two behind her 😄

#

Swatter is a good one

ornate breach
#

My other thought was blinka controlling a circuitpython powered squashing robot lol

idle owl
#

Hah! That one would be beyond my sketching skills. But I bet Bruce would still produce excellence.

ornate breach
#

I loved the Blinka backpack graphic

#

So cute

idle owl
#

That was all him. I told him what you said, and that's what he came back with.

ornate breach
#

Yeah, it was great

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Reproduced on both Feather ESP32-S3 8MB flash no PSRAM and Feather ESP32-S3 4MB flash / 2MB PSRAM, using this test program. NeoPixel flashes three times indicating safe mode when connected to battery.

import digitalio
import board
import alarm
import time

uart = board.UART()
uart.baudrate = 115200

led = digitalio.DigitalInOut(board.LED)
led.switch_to_output(True)
time.sleep(2)
led.value = False
msg = "Alarm was " + str(alarm.wake_alarm) + "\r\n"
print(msg, end = "")
ua...
manic glacierBOT
#

Fixed by #7094. Thanks @MicroDev1!

How do you get this fix to work? Im trying using Ubuntu WSL. I can get the firmware.bin file to make. However, its the same issue as before on the Xiao ESP32c3. I must be doing something wrong??? I am making with the 8.1 beta branch. Is that correct? I am flashing with the online webtool and it uploads. However, it will not work with Thonny, MU or Putty at all.

lavish saffron
#

Hi, a typing query. The function below returns the buffer when it is called with a buffer and returns a bytearray when called with None. Should I install typing-extensions and use the @overload decorator or type the return as Union[WriteableBuffer, bytearray] or something else?

    def read(buffer: Optional[WriteableBuffer] = None):
        ...
            if buffer is None:
                self._rxbuf = bytearray(length)
                bus_device.readinto(self._rxbuf)  # pylint: disable=no-member
                return self._rxbuf
            bus_device.readinto(buffer, end=length)  # pylint: disable=no-member
            return buffer
thorny dove
#

@analog bridge HI, I see you did an excellent job with solving issue #7060. I am stuck with a boot-loop on an Adafruit ESP32-S3-Box. Danh, Jepler and Neradoc have paid some attention to it. Danh is very busy with other bugs. So, in this moment there is no activity. No advance into solving the bug. Could you please have a look into issue # 7093? Title: 'esp32-s3-box with cpy 8.0.0-b.2 loops in reboot as soon as .env file is uploaded.' I am now testing with the latest: cpy 8.0.0-b.3-12 however the problem continues. It also happens when the .env is not on the drive, when I try to connect a WiFi (extender) AP here in the room, either from a CPY script or from REPL. The WDT resets the PRO CPU and it resets the AP CPU. All other WiFi 'steps' e.g. Networks scan are executed without problem.

manic glacierBOT
#

During a Ubuntu-Linux session, I saw that the '/circuitpython/ports/espressif/esp-idf' version is 4.4.2 while the documentation of espressif expresses that for the esp32s3 esp-idf 5.0 is needed. Perhaps this is the source of the problem. Can I clone esp-idf 5.0 into ' /circuitpython/ports/espressif' or is that esp-idf a special version prepared for circuitpython ?

manic glacierBOT
analog bridge
#

from what I read in the issue comments, simply trying to connect to WiFi results in a crash? Can you test this with the following:

import wifi
wifi.radio.connect("ssid", "password")
thorny dove
#

@analog bridge Hi, thank you for your reply. Yes, the command wifi.radio.connect("ssid", "password") does result in a crash. I just finished creating a build, uising esp-idf v 5.0; next flashed the tinyuf2 bootloader; finally copied the firmware.uf2. A simple WiFi test resulted in a 'crash' (reset). See the following extract of the serial output: ```
(105071) wifi:first chan=1
D (105071) wifi:handoff_cb: status=0
D (105071) wifi:ap found, mac=e4:c3:2a:e3:14:31
D (105081) wifi:new_bss=0x3fcaa890, cur_bss=0, new_chan=<9,0>, cur_chan=1
D (105081) wifi:filter: set rx policy=5
I (105091) wifi:new:<9,0>, old:<1,0>, ap:<255,255>, sta:<9,0>, prof:1
D (105091) wifi:connect_op: status=0, auth=5, cipher=3
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x8 (TG1WDT_SYS_RST),boot:0xa (SPI_FAST_FLASH_BOOT)
Saved PC:0x40374200
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd0108,len:0x15e8
load:0x403b6000,len:0xbf8
load:0x403ba000,len:0x31c8
entry 0x403b621c
I (29) boot: ESP-IDF v4.4.2-378-g9269a536ac 2nd stage bootloader
I (29) boot: compile time 11:36:39
I (29) boot: chip revision: 0
I (32) qio_mode: Enabling default flash chip QIO
I (37) boot.esp32s3: Boot SPI Speed : 80MHz
I (42) boot.esp32s3: SPI Mode : QIO
I (47) boot.esp32s3: SPI Flash Size : 16MB

analog bridge
thorny dove
#

Yes. I go now to upload the complete serial output to Github > Adafruit > Circuitpython > Issues #7093

manic glacierBOT
#

@MicroDev1 Here is the serial output from the firmware.uf2 that you creaated / sent to me:

Thursday 2022-10-27 11h55 utc+1
Board: (Adafruit) Espressif ESP32-S3-BOX

Flashed with Circuitpython firmware.uf2 received from @MicroDev

Adafruit CircuitPython 8.0.0-beta.3-20-g2bba6a68e on 2022-10-27; ESP32-S3-Box-2.5 with ESP32S3

Serial Output (after Reset) via PuTTY at Com5  (desktop PC with MS Windows 11 Pro)

ESP-ROM:esp32s3-2021
rst:0x1 (POWERON),boot:0xa (SPI_FAST_FLASH_BOOT...
#

Here is the code.py I used:

###
#
# Circuitpython V8b3-11 for ESP32-S3-Box (with DEBUG=1)
# WiFi test
#

import wifi
import sys
import time
#import ssl
import ipaddress
import socketpool
from secrets import secrets
#import adafruit_requests
#from rtc import RTC

my_debug = False

ssid = secrets["ssid"]
password = secrets["password"]
use_ping = True
pool = None
connected = False
ip = None
s_ip = None

print(f"\nTrying to connect to \'{ssid}\'")
wifi.__init__(...
thorny dove
#

Little thing: in the code.py heading I changed CPY version to V8b3-20

analog bridge
# thorny dove Yes. I go now to upload the complete serial output to Github > Adafruit > Circui...

I was hoping for a backtrace in the debug output but it seems like the board resets without printing it.
This is similar to what Neradoc noticed in https://github.com/adafruit/circuitpython/issues/7093#issuecomment-1287941944
Sorry, I am afraid I won't be able to provide much insight without testing on a board myself and no backtrace.
The issue has 8.0.0 milestone so danh will likely get back to it soon, he did mention about updating the idf to a newer commit in release/v4.4 branch.

thorny dove
#

OK, thank you anyway for trying to help. I much appreciated that! In another test yesterday the serial output clearly stated that it was the internal Watchdog timer that did reset the CPU's.

#

Here is that part: I (7905) wifi:new:<9,0>, old:<1,0>, ap:<255,255>, sta:<9,0>, prof:1 D (7905) wifi:connect_op: status=0, auth=5, cipher=3 # | <<<===== WiFi Connect command ESP-ROM:esp32s3-20210327 Build:Mar 27 2021 rst:0x8 (TG1WDT_SYS_RST),boot:0xa (SPI_FAST_FLASH_BOOT) # | <<<===== MOMENT OF RESET BY WATCHDOG TIMER Saved PC:0x40374200 SPIWP:0xee mode:DIO, clock div:1 load:0x3fcd0108,len:0x15e8 load:0x403b6000,len:0xbf8 load:0x403ba000,len:0x31c8 entry 0x403b621c I (29) boot: ESP-IDF v4.4.2-378-g9269a536ac 2nd stage bootloader I (29) boot: compile time 11:36:39 I (29) boot: chip revision: 0 I (32) qio_mode: Enabling default flash chip QIO I (37) boot.esp32s3: Boot SPI Speed : 80MHz I (42) boot.esp32s3: SPI Mode : QIO I (47) boot.esp32s3: SPI Flash Size : 16MB W (52) boot.esp32s3: PRO CPU has been reset by WDT. # | <<<======== WATCHDOG TIMER RESETS BOARD W (57) boot.esp32s3: APP CPU has been reset by WDT. # | <<<======== IDEM I (63) boot: Enabling RNG early entropy source... I (68) boot: Partition Table: I (72) boot: ## Label Usage Type ST Offset Length I (79) boot: 0 nvs WiFi data 01 02 00009000 00005000 I (87) boot: 1 otadata OTA data 01 00 0000e000 00002000 I (94) boot: 2 ota_0 OTA app 00 10 00010000 00200000 I (102) boot: 3 ota_1 OTA app 00 11 00210000 00200000 I (109) boot: 4 uf2 factory app 00 00 00410000 00040000 I (117) boot: 5 ffat Unknown data 01 81 00450000 00bb0000 I (124) boot: End of partition table

#

@analog bridge What if I would build a version of tinyuf2 with ESP-IDF v5.0 ?

analog bridge
thorny dove
#

I was thinking to make a build of tinyuf2 with ESP-IDF V5.0

analog bridge
#

I created a build with of CP with idf at the latest commit in release/v4.4 branch plus CP customizations

thorny dove
#

Ok

analog bridge
thorny dove
#

Thank you

analog bridge
thorny dove
#

OK

#

I reflashed the bootloader then copied your file to it (also V8.0.0-beta.3-20-...) . Same result: Instantaneous reboot

#

Here is the serial output from the period around the WDT reset: ```

D (8117) wifi:first chan=1
D (8117) wifi:handoff_cb: status=0
D (8117) wifi:ap found, mac=e4:c3:2a:e3:14:31
D (8117) wifi:new_bss=0x3fcaa8e0, cur_bss=0, new_chan=<9,0>, cur_chan=1
D (8127) wifi:filter: set rx policy=5
I (8127) wifi:new:<9,0>, old:<1,0>, ap:<255,255>, sta:<9,0>, prof:1
D (8137) wifi:connect_op: status=0, auth=5, cipher=3
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x8 (TG1WDT_SYS_RST),boot:0xa (SPI_FAST_FLASH_BOOT)
Saved PC:0x403799cf
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd0108,len:0x15e8
load:0x403b6000,len:0xbf8
load:0x403ba000,len:0x31c8
entry 0x403b621c
I (29) boot: ESP-IDF v4.4.2-378-g9269a536ac 2nd stage bootloader
I (29) boot: compile time 11:36:39
I (29) boot: chip revision: 0
I (32) qio_mode: Enabling default flash chip QIO
I (37) boot.esp32s3: Boot SPI Speed : 80MHz
I (42) boot.esp32s3: SPI Mode : QIO
I (47) boot.esp32s3: SPI Flash Size : 16MB
W (52) boot.esp32s3: PRO CPU has been reset by WDT.
W (57) boot.esp32s3: APP CPU has been reset by WDT.
I (63) boot: Enabling RNG early entropy source...
I (68) boot: Partition Table:
I (72) boot: ## Label Usage Type ST Offset Length
I (79) boot: 0 nvs WiFi data 01 02 00009000 00005000
I (87) boot: 1 otadata OTA data 01 00 0000e000 00002000
I (94) boot: 2 ota_0 OTA app 00 10 00010000 00200000
I (102) boot: 3 ota_1 OTA app 00 11 00210000 00200000
I (109) boot: 4 uf2 factory app 00 00 00410000 00040000
I (117) boot: 5 ffat Unknown data 01 81 00450000 00bb0000
I (124) boot: End of partition table

manic glacierBOT
#

During a Ubuntu-Linux session, I saw that the '/circuitpython/ports/espressif/esp-idf' version is 4.4.2 while the documentation of espressif expresses that for the esp32s3 esp-idf 5.0 is needed. Perhaps this is the source of the problem. Can I clone esp-idf 5.0 into ' /circuitpython/ports/espressif' or is that esp-idf a special version prepared for circuitpython ?

There are many incompatible changes between v4.4.2 and v5.0, and v5.0 is still in beta. @MicroDev1 has been working on updati...

manic glacierBOT
proven garnet
#

@lavish saffron I wouldn't use the @overload decorator since CircuitPython doesn't support it's use. I would use a Union, and I also think this is a good use case for TypeVar

#

To specify that the exact type of input is the exact type of output when that happens.
overload decorator would apply, but since neither typing nor typing-extensions exists in CircuitPython, we can't do it and the same trick we're using to type annotate with those modules wouldn't work for a decorator.

lavish saffron
manic glacierBOT
#

@PaulskPt Re your discord conversations, etc. This unit is not made by Adafruit, so it is not first priority when it comes to fixes. Since this "just another" S3 unit, it should work the same as other S3 boards. Since it is not, there are several possibilities:

  1. Your unit is actually defective. Unlikely, but possible.
  2. There are differences in the board-related files for this unit, and at least one of these differences is a mistake

Rather than spend a lot of time on ESP-IDF upgrade...

manic glacierBOT
#

Ok Dan. You aare correct by stating that 'This unit is not made by Adafruit', however I bought it from Adafruit. (May 3, 2022). I doubt the unit is defective. It worked when I received it. The factory demo, using WiFi worked OK; speech command recognition (that sends the voice commands to a server of Espressif): worked. II am going to flash the factory demo again and make a short video to demonstrate. Maybe a defect is there now. We'll find out.

I see that you have a lot 'on your plate' so...

manic glacierBOT
#

Ah, good! Good luck by the configuration attempt!

Anyway I already had downloaded the latest version of the esp-box repo and was flashing the factory demo. Below two images. The first, from the esp-box app on my mobile phone. Showing that the s3-box had been registered online. The second image of the screen stating "Wi-Fi is connected to Vodafone-287778_EXT' (the SSID of the WiFi extender here in the room.

![IMG_7088](https://user-images.githubusercontent.com/9107950/198341799-4d6d2a42-...

#

Just for the record. Serial output after reset with the factory demo flashed.


ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x2a (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd0108,len:0x17b4
load:0x403b6000,len:0xe0c
load:0x403ba000,len:0x3078
entry 0x403b626c
I (25) boot: ESP-IDF v4.4-264-g2bdea81b2a 2nd stage bootloader
I (25) boot: compile time 10:06:42
I (25) boot: chip revision: 0
I (28) qio_mode: Enabling default flash chip Q...
#

CircuitPython version

Adafruit CircuitPython 8.0.0-beta.3 on 2022-10-20; Seeeduino XIAO RP2040 with rp2040
Board ID:seeeduino_xiao_rp2040
UID:415032383337320B
boot.py output:

Code/REPL

"""why does code.py need a docstring for pylint?"""

import adafruit_ssd1306
import asyncio
import board
import busio
import digitalio
import time


class Led:
    """simple LED blinky example class"""

    def __init__(self):
        """shush pylint"""

  ...
#

Hi,

I would like to see this issue fixed, so I had a look at it.

The problem here seems to be that watchdog's scratch register is read and alarm.wake_alarm is assigned in run_boot_py as a part of start_mp. Afterwards the scratch register is cleared by alarm_reset (https://github.com/adafruit/circuitpython/blob/main/ports/raspberrypi/common-hal/alarm/__init__.c#L105). By the time we get to run_code_py the scratch register...

#
"""why does code.py need a docstring for pylint?"""

#import adafruit_ssd1306
import asyncio
import board
import busio
import digitalio
import time


class Led:
    """simple LED blinky example class"""

    def __init__(self):
        """shush pylint"""

        self.led = digitalio.DigitalInOut(board.LED_BLUE)
        self.led.switch_to_output()
        self.led.value = 1

    def toggle_led(self):
        """shush pylint"""
        self.led.value = not self...
deft jay
#

@tulip sleet do I mark this closed now that we know it runs on beta 2 or...it still doesn't work on beta 3 though.

tulip sleet
manic glacierBOT
onyx hinge
#

@tulip sleet huh now I'm having a "how did it ever work" moment. reverting e590d27bf8990f2163ee50e271bc5ce18ee3d956 fixes it, but the code before that was nonsense. Ticks are intended to be micropython small integer objects but in CP we used regular C integers instead ... look at these two implementations of ticks():STATIC mp_obj_t ticks(void) { return MP_OBJ_NEW_SMALL_INT(mp_hal_ticks_ms() & (MICROPY_PY_UTIME_TICKS_PERIOD - 1)); } and #define ticks() supervisor_ticks_ms()

tulip sleet
#

so maybe we diverted with micropython about the semantics of ticks()??

#

is this difference particular to the RP2040 impl?

onyx hinge
#

oh, supervisor_ticks_ms IS an object after all

#

that at least satisfies my intuition that it should have been a compile error 😕

manic glacierBOT
onyx hinge
#

I'd swear up and down that I did test on hardware, but obviously not. 😦 😭

deft jay
#

yeah, I was thinking, "why isn't this working" until it started working and then I thought "why is this working????"

#

@onyx hinge is your comment in the github thread ```pyimport asyncio

async def main():
print("in async func")

print("before asyncio run")
asyncio.run(main())
print("after asyncio run")```

in regards to my shoddy code or in regards to something in the backend?

manic glacierBOT
onyx hinge
tulip sleet
#

@thorny dove I have a version for you to try. Do you need a .bin or a .uf2? (I could not get the bootloader to come up after the first time I used it, so I have been debugging with .bin files)

thorny dove
#

Thank you. I use espressif download tool V3.9.3. And I have the tinyuf2 bootloader, also OK so you can send me an .uf2

tulip sleet
#

this works with the standard Adafruit Internet test program that is in all the guides. It is similar to your test program, but the setup is simpler. Also it doesn't do the __init__() call that was in your program. I that is irrelevant to the problem. The problem was incorrect settings for use of the PSRAM (SPIRAM) for the ESP32-S3 Box.

thorny dove
#

OK

tulip sleet
#

it should work with your test program too;

thorny dove
#

It works! Resolved google address: '142.250.200.110'
Ping google.com [142.250.200.110]: 25 ms
Exiting...
]0;🐍192.168.1.112 | Done | 8.0.0-beta.3-20-g2bba6a68e-dirty\

#

bootlaoader

#

It works! Resolved google address: '142.250.200.110'
Ping google.com [142.250.200.110]: 25 ms
Exiting...
]0;🐍192.168.1.112 | Done | 8.0.0-beta.3-20-g2bba6a68e-dirty\

tulip sleet
#

OK! I will make a PR for this and it should be in beta.4 and later. In the meantime you can use that one.

#

thanks for testing!

thorny dove
#

Thank you very much !!!

tulip sleet
#

sure - it was confusing

thorny dove
#

Yeah. And I threw in a lot of noise. Sorry.

tulip sleet
#

@onyx hinge should CIRCUITPY_ESP32_CAMERA be turned off on all S3 boards? It was not turned off on ESP32-S3-BOX

thorny dove
#

@tulip sleet in a later moment I would like to learn what you've changed to get rid of that bug.

tulip sleet
#

it will be in the PR. The original SPIRAM settings were copied from elsewhere and I think they were just wrong in various ways. I started from a minimal set and just kept adding a few related ones at a time until it worked.

silver tapir
thorny dove
#

OK

tulip sleet
#

this is not the first time a macOS upgrade has broken something about small drive support

#

😕

#

@onyx hinge looks ok for S3 after I looked at the PR OP.

onyx hinge
#

@tulip sleet there aren't enough pins on the 'box so disabling it would be fine too afaik

#

But it should work on esp32/s2/s3 equally and the point of the new component was to make it work on esp32s3 generally

manic glacierBOT
#

Fixes #7093 and #6206.

Fix sdkconfig flags for ESP32-S3-BOX SPIRAM. The original flags were wrong in one or more ways, copied from someplace else, I think. I did not try to diagnose each wrong setting, but instead came up with a simpler set.

Note that CONFIG_SPIRAM subsumes ESP32S3_SPIRAM_SUPPORT.
from esp32s3/Kconfig:

    # Hint: to support SPIRAM across multiple chips, check CONFIG_SPIRAM instead
    config ESP32S3_SPIRAM_SUPPORT
        bool "Support for external, SPI-...
deft jay
# onyx hinge that's a small program that seemed to reproduce the problem you're encountering....

aah, understood, was not at all offended at any remark about my code, I'm very much so learning about these concepts still and just wanted to convey my level of non-expertise. Was asking if the error was caused by my code or a genuine bug. From skimming this it looks like it was a backend bug if I'm not mistaken. Anyway, thank you for looking into it! Sorry to clutter the -dev channel with this chatter.

manic glacierBOT
onyx hinge
#

@tulip sleet I noticed that the inner loop of TileGrid's pixel generating function uses division and modulo, which are not a single instruction (let alone a fast one) on Cortex M0s like rp2040. I wonder if there's some way to get rid of the division...```
473 int16_t local_y = input_pixel.y / self->absolute_transform->scale;
0x100856a8 <+444>: ldrb r1, [r5, #6]
0x100856aa <+446>: bl 0x1009e7f0 <divmod_s32s32>

tulip sleet
onyx hinge
#

oh within divmod_s32s32? I duno

tulip sleet
#

is that code open source?

#

i was maybe misremembering about the RP2040's ROM fp routines; is int division in there too?

#

otherwise it's just in libc, I guess

onyx hinge
#
   0x1009e7f0 <+0>:    ldr    r2, [pc, #68]    ; (0x1009e838 <divmod_s32s32_savestate+24>)
   0x1009e7f2 <+2>:    ldr    r3, [r2, #120]    ; 0x78
   0x1009e7f4 <+4>:    lsrs    r3, r3, #2
   0x1009e7f6 <+6>:    bcs.n    0x1009e820 <divmod_s32s32_savestate>
End of assembler dump.
(gdb) disas divmod_s32s32_savestate
Dump of assembler code for function divmod_s32s32_savestate:
   0x1009e820 <+0>:    push    {r4, r5, r6, r7, lr}
   0x1009e822 <+2>:    ldr    r4, [r2, #96]    ; 0x60
   0x1009e824 <+4>:    ldr    r5, [r2, #100]    ; 0x64
   0x1009e826 <+6>:    ldr    r7, [r2, #116]    ; 0x74
   0x1009e828 <+8>:    ldr    r6, [r2, #112]    ; 0x70
   0x1009e82a <+10>:    bl    0x1009e7f8 <divmod_s32s32_unsafe>
   0x1009e82e <+14>:    str    r4, [r2, #96]    ; 0x60
   0x1009e830 <+16>:    str    r5, [r2, #100]    ; 0x64
   0x1009e832 <+18>:    str    r7, [r2, #116]    ; 0x74
   0x1009e834 <+20>:    str    r6, [r2, #112]    ; 0x70
   0x1009e836 <+22>:    pop    {r4, r5, r6, r7, pc}
   0x1009e838 <+24>:    movs    r0, r0
   0x1009e83a <+26>:    beq.n    0x1009e83e <divmod_u32u32+2>
End of assembler dump.
(gdb) disas divmod_s32s32_unsafe
Dump of assembler code for function divmod_s32s32_unsafe:
   0x1009e7f8 <+0>:    str    r0, [r2, #104]    ; 0x68
   0x1009e7fa <+2>:    str    r1, [r2, #108]    ; 0x6c
   0x1009e7fc <+4>:    cmp    r1, #0
   0x1009e7fe <+6>:    beq.n    0x1009e80c <divmod_s32s32_unsafe+20>
   0x1009e800 <+8>:    b.n    0x1009e802 <divmod_s32s32_unsafe+10>
   0x1009e802 <+10>:    b.n    0x1009e804 <divmod_s32s32_unsafe+12>
   0x1009e804 <+12>:    b.n    0x1009e806 <divmod_s32s32_unsafe+14>
   0x1009e806 <+14>:    ldr    r1, [r2, #116]    ; 0x74
   0x1009e808 <+16>:    ldr    r0, [r2, #112]    ; 0x70
   0x1009e80a <+18>:    bx    lr
   0x1009e80c <+20>:    push    {r2, lr}
   0x1009e80e <+22>:    movs    r1, #128    ; 0x80
   0x1009e810 <+24>:    lsls    r1, r1, #24
   0x1009e812 <+26>:    asrs    r2, r0, #31
   0x1009e814 <+28>:    eors    r1, r2
   0x1009e816 <+30>:    cmp    r0, #0
   0x1009e818 <+32>:    beq.n    0x1009e81c <divmod_s32s32_unsafe+36>
   0x1009e81a <+34>:    mvns    r0, r1
   0x1009e81c <+36>:    movs    r1, #0
   0x1009e81e <+38>:    pop    {r2, pc}
```There's sure a lot of instructions here
#

it just be in the fw, not the rom.

tulip sleet
#

we could make our own fast paths; would not be hard to bencharmk

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

@anecdata Maybe I've misunderstood what the script is supposed to show? I'd like to think it would show an IP if it's actually connected. REPL doesn't show that, no errors. Just connect and disconnect.

import time, wifi, socketpool
from secrets import secrets

SLEEP = 1

pool = socketpool.SocketPool(wifi.radio)

def connect():
    try:
        wifi.radio.connect(secrets['ssid'], secrets['password'])
    except ConnectionError as e:
        print("Connection Error:", e)
...
cedar veldt
#

Hi, I asked yesterday in help-with-circuitpython but maybe it's more of a dev question so hope it's OK to bring it here! I'm wondering why the Arduino Nano RP2040 Connect has 50K more RAM available to the user program than the Pico W. (On 8.0.0-beta.3)

manic glacierBOT
manic glacierBOT
tulip sleet
manic glacierBOT
#

Final feedback: today at 14h20 utc+1, I downloaded from Adafruit's bucketlist file:
adafruit-circuitpython-espressif_esp32s3_box-en_US-20221027-8fe44a2.uf2,
with datetime stamp of creation: 2022-10-27T22:28:31.000Z.
Copied this .uf2 to my ESP32-S3-Box. It works!. CPY statusbar shows an IP-address, proving that exists a WiFi connection.
My script (to receive, analyze and display certain airplane flight gps data, from MS Flightsimulator 2020), is working, while the WiFi connection is there...

manic glacierBOT
proven garnet
#

A heads up the PyPI is in read-only "maintenance" mode right now for scheduled upgrades - I can confirm any releases will fail to upload.

#

The website also says as much

thorny dove
#

@proven garnet the 403 error. The reason could be an outage of internet somewhere. I had 403 errors a few days ago clicking on a link on an Adafruit repo towards ReadTheDocs. It turned out that the reason was outage of internet. A few hours later all was normal. Clicking the link then brought me to the docs page. It was on the same day that people in my country (Portugal, EU) reported outage of WhatsApp services.

manic glacierBOT
onyx hinge
#

@tulip sleet a "power of 2 tile size" optimization won't help with an extremely common case, the terminal text. Its grid is non-power-of-2

#

I was thinking of tracking the sub-grid unit explicitly, but that got hairy quickly.

tulip sleet
#

i wasn't thinking about the mod

onyx hinge
#

the tilegrid scale of the terminal can be non-1 as well, not sure if it's ever not 1 or 2 though

tulip sleet
#

does divmod get called once or twice?

onyx hinge
#

oh that's just one example of use of division/modulo, the more complex expression involves tracking both the scale factor and the grid coordinates

#
            uint16_t tile_location = ((local_y / self->tile_height + self->top_left_y) % self->height_in_tiles) * self->width_in_tiles + (local_x / self->tile_width + self->top_left_x) % self->width_in_tiles;
            input_pixel.tile = tiles[tile_location];
            input_pixel.tile_x = (input_pixel.tile % self->bitmap_width_in_tiles) * self->tile_width + local_x % self->tile_width;
            input_pixel.tile_y = (input_pixel.tile / self->bitmap_width_in_tiles) * self->tile_height + local_y % self->tile_height;
#

it's quite complex, but there are divisions by the scale, and divisions and modulos by the tile width and height

tulip sleet
onyx hinge
#

incrementally, it would be good to figure out how to hoist the "y" calculation parts to the outer loop

#

the divmod_s32s32 function gives the quotient and remainder at once, but as I pasted yesterday there are a lot of function call layers before actually interacting with the fast hardware divider register.

#

The SIO provides one 8-cycle signed/unsigned divide/modulo module to each of the cores

proven garnet
#

PyPI is back online!

manic glacierBOT
#

The UF2 bootloader comes up as 2e8a:0003.

The other major use is the QMK keyboard firmware, which defines VID/PID by the keyboard, not the controller.

The only contact I can find for Maple Computing themselves is a reddit user (probably). Otherwise, it looks like Keebio (@nooges) has been doing most of the work (eg, contributing support to QMK).

I would appreciate advice. I know of https://pid.codes/ but the Elite-Pi is not an open hardware project.

cedar veldt
onyx hinge
#

There's a lot of RAM reserved for the networking functionality even if it's never used.

cedar veldt
tulip sleet
#

@onyx hinge I need to add some forgotten include guards in some files. I see varying opinions about whether #pragma once is safe or not. Files with the same name (of which we have many) are noted as a possible stumbling block, but it seems like the compiler checks much more than that: it would check time, and contents as well. You've used it several places: is there any reason NOT to use it that you know of?

onyx hinge
#

as far as I know, #pragma once as implemented in gcc is safe and frees you from the need to worry about having unique header guards.

tulip sleet
#

thanks, it's a lot easier to type, and I think any issues would show up as compilation errors, at least for us

onyx hinge
#

Identifying the same file on a file system is not a trivial task.[6] Symbolic links and especially hard links may cause the same file to be found under different names in different directories. Compilers may use a heuristic that compares file size, modification time and content.[7] Additionally, #pragma once can do the wrong thing if the same file is intentionally copied into several parts of a project, e.g. when preparing the build. Whereas include guards would still protect from double definitions, #pragma once may or may not treat them as the same file in a compiler-dependent way. These difficulties, together with difficulties related to defining what constitutes the same file in the presence of hard links, networked file systems, etc. has so far prevented the standardization of #pragma once.[citation needed]
I disagree with almost everything in this paragraph on wikipedia 🙂

tulip sleet
#

exactly, some people in the comments did too; I read that a couple of years ago, and just now

onyx hinge
#

at $OLD_JOB we had a manually executable test for the include guards matching a defined style. We could code that in pre-commit, but I believe #pragma once is preferable. It's on any plausible compiler and works fine for our needs.

#

I can vaguely imagine some awful build system that DOES do these symlinking and hardlinking things and could run into trouble, but .. stop hurting yourself like that.

tulip sleet
#

i just made all the common-hal alarm .h's uniform, in the course of adding guards to a bunch of files that were missing them (it worked by accident up to now)

onyx hinge
#

should help marginally with compile time too

tulip sleet
#

but i'm not worried 🙂

onyx hinge
#

huh

tulip sleet
#

the test case is rather pathological

onyx hinge
#

something must have gotten better since 2013 when the difference was 21x, and the later discussion in 2018 when it was 5x. Well, I guess the difference is that the guarded version got slower, the pragma once version is about the same. 😭

tulip sleet
#

it might be lotsa RAM on the test computer or SSD's

onyx hinge
#

almost every time I invested a performance problem in the gnu toolchain it turned out to be a "boy, this is quadratic, because you've got a linear search, probably through a linked list". Mostly I saw it in binutils. Too bad more sophisticated things like hash tables are so hard to build in C.

#

I see this is a similar thing

#

Any use of "#pragma once" sets this flag.
This then leads to a loop over all headers, so n^2 behavior.

#

and I never managed to fix any of them myself, because I didn't even want to campaign for the time to work on it

tulip sleet
#

when I was in a compiler class in grad school in 1978 I had to write my own C string library. C++ might be terrible in various ways but at least it has useful libraries

onyx hinge
#

on a different subject, do we have a writeup of WHY we require a unique vid/pid for each build? I feel like I don't know why, except that it's what adafruit does, and maybe that it's actually important to Arduino.

tulip sleet
#

i think the two original motivations are for arduino, and for programs like Mu to identify the board. The latter is somewhat moot now that we use the USB interface names

#

Limor had a reason which I've asked about a couple of times but forget after a while each time

onyx hinge
#

sounds like we're in a similar boat. I wasn't sure if this was from Limor or from Scott.

tulip sleet
#

same q about why we have different BOOT drive names

#

UF2BOOT would be good enough

onyx hinge
#

something to do with how they flash & QA the boards?

tulip sleet
#

that's an interesting point -- does validation during test

onyx hinge
#

to the extent that it's about Adafruit's practices I don't see why we would make a hard line enforcing it on others. Why not allocate one PID for "generic third party CircuitPython product" and allow that to be used for any non-adafruit board..?

tulip sleet
#

Limor had a good reason, but I can't remember it now. Worth asking again. It should be from pidcodes, not us.

jaunty juniper
#

I believe there is an issue with windows caching drivers based on VID/PID, which is why we need to use the cleaner tool sometimes, if each board has the same pid that problem might appear much more often

tulip sleet
#

yes, that' sounds familiar, thanks

jaunty juniper
#

by the way I'm not sure how Mu does with ESP32/C3 boards, can we use the Micropython mode or something ?

onyx hinge
#

Yeah I wouldn't know about Windows problems. But, in fact, CircuitPython boards can change their descriptors all the time since at least 7.x...

jaunty juniper
#

yep and sometimes I see a board stop being recognized properly because of a change like enabling/disabling part of the USB things, solved with the cleanup tool

tulip sleet
#

I don't know that Mu has any support for non-MSC boards

jaunty juniper
#

(I don't use CP on windows a lot, but I've seen similar things in support questions)

steep musk
#

Excuse me if this is the wrong group for this .. I created a "Socket Server" using inspiration from the existing HttpServer is that something that you'd be interested in putting into circuit python alongside the HttpServer?

onyx hinge
#

The USB-IF have given Raspberry Pi permission to sub-license the USB product ID values for its vendor ID (0x2E8A) since they are to be used on a common silicon component which will be used within a customer's product (the RP2040 silicon). For each of the allocations we (Raspberry Pi) will have to apply to the USB-IF to agree this use. This document then contains the full list of product IDs we have approved.
Oh poor rpi, they have to take each request to USB-IF. well, nobody said it should be easy.

I need someone to convince me not to start a website called "nebraska firmware mart" that allocates small integers that, in association with the nubmber 0004, could potentially be used for some unspecified purpose. (Vendor ID 0004 was allocated to Nebraska Furniture Mart, but is listed as abandoned)

onyx hinge
#

the library has to follow the usual format of all the adafruit libraries, which is easiest if you create the structure for your github repo using cookiecutter (you can do that, then copy in the files you already wrote)

jaunty juniper
onyx hinge
#

thanks for the link Neradoc!

#

I knew there was more documentation than that

steep musk
#

Thanks both and thanks for all the great work. I've created a WiFi controlled USB hid device over the last couple of days

manic glacierBOT
manic glacierBOT
jaunty juniper
#

@tulip sleet I am looking at adding safe mode with the button on the m5stack stamp C3 and because that adds a new safe mode message (the button has a name that is not in an existing string) it also does this in circuitpython.pot, from main. (In addition to adding the string)

-#: py/objnamedtuple.c
+#: py/objexcept.c py/objnamedtuple.c
#

on "can't set attribute"

tulip sleet
jaunty juniper
#

no that PR is not me

idle owl
#

@onyx hinge @tulip sleet I ran into the same Learn issue with takeover, while Justin was the one looking at my guide page. So, there's an issue filed now for it. 😄

cedar veldt
#

How do I build Pico W? I'm getting make: *** No rule to make target 'lib/cyw43-driver/src/cyw43_stats.c', needed by 'build-raspberry_pi_pico_w/genhdr/qstr.split'. Stop.

manic glacierBOT
#

I speculated that at least on M0 devices like the RP2040, the use of division and modulo operators inside the TileGrid's main loop.
I removed it to the greatest extent possible from the inner loop, then piled on more optimizations.

I ultimately raised the frame rate of scrolling terminal content from 2.7fps to 3.90fps on a raspberry pi pico w, as measured by this program below. Since much of the screen was blank space I'm not sure these are actually full-screen refreshes, vs just refreshi...

tulip sleet
#

do make fetch-submodules at the top level

idle owl
#

@tulip sleet Is there any way to view super-old Adabot library reports on S3? I thought you had a hand in making them only recent ones.

#

I want something like 1 February 2019.

cedar veldt
#

... But maybe I was on the wrong branch when I did it. trying again

jaunty juniper
#

by the way I make alphas as I progress with my web (and usb) workflow app (apparently around once a week so far), if anyone wants to try it out.
It's very alpha but can edit files, install and update libraries, backup the board's content (useful with web workflow since updating CP with esptool usually erases the flash)
https://github.com/Neradoc/discotool-circuitpython-manager/releases
I make windows and mac builds manually but I think you can run it on linux by running npm install and npm start from the repo dir.

manic glacierBOT
cedar veldt
#

Fetching the submodules again didn't make any difference.

#

Ah no, I think that operation didn't complete because of an error in espressif

tulip sleet
idle owl
tulip sleet
cedar veldt
#

I'll also see if I can still build espressif sometime 😉

idle owl
#

@tulip sleet No apparently it wasn't in the notes doc. I checked a few. I'm now not sure where we even stored this info. Remember when we had PyPI download stats for every library? I genuinely don't even remember what we did with that data. I'm suggesting if we can get it going again to add it to the autogenerated library list in the Bundle repo (circuitpython_library_list.md, not drivers.rst), and also include a total for ALL libs in the library section of the daily lib report, since listing every library would be untenable.

thorny dove
#

@tulip sleet or anyone else who owns an ESP32-S3-BOX, when you have the time for it, can you check on your ESP32-S3-BOX the x,y touch values for the four corners of the display (approximately). See the uploaded 'code_touch_test.py'. In the top of the script it has the values I found on my esp-box. I ask this because my esp-box has the x,y 0,0 in the right-top (instead of left-top).

tulip sleet
#

I think there was some issue about their accuracy? I have a vague memory of that

idle owl
#

That I don't recall. Maybe? I think it was vaguely interesting, And moreso now because editing environments use them, and so on, so it kind of shows more than Blinka use at this point. I'm going to have Alec look into what's needed to get that data again, and if it's bonkers, forget it. But if it's reasonable, I think it's worth having.

#

He's also planning to look into the Blinka PyPI download stat, because he thinks that's inaccurate for PyPI, and might be able to get a more accurate and appropriate number for that as well.

tulip sleet
jaunty juniper
#

yup same coordinates

idle owl
#

Yes!

thorny dove
#

@tulip sleet & @jaunty juniper thank you

idle owl
#

@tulip sleet Thank you so much. I felt like the whole situation had ghosted. I swore it was documented....

#

But I couldn't find anything.

jaunty juniper
#

the driver is pretty basic, it reads bytes, and splits them into the values with struct, no math done on x or y

idle owl
#

I remembered the other thing PyPI stats were good for, @tulip sleet. When we do library-wide updates, we know which libs are likely the most popular, and we can avoid starting with those, and start with the bottom of the list instead. That was really nice to have. As it is, we guess.

thorny dove
#

@jaunty juniper OK

#

@tulip sleet & Neradoc about the touch controller the ESP32-S3-BOX: It's a bit confusing for me: in github.com/espressif/esp-box/components/i2c_devices/touch_panel folder there are the files ft5x06.c (with I2C address 0x38) and tt2100.c (with I2C address 0x24). I go to check if an I2C.scan() reveals any of them. OK: the i2c.scan found the following addresses: ['0x18', '0x24', '0x40', '0x68']. I had no external devices attached other than that piggy-back 3-led board and an CP2102N via UART. However I have the adafruit_tt21100 module imported and a touch object created using 'tt = adafruit_tt21100.TT21100(i2c).

jaunty juniper
#

hmmm it stops detecting touches after a few

thorny dove
#

ahhhh... I thought I had made an error in my program or so. When I push a finger for longer time it ultimately comes with updated x,y values. But this touch part I am using now in a much long script for other things. I just inserted the touch part to test it there in that script.

#

The script I uploaded above was written solely for a touch test.

#

In the factory demo the touches work fine.

onyx hinge
#

curious. I wondered whether it took much time to claim a DMA channel. Keeping the SPI peripheral's DMA channels around from the time it is locked until it is unlocked is slower at doing displayio refreshes...

#

specific to rp2040

blissful pollen
#

I also think (and may be imagining it) that after the DMA write it, CP pauses until it is done

idle owl
#

OK, so I'm writing the guide for the PiCowbell Proto (https://www.adafruit.com/product/5200) and there are four ways to assemble it for the Pico(W). The fourth one is as follows: "Solder the PCB directly to the Pico headers - of course this is very compact and inexpensive but you won't be able to remove the PiCowbell." I don't see how that's possible. It's not reversible, the STEMMA QT requires you to have it oriented properly so GPIO4 and GPIO5 are the Pico(W) pins connected to the STEMMA QT connector. So if you try to do that with the board oriented properly, either the components on the Pico(W) get in the way, or the button and STEMMA connector on the PiCowbell get in the way. Am I missing something obvious here? I'll get clarification from Limor on Monday, but I figured I'd ask here in case anyone else saw something I haven't.

#

Anyway, if anyone has any ideas, please tag me. Half of the guide will be documenting the four options to assemble it. So I have to figure this out eventually. 😄

ember iris
# idle owl OK, so I'm writing the guide for the PiCowbell Proto (https://www.adafruit.com/p...

If I understand this correctly, it is suggesting soldering the cowbell to a pico which has these male headers soldered like this: https://cdn-shop.adafruit.com/970x728/5584-02.jpg
where the plastic spacer on the male short plug headers offer enough clearance for the stemma and button to be spaced in like that and you can solder the pins directly to the cowbell which make it a permanent design
But I could be thinking about this wrong and not seeing it

idle owl
#

Ohhhhh, it says "Pico headers", not "Pico". You may be right there.

#

That makes a lot more sense.

#

Checking one of my soldered Picos to see if it fits

ember iris
#

It's my best guess because you're right, a direct solder on the through holes wouldn't make sense here

idle owl
#

Oof I did a bad job soldering these headers on. One is on an angle, making getting it into the Cowbell difficult. Ugh.

#

There we go.

#

OK, yes, that seems reasonable. There's still a little gap between the PiCowbell and the plastic bit on the header, but it's definitely a slimmer sammich than any other option.

#

Could trim the header pins to slim it further.

ember iris
#

*nervously stares at my soldering, which often is brute forced into place*
Huh, I *totally* don't know what that's like

idle owl
#

Feeling a bit dumb here. 😄

#

Thank you for clarifying!

idle owl
ember iris
#

I'm getting better at it, but back in college I relied on a few friends who were amazing at soldering. Which might have not been a great option in hindsight, but here we are--with new skills to learn lol

idle owl
onyx hinge
#

it's a bummer I don't know how to do function-level profiling on microcontrollers, at this point I think I'm probably guessing wrong about what's taking a long time

cobalt grail
#

Can someone clarify what BOARD_USER_SAFE_MODE_ACTION is supposed to explain?

manic glacierBOT
cobalt grail
#

It would also be helpful if someone could tell me how to get rid of the stupid "wat" icon that automatically got added to my post?

jaunty juniper
#

so you know why it happened

#

example:

You are in safe mode because:
You requested starting safe mode by pressing G3 button at start up.
To exit, please reset the board without pressing G3 button at start up.
#

(that's a build I'm looking at for the M5Stack stamp C3)

#

(I added a "the" since)

#

on many boards it would be "boot button"

#

the CPX says: pressing both buttons at start up

cobalt grail
#

So it is an explanation but only half of the sentence? And no. I have no idea why it happens.

jaunty juniper
cobalt grail
#

And yes, it was M5Stack only.

jaunty juniper
#

basically it's 2 sentences that are stuck at compile time:
You requested starting safe mode by + BOARD_USER_SAFE_MODE_ACTION
To exit, please reset the board without + BOARD_USER_SAFE_MODE_ACTION

#

it is already on many boards, you could lookup how they do it

#

the "both buttons version" and "boot button" version etc.

cobalt grail
#

Ok. For anyone "listening" - You can't use half of an english sentence and add another half of a sentence and think it may make sense if string concatenating the two.

jaunty juniper
#

yeah

cobalt grail
#

That is not how other languages work.

jaunty juniper
#

we should rework it into a separate sentence

cobalt grail
#

So give me a full sentence to translate. Don't try to be smart. It does not work.

idle owl
cobalt grail
#

Thanks for the link. I fixed the symantics by adding 2 words. Just wish I knew where to add those words in the sentence prefix, as the are the same for all.

cobalt grail
#

I tried to edit my post uyt nope. Very odd!

idle owl
cobalt grail
#

Seems it was added because I wrote "what"???

#

So Discord sucks. Got it. 🙂

jaunty juniper
#

it's like it tries to push you to use it with popups so you have to intentionally cancel it or something

#

is there a X next to it when you hover like link previews ?

cobalt grail
#

Nope. No way to delete it. Very strange.

#

It does state that is the "What" decal so.

#

Either way, I will spend exactly 0 seconds on that going forward.

jaunty juniper
#

🤷

manic glacierBOT
#

I'm using an Arduino Nano RP2040 and trying to use an I2C LCD display (connected to the default SDA and SCL pins) with CircuitPython but when creating the busio I2C class (using the default SDA and SCL pins) on my board it returns the exception: "ValueError: No I2C device at address: 0x20". I've used busio.i2c.scan and it returns 3 (when the lcd is connected, and 2 addresses when not) different I2C addresses (the other 2 addresses are the sensor chip built into my board and the crypto engine)...

#

I thought it worked, there are a number of issues and PRs from some time ago to add the board and tweak the config, and this Learn Guide: https://learn.adafruit.com/circuitpython-on-the-arduino-nano-rp2040-connect/wifi I think some of the pins are different, so the Arduino NINA firmware must be used, not the Adafruit fork. I seem to recall that the Arduino NINA firmware needed to be updated for some older boards. Have you tried it with the Arduino NINA firmware and the Adafruit ESP32SPI lib...

manic glacierBOT
manic glacierBOT
#

Other notes:

  • _refresh_area sends many many too many commands. For SPI TFTs it should only be necessary to send one update rectangle and then a stream of only pixels
  • but for other devices like i2c, having the data split across multiple 'send's may not be OK
  • this requires the transaction be enlarged to cover the whole update...
  • and is the only plausible way for background writes to work
  • as proof that this has a payoff, reducing the number of send calls by enlarging the minim...
manic glacierBOT
#

Another note on speeds: We can try several levels of "no-op"'ing _refresh_area.

Test Time (ms) saved vs baseline
Baseline 252 N/A
Skip just displayio_display_core_fill_area 84 168
Skip just _send_pixels 185 67
Skip both 13 239
1 transaction simulation 3 249

The last test does a 'break' at the end of the first loop, trying to demonstrate the overhead that I think is mostly in start/stop transaction, set refresh ...

manic glacierBOT
jaunty juniper
#

how about:

You are in safe mode because:
Both buttons were pressed during start up.
To exit, please reset the board without requesting safe mode.
jaunty juniper
#

that is a bonus

analog bridge
#

If you are at it, maybe replace:

- G3 button was pressed, BOOT button was pressed
+ %q button was pressed, MP_QSTR_BOOT
jaunty juniper
#

not sure how that fits, I'll open the PR an we can discuss it there

manic glacierBOT
lavish saffron
#

I'm adding typing to the Adafruit_CircuitPython_Wiznet5k library.

When I try to build the documents with sphinx I get the following exception:

Warning, treated as error:
autodoc: failed to import module 'adafruit_wiznet5k' from module 'adafruit_wiznet5k'; the following exception was raised:
Traceback (most recent call last):
  ...
  File "/Users/martinstephens/Documents/Coding/Repos/Adafruit_CircuitPython_Wiznet5k/adafruit_wiznet5k/adafruit_wiznet5k.py", line 43, in <module>
    import adafruit_wiznet5k.adafruit_wiznet5k_dhcp as dhcp
  File "/Users/martinstephens/Documents/Coding/Repos/Adafruit_CircuitPython_Wiznet5k/adafruit_wiznet5k/adafruit_wiznet5k_dhcp.py", line 28, in <module>
    import adafruit_wiznet5k.adafruit_wiznet5k_socket as socket
  File "/Users/martinstephens/Documents/Coding/Repos/Adafruit_CircuitPython_Wiznet5k/adafruit_wiznet5k/adafruit_wiznet5k_socket.py", line 28, in <module>
    _the_interface: Union[wiznet5k.adafruit_wiznet5k.WIZNET5K, None] = None
AttributeError: module 'adafruit_wiznet5k' has no attribute 'adafruit_wiznet5k'

The code in question is below and PyCharm is not flagging this reference as a problem. I'm stumped.

try:
    from typing import Any, Optional, Tuple, List, Union
except ImportError:
    pass

import gc
import time
from micropython import const

import adafruit_wiznet5k as wiznet5k

# pylint: disable=invalid-name
_the_interface: Union[wiznet5k.adafruit_wiznet5k.WIZNET5K, None] = None

Here's the directory tree, which makes me think that the reference is good:

├── adafruit_wiznet5k
│   ├── __init__.py
│   ├── adafruit_wiznet5k.py -> WIZNET5K is a class
│   ├── adafruit_wiznet5k_dhcp.py
│   ├── adafruit_wiznet5k_dns.py
│   ├── adafruit_wiznet5k_ntp.py
│   ├── adafruit_wiznet5k_socket.py
│   └── adafruit_wiznet5k_wsgiserver.py

Any help greatly appreciated as always!

violet thistle
#

Hey. asyncio.run() is not working in V8.0, is this intentional or an oversight?

stuck elbow
#

it's a bug, there is a fix already

manic glacierBOT
#

Recently I found a hack on a website (sorry - I forgot the name) which works fine in my environment:

Der following code to scan the I2C-Adresses is necessary

i2c = board.I2C()
while not i2c.try_lock():
pass
running = True
try:
while running:
print(
"I2C addresses found:",
[hex(device_address) for device_address in i2c.scan()],
)
# time.sleep(2)
running = False

finally: # unlock the i2c bus when ctrl-c'ing out...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

I have concluded that there does not appear to be a path of incremental change to the goal of overlapping pixel transmission (DMA) with pixel calculation, due to OnDiskBitmap (even if unused). My rather grumpy-sounding commit message about it, in yet another branch without a future: d72d841

Hmm that is disappointing. My first thought would be a dedicated DisplayBus would be ideal but would obviou...

manic glacierBOT
manic glacierBOT
#

Initial support for the Waveshare RP2040-Plus

Opening it as a draft PR as there are still a few kinks to work out: e.g. the SPI bus is not working as of now.

Pinout is supposed to be the same as the Pi Pico. Main changes are the USB-C port instead of microUSB, and the addition of a battery charging/discharging circuitry with a PH1.25-2P battery connector. The battery voltage, [according to the schematics](https://www.waveshare.com/w/upload...

manic glacierBOT
#

Initial support for Waveshare RP2040-LCD-1.28

Testing underway.

Features:

  • GC9A01A LCD controller, with a 240x240 circular LCD display, over SPI
  • QMI8658C IMU, accelerometer and gyroscope, over I2C
  • 2MB flash (W25Q32JVSSIQ according to schematics, but that's a 4MB flash)
  • PH1.25-2P battery connector, with an ETA6096 battery charge/discharge controller
  • VBAT is hooked up to GPIO 29 with a 0.50 bias via resistors

TODO:

  • Circ...
proven garnet
#

So it looks like the weekly report only reports downloads from piwheels.org, which doesn't include good ol' PyPI. We actually (and unsurprisingly) get way more downloads from PyPI, about 25322 in the last week (10903 was the reported piwheels for reference). Working on adding that back into adabot and the weekly meeting since I got Google BigQuery to work with pulling that data, which is how I'm getting that number.

#

Not sure I'll have it in time for next meeting but effectively if you add both of those, for example, the actual number of times Blinka is downloaded shoots from 10903 to 36225, over triple the reported amount!

manic glacierBOT
#

Fixes #6483; subsumes PR #7137.

Changes how alarm.wake_alarm is set. Instead of creating an alarm on the heap, after the VM is set up, a static alarm object is used instead, which can be set up outside of the VM.

This simplifies how and when to store the alarm info, and removes the need for the first_run boolean that was passed around in main.c.

Use #pragma once instead of #ifdef #include guards for alarm-related .h files: some were missing, so I just changed them all, to...

manic glacierBOT
#

Yes that's me =) great to see this picked up here! For context, I mainly do hardware design, and Keebio (@nooges) generally has been helping by adding files to QMK / software-related-things.

As far as VID/PID goes, no we did not formally get a VID/PID heh, it's mainly being used in QMK, which as you pointed out above defined VID/PID by keyboard not the specific controller.

Let me know what I can do here to assist.

#

CircuitPython version

Adafruit CircuitPython 8.0.0-beta.3 on 2022-10-20; S2Mini with ESP32S2-S2FN4R2

Code/REPL

import time
while True:
    print("Sleeping!")
    time.sleep(1)
    print("Loopping!")

Behavior

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
]0;🐍192.168.1.138 | code.py | 8.0.0-beta.3\Sleeping!
Loopping!
Sleeping!
]0;🐍192.168.1.138 | Done | 8.0.0-beta.3
Code stopped b...

#

Hi, Auto reload is normally caused by something on your computer writing to the board's drive.
Some antivirus software do that, there's an FAQ on that.
https://learn.adafruit.com/welcome-to-circuitpython/troubleshooting#code-dot-py-restarts-constantly-3108374

If that's not enough, you can go to the Adafruit forum or Discord for support questions where people might be able to help you figure it out:
https://forums.adafruit.com/
https://adafru.it/discord

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

I've been programming on raspberry Pi for some time and love using the asyncio mechanisms for creating event driven programs. More recently I've started developing a product using the Seeed nRF52840 Sense board, using CircuitPython. I see we've got asyncio support, but there doesn't seem to be any async oriented libraries.

e.g

I would like to be able to do:

async def buttonAction(pin: DigitalInOut):
    while True:
        await pinChanged(pin, RISING_EDGE)
        #do some act...
manic glacierBOT
#

Sali @BeatArnet and many thanks! This worked for me :clap:

I also formatted your example a bit:

# See: https://github.com/adafruit/Adafruit_CircuitPython_LC709203F
# Ensure to have "adafruit_lc709203f" installed (circup install adafruit_lc709203f)
import time
import board
from adafruit_lc709203f import LC709203F, PackSize

BATTERY_MON_ADDRESS = 0x0B  # Address for ESP32-s3 tft Feather


def hack_for_i2c_issue():
	i2c = board.I2C()
	while not i2c.try_lock():
		pass
...
manic glacierBOT
manic glacierBOT
thorny dove
#

@tulip sleet about the touch readings on the ESP32-S3-Box I wrote this function: def clr_touch(): global tt_touched cnt = 0 ret = True tt_cnt = 0 while tt.touched: ts = tt.touches if isinstance(ts, list) and len(ts) > 0: tt_cnt +=1 cnt += 1 if cnt >= 100: ret = False break print(f"clr_touch(): touches count= {tt_cnt}") if tt_cnt > 0: tt_touched = False The global tt_touched flag is set when there was a touch event. This is done in function ck_touch(). Then, in function loop() there is this call to clr_touch() when the tt_touched flag is set: if tt_touched: clr_touch() REPL output after I touched the display: ```

ck_touched(): screen touched at: [{'y': 106, 'x': 144, 'id': 0, 'pressure': 34}]
menu_touch(): Touched: id= 0, at x,y = 144,106. Pressure= 34
clr_touch(): touches count= 3```Conclusion: the touch module, for reason unknown to me, fills the touch event 'buffer' with three occurrances/events after one touch. I also saw one time (or maybe few more times) that the 'touch event buffer' already had touch event data at start of the script. Perhaps I touched the display before (or touching it with one or more fingers to fix the device onto the table while pushing the reset button on the side). Anyway I implemented a call to clr_touch() at the start of the script and in the loop(), when tt_touched is set I do a call to clr_touch() to have a 'clean touch slate'. This solution works in this script as I like it to be. After a touch I now only get one call to a function 'menu_touch(ts)' which displays the touch event attributes: id, x, y and pressure'. The ultimate goal is to create a menu-system using touch events/data.

thorny dove
#

@tulip sleet the touch attributes displayed

tulip sleet
thorny dove
#

OK, I did not (recently) see the contents of that library. I go to do that.

#

I realize myself that I have to keep in mind that the code for the touch events (as a lot of other events), 'outside of my CPY script' are always running in the background. So, if I touched the display before starting my script, the code of the device already has accounted the fact that the display been touched.

tulip sleet
#

@onyx hinge I wrote the release notes for 8.0.0-beta.4. If you feel like reviewing #7154, I'll make a release today. I tested it and a user tested it.

onyx hinge
#

it touches 47 files, eek!

tulip sleet
#

many are just renaming, or the same change multiple places

onyx hinge
#

create -> record is a renaming?

tulip sleet
#

those routines used to actually allocate a new object. Now they record the info in a static singleton, hence the name change.

#

also "wakeup" -> "wake" for consistency.

#

the singleton is a union to hold the largest possible object. (even the largest is pretty small)

manic glacierBOT
tulip sleet
#

I started to add even more flags that handled the lifetime of the alarm info, but it was a mess, and varied per port. This is simpler.

onyx hinge
#

simplification is good

jaunty juniper
manic glacierBOT
#
[adafruit/circuitpython] New tag created: 8\.0\.0\-beta\.4
orchid basinBOT
manic glacierBOT
#

Tests ok with TimeAlarm and PinAlarm, thanks. There might be a regression: entering deep-sleep should release the display. At least there was a pull-request for that as far as I remember. And it does work for a few cycles (run-deep-sleep-run-...) and then stops working. Not sure if this is related to this patch, because I have not tested before merging your patch, but I will do so within the next few days.

vague thicket
#

Hello, can anyone point me to something which would help me fix the issue with CI? I have PR which is failing (https://github.com/adafruit/circuitpython/actions/runs/3356536863/jobs/5561676282), but I do not know what to change to make it finish. I understand that there is problem with translation and I sync with Adafruit CPY repo, but that does not help. I do not have these files in my PR so I´m bit confused and I did not find any topic in history which would help me. I´m new to the CI so sorry for probably stupid question. Many thanks for any help.

tulip sleet
#

do you mean that you merged in the latest from adafruit? You may still need to do make translate

vague thicket
tulip sleet
manic glacierBOT
manic glacierBOT
#

CircuitPython version

ESP32C3 XIAO CircuitPython 8.0.0-beta.4

Code/REPL

N/A Can't upload or doing anything else, so its pointless.

Behavior

Issues:

Timeout error still happening.

Thonny file upload of anything larger than read me locks up from 7-30%.

MUEditor only brings up REPL. Files cannot be uploaded. You have to have it on CircuitPython setting.

ESPWebTool - the newer one will get to the upload portion and freeze.

ESPWebTool...

manic glacierBOT
manic glacierBOT
#

I mean third-party disk utilities or anti-virus programs. See https://learn.adafruit.com/welcome-to-circuitpython/troubleshooting for some examples of how these programs have sometimes interfered. The symptoms you list don't sound as familiar, but it would still be good to cross-check the board on a non-Windows machine or another unrelated Windows machine with different hardware and installed programs.

#

I mean third-party disk utilities or anti-virus programs. See https://learn.adafruit.com/welcome-to-circuitpython/troubleshooting for some examples of how these programs have sometimes interfered. The symptoms you list don't sound as familiar, but it would still be good to cross-check the board on a non-Windows machine or another unrelated Windows machine with different hardware and installed programs.

I'll try to connect it to my nas with filebrowser installed i guess (docker) and see if ...

manic glacierBOT
manic glacierBOT
lavish saffron
#

Hi, I've been adding typing to the Adafruit-CircuitPython-Wiznet5k package. I have hit a roadblock with adding typing to the WIZNET5K class. The class is used as an argument for classes in other modules (e.g. DNS, DHCP) that are in turn imported into the wiznet5k module. Thus, when I import the WIZNET5K class to add as a type I create cylic imports. This prevents import adafruit_wiznet5k.adafruit_wiznet5k from working and makes pylint grumpy. I've tried some suggestions from the Interweb and I've grep'd the entire CircuitPython bundle for cyclic-import. I'm stumped.

Any suggestions will be gratefully received!

jaunty juniper
#

I believe that's when you need to start with from __future__ import annotations as the first import

#

not sure though

onyx hinge
#

if it's pylint, you can add the right magic comment to tell it not to produce the message in the first place. Here's one example: https://github.com/adafruit/Adafruit_Blinka/blob/ef2657eaa1caf3262c6bbe1f2df5b6ed08f72162/src/adafruit_blinka/microcontroller/generic_micropython/__init__.py#L21 ```py

def __repr__(self):
    # pylint: disable=import-outside-toplevel, cyclic-import
    import board
    import microcontroller.pin

    for key in dir(board):
        if getattr(board, key) is self:
            return "board.{}".format(key)
    # pylint: enable=import-outside-toplevel, cyclic-import

``` though I don't know if there's a reason that the one-line version import microcontroller.pin # pylint: disable=cyclic-import wasn't used, I'd try that first

GitHub

Add CircuitPython hardware API and libraries to MicroPython & CPython devices - Adafruit_Blinka/init.py at ef2657eaa1caf3262c6bbe1f2df5b6ed08f72162 · adafruit/Adafruit_Blinka

lavish saffron
lavish saffron
#

I'm getting this error while building the docs with sphinx:

...adafruit_wiznet5k.py:docstring of adafruit_wiznet5k.adafruit_wiznet5k:6:Field list ends without a blank line; unexpected unindent.

How do I find the location of the error within the file (1000 lines of code)? I've added -v -v to the command but it's still obtuse! Thx

lavish saffron
manic glacierBOT
manic glacierBOT
proven garnet
manic glacierBOT
tulip sleet
#

@proven garnet @idle owl @jaunty juniper circup is throwing an error getting a library from the latest bundle. My circupt version is up to date. I haven't figured it out yet but need to do some other things. If you have time, could you take a look

jaunty juniper
#

what error ?

tulip sleet
#
halbert@cod:~$ circup install adafruit_lc709203f
Found device at /media/halbert/CIRCUITPY, running CircuitPython 8.0.0-beta.3-20-g2bba6a68e.
Downloading latest version for adafruit/Adafruit_CircuitPython_Bundle.

  [####################################]  100%
  [####################################]  100%
  [####################################]  100%

OK

Searching for dependencies for: ['adafruit_lc709203f']
WARNING:
    typing-extensions is not a known CircuitPython library.
WARNING:
    typing-extensions is not a known CircuitPython library.
Traceback (most recent call last):
  File "/home/halbert/.local/bin/circup", line 8, in <module>
    sys.exit(main())
  File "/home/halbert/.local/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/home/halbert/.local/lib/python3.10/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/home/halbert/.local/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/halbert/.local/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/halbert/.local/lib/python3.10/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/halbert/.local/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/halbert/.local/lib/python3.10/site-packages/circup/__init__.py", line 1310, in install
    device_modules = get_device_versions(ctx.obj["DEVICE_PATH"])
  File "/home/halbert/.local/lib/python3.10/site-packages/circup/__init__.py", line 903, in get_device_versions
    return get_modules(os.path.join(device_path, "lib"))
  File "/home/halbert/.local/lib/python3.10/site-packages/circup/__init__.py", line 954, in get_modules
    metadata = extract_metadata(source)
  File "/home/halbert/.local/lib/python3.10/site-packages/circup/__init__.py", line 536, in extract_metadata
    if loc > -1:
UnboundLocalError: local variable 'loc' referenced before assignment
jaunty juniper
#

ok that's what happens when a mpy file is invalid

tulip sleet
#

yes, so something odd about the .mpy's in the bundle? The previous problem was a badly assembled bundle

jaunty juniper
#

can you try with an empty lib directory ?

turbid radish
#

@lone axle - newsletter draft is ready to crib off of for notes

onyx hinge
proven garnet
#

Interesting I can take a look this evening perhaps if it isn't resolved by then

lone axle
#

Thank you

proven garnet
#

Update to my Piwheels comment - it was 11337 downloads from Piwheels in the last month, but 31466 from PyPI in the last week

jaunty juniper
proven garnet
#

So it's more like 12 times the number of downloads 🤯

tulip sleet
# jaunty juniper I can't reproduce, I think it's choking on a file in your lib directory, can you...
Version 0.9.10.dev34+g49860ce of circup is outdated. Version 1.1.3 was released Friday September 16, 2022.
Found device at /media/halbert/CIRCUITPY, running CircuitPython 8.0.0-beta.3-20-g2bba6a68e.
The following modules are out of date or probably need an update.
Major Updates may include breaking changes. Review before updating.
MPY Format changes from Circuitpython 6 to 7 require an update.

Module               Version     Latest  Update Reason  
-------------------- ----------- ------- -------------- 
adafruit_lc709203f   2.2.2       2.2.8   Minor Version  
adafruit_scd4x       1.3.3       1.3.7   Minor Version  
adafruit_bus_device  Bad format  5.2.3   Major Version  
#

a bit weird because I've been using circup on 8.0.0 builds with no issues

#

(I think!)

proven garnet
#

It's a day for spooky tricks!

jaunty juniper
#

is something abnormal with the adafruit_bus_device file then ?

tulip sleet
#

I wiped lib/ and was able to isntall the library. So I guess there were old versions there

#

perhaps it should just erase and reinstall if it finds a "bad" library

#

my local problem is solved, thanks!

proven garnet
#

Library ghosts gx_imaghostoooo

jaunty juniper
#

I wanted to add a unit test for bad MPY, and maybe there was something else, I don't remember why I didn't open that PR, I'll do it now and we'll see

lone axle
#

<@&356864093652516868> the weekly meeting is pumpkin spice flavored, and will occur at 2pm eastern today, a bit over an hour from now. If you'd like to participate join us here on discord and put any hugs or status updates you have in the notes doc. See you there. 🎃

onyx hinge
idle owl
#

Womp, womp.

#

Have not seen that before.

random junco
onyx hinge
#

Going from 3 to 4 is fine

#

backing it up is still a good idea

random junco
onyx hinge
#

Newsletter looks great based on the sneak preview, Anne!

turbid radish
#

Thanks!

idle owl
#

Thanks! 😊

proven garnet
#

Yes! We can take some extra days to get them merged!

idle owl
#

🎉

turbid radish
#

👏

midnight ember
#

I love all Jeplers keyboard projects. So many keyboards, so little time.

#

As if desoldering feathers wasn't bad enough now the pico has like 40 pins, that's a lot of desoldering.

onyx hinge
#

can you make a fritzing diagram of that? I am not understanding your explanation.

midnight ember
#

Ahh Apple and USB issues, it never ends.

#

lol

onyx hinge
#

I've been thinking of getting a usb c / displayport hub which I think is supposed to be possible with my laptop, but I'm not confident what to look for / what to get...

midnight ember
#

i didn't even catch that melissa, that's funny

lone axle
#

On my end she started metnioning USB / audio all working, then silence 😅

midnight ember
#

oof he went robot

gilded cradle
#

You're cutting out @lone axle

idle owl
#

Sound good now.

midnight ember
#

good now

gilded cradle
#

👍

idle owl
#

@lone axle You disappeared again.

midnight ember
#

back

tulip sleet
#

start at top of tekktrik

idle owl
#

That's entirely fair.

midnight ember
#

yes

#

BigQuery?

#

never heard of that

idle owl
proven garnet
#

Yeah, this was one of the challenges of the pastebin library - I had something like a unified API and all fairly similar in use, but they're effectively different things under the hood.

lone axle
idle owl
#

@tulip sleet Might have something to add?

proven garnet
#

Oh I did something similar to this for my personal project, where PRs triggered things in another repo. I can look into it.

#

Text only

lone axle
proven garnet
#

Yeah that's right

midnight ember
#

github trolling?

onyx hinge
#

I think they probably mean well

#

I just don't have the experience that indicates that they're right about it

midnight ember
#

maybe someone from hacktoberfest trying to get in some PR's somehow?

proven garnet
#

Sounds good, I can close the suite of issues with what's been said here, I think this makes sense

onyx hinge
#

"I am not a robot. I am doing a project to help developers with API compatibility checks. I hope to submit a PR or communicate with you, if possible." -- https://github.com/PyDeps

gilded cradle
#

Thanks

onyx hinge
#

👋 have a good week all!

austere acorn
#

I missed the meeting, darn daylight saving changes 🙄 lol

#

Happy Halloween everyone!

midnight ember
#

Happy Halloween!

onyx hinge
#

oh oh! next week the US time changes

idle owl
midnight ember
#

Don't forget Help Desk is tonight... though I'm on candy duty.

#

About what times is Help Desk going to go for? I want to be there but I get a barrage of kids every Halloween in the suburbs so I don't want to have to go in and out.

idle owl
#

@tulip sleet I disconnected you from chat so you don't end up with surprises.

tulip sleet
idle owl
#

If Apple won't touch it because we didn't complain loud enough, let's incite more complaints.

tulip sleet
#

I said to use the Feedback Assistant tool. I was just about to encourage it more. pt and I are corresponding with the RPi folks.

idle owl
#

Excellent, thanks.

jaunty juniper
#

it's about UF2, is there anyone at Microsoft that knows someone at Apple ? 😏

lone axle
#

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/1BtwVBaXLXcFHM52SGlMX0-7K0m3r_e-T6l6MLfux5KI/edit?usp=sharing

Reminder that daylight savings time ends for US timezones on 11/6. Clocks will be adjusted back by 1 hour the day prior to the weekly meeting.

edgy edge
#

has anyone ever looked into implementing interrupt handling for an IMU like LSM6DS? The motivation behind this is to enable orientation change and significant movement interrupts to be generated while in very low power state to extend battery life.

lone axle
#

@idle owl okay, post meeting stuff is wrapped up. I am available now or any time.

proven garnet
#

Closed those issues regarding pinning dependencies, thanks y'all!

idle owl
#

@onyx hinge Good call on those issues. I hadn't looked into it, so I didn't respond, but you had it nailed down.

quasi veldt
#

@meager fog https://blog.adafruit.com/2022/09/12/circuitpython-wifi-support-on-the-raspberry-pi-pico-w-part-deux/ what IDE setup do you have in this first video? Is that Atom + some custom terminal plugin?

Adafruit Industries - Makers, hackers, artists, designers and engineers!

Last time we checked in on the PicoW CircuitPy progress, we saw the onboard LED blinking – basically proving that the SPI transport and firmware upload was working. This round, we’re st…

idle owl
quasi veldt
# idle owl Please do not tag Ladyada. It's entirely inappropriate, and you won't receive an...

Happy to put it there.

If you don't mind me asking, I'm not sure why it's "entirely inappropriate". Can you please explain?

Here's what was going thru my mind:

  • she made the video I'm linking to (or at least I think it's her voice). She has the prerogative to ignore my message, and anyone else can respond as well.
  • And it's related to testing and coding a new library support in circuitpython which I'm happy to help code (I've not written any circuitpython library code yet, but you can see I've participated in design discussions before).
  • I want to get involved with committing code (hence I'd like my IDE setup to match)
  • Obviously she's the CEO of a company (so am I) and there are boatloads of other things to focus on. I take no offense if she doesn't respond.

What am I missing in my internal logic?

I appreciate your constructive criticism.
No passive aggressive or anything from my side - just looking to learn 🙂
Thanks!!

idle owl
# quasi veldt Happy to put it there. If you don't mind me asking, I'm not sure why it's "ent...

We discourage tagging anyone with whom you were not already in a conversation, or did not have previous permission to do so. There are a couple of reasons for this. One: This community will likely be able to help you sooner than the person you tagged. Two: Tagging someone can imply that you did have that permission or a previous conversation going, and other folks may be less likely to respond. The second one is probably the more important one. Even if the question pertains to an individual, it is still better not to tag them without permission for both of those reasons. It's not listed explicitly in the Code of Conduct, but perhaps it should be.

I understand where you're coming from, as to why you tagged her on that message, but as admins and moderators, we encourage folks to avoid that practice, and instead, simply post the question and let the community help you. Specifically regarding Ladyada, she doesn't really spend time on Discord at all, and does not have notifications turned on. This means if the community assumed you already had help, you likely would not have gotten an answer, which I'm almost certain someone in the community can provide. Due to her commitments and obligations elsewhere, we are more likely to ask folks not to tag her specifically. Even with her not getting the notifications, it has the possibility to get through somehow, and we are protective of her time.

quasi veldt
idle owl
manic glacierBOT
#

Still unhappy about something 😕

Note: Not building languages {'hi', 'ko', 'cs', 'el'}
building boards with parallelism 2
Error: Build maker_badge for de_DE took 0.66s and failed
make: Entering directory '/home/runner/work/circuitpython/circuitpython/ports/espressif'
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 'boards/maker_badge/sdkconfig', needed by 'build-maker_badge/esp-idf/config/sdkco...
manic glacierBOT
onyx hinge
#

oof that is a heavy dependency, rust is also a swiftly moving target at this time. I wonder if we can select a different minifier.

ruby atlas
#

everything's a moving target 🙂

ornate breach
#

Well, everything in the vehicle is not moving to the observer

onyx hinge
#

hi rose.

ruby atlas
#

hi jeff.

manic glacierBOT
manic glacierBOT
#

I started out just wanting to request that a comment be added that the blank lines within boardlist are important and cannot just be removed.

But then I got creative. I don't know if column is standard on macs, but I came up with this:

define show_board_error
boardlist = 
$(info Valid boards:)
$(shell printf '%s\n' $(patsubst boards/%/mpconfigboard.mk,%,$(wildcard boards/*/mpconfigboard.mk)) | column -c 80 1>&2)
$(error Rerun with $(MAKE) BOARD=<board>)
endef

ifeq ($(...
ancient hemlock
#

Is there a quickstart/guide of some kind to adding functionality to CircuitPython? I'm not especially well versed in C/C++ but I like to learn how things work.

stuck elbow
#

otherwise, I would say look at the pull requests that add a module

ancient hemlock
stuck elbow
ancient hemlock
stuck elbow
#

scroll down to the ones with Scott, those are the ones about the internals

#

the later ones with Tim are also interesting, but they are more about the python libraries

manic glacierBOT
ruby atlas
#

Who do I have to beg for hacktoberfest-accepted labels 🙂

random junco
ruby atlas
#

🙂

proven garnet
#

Hallo

#

If the PRs were merged in a repository with the hacktoberfest label you're probably fine. Though not sure what happens now that it's November

jaunty juniper
proven garnet
#

I meant to ask - I keep seeing PRs to ESP_ATControl, which has a depreciation notice in the README (or a no-longer-supported one at least). Do we want to archive that repo?

manic glacierBOT
ruby atlas
#

@proven garnet they're for here 🙂

proven garnet
#

I don't think I understand what you mean, do you mean the recently GitHub bot posted PRs need the label?

ruby atlas
proven garnet
#

Out of curiosity, what does your Hacktoberfest account list for that PR? Is it pending?

ruby atlas
#

pending 🙂

#

oh wait not-accepted

proven garnet
#

I can add the label, curious what happens - we definitely don't want it as not-accepted

ruby atlas
#

both of the late-night ones were. we're still in the 7 day window where the PRs can be labelled.