#circuitpython-dev
1 messages · Page 15 of 1
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.
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 --versionis 3.81 brew install makegot hergmake --versionof 4.3. Then, usinggmake BOARD=...worked across 3 full builds- I built 3.81 on my linux box, an...
that's good, because you know you're likely to end up working on the guide text
😭 sigh.
the part I didn't say is that you know you're well-suited to writing stuff like that up
This looks good to me. I checked the definition style against other boards.
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...
I made an extremely minimal library for CP1203, which has a qwiic board from adafruit that I've owned for many years and not been able to use: https://gist.github.com/jepler/4e1840fe9a37a500d13287870c1f03d7
I didn't get the multitouch stuff to work but I didn't try too hard.
Is this an edge vs level triggered interrupt problem?
What's more beginner friendly - requiring an input be str or calling str() on inputs to turn them into strings?
the latter
Context is they provide something to be pasted to a site like PasteBin
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)
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
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.
Thanks!
@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=stdlibThis 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
wow, it's a long thread. Ok, let me take a look at that article first. Thx!
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.
Thanks I think that did it!
yay! goodnight!
Is the update to esp-idf 5.0 intended to be a pre or post-8.0 thing?
its likely to be post-8.0
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
can't connect ?
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.
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 =...
Yeah, to the network
beta.3 actually
But I also saw it on 2 I think
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...
@proven garnet apparently I do also have a qt py s2. Do you have a test script I can run to help confirm?
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
Oh I have plenty of those snippets on hand. Ok will do in a little while.
I also recently changed routers and quadruple checked my credentials, for what it's worth.
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?
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
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
using my basic get time from online here: https://github.com/DJDevon3/My_Circuit_Python_Projects/tree/main/Circuit Python Tips %26 Tricks
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
This is the lwip no-os version of SO_REUSEADDR, which is set on all listening sockets in the espressif port; do so here as well, it makes running servers easier. The "address in use" (OSError: [Errno 112] EADDRINUSE) error does not occur.
@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 🙂
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
@FoamyGuy this should cure the problem you saw when testing the httpserver, which I initially discounted. when I went looking I saw that espressif was automatically setting the flag, so I did it as well
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.
Thanks @midnight ember for helping to confirm it's not just me!
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?
@midnight ember do you have CP active on qtpy s3?
yes
are you trying get into bootloader mode pragmatically?
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
import microcontroller
microcontroller.on_next_reset(microcontroller.RunMode.BOOTLOADER)
microcontroller.reset()
does this work
nope, refuses to show featherboot
had to get into safemode to get out of it, whew
featherboot? do you mean to go into UF2 bootloader? For that try, microcontroller.RunMode.UF2
yes thought they were the same mode?
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.
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
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
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.
@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)
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?
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.
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.
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.
The bug tekktric had was on the qt py s2.
right, that's the first thing I posted. I suspect the issue isn't inherently with beta.3
Oh you’re saying I don’t have to bother testing the qt py s3.
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)
Thought it was a power delivery difference using pins vs usb..
Not a connected sensor or something.
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)
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.
I've switched over a bunch to beta.3, more solid than previous
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.
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...
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.
(I did get 3 Connection Error: Unknown failure among 500 connections: (1) 2; (1) 4; (1) 200)
Added a new board: M5Stack Core Basic
Manufacturer page: https://docs.m5stack.com/en/core/basic_v2.6
CircuitPython version
Current
Code/REPL
not relevant
Behavior

Description
On the README page https://github.com/adafruit/circuitpython, README.rst, under Documentation, I clicked on the link Read The Docs (http://circuitpython.readthedocs.io/en...
is there some "trick" to download the builds from artifacts in github? Beyond clicking the link of the artifact name on pages like this https://github.com/adafruit/circuitpython/actions/runs/3322093441
I think you have to be logged into github
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.
weird
I got a pink unicorn clicking on your link
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 😅
there might be github issues right now ?
github issues in general
thank you
not showing in https://www.githubstatus.com though
same issue with the blue bar but I did get the zip by middle clicking the zip link/copy and pasting it
The problem seems to be inside the https://docs.circuitpython.org/en/latest/shared-bindings/index.html.
If I enter a search term it redirects me to 403 forbidden. When I click on on of the items listed on the page, e.g. adapter, BluetoothError or RoleError, the same happens.
is anyone else getting a 403 forbidden at https://docs.circuitpython.org/en/latest/shared-bindings/_bleio/index.html#bleio.RoleError ? I'm not but a user reports it above.
I can't reproduce here. I visited https://docs.circuitpython.org/en/latest/README.html then entered RoleError and selected the first/only hit. This took me to https://docs.circuitpython.org/en/latest/shared-bindings/_bleio/index.html#bleio.RoleError which displays in my browser
If I click the link RoleError (not using search) then it also works, linking me to the same page and anchor https://docs.circuitpython.org/en/latest/shared-bindings/_bleio/index.html#bleio.RoleError
My browser ...
Should watchdog be triggering on a long file read?
Nope, sorry, I am working on ESP32-nn sleep issues at the moment.
like a crash/reset ? or the watchdog module watchdog setup and triggering because the read is too long ?
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
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.
and it's a dictionary structure, so loading it into a bytearray is impractical
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.
I'm curious how a python dict in an mpy file would perform here
I could try that
I get a memory allocation error on my Mac using mpy-cross o_O
just that file (macOS 12.6) latest mpy-cross, just downloaded
yeah, that shocked me
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
that's a new one
It doesn't match the symptoms you reported, but it's notable that cloudflare recorded an outage today. The incident report states that there were "Increased HTTP 530 Errors" and was resolved earlier today.
I think it's file size
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 ;-)
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
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...
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...
Hi Jeff, thank you! You're right. I just checked, now that link works. I just saw on the Portuguese TV that there was here also an outage of WhatsApp. So I close this issue.
I saw this comment of someone claiming that miniMQTT fails on ESP32-S2 with a similar error as I fixed for Pico W in PR #7048.
I was able to reproduce it and saw that it throws an error with the error code -11. This is a negative version of errno.EAGAIN (11) and causes the error not to be ignored by miniMQTT.
I've tested the fix on an Unexpec...
@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"
About the HW TIMER errors: the error is reported four times. The hardware timers are described here: General Purpose Timers. The doc starts to describe that there are 2 Timer groups. Each group having 2 timers. When I google'd for the error I found about four hits. Some had to do with IR-applications.
About the errors I2S port 0/1 has not installed. The doc about I2S says:
ESP32-S3 contains two I2S peripheral(s). These peripherals can be configured to input and output sample data via the I2S driver. [...]
Driver uninstall:
I believe we see these errors in the log output of all builds. It would be worth comparing the log output of a board that works with the Box output.
OK. However I don't understand your last sentence. Can you rephrase pse.
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.
Thank you for the elaboration. I'll try to build a debug version for the UM FeatherS3.
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
- Fixes #6994.
- Code to wait for a pull to happen was wrong -- it only waited in one direction, and it waited essentially forever. Not a good idea anyway, since the pin might be tied firmly to one value or the other. Instead, add a brief delay after setting all pulls.
- Make sure RTC is powered up during sleep.
- Unrelated corrections. to Metro ESP32-S2 debug UART pins.
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
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...
There can be a mismatch. Both should follow the actual use case. In the case of timeouts using monotonic, you can use float, because all int are float in the numeric tower.
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.
no testing performed but the basic change makes sense. waiting forever for a pin to reach a particular status doesn't seem right. 50ms should be generous for almost any RC constant of a pulled I/O pin.
does this need to be done in the "low_count > 0" (i.e., == 1) case? I don't know what the call does.
.. apparently, no, this is specific to ESP_EXT1_WAKEUP. https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-reference/system/sleep_modes.html#external-wakeup-ext1 assuming all esp32/s2/s3 are identical. I just checked the one page.
RIght, I checked that. I'm not sure this is necessary, because there is some "automatic" setting of these power domains based on what is going on elsewhere, but I think it's belt-and-suspenders.
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...
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...
So, with the 'own build' for the FeatherS3, trying to establish a WiFi connection 'by hand', from the REPL, the board's CPU halted.
When flashing the 'normal' CPY V8 b3, downloaded from 'circuitpython.org', WiFi contact establishes without problem on the UM FeatherS3.
OK, all this is 'noise'. The problem is with the Espressif ESP32-S3-Box.
@rdagger Can you please try again with latest nightly build?
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
You'll need a unique USB VID/PID pair for this board.
If you are open source maker, then you can request a PID from http://pid.codes/
For boards without native USB, you can request a Creator ID from https://github.com/creationid/creators/
Otherwise, companies should pay the USB-IF for a vendor ID: https://www.usb.org/getting-vendor-id
Hi, how should I type these? Thx
`
def enter(self):
return self
def exit(self, exc_type, exc_val, exc_tb) -> None:
...
`
why would you? it's not like you are ever going to call them directly
is this in libraries or shared-bindings? You can look through existing libraries to find similar examples. The easiest way to do that is to clone the Bundle repo and get all the submodules, which are all the libraries in the bundle. Then you can search through all the libraries at once.
It's in the socket class of the Adafruit_CircuitPython_Wiznet5k library. I'll clone the Bundle, an excellent suggestion, thanks.
yeah it's in many other libraries
Wacky, do you want to submit the issue since you debugged it more?
You can type them if you want, but I wouldn't worry about it like @stuck elbow said if you don't want to since they aren't accessed directly. If you want though, the motor library has __enter__() and __exit__() typed:
Most of the "dunder" (__abc__()) methods have already been typed in at least one other library I think, as has been mentioned.
My preference is to leave them untyped
I wonder why mypy doesn't type them implicitly, after all it should know what their types are
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?
Also, looking for general feedback on this new pastebin library. I tried to keep it extremely simple, just init and dump text, but didn't know if it was beginner-friendly or missing anything: https://github.com/tekktrik/Adafruit_CircuitPython_Pastebin
Wanted something like a uniform API when the services vary in what knobs can be turned when uploading content.
@proven garnet sure can do
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...
The Arduino Nano RP2040 has both Bluetooth and Wi-Fi capabilities but only Bluetooth is supported my CircuitPython on this board. Are there any plans in the future to add Wi-Fi support to the Arduino Nano RP2040?
@georgboe Looks like it works now, thanks!
Using 8.0.0-beta.3-15-g0bc986ea7
I reverted back to the unmodified version of adafruit_minimqtt.mpy and it still works without having to modify the timeouts.
I'll let it run for a couple of days to test the stability.
When "Limitations:" is in the class docstring, it is sometimes taken as a class attribute name because of the colon. When exactly is not clear, but changing embedded colons or various indentations fixes the problem.
- Fixes #7118.
.descriptors was inexplicably missing from the locals dict for _bleio.Characteristic.
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...
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...
looks simple enough, thanks
@onyx hinge You have marked the coproc PR as draft, are more changes in the pipeline?
I had intended to test it on an esp32s2 but didn't find the time yet. I marked it as ready for review just now
@tulip sleet I have an old PR that you think you had said you were going to take a look at later, just wondering if I should close it since its old or if things are still in flux. Or I can retag librarians if you're just swamped: https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI/pull/160
Remembered it because you recently made an issue in HTTPServer about WSGI stuff and didn't know if that also had an effect.
15 is WIFI_RADIO_ERROR_4WAY_HANDSHAKE_TIMEOUT. Is this the onboard antenna? What's the physical environment between the QT Py and the Access point?
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.
I've been in the same room as my router or in the other room when this happened, nothing too wild.
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
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?
@tulip sleet Do you still want me to test this? I see Jeff approved it.
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
CircuitPython Weekly Meeting for October 31, 2022 Welcome to the CircuitPython Weekly meeting notes! Feel free to add your Hug Reports and Status Updates early. During the meeting, we go through them as a round robin sorted by username. If you can’t make the meeting and would still like to part...
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:
- 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.
- Only scheduling based on changes in the latest commit and ignoring changes in the previous commits.
- Fix:...
If you have a setup to test it yes, that would be great. Jeff checked over the code logic but did not test it. I tried your example with value=True and value=False, and it seems to do what I would expect now, including printing messages at the right time, but good for you to check too.
I think I'm still set up somewhere. My desk is such a mess, I'm fairly certain the board is still in here somewhere. I'll take a look today or tomorrow.
I might merge it sooner if I want beta.4 more quickly, but a test would still be good. It's better, I just want to make sure it's right now.
Sounds good. I have no objections to testing it in beta.4 as well. Merge whenever works for you and I'll test it accordingly.
I can't reproduce it on either model of QT Py S2, using the above code or forever-looping connection code. In the forever-looping code, there are several errors of various types among 500 good connections, but retry recovers the connection.
@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.
I tested this and confirmed it is able to go back to serving again after soft reset from saving a file. No more addr in use errors.
Thank you @jepler
To test locally: (Guide to get GITHUB_TOKEN)
REPO=adafruit/circuitpython PULL=7132 GITHUB_TOKEN=*** EXCLUDE_COMMIT=30f07fbf22bfb7e19e27f062d1ab39ab83e7b067 python tools/ci_changes_per_commit.py
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 that commit still trigger a rebuild of all the affected builds based on the scope of some file change?
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?
@jepler would you mind adding tags or augmenting the title so it's obvious this is raspberrypi-specific?
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'm 10 ft from my AP and the Qt Py S3 connect fine. Qt Py S2 fails every time. Cannot get a connection. I can't throw all my other boards that have no problem connecting into the mix because they're still on beta 2 or lower.
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...
TinyUF2 Bootloader f12dd0f - tinyusb (0.10.1-109-g9b3ec69b)
Model: Adafruit QT Py ESP32-S2
Board-ID: ESP32S2-QTPY-revB
Date: Dec 12 2021
I will merge this now in prep for a beta.4 fairly soon. @kattni you can test at your leisure.
Which rev board, B or C? I have two Rev B, and 10 Rev C with u.FL, in operation and don't see connection issues on any of them.
Huh, weird, I do still have it
Ok, please try again to transfer it
Clicked on my end. Leaving the page alone for a few minutes this time in case that's the problem.
thanks Dan, tags and titles are really useful for future code archaeologists 😉
Both of the ones I've noticed it on are Rev C
I'm using b with no ufl. On board antenna.
Tried your code with same result.
I haven't put any of the looping stuff in there. If you could provide a script to try I'll gladly do it.
Script linked above (https://gist.github.com/anecdata/613f9de22ae246e59ca581fbad7de749). I was about to say your Board-ID says "rev B" in the comment above, but I seem to recall some discussion on Discord that those didn't necessarily match the silk. And lo and behold, they don't.
Mine has no mention of a rev on the silkscreen.
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...
Ah, mine says C but the bootloader shows B in INFO_UF2.TXT for both.
@MicroDev1 Ah, the flash size is used to create the .bin. I removed that from the Makefile; that is wrong. Pushing a new commit.
Well I was hoping anecdata's would actually be the different one to explain the difference, now we have a hodge podge of no consequence.
@midnight ember the revision is the letter in a circle
It should have a Ⓑ or ⓒ, not to be confused with a Copyright ;-)
ahh yes it's a C
@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.
@proven garnet Got it this time!
Huge success!
And transferred to Adafruit.
Sorry. Closing: the basic premise of this PR is wrong: the CIRCUITPY_ESP_FLASH_MODE and CIRCUITPY_ESP_FLASH_FREQ values are needed by esptool.py elf2image`.
That doesn't mean that the values for the boards are right; a lot of people copy them blindly.
Thanks @idle owl!
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 ...
@idle owl I love the scorpion, did you have any hand in its creation? 🙂
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.
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”
Where are the errors in that display?
This being compared to the claws many scorpions have which tend to be kind of small
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.
CircuitPython version
Adafruit CircuitPython 8.0.0-beta.3 on 2022-10-22; Raspberry Pi Pico W with rp2040
Code/REPL
text = open("TextFile.txt", "w")
text.write("Test")
text.close()
Behavior
Returns the following error:
Traceback (most recent call last):
File "", line 1, in
OSError: [Errno 30] Read-only filesystem
Description
No response
Additional information
No response
What a momento 😳
Hehehe.
I'm removing myself as a reviewer. Thanks for taking into account my comment on the basic idea. But at least right this second I'm not able to think too hard about the specifics of this proposed change.
The onboard CIRCUITPY filesystem is read-only by default so that code doesn't collide with edits from USB. More here:
https://learn.adafruit.com/circuitpython-essentials/circuitpython-storage
Feel free to get help on Discord https://adafru.it/discord in the #help-with-circuitpython channel
what scorpion?
it lost two legs, poor thing
It was our graphics person Bruce! I asked around 🙂
Um... no it didn't?
I had to google, but the grabbyhands are their 7th and 8th legs, at least at first glance.
Wait, don’t they have 10 appendages?
scorpions have 8 walking legs, just like their cousins spiders
Google says 6-12
the claws are the equivalent of pedipalps in spiders
There are over 60,000 known species in this order. Like most arthropods, arachnids have eight jointed legs and an exoskeleton. Arachnids have two sections to thier bodies - the prosoma and the opisthosoma. The promosa is the front part of the body. The promosa includes the arachnids head and thorax or cephalothorax. Arachnids have four pairs of ...
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.
The ones you don’t see and live by are the safest
Interesting.
scorpions are basically spiders with opposable thumbs
That description is basically terrifying.
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
appendages, depending on how you count
So that's how you get a leg up in life
I think I still trust Wikipedia more than Wildlife Journal Junior
if we can't trust the governments of the world, whom can we?
Do pass along that it looks great
PT said "If someone hates it or it's offensive, then I did it. I'll apologise and make sure it gets updated." I piped up that (you) loved it. He said, "Oh, ok good." 😄
I’m glad I’m the opinion of reason there hahaha
it's cute
Did the “Blinka squashing bugs” graphic ever make the chopping block?
Not sure I’m using the right analogy
No! But to be honest, it's still on my list. So it hasn't been approved or denied yet. I am still working on what it might look like so I could provide Bruce with a sketch (which he would end up doing much better anyway, but still).
The way you worded it, it sounds like you're asking if it was denied.
Opposite, approved lol
Hah
Anyway, I was thinking of Blinka racing after little green circuit bugs or something like that
Or maybe holding a fly swatter
My other thought was blinka controlling a circuitpython powered squashing robot lol
Hah! That one would be beyond my sketching skills. But I bet Bruce would still produce excellence.
That was all him. I told him what you said, and that's what he came back with.
Yeah, it was great
As implied above, this appears to be an upstream bug: https://github.com/espressif/esp-idf/issues/8569. Other Espressif users have reported this. It has been "selected for development" by Espressif. We will await an upstream fix for this. I'll remove this from the 8.0.0 issues.
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...
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.
I am making with the 8.1 beta branch. Is that correct?
The fix for this should be present in the main branch. Check if your local commit history has https://github.com/adafruit/circuitpython/pull/7094/commits/2285dd1838fba467f800ad6c114569fb07101909.
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
@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.
Thanks anecdata. Much appreciated!
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 ?
I copied 'esp-idf' (V 5.0) from elsewhere into /circuitpython/ports/espressif. It worked. firmware.uf2 etc built.
Hi! @thorny dove, I don't have a esp32s3 board handy so I won't be able to run any tests.
I did a DEBUG=1 build with current main and have attached the bin and uf2 files for espressif_esp32s3_box.
I might be able to provide some insights if you can get the debug output.
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")
@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
Is this the output from the build files I provided?
Yes. I go now to upload the complete serial output to Github > Adafruit > Circuitpython > Issues #7093
@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__(...
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.
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 ?
tinyuf2 or circuitpython? I have a PR which updates CP to idf-v5.0 https://github.com/adafruit/circuitpython/pull/6913
I was thinking to make a build of tinyuf2 with ESP-IDF V5.0
I created a build with of CP with idf at the latest commit in release/v4.4 branch plus CP customizations
Ok
Can you test this:
Thank you
tinyUF2 shouldn't affect this issue, unless you have noticed that a bin works fine and uf2 dosen't
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
Hardware: (Adafruit ESP32-S3-Box and Adafruit CP2102N.


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...
Thank you Dan. I cannot find back yet the page where I read "needed". I am searching for it.
@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.
Thx. I’ll have a look at TypeVar 
@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:
- Your unit is actually defective. Unlikely, but possible.
- 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...
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...
I reproduced your problem on my S3 box, so you can hold off on hardawre testing. The settings for PSRAM in sdkconfig are unusual, and I am fiddling with them to see if I can get it to work.
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.
,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"""
...
Please ignore all the weird pylint docstring stuff, was cracking jokes in the channel at how bad pylint was grading my example code...shouldn't affect performance.
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...
Just because I thought it might...idk...change behavior in some way...I compiled mpy-cross to compiled code.py to code.mpy...
made no difference in execution time.
Adafruit CircuitPython 8.0.0-beta.3 on 2022-10-20; Seeeduino XIAO RP2040 with rp2040
>>> import code.mpy
True
begin
8.913
Could you try this with 8.0.0-beta.2 and beta.1? There have been significant changes to asyncio since then. If those don't make a difference try rolling back the asyncio library to https://github.com/adafruit/Adafruit_CircuitPython_asyncio/releases/tag/0.5.16, and then trying those betas again? Thanks.
@dhalbert that fixed it straightaway. revert to beta 2.
"""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...
the first submitted code wasn't actually even possibly correct, due to some function naming errors related to sloppy debugging of mine. This code does run on 8x-beta 2
@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.
No, it means there was a regression from beta.2 to beta.3, so it's a new bug
Thanks for the testing! Can you come up with the simplest, smallest example? Remove all the commented out stuff, and all the pylint fixes No reason to run your code through pylint just for a test example.
@jepler Should I assign this to you? Regression from beta.2 to beta.3 in asyncio (so something in _asyncio?)
Happy to help, will need to be a little later in the day however.
OK, if I disable PSRAM completely, it works. So there is something about the PSRAM setup that is causing trouble.
I am going to hide a bunch of comments in this issue to expose the ones that are the most relevant.
import asyncio
async def main():
print("in async func")
print("before asyncio run")
asyncio.run(main())
print("after asyncio run")
It's pretty broken. A much smaller reproducer is above
@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()
so maybe we diverted with micropython about the semantics of ticks()??
is this difference particular to the RP2040 impl?
I have this issue on my mind sometimes: https://github.com/adafruit/circuitpython/issues/6452
oh, supervisor_ticks_ms IS an object after all
that at least satisfies my intuition that it should have been a compile error 😕
.. and explain why, because it wasn't clear to past-me.
Actually tested on a pico w :)
Closes: #7136
I'd swear up and down that I did test on hardware, but obviously not. 😦 😭
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?
OK, I think this is a dupe of #6206. Closing this in favor of that bug, which gets to the root issue faster. @PaulskPt wait up before trying more things, as I am on the trail of the bug.
that's a small program that seemed to reproduce the problem you're encountering. Not intended to be any comment on the quality of your code.
@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)
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
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.
OK
it should work with your test program too;
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\
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!
Thank you very much !!!
sure - it was confusing
Yeah. And I threw in a lot of noise. Sorry.
@onyx hinge should CIRCUITPY_ESP32_CAMERA be turned off on all S3 boards? It was not turned off on ESP32-S3-BOX
@tulip sleet in a later moment I would like to learn what you've changed to get rid of that bug.
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.
Heads up. Don't click that Upgrade to MacOS Ventura.
https://twitter.com/aallan/status/1585406275781038085
I'd note that this is a common mechanism employed by embedded devices which support firmware updates over USB, this is going to break a lot of other people's products. It's not the fact it's a UF2 file, it's the fact it's a "fake" drive. https://t.co/jgojkciRut
OK
if you just use cp it works, but the FInder throws an error
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.
@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
Those might be the last translations that were still missing.
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-...
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.
Thanks for the insight! This is not a problem on ESP32-nn alarms because the "alarm happened" state is not cleared by alarm_reset(), but it is on RP2040, as you diagnosed. I am taking a look to see what the best way to fix this would be. There might be some issues not doing alarm_reset() during run_boot_py() if some pins are going to be used.
Fix should also take #6476 into account. That is on Espressif, but there may be a more general solution here.
@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>
are there fast paths in the division routine for / 1 and divide by powers of 2? There might be.
oh within divmod_s32s32? I duno
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
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.
but yes the rom is open source too https://github.com/raspberrypi/pico-bootrom
we could make our own fast paths; would not be hard to bencharmk
Keebio documented the Elite-Pi as supporting CircuitPython, but didn't actually contribute anything. Let's fix that.
Product Page: https://keeb.io/collections/diy-parts/products/elite-pi-usb-c-pro-micro-replacement-rp2040
- [ ] VID/PID
- [ ] Pin definitions
- [ ] Testing
Tested on a brand new QT PY ESP32-S2 uFL (Adafruit 5348) and attached antenna. Circuit Python Beta 3.
TinyUF2 Bootloader f12dd0f - tinyusb (0.10.1-109-g9b3ec69b)
Model: Adafruit QT Py ESP32-S2
Board-ID: ESP32S2-QTPY-revB
Date: Dec 12 2021
It is working for me.
Connecting... 192.168.1.27 Disconnecting...
Connecting... 192.168.1.27 Disconnecting...
https://github.com/keebio/keebio-docs/blob/master/docs/elite-pi-guide.md is the page that documents the Elite-Pi as being MicroPython compatible.
I'm going to call that good enough for an initial review. There's a few loose ends to clean up, but I'm ready for opinions (either from the maintainers or @nooges).
Thanks! There are some things to fix before inclusion of this PR, though.
The board's silk has legends like "D5", "A0", etc. This file should reflect the markings on the silk, when it makes sense to do so.
Does SMPS_MODE apply to this board? Without more information I'm assuming that the GPIO# and D# assignments match, but D23 is an I/O pin.
A proper VID/PID combination must be provided for this board.
Added a new board: M5Stack atom lite
Manufacturer page: https://docs.m5stack.com/en/core/atom_lite
@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)
...
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)
The Arduino uses the Arduino NINA firmware, while AirLift modules use the Adafruit NINA firmware, but the module on the Arduino works perfectly if treated as an external AirLift module. The example in the learn guide works for me on 8.0.0-beta.3. I previously had to update the Arduino NINA firmware to get SSL working.
I'm adding the boot in safe mode via button for M5Stack Core Basic and Fire
I've also fixed copyright attirbution on this two board files
The WiFi coprocessors require different supporting software, since they are completely different, and don't use the same underlying protocol. More work is done on the main-processor side for Pico W than for the NINA-FW.
People have reported using this, so I'll merge. Thanks!
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...
The original file missing IO45~IO48 definitions, and IO18/A17/D18 incorrectly points to IO17.
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
Yup, that's an open question. I'm not convinced that Maple Computing or Keebio bothered to get a VID/PID.
I'm going to check a few different sources and see what the common use is.
While that makes sense for primaries, should I also include the aliases in the pinout diagram? https://d33wubrfki0l68.cloudfront.net/d42e46a6982528aa7328b87dc758414ebabc5dbf/7d77f/assets/images/elite-pi_pinout-both-3c2ffb9c7e7d46f36fd54006ab000709.png
@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.
Taking this pin for example, you might define both D29 and A3 but not any of SCL0, RX0, /CS1, or 6B.

When there's e.g., a single set of pins designated for SPI, UART, or I2C we name them separately. So, for instance, if the use of the pins labeled D0/D1 as TX/RX is well established for this form factor, I might put that alias even though it's not on the silkscreen. Similarly, D...
@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.
i meant the only the scale. is the scale 1?
i wasn't thinking about the mod
the tilegrid scale of the terminal can be non-1 as well, not sure if it's ever not 1 or 2 though
does divmod get called once or twice?
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
some discussion this is already optimized in some way: https://stackoverflow.com/questions/5608559/division-and-modulus-using-single-divl-instruction-i386-amd64
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
I'll just use the non-duplicated names for now.
Ah, GP23 is an output on the Pico, ok.
No, I don't think SMPS_MODE applies to this board, and it's just a GPIO pin.
PyPI is back online!
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.
It looks like Maple Computing is @That-Canadian
Right, it's not surprising that Pico W would be doing more work for WiFi on the main-processor side. But I was still puzzled about why there's such a difference for a program with no WiFi in it. Does it need to do some things on startup?
There's a lot of RAM reserved for the networking functionality even if it's never used.
I see, thanks for the info! In my case I do want to be using the WiFi, but I wonder if people will be surprised about Pico programs not working on Pico W.
@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?
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.
thanks, it's a lot easier to type, and I think any issues would show up as compilation errors, at least for us
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 🙂
exactly, some people in the comments did too; I read that a couple of years ago, and just now
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.
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)
should help marginally with compile time too
huh
the test case is rather pathological
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. 😭
it might be lotsa RAM on the test computer or SSD's
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
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
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.
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
sounds like we're in a similar boat. I wasn't sure if this was from Limor or from Scott.
something to do with how they flash & QA the boards?
that's an interesting point -- does validation during test
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..?
Limor had a good reason, but I can't remember it now. Worth asking again. It should be from pidcodes, not us.
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
yes, that' sounds familiar, thanks
by the way I'm not sure how Mu does with ESP32/C3 boards, can we use the Micropython mode or something ?
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...
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
we have said to use Thonny for boards without CIRCUITPY
I don't know that Mu has any support for non-MSC boards
(I don't use CP on windows a lot, but I've seen similar things in support questions)
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?
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)
that sounds like something that could belong in the "Community Bundle". https://github.com/adafruit/CircuitPython_Community_Bundle
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)
that would be the guide
https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library
Thanks both and thanks for all the great work. I've created a WiFi controlled USB hid device over the last couple of days
@MicroDev1 I think I will merge this after beta.4. I didn't see anything to change, but it's complicated, s let's test the workflow in action after the next release.
Mrs. Blumkin may have been very far-sighted
Hi - a few minor things.
Your PR's have these changes in circuitpython.pot. Could you merge the latest main from upstream to make yours match? Otherwise we will have churn in this file.
This is the standard boilerplate now. Empty routines are already handled by MP_WEAK definitions.
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.
Also a change here causes everything to be rebuilt on each PR push, instead of just the board build.
Could you bring circuitpython.pot up to date so it is not a changed file?
@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"
ah, ok, sorry. I did not see that. So that's you also?
no that PR is not me
I think "make translate" was not run when the error message was added to objexcept.c or since, is the reason for that line's change https://github.com/adafruit/circuitpython/pull/7103
Could you bring
circuitpython.potup to date so it is not a changed file?
Never mind, I did not see that you added a string.
This file is missing a newline at the end.
@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. 😄
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.
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...
did you fetch the submodules?
do make fetch-submodules at the top level
@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.
Yes I did
... But maybe I was on the wrong branch when I did it. trying again
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.
@DJDevon3 I edited the test script, so it should show an IP address now. But in any case absence of errors is a good thing.
Fetching the submodules again didn't make any difference.
Ah no, I think that operation didn't complete because of an error in espressif
I deleted those old reports, sorry! I do that by hand every few months. Is the info in the old meeting notes?
I have no idea. Good to know though. I'll check that at least.
If this persists, I can take a look. I have not encountered that problem.
Something got into the wrong state in git and ports/espressif/esp-idf was dirty. I'll see if it happens again
I'll also see if I can still build espressif sometime 😉
@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.
@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).
i kind of remember that, but are pypi downloads that interesting -- they only tell us about blinka use
I think there was some issue about their accuracy? I have a vague memory of that
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.
Yes, I see the same thing. I don't know if it's due to the library code (maybe it's inverting things) or due to something else. Also the touch library was written for a particular version of the touch sensor, maybe, and maybe the version on the BOX is different??
yup same coordinates
Yes!
@tulip sleet & @jaunty juniper thank you
@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.
the driver is pretty basic, it reads bytes, and splits them into the values with struct, no math done on x or y
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.
@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).
hmmm it stops detecting touches after a few
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.
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
I was wondering that too but never got a chance to test it
I also think (and may be imagining it) that after the DMA write it, CP pauses until it is done
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. 😄
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
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
It's my best guess because you're right, a direct solder on the through holes wouldn't make sense here
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.
*nervously stares at my soldering, which often is brute forced into place*
Huh, I *totally* don't know what that's like
Hah. I usually do headers while in a breadboard, which means they're usually straight. So... no idea what happened here.
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
I learned from my bestie who is brilliant at soldering. I haven't worked on my SMT skills, but otherwise my soldering is really good. Learning from him helped immensely.
yes, it does wait for the DMA to complete, which is the usual requirement for how we do spi/i2c/etc transfers. I experimented with whether NOT doing run_background_tasks (but just busy looping) helped anything but it .. didn't.
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
Can someone clarify what BOARD_USER_SAFE_MODE_ACTION is supposed to explain?
Unsurprisingly some boards became over-full due to code growth. Can probably fix it by putting particularly all the cases of manually specialized get_pixel behind a define.
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?
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
So it is an explanation but only half of the sentence? And no. I have no idea why it happens.
I meant the string is there so you know why it happened 😛
And yes, it was M5Stack only.
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.
does that work ?
https://hosted.weblate.org/browse/circuitpython/main/en/?offset=1&q=pressing&sort_by=-priority%2Cposition&checksum=
https://hosted.weblate.org/translate/circuitpython/main/en/?checksum=31cefe380cd4850d&q=safe+mode&sort_by=-priority%2Cposition
https://hosted.weblate.org/translate/circuitpython/main/en/?checksum=c1b5d85d73cafbab&q=without&sort_by=-priority%2Cposition
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.
yeah
That is not how other languages work.
we should rework it into a separate sentence
So give me a full sentence to translate. Don't try to be smart. It does not work.
Only you can get rid of it. Edit the post and delete it, I believe. I can delete your entire post, but that's not the right thing here. I can't edit it.
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.
I am more like; Why did Discord even ADD IT?
I tried to edit my post uyt nope. Very odd!
I have no idea, I think there's a way to click on them, and I've seen it pop up and have had to avoid accidentally adding those things. So they're so easy to add, but apparently really annoying to remove.
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 ?
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.
🤷
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...
Hi, for support questions, it's better to go to the forums or the Adafruit discord.
There, you can share your code and people will be able to look at it and help you with it.
https://forums.adafruit.com/
https://adafru.it/discord
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...
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 ...
@bergdahl points out the BOARD_USER_SAFE_MODE_ACTION sentence fragment that is concatenated with another sentence fragment is not necessarily translatable due to sentence construction in other languages. We should fix this, making two complete sentences, or one single sentence, or some other non-language-specific structure.
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.
LGTM! + Its smaller 👍
that is a bonus
If you are at it, maybe replace:
- G3 button was pressed, BOOT button was pressed
+ %q button was pressed, MP_QSTR_BOOT
not sure how that fits, I'll open the PR an we can discuss it there
resolves #7149
Removes a few messages mentioning the boot button, since that is the default anyway (if a boot button is defined).
The format is now:
You are in safe mode because:
Both buttons were pressed at start up.
To exit, please reset the board without requesting safe mode.
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!
Hey. asyncio.run() is not working in V8.0, is this intentional or an oversight?
it's a bug, there is a fix already
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...
I realized that one of the reasons that the locking is so diffuse is to enable sharing the bus with an SD card so that OnDiskBitmaps work. OnDiskBitmaps are one of the bits of displayio least likely to ever be performant, but they also have a marked negative impact on the speed of the rest of the system even when not in use.
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: https://github.com/adafruit/circuitpython/commit/d72d841e1bdb8566e20abb9bb12fdfdf3633523d
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...
I think our maths are both wrong.
{ MP_QSTR_baudrate, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 24000000} },
The default is 24MHz, I initially wrote in my comment that I was at 12MHz. However, I'm pretty sure about the 48ms, or that I'm making a bits vs bytes error.
You have: 72000*16/24MHz
You want: ms
* 48
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...
USB_PID = 0x0005
Apologies, forgot to set the original PID back after testing
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...
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!
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...
@dhalbert I tested now on a Pico W and it works perfectly.
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...
Quick follow-up, looks like the Raspberry Pi foundation will allow people to acquire a PID using their VID : https://github.com/raspberrypi/usb-pid
I'll look into this further and pursue it if needed over the next few days.
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
@dhalbert I tested now on a Pico W and it works perfectly.
Thank you for testing!
Thanks @bergdahl and @wtuemura.
The Feather M0 RFM69 does not fit. There's not really anything obvious I can turn off, but I think the frozen library can be shrunk a bit without much difficulty.
So I changed the if (message != NULL) into a #if defined that I thought would have been optimized away anyway, so hopefully I didn't remove functionality in the process. Somehow it won us 16 bytes on the RFM69 from the previous run.
Great, that narrow change is what we needed! I'll merge to get this in to beta.4.
I looked at the size of the RFM69 ru build before this PR, and it had exactly 0 bytes remainining!
It would still be good to shrink that library a bit, since this will happen again.
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...
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
...
I revised the Building CircuitPython Learn Guide to include the information above. I actually had more trouble than what was described above: I have Ventura 13.0 installed, along with the latest Xcode. make --version asks me to install the Xcode command line tools. I did that twice, and even logged out, and it keeps asking me. So that's yet another problem.
It happens mainly in Mu:

In PuTTY the CPY V8 statusbar text is seen instead of 'PuTTY' in the caption of the PuTTY app window only
but not in the print output:
: 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.
@tulip sleet the touch attributes displayed
If you see changes you would like to make to the library, issues or pull requests are welcome.
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.
@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.
it touches 47 files, eek!
many are just renaming, or the same change multiple places
create -> record is a renaming?
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)
Thanks! I don't 100% follow the changes in main.c but I am relying on the testing.
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.
simplification is good
you might want to find the datasheet for the sensor, because the library is written for another sensor, isn't it ?
Automated website update for release 8.0.0-beta.4 by Blinka.
New boards:
- m5stack_core_basic
- m5stack_stamp_c3
- m5stack_atom_lite
- m5stack_core_fire
- 42keebs_frood
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.
I was able to test that every pin can drive output as labelled. That's probably the extent of what I can test at this moment. (I flipped my Elite Pi when soldering and desoldering is proving challenging.
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.
run make translate at the top level of your repo and then commit that change
do you mean that you merged in the latest from adafruit? You may still need to do make translate
thanks @tulip sleet , that helped resolve my issue 🙂 now I´m waiting if all checks will be ok..
I also had problems with pico w and circuitpython not connecting/showing, don't know why.
This could be an issue with utility programs on your particular Windows machine. If you could try similar things on a Mac or a Linux machine (even an RPi), that would help to narrow down the problem.
This could be an issue with utility programs on your particular Windows machine. If you could try similar things on a Mac or a Linux machine (even an RPi), that would help to narrow down the problem.
Do you mean thonny, explorer, both or you don't know?
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...
Failed just at my board, which is expected as my PR is not merged. Am I right or should I look in to it again?
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.
Failed just at my board, which is expected as my PR is not merged. Am I right or should I look in to it again?
No, your board should not fail. It looks like the sdkconfig file is missing: see https://github.com/adafruit/circuitpython/actions/runs/3357317522/jobs/5563100639.
But there are far too many changed files here. Don't add the frozen libraries directly by copying. Add them as git submodules.
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 ...
@nruffilo -- Any progress on this? I may would love to see this feature and might start working on it, so I'm wondering if you've tried anything yet
@nruffilo -- Any progress on this? I may would love to see this feature and might start working on it, so I'm wondering if you've tried anything yet
sadly it seems to be in "long term" but no work done. I switched to arduino / c for my code...
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!
I believe that's when you need to start with from __future__ import annotations as the first import
not sure though
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
That's spot on, thanks!
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
Found it. `\r\n in a doc-string. Grrrrr 
Thanks a lot for the formatting!
I think there's a precommit hook for this that I want to add
Looks like the Stream wrapper in asyncio actually does what I want. May need documentation update, I will investigate
@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
what error ?
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
ok that's what happens when a mpy file is invalid
https://github.com/adafruit/circup/issues/146 and maybe others
yes, so something odd about the .mpy's in the bundle? The previous problem was a badly assembled bundle
can you try with an empty lib directory ?
@lone axle - newsletter draft is ready to crib off of for notes
Interesting I can take a look this evening perhaps if it isn't resolved by then
Thank you
Update to my Piwheels comment - it was 11337 downloads from Piwheels in the last month, but 31466 from PyPI in the last week
I can't reproduce, I think it's choking on a file in your lib directory, can you try a circup list with this branch ?
https://github.com/Neradoc/circup/tree/wrong-mpy-file-response
So it's more like 12 times the number of downloads 🤯
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!)
It's a day for spooky tricks!
is something abnormal with the adafruit_bus_device file then ?
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!
Library ghosts 
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
<@&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. 🎃
bonk
Newsletter looks great based on the sneak preview, Anne!
Thanks!
Thanks! 😊
Yes! We can take some extra days to get them merged!
🎉
👏
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.
can you make a fritzing diagram of that? I am not understanding your explanation.
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...
i didn't even catch that melissa, that's funny
On my end she started metnioning USB / audio all working, then silence 😅
oof he went robot
You're cutting out @lone axle
Sound good now.
good now
👍
@lone axle You disappeared again.
back
start at top of tekktrik
That's entirely fair.
I only know of it because of starting on this PyPI project a few years ago.
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.
@tulip sleet Might have something to add?
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
Yeah that's right
github trolling?
I think they probably mean well
I just don't have the experience that indicates that they're right about it
maybe someone from hacktoberfest trying to get in some PR's somehow?
Sounds good, I can close the suite of issues with what's been said here, I think this makes sense
"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
Thanks
👋 have a good week all!
I missed the meeting, darn daylight saving changes 🙄 lol
Happy Halloween everyone!
Happy Halloween!
oh oh! next week the US time changes
Ours is next weekend. Yeah.
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.
7-10pm EDT
@tulip sleet I disconnected you from chat so you don't end up with surprises.
thanks, I would do the same for others; writing up the Ventura issue
Please include a clear explanation of how to complain to Apple effectively. If it makes sense. (I guess I meant to mention this for the blog post which you already did, I think.)
If Apple won't touch it because we didn't complain loud enough, let's incite more complaints.
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.
Excellent, thanks.
it's about UF2, is there anyone at Microsoft that knows someone at Apple ? 😏
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.
CircuitPython Weekly Meeting for November 7, 2022 Welcome to the CircuitPython Weekly meeting notes! Feel free to add your Hug Reports and Status Updates early. During the meeting, we go through them as a round robin sorted by username. If you can’t make the meeting and would still like to pa...
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.
@idle owl okay, post meeting stuff is wrapped up. I am available now or any time.
Let's vid!
Closed those issues regarding pinning dependencies, thanks y'all!
Cheers!
@onyx hinge Good call on those issues. I hadn't looked into it, so I didn't respond, but you had it nailed down.
@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?
Please do not tag Ladyada. It's entirely inappropriate, and you won't receive an answer. Post your question and give our community a chance to assist. As well, you'd be better off posting to #help-with-circuitpython for questions like this. We discourage crossposting, but in this case, I'm suggesting it.
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!!
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.
I appreciate the well-reasoned answer
You're welcome. Thank you for being receptive.
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...
Rust is a required dependency for installing minify_html when installing dependencies.
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.
everything's a moving target 🙂
Except for the observer in the vehicle 🙂
Well, everything in the vehicle is not moving to the observer
hi rose.
hi jeff.
This is a work-in-progress to add dependency setup and validation on a per-platform basis.
Adds the list of boards to the error output of make boards
Nice cueing the user! Are you willing to do this for the Makefiles in the other ports too?
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 ($(...
Personally, I don't like using scripts like these to install software on my computer, since I have Ideas about how things should be. But, this is potentially helpful to some folks! thanks for starting a ball rolling
note that we request use of a specific version of the arm embedded toolchain, currently 10-2020-q4. Is it possible to request this version in particular via brew? This is hidden down in our github actions:
- uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: '10-2020-q4'
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.
the deep dive videos with Scott are very useful for that
there is also the build guide, which is something you will need to do anyways https://learn.adafruit.com/building-circuitpython/
otherwise, I would say look at the pull requests that add a module
Thanks, appreciate the info. Could you share a link to the YT channel?
Awesome! Thanks for giving me a place to start.
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
I am absolutely good with adding this for the rest of the Makefiles.
PS - I was trying to use column before sending the last commit of the night, but couldn't quite get make to preserve the newlines.
Yes, Column is available.. But we could do
COLUMN=$(shell which column || echo cat)
Who do I have to beg for hacktoberfest-accepted labels 🙂
Tekktrik I believe
🙂
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
#help-with-circuitpython would be a better place to ask that (and I will answer to you there)
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?
This was a dual-purpose PR in the end:
-
Introduce the idea of platform-specific make includes/settings (eg MacOS - gmake, but also other things like the LD_LIBRARY_PATH/INCLUDES for things like gettext)
-
Introduce platform-specific checks/dependency helpers
I'll look into the eabi version.
@proven garnet they're for here 🙂
I don't think I understand what you mean, do you mean the recently GitHub bot posted PRs need the label?
https://github.com/adafruit/circuitpython/pull/7161 🙂 even if it doesn't end up being merged in that form, or merged at all. The purpose was to start acting on some of my complaints about going from 0 to working circuitpython build env without missing things 🙂
Out of curiosity, what does your Hacktoberfest account list for that PR? Is it pending?
I can add the label, curious what happens - we definitely don't want it as not-accepted
both of the late-night ones were. we're still in the 7 day window where the PRs can be labelled.