#circuitpython-dev
1 messages Β· Page 37 of 1
I even get an email: Subject: [adafruit/circuitpython] Run failed: Build CI - 8.1.0 (b1a28bc)
but only because I initiated those runs
Oh, come on. π€¦π»ββοΈ
I removed the thing that reset the time check for that block somehow.
2038, right, that's the end of time (I think) for CircuitPython```py
sys.maxsize
2147483647
time.localtime(2147483647)
struct_time(tm_year=2038, tm_mon=1, tm_mday=19, tm_hour=3, tm_min=14, tm_sec=7, tm_wday=1, tm_yday=19, tm_isdst=-1)
pretty sure I had tested it and it worked passed it.
@tulip sleet Turns out 6 pings per second is too much for the ESPIDF. π
@crimson ferry OK, so I made this work, but kept my original code intact, like a smart person for once. Are you saying this is completely unnecessary, and I should simply use time.time() in place of monotonic()?
That's completely fine, but I wanted to clarify before I revert all of this, llol.
should be fine for rough-one-second intervals
Ok. Thank you.
no floats, no rollover, no extra dependences
ints have no size limit, but time functions are limited:
>>> time.localtime(2147483647+1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: overflow converting long int to machine word
FWIW, it was keeping in time with the RTC intervals in the time I let it run.
e.g. I had it printing time.time() and monotonic() at the same time as the code block print, and it was exactly 1 second apart.
the code might have gotten sync'd up to a second boundary
(or drift due to float precision - but not likely if you've been resetting it)
oh, n/m, I think I misunderstood
I'm saying the time.time() interval was matchy with the RTC 1 second interval.
Which is a good thing, I believe.
yeah, I believe everything comes from the same clock internally?
Fair enough.
This was a much simpler change. Thank you. π
But I got RTC working! Saving that code. Because that was a whole ordeal. And I can crib it later.
My ping times here are showing 0.0ms maybe 75% of the time. Is that seriously right?
Am I having a good internet day? Or is CircuitPython lying or something, heh...
RTC is nice, on espressif even more nice since it will keep real clock time across reloads AND soft resets, making nice timestamps once you set the RTC
Good to know.
CircuitPython 53.0.0 in 2038 will only run on 64-bit processors :p
wait, how does rtc handle it then?
rtc.RTC().datetime = time.struct_time(...)
I can set it just fine with my date implementation
It just works.
interesting
Looking forward to when Circuitpython competes in the UEFI market.
Confirmed this fix works for me on the Qt Py ESP32-S2. Thank you @dhalbert for the quick solution.
`Wi-Fi: off | code.py | 8.1.0-2-g9040ac8bcWi-Fi: off | code.py | 8.1.0-2-g9040ac8bc<TouchAlarm>
Wi-Fi: off | Done | 8.1.0-2-g9040ac8bcWi-Fi: off | Done | 8.1.0-2-g9040ac8bc
Code done running.
Press any key to enter the REPL. Use CTRL-D to reload.
Pretending to deep sleep until alarm, CTRL-C or file write.
Woken...
If anyone is up for a review: https://github.com/adafruit/Adafruit_Learning_System_Guides/pull/2512
note that the error I showed would be a limitation of the implementation of time.localtime(), not a limitation of struct_time itself
sounds like an easy fix
i will try switching it
I ran into that same overflow error working with the gps time. never did figure out how to fix it. it would happen randomly. :/
erroneous character in a UART communication leading to an absurd value or something maybe ?
Wait, doesnt CP do parity bit?
does the GPS do it ?
I like the AVR chips for their price, low power capability, and availability.
I'd happily help out where I can, but based on what I've seen of CP's code, I'd say that even with help, solving this issue is quite a bit beyond my abilities :-/
But in the mean time, as a workaround, objects can simply be moved by a fixed amount off and back onto the screen. This does not change their order in the Z direction and preserves the original coordinates.
As far as i could tell it seemed like gps data was trying to merge with the time struct. I donβt know how else it would overrun the int size.
I didnβt know about error handling then. Might be able to revisit it.
HI - just one thing about I2C.
board.I2C() should use the same pins as board.SCL and board.SDA, as on the S2 Pico. So I think you want to change these as below:
#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO10, .sda = &pin_GPIO8}}
@tkroo Does the latest batch of changes boot? If so I can approve. @bill88t How is it for you?
This should be delayed until ESP-IDF v5 update, and reviewed and redone then.
@tyeth I'm assuming you read https://learn.adafruit.com/circuitpython-safe-mode. Without safemode.py, the reason is printed in the REPL. The original motivation of safemode.py was not to do a more thorough diagnosis, but to recover even in the presence of a safemode.
I can add more detailed examples to the guide. I'd rather not complicate the beginner's experience with a pre-programmed safemode.py.
for some reason
make fetch-submodulesdoes not pull in "tools/huffman". I had to explicitly get it withcd tools/huffman; git checkout
I did a fresh clone of my fork, and did make fetch-submodules. huffman got cloned and populated as I would expect. I am using git 2.40.1 on Ubuntu 22.04. I use the git PPA to get a newer version than 22.04 would normally provide.
Maybe there is something wonky about your clone. You could try git remove-submodules and then `git fetch-submodule...
@dhalbert I do not have the board.
I just try to review stuff I am comfortable with.
The optimisation flag is what concerns me most with this definition.
If you want me to stop reviewing stuff, just tell me.
I should have been more specific, sorry.
It's CONFIG_SPIRAM_TYPE_AUTO that is unwanted.
You want CONFIG_SPIRAM_MODE_QUAD or CONFIG_SPIRAM_MODE_OCT enabled.
You can just try out if oct works if you are too lazy to check the schematic.
If oct doesn't boot, quad.
@bill88t No problem, keep reviewing. THe optimization change may be needed to make it fit. -O2 is the default for the xtensa boards; -Os is needed for the RISC-V boards. (See the Makefile). You probably know this already. I don't see any other boards setting optimization per board in ports/espressif, though.
880kb is an absurd amount of data. I can't even begin to fathom what kind of bug caused such an allocation.
Isn't it the policy to just disable unused modules in favor of keeping optimisation as is?
It's a 4mb S3 board.
Looking at the adafruit_feather_esp32s3_tft definition, instead of disabling optimisation, CIRCUITPY_ESPCAMERA = 0 is set instead.
I think it's a typo: .833 -> .0833
Normally we would turn ESPCAMERA off. We don't necessarily preserve optimization in favor of turning of general-purposes functionality. O2 is a lot bigger than Os. That is certainly true on various SAMD boards, for instance. We use Os to have all the useful modules.
It's 4 am almost. Enjoy.
Added Camera to features. It's such a basic thing. I don't get how this wasn't already one.
It's ready for review. How was Camera not a feature?
Have there really been that few CP boards with a camera?
@tkroo Does the latest batch of changes boot? If so I can approve. @bill88t How is it for you?
Yes, my board boots with latest changes. I also just did a build without the OPTIMIZATION_FLAG = -0s and it also boots. Should I remove that flag? I don't know what is preferred.
If OPTIMIZATION_FLAG isn't needed, it should absolutely be removed.
ESP used to be the only one powerful enough to do a camera of any kind, maybe a few others. yeah there aren't many.
now with supercharged boards like iMX we might see more higher power projects.
higher power bloat π
I am the king of bloat & I approb.
If
OPTIMIZATION_FLAGisn't needed, it should absolutely be removed.
Thanks! Removed. I had thought the optimization flag was brought over from the existing Lolin S3 board files, but it was me who accidentally pasted it from somewhere else. Sorry about the confusion.
This is weird. I have also been building on an Ubuntu 22 x86_64 box and I swear I saw it there too.
But I just did a fresh checkout on Ubuntu (git 2.34.1) and macos (homebrew git 2.39.1) and I am not experiencing this issue now. I do know that someone else on a Mac I was helping build a board definition had the same problem and they perhaps did not have homebrew git. And at one point during this I was having PATH issues wrt homebrew.
Closing this issue because I think the problem was me.
I use BUTTON_R is normal.
I can't use BUTTON_L same time with BUTON_R , but if I use GP7 instead, 2 button work well
Thanks for the review comments, I think I got 'em all.
{ MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_GPIO29) },
pin VOLTAGE_MONITOR need to be set as GPIO26 at BAT_ADC , I check pin by this schematic
https://github.com/Xinyuan-LilyGO/LILYGO-T-display-RP2040/blob/main/schematic/T-Disply RP2040_2.pdf
CircuitPython version
Adafruit CircuitPython 8.1.0-alpha.2-132-g3ab9920927
Running on ESP32-S2 (custom board).
Code/REPL
import time
import board
import analogbufio
import array
import supervisor
import asyncio
import gc
import busio
import sdcardio, storage, os
# Mount file system
sd_spi = busio.SPI(clock=board.SCLK, MOSI=board.SD_DIN, MISO=board.SD_DOUT)
sdcard = sdcardio.SDCard(sd_spi, cs=board.CS)
vfs = storage.VfsFat(sdcard)
storage.m...
- Fix issue when creating ble bonding
- Change analogio Vref from 2.5V to 3.3V
- Change default board.i2c of Explorer kit board to Qwiic port.
- Add CIRCUITPY_SDCARDIO for the Dev kit and Explorer kit
- Change the Dev kit to use internal flash.
- Remove unused file silabs.pintool
Ok, guys, I want you to hear me out.
I feel a speed difference between .bin and .uf2.
Like, actual difference in speed of the board during operation.
the uf2 feels faster???
I seriously need to make boardbench.
I have no way to prove it right now.
@dhalbert
I'm assuming you read https://learn.adafruit.com/circuitpython-safe-mode.
Sadly not :) I think I had in the past I believe, but re-reading it now there's a few useful things I picked up. I wonder if another example showing a more complex case or an external link to a repo/project/learn-guide with bundle with the "log all the things locally (exceptions and reboot reasons with time/traceback) and then to adafruit IO after reboots (or immediately if recoverable error? I'm just us...
I am pretty sure Camera was already suggested by me.
Either in a meeting, or as an issue.
And the answer could have been: "We need to limit the number of feature." + "Only a few board have Camera, and people looking for that will get the information from the learn guide... or the feature matrix."
But that is from memory, I could be wrong.
Well, it's in the PR. I guess I will find out soon enough.
And the argument that there aren't that many won't stand for long.
m5stack has like 14 boards with cameras, all of which should eventually get a port
https://shop.m5stack.com/collections/m5-cameras
Here is my display if I let it have the 28 seconds for the clear step.
This behavior is definitely different to what I see. I'm currently not at home but when I am back end of the week, I try to post a video of what I experience. BTW: my test-code is here: https://github.com/bablokb/circuitpython-examples/blob/master/inkyframe57/main.py
//| octave. A depth of (1/12) = 0.0833 corresponds to a bend of 1 semitone,
//| octave. A depth of (1/12) = 0.0833 corresponds to a bend of 1 semitone,
not sure where to ask for a semi-official opinion... Does Adafruit have a preference for which pins on a Feather (RP2040) should be Wire1 in Arduino? https://github.com/earlephilhower/arduino-pico/issues/1465 D6/D9 and D112/D13 are used by a lot of featherwings, RX and TX probably not, D24/D25 are SWD
thanks Dan
Although may not be relevant I would remove all the extraneous pin definitions for those not broken out on the board. I would include a definition for the onboard WS2812 which I believe is on IO47. I can't be more specific on my phone lol
Thanks
cater is following up on this, thanks
oh. yep. there's discussion scattered in several threads at this point. but TLDR = going to make breaking change so that SCL/SDA are Wire. here's the PR that will do that:
https://github.com/earlephilhower/arduino-pico/pull/1468
in terms of "preference" - most definitely that SCL/SDA be Wire.
These changes look OK to me.
One thing to note. The modules below, which you currently have turned off, are implemented in a port-independent way in shared-modules. So you could turn them on and they should just work:
CIRCUITPY_BITBANGIO ?= 0
CIRCUITPY_KEYPAD ?= 0
CIRCUITPY_TOUCHIO ?= 0
bitbangio and keypad use common-hal DigitalInOut operations to do their work, so those should just work immediately.
touchio has both native and generic ...
@tidal kiln thanks for getting involved, it was quite confusing
yep. very much so.
The pins.c file will need an update. Want to try making a PR? I don't have this board to test with.
Nevermind. I had the wrong diff up somehow.
HI - just one thing about I2C.
Thanks! updated.
Just a heads up to everyone I'll be patching the pylint and jQuery (RTD) issues this evening, so those issues should be resolved within the next few days. Also to merge/rebase if needed.
Though the latter point shouldn't apply to most if anyone I think.
@graceful rain dev stuff better in here... you can put it in the make command line, but you'll need to turn off some modules to allow the debug build to fit on flash, see #circuitpython-dev message
backtrace decode utility is at ports/espressif/tools/decode_backtrace
thanks @crimson ferry wow this is really getting into the weeds. Where does this decode_backtrace go in my own test program? I'm not too sure what I'm looking at or how to use it, haha. "Enter the backtrace line at the "? " prompt." - what does that mean?
first, you have to hook up your host to the debug serial pins and monitor that (19 & 20 I think on the S2?), then when you get a safemode / hard fault, there will be a list of addresses... those get pasted into decode_backtrace and out will come a stack of the C code line numbers
Ok, thanks. So that decode_backtrace code is running on the host?
Sorry one more question. How does that code know what serial port to listen to. I don't see it defined anywhere
Your question is vague.
In your os? In terms of board pins?
@crimson ferry said to hook up the debug serial pins and monitor that. But I don't see anything here (https://github.com/adafruit/circuitpython/blob/main/ports/espressif/tools/decode_backtrace.py) about monitoring serial pins or defining the serial port.
Yes, in my OS (Linux)
the python script doesn't connect to it
just use your normal serial terminal
and then copy the backtrace line over from there
does the backtrace go to the regular serial console? I thought it went to the debug console
I always hook up the second USB to get debug messages and safemode backtraces
it goes out the uart because it is done by the IDF
A couple of board builds are just stalled for CI reasons. No reason to think they would not complete. I will merge.
I don't understand why there are now merge conflicts noted above, since you are just adding files.
@tkroo, do you see @skieat's suggestion of removing pins that are not accessible?
@ktroo I don't understand why there are now merge conflicts noted, since you are just adding files.
Do you see @skieast's suggestion of removing pins that are not accessible?
I don't understand the merge conflicts either. Strange. But I am new to this whole process, so maybe I did something accidentally.
I did see @skieast's suggestions. On board neopixel is already defined:
https://github.com/adafruit/circuitpython/blob/5c4997850c84c8add0b2967acd99c0643d390521/ports/espressif/b...
I don't understand the merge conflicts either. Strange. But I am new to this whole process, so maybe I did something accidentally.
I think the easiest way to fix this would be to make a new branch, copy the new files into it, and make a new PR. We can close this one assuming the new one works.
@ktroo I don't understand why there are now merge conflicts noted, since you are just adding files.
Do you see @skieast's suggestion of removing pins that are not accessible?I don't understand the merge conflicts either. Strange. But I am new to this whole process, so maybe I did something accidentally. I did see @skieast's suggestions. On board neopixel is already defined:
https://github.com/adafruit/circuitpython/blob/5c4997850c84c8add0b2967acd99c0643d390521/ports/es...
I don't understand the merge conflicts either. Strange. But I am new to this whole process, so maybe I did something accidentally.
I think the easiest way to fix this would be to make a new branch, copy the new files into it, and make a new PR. We can close this one assuming the new one works.
Ok. I will create a new branch and PR. Thanks for all your help!
re: extraneous pins. I checked pins.c and don't see any pins defined that are not also exposed on the board.
Quite true. I was looking at it on my phone. I can blame my old eyes, better than blaming myself. Thanks again.
No worries! I am new to this and appreciate as many eyes on this as possible. Thank you!
@tkroo you don't need to delete your fork. Just deleting the branch would be ifne.
@tkroo you don't need to delete your fork. Just deleting the branch would be ifne.
Oh well, I've already deleted it. I think what caused the merge conflict was that I had merged my branch into my fork's main. Anyway, I'll create a new fork, branch, and PR.
Sorry about the chaos
had merged my branch into my fork's main.
Yes, try to keep your main the same as upstream's main. Basically, never work in main. Always work in a branch.
Thanks @dhalbert, @bill88t, and @skieast for all the help. Here is a fresh PR.
Please don't try and circumvent the checks by adding to the features list without previous agreement. The reason we don't have it on the list is because there are so few boards with this feature and we're trying to keep the features filters from being too long:
Thanks @todbot!
- Incompatible change:
Synthesizer.blocksreplacesSynthesizer.lfos; the functionality is unchanged - Incompatible change:
voct_to_hzadded, replacesonveo_to_hz(which was totally incorrect in its implementation). - Docs: correctly show
filterin the Synthesizer constructor - Docs: correctly show the type of
Note.frequencyasfloat.
Updated spi pins to match Wemos provided schematic of Lolin C3 Pico, which shows MISO on GPIO0, MOSI on GPIO1, SCK on GPIO1
Fixed Button_R from GPIO6 to GPIO7
Fixed LCD_BACKLIGHT from GPIO29 to GPIO26
Alright, the change has been reverted.
Note: Tag GPS only contains one board, while Camera (with this one) would have 4. And m5stack has quite a few more esp32 boards with cameras that may be added in the future.
The pins.c file will need an update. Want to try making a PR? I don't have this board to test with.
yes , I can't access GPIO26/Battery voltage and Button_L I can use GP7 instead
I still think that the clear at least should be optional. There's really no reason to clear the display prior to displaying the desired image, except that it takes twice as long as it needs to.
BTW, re: the busy pin, I would also suggest that we consider the method override here. I have another eink display, it has a busy pin, but it's only set as a result of sending a "busy check" command. i.e:
is_busy():
send_command(busy_cmd)
digital_read(busy_pin)
Tested on a Metro M7. blocks and voct_to_hz changes work. Documentation changes look good.
@crimson ferry got a debug build up, and observed debug serial, but it didn't really show anything aside from the usual:
Build:Oct 25 2019
rst:0x3 (RTC_SW_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x4002b865
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x1688
load:0x4004c000,len:0x1048
load:0x40050000,len:0x2f04
entry 0x4004c350
I (24) boot: ESP-IDF v4.4-dev-3608-gbbe2a1bf34 2nd stage bootloader
I (24) boot: compile time 23:14:23
I (24) boot: chip revision: 0
I (28) qio_mode: Enabling default flash chip QIO
I (33) boot.esp32s2: SPI Speed : 80MHz
I (38) boot.esp32s2: SPI Mode : QIO
I (43) boot.esp32s2: SPI Flash Size : 4MB
I (47) boot: Enabling RNG early entropy source...
I (53) boot: Partition Table:
I (56) boot: ## Label Usage Type ST Offset Length
I (64) boot: 0 nvs WiFi data 01 02 00009000 00005000
I (71) boot: 1 otadata OTA data 01 00 0000e000 00002000
I (79) boot: 2 ota_0 OTA app 00 10 00010000 00160000
I (86) boot: 3 ota_1 OTA app 00 11 00170000 00160000
I (93) boot: 4 uf2 factory app 00 00 002d0000 00040000
So it hasnβt gone into safe mode yet?
When it does, the crash dump will print there with the traceback addresses
Does it make sense to have these in reverse order? The order you have in the fields array is correct. And in your sample you reverse them again https://github.com/bablokb/circuitpython-examples/blob/master/inkyframe57/main.py#L185
Should this just be ascending order?
The pins.c file will need an update. Want to try making a PR? I don't have this board to test with.
Thanks @tannewt for your support, I PR new edit and now it working well.
Here is the CircuitPython level driver I did with the waveshare breakout for the 7": https://github.com/adafruit/Adafruit_CircuitPython_ACeP7In/blob/main/adafruit_acep7in.py
I see a couple little differences in the sequences but it is mostly the same.
I tried the py library, it worked, so took the changes into the board.c and it's working just fine now. I'm not sure if it was the rotation, or moving the PON command. Don't care at this point, hard to argue with success.
I'm stil...
Does it make sense to have these in reverse order? The order you have in the fields array is correct. And in your sample you reverse them again https://github.com/bablokb/circuitpython-examples/blob/master/inkyframe57/main.py#L185
Should this just be ascending order?
The order is correct, to match key-event number with keycode. I reverse it again in my sample code only for the led-list that I am using. L183+184 show how the codes match with the tuple.
Right, I see that it gets reversed again. What I'm saying is in the schematic and in the pimoroni library
The leds are keyed 0-4, with the others taking 5-7. The order of these ints might reverse them.
So I understand that you're specifying here that switch A should map to keycode 7. I suggest that s...
Yes, it would be better if switch A would map to keycode 0, but that is not under my control. I am using the class keypad.ShiftRegisterKeys and that class just creates it this way. Probably because it is physically connected this way.
just found this as i exactly was looking for this option :-)
are there any plans?
does anybody now how much work this is?
feasible as a first contribution to cp?
@regicidalplutophage to 1.: so we would need to have pull=UP and pull=DOWN as option?!
and a (small) change to line 54 & 55 in Keys.c
is it good to extract each request in its own issue?
CircuitPython version
Adafruit CircuitPython 8.1.0 on 2023-05-22; Adafruit Metro M4 Express with samd51j19
Code/REPL
import board
import busio
import digitalio
print("\n")
cs = digitalio.DigitalInOut(board.D5)
cs.direction = digitalio.Direction.OUTPUT
spi = busio.SPI(clock=board.SCK, MOSI=board.MOSI, MISO=board.MISO)
while not spi.try_lock():
pass
baudrates = [1,10,100,1000,5000,10000,25000,50000,100000,500000,1000000,2000000,300000...
The actual frequency is set not by a number, but by multipliers and dividers on one of the internal clocks. There are only so many combinations of those available, so it's not possible to set a precise frequency. You should instead always specify the maximum frequency supported by the peripheral you want to talk to, and CircuitPython will use the highest available frequency that is smaller or equal to what you have specified.
π
Alright, the change has been reverted.
Note: Tag
GPSonly contains one board, whileCamera(with this one) would have 4. And m5stack has quite a few more esp32 boards with cameras that may be added in the future.
Hmm, that's a good point. Then if you'd like to add Camera back in, but also add it to the other boards, I'd be ok with that. Sorry to go back and forth on that.
@onyx hinge @slender iron I am going to make an 8.2.0-beta.0. Release notes are all done. I don't see any imminent PR's. OK by you?
@tulip sleet I have nothing pending for synthio that affects behavior, just an added set of tests
sounds good; the main point of this is to refresh synthio and get some new boards in
Automated website update for release 8.2.0-beta.0 by Blinka.
New boards:
- imxrt1060_evkb
- lolin_c3_pico
- lolin_s3_mini
I have reintroduced the camera tag.
Would you perhaps want me to remove tag GPS to keep the list length the same?
Let's leave the GPS filter for now.
All good to me
@idle owl heads up that adabot failed the bundle cron last night. I'll dig into it, but letting it fail again might help. I'll have it fixed this week though.
I still think that the clear at least should be optional. There's really no reason to clear the display prior to displaying the desired image, except that it takes twice as long as it needs to.
I'm ok if you want to add a kwarg to make it optional. The code I was modelling after for Good Displays says it is needed so I did that here and think we should by default.
Ok.
Thanks.
π«‘ its prooooobably NAU7802
Agreed
But the error text was... lacking in helpful information. I'll likely need to poke it locally
Actually, did anyone turn on branch protection for the Adafruit Bundle repo recently? I re-ran it and it's giving me the same issue.
I think Adabot is supposed to be able to write to the main branch but can't now for some reason. At least that's what the error suggests.
OK, I'll check.
Oh that might be the old action again, but that's what the error was the first time at least
We'll see what re-running does
Yup, same thing.
I am not seeing anything indicating we changed something.
hmmmmmmmm, it definitely reads like a permissions issue with actually pushing the changes.
STDERR:
remote: Resolving deltas: 0% (0/3)
remote: Resolving deltas: 33% (1/3)
remote: Resolving deltas: 66% (2/3)
remote: Resolving deltas: 100% (3/3)
remote: Resolving deltas: 100% (3/3), completed with 3 local objects.
remote: error: GH006: Protected branch update failed for refs/heads/main.
remote: error: At least 1 approving review is required by reviewers with write access.
To https://github.com/adafruit/Adafruit_CircuitPython_Bundle.git
! [remote rejected] main -> main (protected branch hook declined)
error: failed to push some refs to 'https://github.com/adafruit/Adafruit_CircuitPython_Bundle.git'
Do me a favor, and take a look? And do a google search on what setting would block that? Because I did both, and not seeing anything or getting a useful search result.
@s-light
so we would need to have
pull=UPandpull=DOWNas option?!
That would the usage of normally closed switches with keypad.Keys.
For matrices pressed and released would have to be inverted and same for shift register.
is it good to extract each request in its own issue?
I don't have an opinion on that.
Sounds good. It might be part of a larger question of what repos should have that protection. Doing patches, I noticed a lot had protections against pushing directly to main that I was curious why (neopixel I understand, but there seemed to be a bunch of random other less popular libraries that had it)
Yeah I was seeing that.
We need to fix that or figure out excluding Adabot only from that. Except on neopixel. π
I can look into that.
Thanks. But let's figure this out first.
Wait.
It does say "require a PR before merging".
It is common to have write() and readinto() functions that take in WriteableBuffer and ReadableBuffer. The are some cases where you want to send or receive as you go. We've thought about this mostly in terms of async versions of these APIs. However, I wonder if it'd be ok to accept new FIFO types along side the fixed buffers. The corresponding methods would return immediately when given a FIFO. Then, data would be read or written via the FIFO. By taking in a new type, the old API is p...
But you can create roles that are excluded. Thing is, who is Adabot running as? She's not an actual user I think? So how do we create the exclusion role since I think it runs under multiple users?
Bingo!
mmmmmmmm, good question
This should be adabot: https://github.com/adafruit-adabot
So giving her an exception should be sufficient for CI purposes
adabot should be a separate account
I recently added branch protection to a bunch of libraries, and maybe the bundle repo too.
I can turn that off immediately. I did it because GitHub started warning about unprotected branches. In regular libraries this makes sense: a library update should have a PR. We can add exclusions.
We can give adabot (adafruit-adabot?) this bypass permission:
I think that should work. Because then at least someone could log onto adabot, get a temp token for patches, and run with that.
I like making sure no one can write to main, but that's also what will happen a lot haha
I'm sorry I caused trouble here; I didn't realize there was direct pushing to main on the Bundle.
No worries! Glad it's not a chase down the rabbit hole if anything π
so what privileges does adafruit-adabot need on the Bundle repo? I think Admin.
Is that sweeping permissions? The ones I can think of are anything relating to contents, Actions, and workflows.
That would also be great, and might be futureproof for adding more people
If that ever happens
uhh, can't do it without being GitHub Enterprise, which we are not

Excluding adabot would help at least
Not sure the difference between admin and maintain though in terms of permissions
admin can delete the repo, etc. basically superuser on the repo
maintain is not good enough to bypass protections.
So I can make adabot be admin, or take away the rule
@idle owl, what are your thoughts when you get a chance?
Even if you take away the rule, adabot couldn't delete, right?
ok, I did this:
- Make adafruit-adabot have Maintain.
- Turn off all the branch protection stuff (PR required, etc., except this:
I turned this on. I think this will allow PR merges from Librarians, and allow direct pushes from adabot. Is there an easy way to test the adabot role now?
I could re-run the failed job from last night?
I'm not sure that Librarians can merge PR's to Bundle now, with that set.
So worst case, we just delete the protection rule, if this doesn't work.
I can try the bundle CI again and let you know!
actually, for 2. above, I added Librarians to who can push, so that should be fine now.
I just clicked save, so if it failed a few seconds ago, try agian
yay! I now understand this better. One more q -- sometimes we do massive changes across all libraries. I thought these were sometimes done without PR's. Is that (still) true? Are the branch protection rules getting in the way of that? Your latest change was all PR's.
Adabot can do many of them, but if they can't be patched (via git format-patch) then they'll come from a human account
All those PRs I did were pretty much exclusively due to branch protection. I might PR changes that do require a second look like pylint updates but yesterdays weren't in that category.
but the patch is a direct push to main, is that right? On libraries without branch protection rules that would be no problem, but since I've been adding those rules, then that won't work any more. So I should allow adafruit-adabot to push directly in the branch protection rules, and then it will work agian.
i don't know if there were no branch protection rules before, but maybe that was the case.
Yeah the patch is a direct push to main, I just wanted to highlight who was pushing.
So yeah, allowing adafruit-adabot will fix those and prevent any pushes from humans, but that also means any pushes that are hand-tuned or manual pushes (maybe the patch could be applied like yesterday's to many libraries), it now means all those will need to be PRs now. Before I used to be able to just push directly to main.
Please do split issues up, since they can be fixed one at a time.
so we would need to have
pull=UPandpull=DOWNas option?!
Instead of that, I think I would add a normally_open=True optional argument, to handle normally closed switches.
I'm not sure we want to add lots more features to keypad, because it makes it larger and it might stop fitting on smaller builds. But adding some kind of access to the Event queues would make it possible to do some of this in Python inste...
I think I can sidestep it if I'm provided a PAT and authenticate as adabot, so that's one solution if we want to keep those protections but temporarily allow manual fixes like yesterday's to avoid generating a ton of PRs. Or not, I'm open to solutions of any kind.
The other case is I have scripts for doing patches that are patched by parsing repository contents using Python as opposed to git format-patch, so those also come from a human and not adabot. So same things as above apply there. An example of such a patch would be change all SPDX authors to FooBar - git format-patch would fail so I use parse in Python to iterate through all the libraries and do it, checking, writing, committing, and pushing.
Before I start opening new issues, let's think if one big change can solve a bunch of problems at once.
Then I think keypad should at least take digitalio.DigitalInOut, adafruit_tca8418.DigitalInOut, adafruit_74hc595.DigitalInOut and the like.
This way we can remove shift register scanner from keypad library altogether without losing shift register support and still gain support for shift register or mixed matrices.
This is an interesting generalization. The FIFO's could optionally be passed an event object that you could use to wake up an asyncio task when there was new data (InputFIFO) or the buffer was empty (OutputFIFO). I had mentioned something previously as a way of async-ifying the existing API's without new direct async def methods.
@proven garnet @tulip sleet Thanks for the fix! If we need to do something more broadly with the libraries, please loop me in.
Setting normally_open=False would allow the use of normally closed switches with keypad library
I am interested in the use cases for NC switches. Have you encountered this in a project?
https://www.ablenetinc.com/jelly-bean
These are wired as normally closed internally
Nah, the name was recently changed and the old one (epd) wasn't completely removed from the data file.
update pins to match Lolin C3 Pico schematic which shows SCK on GPIO1, MISO on GPIO0, MOSI on GPIO4, SDA on GPIO8, and SCL on GPIO10
add info for lolin c3 pico board
Example of doing this in raw python code (micropython): https://raspico.blogspot.com/2022/05/using-pio-to-interface-ps2-keyboard.html
This could be used as a guide for implementing ps2io in "plain circuitpython" or for creating a C implementation in the core.
There's also an implementation of the related IBM PC keyboard protocol in https://learn.adafruit.com/ibm-pc-keyboard-to-usb-hid-with-circuitpython/overview
CircuitPython version
Adafruit CircuitPython 8.1.0 on 2023-05-22; VCC-GND YD-ESP32-S3 (N16R8) with ESP32S3
and
Adafruit CircuitPython 8.1.0 on 2023-05-22; ESP32-S3-Box-Lite with ESP32S3
and
Adafruit CircuitPython 8.1.0 on 2023-05-22; Espressif ESP32-EYE with ESP32
Code/REPL
from debugfun import breakpoint, vars
import supervisor
supervisor.status_bar.console = False
supervisor.runtime.autoreload = False
help("modules")
import microcontr...
Is this still an issue? I don't see that the Espressif issue is closed, but for some reason I thought it had been fixed and added back the temperature check in my wifi code some time ago without any problems since.
As a double-check, just ran this for over an hour on
Adafruit CircuitPython 8.1.0-beta.2 on 2023-04-26; Adafruit QT Py ESP32S2 with ESP32S2:
import time
import os
import wifi
import microcontroller
def seconds_to_iso_time(s, tz):
st = time.localtime(s)
...
Can you try it with another router, or with your phone as a hotspot?
Sometimes a router will have a transient 0.0.0.0 IP address for a station as DHCP kicks in. But the 192.168.4.4 is more curious.
Hi! I have a question: why aren't there any ports for MCU modules? The kind you solder onto a carrier board. What are the challenges for supporting these?
Or is it the question of target audience?
I'm ok if you want to add a kwarg to make it optional. The code I was modelling after for Good Displays says it is needed so I did that here and think we should by default.
I would support this. I am running an InkyImpression (with the same display as the InkyFrame 5.7") for years now without the initial clear (update is once a day). The visual appearance does improve with a clear, but this can be done e.g. once a week from application code as well.
there is no way of telling what pin will be used for what, one big point of a board definition is that it defines pin names
if you build a board using a module, you can add a board definition for it
I feel we can just copy microcontroller pin names, it's already being done for some breadboardable modules anyway
because nobody has made one yet. There are some board definitions for Espressif dev boards that bring out all the pins, which can generally be used for the compatible module.
Then again, pure modules are not super practical, considering how CP generally relies on a USB port or at least a dedicated serial (with a serial-to-usb chip). You wouldn't really be able to use a generic build without specifying at least one of those
Yeah, makes sense... There's usually only one USB interface, that can probably be assumed as default
@jepler What do you think of this? It could merge nicely with audio and synth stuff.
Draft for now since we haven't decided on a name.
From what I understand about audio-frequency signal processing it mostly proceeds in lock-step, so fixed sized buffers are more commonly used. Furthermore, there may be a topology in which the output of one block is consumed as inputs by two or more blocks (or, in unusual circumstances, two copies of an output might be consumed by a single block), which is another way in which a FIFO model doesn't seem matched, since only one consumer gets to consume any particular item from a FIFO.
So, ba...
Hello, This issue was reproduced using ESP-IDF sample application which mounted an SD card and then tried to initialize the DMA engine.
I (287) gpio: GPIO[18]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (297) sdspi_transaction: cmd=52, R1 response: command not supported
I (337) sdspi_transaction: cmd=5, R1 response: command not supported
I (377) ADC DMA: Filesystem mounted
Name: SU16G
Type: SDHC/SDXC
Speed: 20 MHz
Size: 15193MB
I (377) ADC DMA: T...
Tested on prototype board. STEMMA I2C works. SD card works with sdcardio (sdioio not implemented on RP2040).
Pin naming note:
The Metro RP2040 has a TX/RX swap switch, because on RP2040 GPIO0 must be TX and GPIO1 must be RX, which is opposite from the Arduino pin convention.
Since the RX and TX pins no longer correspond immutably to D0 and D1, ther are two possibilities I can think of for handling this:
- Omit
board.TXandboard.RXcompletely. User will need to specify `boar...
the output of one block is consumed as inputs by two or more blocks
I wonder if a third class could be an intermediary between FIFOs then.
Instead of having to do a slow make fetch-submodules at the top level after cloning circuitpython, fetch the submodules lazily. Fetch the submodules for a particular port only when a build is done in that port directory.
... working on this.
Minor updates to make code for buttons and LEDs running on the PCA10056 compatible with the PCA10100. Focus was to make this code snippet portable between the two boards (They are practically identical...):
import board
from digitalio import DigitalInOut, Direction, Pull
import time
# LED setup.
led1 = DigitalInOut(board.LED1)
led2 = DigitalInOut(board.LED2)
led3 = DigitalInOut(board.LED3)
led4 = DigitalInOut(board.LED4)
led1.direction = Direction.OUTPUT
led2.directi...
I have successfully re-recreated this a learned a little bit about it, but still need to dig a bit further and do not have an actual solution to propose.
A few findings from my testing:
- Line object makes it go much slower than Rect objects. I tested by changing the 150 loop to make Rects instead of Lines and the display refreshes much faster in that case. (even if I make the Rects be 100x100 which is the size of the Bitmap for the Diagonla Lines)
- Line objects are not just inherentl...
Not a IDF fix, but a workaround in CP:
# Mount file system
dummy_spi = busio.SPI(clock=board.A1, MOSI=board.A2, MISO=board.A3)
sd_spi = busio.SPI(clock=board.D36, MOSI=board.D35, MISO=board.D37)
dummy_spi.deinit()
sdcard = sdcardio.SDCard(sd_spi, cs=board.A0)
vfs = storage.VfsFat(sdcard)
storage.mount(vfs, "/sd")
8.1.0
QT Py SAMD21
Thonny
https://forums.adafruit.com/viewtopic.php?p=973733
import board
import busio
uart = busio.UART(board.TX, board.RX, baudrate=4800, bits=7, parity=EVEN, stop=2, timeout=0.5)
Note that EVEN is undefined, so it shouldn't get to the constructor call.
Doing the above in the REPL causes the error to be reported followed by a safe mode crash, repeated attempts to reconnect from Thonny. For the user, with an unprotected bootloader, it bricked the b...
Tell the compiler we know what we are doing, and that the bytes are correctly aligned, to avoid compiler warning:
error: cast increases required alignment of target type
As an exploration, I implemented circuitpython.org using 11ty here: cp-org-11ty
This exploration is just for fun (and is unfinished) but might be helpful to this issue. Also it doesn't address the renaming/redirect issue.
11ty is nice because:
- You can create collections programatically. Which could make creating collections based on complex filtering criteria easier than doing it in liquid.
- You can use any of these templating languages: ...
I feel like make fetch-submodules shouldn't be removed.
It's nice to be able to run one command to prepare the local repo so that you can go offline.
But seperating it into auto triggers for every port sounds like a great idea.
CircuitPython version
Adafruit CircuitPython 8.1.0 on 2023-05-22; ESP32-S3-Box-Lite with ESP32S3
Code/REPL
import time
import array
import audiocore
import board
import audiobusio
audio = audiobusio.I2SOut(board.I2S_SCLK, board.I2S_LRCK, board.I2S_CODEC_DSDIN)
d = array.array("H", [0])
d[0] = 0b1111111111111111
print(d)
w = audiocore.RawSample(d, sample_rate=8000)
audio.play(w, loop=True)
while True:
time.sleep(1)
Behavior
This is...
CircuitPython version
Adafruit CircuitPython 8.1.0 on 2023-05-22; ESP32-S3-Box-Lite with ESP32S3
Code/REPL
import board
import audiobusio
audio = audiobusio.I2SOut(board.I2S_SCLK, board.I2S_LRCK, board.I2S_CODEC_DSDIN)
def breakpoint():
while True:
_dbg_input = input('> Input:\n')
print('> Output:')
if _dbg_input:
try:
exec(_dbg_input)
except Exception as e:
...
Hi,
Thank you for your reply.
I figured out where does the 192.168.4.* comes from. It come from a esp8266 running micropython code:
from debugfun import breakpoint, vars
print("Activating network")
import network
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect('****', '****')
I guess it goes into some kind of AP mode with the same SSID and pwd but not functional.
Also, I guess the Document page need to be modified.
[https://docs.circuitpython.or...
Hey folks, anyone want to help with some under-the-hood circuit python library extension stuff?
I'm trying to add a library to CircuitPython (the library in question is from Neuton, a TinyML platform - https://lab.neuton.ai )
My team and I used to have this library compiling, but Neuton went and changed how they distribute their code. Previously, they gave a file tree that was
/YourModel
/Artifacts
/neuton
/include (h files)
/lib (c files)
/neuton_generated
But they've changed it so that /lib contains .a files (https://fileinfo.com/extension/a) - and now CMake is unhappy with our old tools for binding the library into CircuitPython claiming that it can't find a rule to make Neuton.C, which now doesn't exist.
How should I direct CMake to parse a ".a" file.
Even a start on what to read up on would be helpful because it's currently bottlenecking our project and I don't know how to fix it.
Thanks in advance!
Learn about .A files and view a list of programs that open them.
iirc .a files are assembly
if that is the case, unless it's arm/riscv code that ain't gonna work, even if you get cmake going
or was it .S It's 6am with no sleep, idk anymore
Original board support doesn't allow the device to run on battery. But for most M60 keyboard users, they use the keyboard wirelessly. This PR makes it possible to run latest CircuitPython on M60 keyboard without first being connected to a USB power source.
This also expose the battery control pin as BATTERY_ENABLE, so users can fully power off the keyboard just by initialize this pin.
The connect comments could be clarified. If the station is disconnected, the code will make several reconnection attempts, but it can't guarantee that the external conditions are ready for a successful connection. Sometimes those retries are enough, sometimes not. And sometimes user code may want to do something else if it can't reconnect, like display an error, or try a different AP.
I feel like wifi reconnection should be something like a periodic check.
If it has connected once successfully, it should do a bunch of attempts at once when it's lost. And then more attempts at intervals within backround_tasks
my engluish is dying, 8am after allnighter
Doing a bunch of attempts when a problem has just occured is not really helpful in most scenarios.
yeah, we should probably entertain some other strategies
tough call though, at some point you may want to send it back to user code to make a decision
As it stands now, it 'wants' to be seemless.
Which it really isn't.
But it's a good time to decide on api changes cuz 9.0.
I seem to recall some discussion of whether web workflow auto-reconnect should trigger more aggressive always-connected approach
and then there are still differences in behavior between espressif and raspberrypi
Yea, I really need to at some point go back to rp2 and do the different wifi security stuff for ap.
The thing is just that I am now so happy with S3 that picow just feels sad in my eyes.
Adafruit CircuitPython 8.1.0-beta.2 on 2023-04-26; Adafruit QT Py ESP32-S3 no psram with ESP32S3
>>> import os, wifi
>>> wifi.radio.connect(os.getenv("WIFI_SSID"), os.getenv("WIFI_PASSWORD"))
>>> wifi.radio.connected
True
>>>
soft reboot
Auto-reload is off.
Code done running.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 8.1.0-beta.2 on 2023-04-26; Adafruit QT Py ESP32-S3 no psram with ESP32S3
>>> import wifi
>>> wifi.radio.connected
False
```vs.```py
Adafruit CircuitPython 8.1.0-rc.0-6-g6cfdbfbdd on 2023-05-21; Raspberry Pi Pico W with rp2040
>>> import os, wifi
>>> wifi.radio.connect(os.getenv("WIFI_SSID"), os.getenv("WIFI_PASSWORD"))
>>> wifi.radio.connected
True
>>>
soft reboot
Auto-reload is off.
Code done running.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 8.1.0-rc.0-6-g6cfdbfbdd on 2023-05-21; Raspberry Pi Pico W with rp2040
>>> import wifi
>>> wifi.radio.connected
True
(web workflow off in both cases... espressif disconnects on reload, raspberrypi does not)
That's cuz on rp2 it never resets the wifi stuff underneath.
Not much can be done with the current code.
your breakfast time, my sleep time (don't know if we had crossed paths yet, but I was in your city last summer π
A rewrite would be needed.
And with the current api, that would be pointless.
You never know.
The world isn't too big.
Discord could do a lot more to be a professional tool.
but doesnt, prolly intentionally
Business discord would annihilate slack
Hey, I might need some help with editing these files for a new circuitpython board i'm developing. Before I get into it, is this the right channel for these types of questions?
This is the right place, you don't need to ask to ask. π It is a holiday weekend in the US, so devs might not be around on a Sunday morning. Almost all of us are volunteers, so I'd recommend asking your question and when someone sees it and knows, they'll speak up
Sounds good, thanks π
I've developed a system where I control mouse movement from a Windows device connected to my Raspberry Pi via a socket connection. When I send the movement coordinates (x, y) from the windows device to the Raspberry Pi, the messages sent go so fast, they manage to make the mouse move but slip and don't have time to be properly executed.
I've tried sending the coordinates sequentially with a delay (time.sleep) between each transmission. This works, but it slows down mouse movement considerably, which is undesirable as I jerk and lose a lot of fluidity.
I also tried using an execution queue to process the coordinates sequentially, but this didn't solve the smoothness problem.
I'm now looking for advice on the best approach to solve this problem and make mouse movement smoother, without introducing additional delays or latency.
I would greatly appreciate any help or suggestions to improve the smoothness of mouse movement in my system.
Thank you in advance for your assistance!
Turn mouse acceleration off from sys settings.
To make it look like human movement send many coords of smaller steps to the pc, or even make it go to (x,y) in a curve.
Disclaimer: I pulled an allnighter, may have misread the wall o' text.
The trick virtual machine software use is to register the hid device as a pen-touch tablet.
So that regardless of os, it doesn't overshoot.
Pretty sure it's not in CP as of now though.
Also #help-with-circuitpython for code.
Here is for CP development itself.
@quaint monolith
I had already done it
And it still overshot?
Weird.
I haven't touched usbhid in a bit, but last I checked it worked fine.
yes, my mouse receives the coordinates and moves but it drifts
but I send several hundred coordinates per second
but I can't help but send so many
I mean, that really isn't a great idea.
How about implementing some sort of 'fps' cap?
Like, every second I want to send n updates max.
So divide 1 by n.
Setup a time check func that reads last update time & time monotonic.
If the threshold isn't met, discard the update.
This way it can just send updates based on that n, regardless of the speed of the code.
I suggest starting with a small n like 10.
infact every movement of my mouse means that I have to update the coordinates sent to my raspberry. So if I have 144 fps I have to try to send as much as possible so as not to feel the latency
During development I suggest you don't be overzealous with speed.
Optimisations can be done later, and the handicaps can be removed at any time.
I don't think I fully understand your proposed solution to help me. I don't know if it's the translation into my language that doesn't make me understand, but I'm having trouble.
CircuitPython version
Adafruit CircuitPython 8.1.0 on 2023-05-22; Raspberry Pi Zero W with bcm2835
Code/REPL
print("Hello World!")
Behavior
- The gadget serial interface and CIRCUITPY drive are unavailable.
- Inspecting the sd card confirms that the 2nd partition was created successfully.
- Content of
boot_out.txtis as expected and does not provide any clues.
Description
The console on GPIO 14/15 shows the usual output but seems to ...
in what you told me I can't Limit the number of sends per second and Send multiple coordinates of small steps
I didn't say any "you can't".
What I said is that you should limit the number of 'sends' per second.
Thank you for helping me sort these things out. If there is not anything confusing I am closing this issue.
Iβve found the same, also from my own build. Four blinks and thatβs it.
CircuitPython version
Adafruit CircuitPython 8.1.0 on 2023-05-22; M5Stack Timer Camera X with ESP32
Code/REPL
Code done running.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 8.1.0 on 2023-05-22; M5Stack Timer Camera X with ESP32
>>> import os
>>> a = open("/test", "w")
>>> a.close()
>>> os.remove("/test")
>>>
Behavior
root is mounted rw
Description
It could have to do with the web-workflow.
By ...
.a files are archive files, are a bunch of .c.o files
An A file contains a library of functions and headers that may be referenced by a C/C++ source file. It may store only a few functions or may include an entire library of functions, such as a 3D modeling engine. A files are typically created by the GNU ar utility.
That's intentional, the only reason to limit the drive to read only is to protect from corruption when the USB drive is mounted.
Builds where USB is not enabled have the drive is read/write mode by default.
After bisecting it looks like the pystack fix for the espressif chips in commit 7d02bff is causing this:
- if (stack_get_bottom() != NULL) {
- mp_stack_set_limit(stack_get_length() - 1024);
+ uint32_t *stack_bottom = stack_get_bottom();
+ if (stack_bottom != NULL) {
+ size_t stack_length = stack_get_length();
+ mp_stack_set_top(stack_bottom + (stack_length / si...
Confirmed @RetiredWizard thank you
With
(ENV-circuitpython) graeme@sleeper-service:~/git/circuitpython/ports/broadcom$ git diff
diff --git a/main.c b/main.c
index 122f079129..a32365defe 100644
--- a/main.c
+++ b/main.c
@@ -160,7 +160,6 @@ STATIC void start_mp(supervisor_allocation *heap, supervisor_allocation *pystack
uint32_t *stack_bottom = stack_get_bottom();
if (stack_bottom != NULL) {
size_t stack_length = stack_get_length();
- mp_stack_set_t...
Did you try absolute mouse hid-descriptor?
There is a library for doing that in the community bundle.
This might ease what you try to do.
CircuitPython version
Adafruit CircuitPython 8.1.0 on 2023-05-22; SAM E54 Xplained Pro with same54p20
Code/REPL
-
Behavior
USB drive appearing instead of CIRCUITPY drive.
Description
Hello, could someone help me understand why after installing the latest CircuitPython to my SAM E54 Xplained Pro, the "CIRCUITPY" drive does not appear but "USB Drive" appears instead?
Additional information
No response
Cheers! @RetiredWizard
Serial console setup
Adafruit CircuitPython 8.1.0-dirty on 2023-05-29; Raspberry Pi Zero W with bcm2835
Board ID:raspberrypi_zero_w
UID:00000000XXXXXXXX
0;πDone | 8.1.0-dirty
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
0;πcode.py | 8.1.0-dirtyHello World!
0;πDone | 8.1.0-dirty
Code done running.
Press any key to enter the REPL. Use CTRL-D to reload.
The hunt for one of those elusive 2w's is...
Here are some things to check:
- See https://forums.adafruit.com/viewtopic.php?p=838854#p838854, and the whole thread. A user had trouble, and it turned out some board jumpers were set wrong.
- (If I remember right:) A user had trouble with a newer SAMD21 Xplained board. It turns out Microchip changed the flash chip on the board during the chip shortage without much if any notification. Perhaps they did something similar on this board. Currently the board build is only expecting an `N25Q2...
Hello, is here anybody who could point me to some tutorial for writing/porting epd driver or describe me how to debug SPI data for it? I asked in help with circuitpython, but except @slender iron (thanks!) nobody respond. Display is working under Arduino, but I would like to use it with CPY. It should have Il0371 driver, and I think I have right datasheet for it and I'm also comparing some part (start sequence) to working code in Arduino. I have logic analyzer connect to my ESP32-S3 dev board so I can see what is happening at the bus and compare it to the Arduino code. I have this V1 display (https://www.waveshare.com/wiki/7.5inch_e-Paper_HAT_(B)_Manual#Introduction ), which should have this datasheet ( https://www.waveshare.com/w/upload/2/29/7.5inch_e-paper-b-Specification.pdf ) and I'm trying to change Il0373 driver from Adafruit. I also tried to search this, but without luck. Many thanks for response.
Let's try now
What's the best way for including assets (e.g. mp3 files) to be added to the filesystem on init? You can explicitly write small files like the default code.py, but that'd be messy for something as large as an mp3. Is there a path for doing this similar to how we include frozen python modules?
I believe there is a tool to create a UF2 from your entire setup. I can't recall what it is offhand as I have never used it. That may work
Yeah, I was thinking that as an option. nRF Connect can show you the current memory layout and save it to a hex file. Was wondering if I could just build with the asset.
Not tested on hardware yet, but gives plausible results for the new manual host computer test "synthio/note/biquad.py"
My main reference has been https://www.w3.org/TR/audio-eq-cookbook/
each note can have just 0 or 1 biquad filters, there's not a filter topology.
the filter property can in theory be dynamically updated but I didn't test it; I think there's not actually a sound mathematical theory of how changing the a/b coefficients dynamically affects things, since the internal `...
and I verified the filter coefficients against https://arachnoid.com/BiQuadDesigner/
I think I wrote a tool for this, but it might only be for GitHub CI....
Ah nevermind, it just creates a filesystem image file, not a UF2.
Since we're in the same boat here with trying to port this driver to be displayio-compatible (given that we chatted before about this and I'm working on the 2.13 display), I can help you out up to a certain point because I got mine working... with some caveats. I'm using 8.2 (though I started in 8.1 and it works there too) I got the init to work, but I couldn't get it to refresh the display the normal way.
Everything checks out according to the probe though except for the part where it uploads the framebuffer to RAM, but that's a displayio quirk for good reason. What doesn't make sense is that it won't refresh the display even when I supplied the bitpacked commands. The probe says it's coming in but it just doesn't happen. Knowing that my custom driver works with no delay included, I pretty much just packed everything into the init code and sure enough, it works. I think it's something between the init and the refresh commands that's screwing it up. Possibly the upload to RAM but I dunno. I need to investigate it, maybe even include the busy pin because I know waveshare devices kinda mess that up too.
I just realized that it only does that when I hard reset it so that's something to dig into as well. XD
an up to date listing similar to this automatically generated at build time, on a dedicated page: https://docs.circuitpython.org/en/latest/shared-bindings/support_matrix.html -- would it make more sense to remove this table? It feels like a potential maintenance burden to have it here.
This was added in the original SiLabs PR, I have no objections for removing it.
I finally got it! It's the baudrate. Turns out, the custom SPI method I was using was at the right speed at 4000000βor rather, it hits a speed wall around that point that works just fine. But on displayio, I have to crank it down to something like 10000 because it's way too fast otherwise. Like x10 too fast on 4000000 based on the timings. Now it works. Still needs to hard reset but I'm finally in. XD
https://forums.adafruit.com/viewtopic.php?t=201772
CircuitPython 8.0.5
Adafruit ESP32-S3 Reverse TFT Feather
Trying to use board.D3 (aka board.SDA) as a TouchIn causes a hang.
import touchio
print("")
print("touchio_test.py")
while True:
touch_pin = touchio.TouchIn(board.D3)
print(touch_pin.value)
time.sleep(0.1)
Cannot reproduce exactly on regular esp32, however got a weird crash.
Adafruit CircuitPython 8.1.0 on 2023-05-22; M5Stack Timer Camera X with ESP32
>>> import board, digitalio, touchio
>>> a = touchio.TouchIn(board.G13)
>>> a.value
False
>>> a.deinit()
>>> a = touchio.TouchIn(board.G4)
>>> a.value
False
This is one of the 3 i2c busses of the board.
On the other one, same deal fine.
On the 3rd one, and specifically pin board.BM8563_SCL, which is pin_GPIO14, this happe...
Here are some things to check:
- See https://forums.adafruit.com/viewtopic.php?p=838854#p838854, and the whole thread. A user had trouble, and it turned out some board jumpers were set wrong.
- (If I remember right:) A user had trouble with a newer SAMD21 Xplained board. It turns out Microchip changed the flash chip on the board during the chip shortage without much if any notification. Perhaps they did something similar on this board. Currently the board build is only expecting a...
i just tested it with the REPL:
Adafruit CircuitPython 8.0.5 on 2023-03-31; Adafruit Feather ESP32-S3 Reverse TFT with ESP32S3
>>> import board
>>> import touchio
>>> touch_pin = touchio.TouchIn(board.D3)
at this point the ESP32-S3 (in my case a Adafruit ESP32-S3 Reverse TFT Feather )
REPL is unresponsive till i reset it.
the CIRCUITPY disc is still working!
We don't usually use cmake to build CP. .a files are already compiled so they are linked into CP . You'll want to add the .a to the linking command.
- @vague thicket did you get it going? I'm back from the weekend.
I guess I ran into the same issues people had with this display showing flipped/mirrored images with displayio and eventually rediscovered (as others seem to have) that the adafruit_ssd1680 driver perfectly works fine with the 2.13 inch. I still think Waveshare's implementation clashes with displayio; currently, I can get it to refreshβnot display the images I want, but surprisingly the "code is done running" message and at any baudrate. But I don't think it matters much in this case because it's probably their init sequence, which the ssd1680 completely sidesteps.
Not a waste of time though since my main goal is to get the 7.5 inch working (I think dronecz and I have the same model) and this gives me a lot of info to go with. Maybe the ssd1680 works there too but I haven't started yet.
so the ssd1680 sequence works ok
Yeah. I'm totally surprised because its init sequence is pretty simple, which makes me think these displays might have some level of ubiquity with them.
<@&356864093652516868> we'll be having the weekly meeting in round about an hour. Please add your info to the notes doc if you haven't yet! https://docs.google.com/document/d/1VcPOjquw3lEHudLutRlrpuA2AQNsrTsxyYjwu2nnvZY/edit?usp=sharing
CircuitPython Weekly Meeting for May 30, 2023 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 att...
@lone axle are you good to run the meeting today even though it's tuesday?
Yep, I ended up taking today off from my other job. Thank you
I did not π¦ I tried to change code from @dusk mist , but without luck. Strange for me is that, that display does completely nothing in CPY, but it works in same setup in Arduino. IΒ΄m also using this code (https://github.com/lemariva/uPyEINK/blob/master/frozen_modules/e7in5.py ) as reference as far as I can tell it is pretty similar to Arduino implementation (https://github.com/ZinggJM/GxEPD2/blob/master/src/epd3c/GxEPD2_750c.cpp) .
I changed MPY driver to this (comments may not be right).
I watched today stream from @lone axle where he was fighting 7 color EPD and it did not look that hard, even when he was bit lost as IΒ΄m right now.
In my case I was ended up using https://github.com/adafruit/Adafruit_CircuitPython_SPD1656 library for the 7color display. I think I tried a few other things before that, but this one Scott worked on before I had any hardware and it successfully displayed on my display without modification if I recall correctly.
@vague thicket did you try with the regular il0371 driver?
I'd get two logic captures and compare them
There is some? I did not find one. I will capture data with my analyzer for Arduino and CPY and compare them, but I'm newbe with that as well.
ah 0371
not quite the same
Please post a picture of the chip. It'll likely have a manufacturer's logo too.
Any idea why it is crashing with that line? Maybe the uint32_t needs to be size_t?
Without setting the top, CP's stack checking won't be correct.
I did some quick test for obvious things like stack_length coming back zero or strange stack_bottom but didn't go very far. I get lost quickly when I start tracing the memory/stack logic but I can give another try :).
Given it doesn't happen on the Zero2W, I'm thinking it might be a difference in how the SDK handles the chip variants???
Lurking remotely today so did not add any notes
https://blog.adafruit.com/2023/05/22/circuitpython-8-1-0-released/ https://blog.adafruit.com/2023/05/24/circuitpython-8-2-0-beta-0-released/
From the GitHub release page: This is CircuitPython 8.1.0, the latest minor revision of CircuitPython, and is a new stable release. Notable changes to 8.1.0 since 8.0.0 Silicon Labs (SiLabs) MG24 mβ¦
TypeScript for Tiny IoT Devices
I am creating toys like this thanks to my supporters https://www.patreon.com/bobricius
GPIO matrix keyboard for @SeeedStudioSZ Wio Terminal
One suggestion. Otherwise good. Thanks!
Let's leave HW_LED_STATUS because it shouldn't block user code from using it.
sdomoszlai13 was on yesterday's report with a merged pull request, thank you!
and a new library that was on yesterday's report but not today's: jposada202020/CircuitPython_scales
@midnight ember Thanks for handling the SSD1306 support issue!
for those who are curious the error that occurs when calling the show method with a Group is: ```Traceback (most recent call last):
File "code.py", line 41, in <module>
TypeError: function takes 1 positional arguments but 2 were given
Could we add specific error handing in `show` that prints a useful error?
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/1v476RNCHysQUjWEPVojGsr7lcRD1saa2d9-Sdhbq3_Y/edit?usp=sharing
CircuitPython Weekly Meeting for June 5, 2023 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 partici...
https github com adafruit Adafruit
Just making it back online. The SSD1306 thing I just wanted to bring up the issue. How it's handled is completely up to the librarians and learn guide people that is beyond anything else I could contribute to the conversation. Hearing the discussion amongst the people it's most relevant to was the goal for bringing up the issue.
Even something as simple as a header comment # this library is designed for framebuffio and not for displayio use or something as simple as that.
whatever you all decide how to handle the confusion is beyond me. had no idea it would affect so many other display libraries. if there's a larger naming convention confusion issue then it should be addressed across the libraries. that was a really interesting conversation.
@tulip sleet is this still on going? specially - is there a known esp32-s3 specific i2c issue?
https://github.com/adafruit/circuitpython/issues/6311
part of the problem is when google searching circuit python ssd1306 examples it dumps you into an examples folder. you never see the base directory where the deprecated warning is. the deprecated page could have a huge warning with an animated gif myspace style and it would have no effect as the google search bypasses it and dumps you into the examples folder... which is what you want if you're searching for a github example. so the warnings are bypassed. header commenting in the example files is needed too.
Ultimately it was Neradoc that corrected the issue, I only provided an example for the user's question (once I used the right library).
I meant handling the long-term support issue by submitting an example. π
@onyx hinge here is my brainstorm for what each physical synthio module would have: ```
Modular synthio
LFO:
OLED for displaying waveform
waveform: rotary switch with detents
rate: pot and input jack
offset: pot and input jack
phase_offset: pot and input jack
scale: pot and input jack
once: toggle
interpolate: toggle
output: output jack
Math:
operation: rotary switch with detents. 14 options
a: pot or input jack
b: pot or input jack
c: pot or input jack
output: output jack
Envelope:
OLED for displaying envelope.
attack_time: pot
decay_time: pot
release_time: pot
attack_level: pot
sustain_level: pot
output: jack
Noterizer:
OLED for waveform
waveform: rotary switch with detents
panning: input jack
amplitude: input jack
bend: input jack
ring_bend: input jack
Has anyone got any resources for library construction? Specifically for i2c building?
Donβt really know what Iβm doing properly but Iβm trying to port a library for the Pimoroni IO Expander board.
Iβm getting some data out tho itβs not quite right yet, but Iβve a way to go and need to handle interrupts etc somehow too.
Hereβs what I have so far:
I'd suggest starting with another circuitpython io expander library
@slender iron cool! the number of analog I/Os required for some of those is large!
None would be analog. The jacks would just connect one thing to another
Weβll pots would be analog I guess
Hello, I took a look at the code that you previously share. I would recommend use the Adafruit_register library, this will handle all the register address and masking and register for you, so you do not need to figure what mask to use. However, I am more a hands on person, so Ill try the code on the hardware. and then compared with other code available, I have done some I2C libraries from scratch for Circuipython. we could discuss if you need. my user handle is jposada202020 in github if you want to take a look. there are also some Circuitpython Expander libraries in the community bundle if you want to take a look https://github.com/adafruit/CircuitPython_Community_Bundle/blob/main/circuitpython_community_library_list.md. Good luck !
resolves: #8013
The diff shown on the changes pages is cut into a way that makes it a bit harder to follow at least for me.
The are two main changes.
- wrap everything except the return in here: https://github.com/adafruit/circuitpython/blob/bf67ea36405f3285bacc564e17076263ba1a5c6a/shared-module/displayio/Group.c#L441-L468 with an if statement that makes it skip looking into the members of a group that is hidden. This covers a case that wasn't mentioned in the issue which is when a...
got a weird import order from pylint submitting an example ```py
Check failure on line 13 in examples/displayio_ssd1306_picowbell_tempsensor.py
GitHub Actions / test
third party import "from adafruit_bme280 import basic as adafruit_bme280" should be placed before "import adafruit_displayio_ssd1306 as ssd1306"
import time
import board
import displayio
import busio
import terminalio
from adafruit_display_text import label
from adafruit_bme280 import basic as adafruit_bme280
import adafruit_displayio_ssd1306 as ssd1306
``` if it wants 3rd party imported first then why doesn't it want it imported before time, board, etc..?
the way pylint wants things formatted confuses the heck out of me sometimes, but i change it and it's happy so π€·ββοΈ
maybe OCD but I always do imports first and from second, it just looks cleaner. using Mu there's no import order helper.
When using IO expander and multiplexer libraries, the register library is a common associated prerequisite so I would consider that completely normal if he goes with the register helper library.
it's alphabetical too, thus adafruit_bme before adafruit_displayio I think ?
is that all it is? lol i can remember that then. π
what pylint considers "3rd party import" I don't know though, are the CP builtin libraries defined in pylintrc ? I never thought about that
it only seemed to complain about the imported libraries in /lib yes
i've been using circuit python for like a year or two now and didn't know this...
i know it sounds really basic but can we get a learn guide on basic import ordering? might seem to be a nuance but not documented in any example to my knowledge.. π
it's only relevant with pylint though, right? so, submitted code, maybe could go in the making libraries guide
That's true, Mu doesn't care about the ordering only pylint?
uh oh, he's gone modular!
Here is a picture of the chip.
I'm using a third-party machine learning library (Neuton). The vendor just stop shipping C source code and now supply .a and .h files instead. Is this the best approach to integrating with circuit python? It compiles and links successfully, but feels like a hack. Is there a better way to add an architecture dependent library? Is there a more convenient way to update OBJ to avoid the makefile edit.?```
Vendor supplied library files in lib/Neuton
neutonml folder with init.[ch] and neuton.[ch] in shared-[bindings, modules]
my board's mpconfigboard.mk:
AULITECH_NEUTONML = 1
py/circuitpy_defns.mk:
ifeq ($(AULITECH_NEUTONML),1)
SRC_PATTERNS += neutonml/%
INC += -I$(TOP)/lib/Neuton/neuton/include -I$(TOP)/lib/Neuton
LIB_3P += $(TOP)/lib/Neuton/neuton/lib/libneuton_arm_cm4.a
endif # note the library is architecture specific
ports/nrf/makefile:
$(BUILD)/firmware.elf: $(OBJ) $(GENERATED_LD_FILE)
$(STEPECHO) "LINK $@"
$(Q)echo $(OBJ) $(LIB_3P)> $(BUILD)/firmware.objs
adding LIB_3P to the list of object files
slight improvement ties the Library to board.```
my board's mpconfigboard.mk:
AULITECH_NEUTONML = 1
AULITECH_NEUTONML_LIB = lib/Neuton/neuton/lib/libneuton_arm_cm4.a
py/circuitpy_defns.mk:
ifeq ($(AULITECH_NEUTONML),1)
SRC_PATTERNS += neutonml/%
INC += -I$(TOP)/lib/Neuton/neuton/include -I$(TOP)/lib/Neuton
LIB_3P += $(TOP)/$(AULITECH_NEUTONML_LIB)
endif # note the library is now board specific
ports/nrf/makefile:
$(BUILD)/firmware.elf: $(OBJ) $(GENERATED_LD_FILE)
$(STEPECHO) "LINK $@"
$(Q)echo $(OBJ) $(LIB_3P)> $(BUILD)/firmware.objs
adding LIB_3P to the list of object files```
CircuitPython version
Adafruit CircuitPython 8.0.5 on 2023-03-31; Waveshare RP2040-Zero with rp2040
Code/REPL
import board
import neopixel
from adafruit_led_animation.animation.rainbow import Rainbow
# Update to match the pin connected to your NeoPixels
pixel_pin = board.GP6
# Update to match the number of NeoPixels you have connected
pixel_num = 8
pixels = neopixel.NeoPixel(pixel_pin, pixel_num, brightness=0.5, auto_write=False)
rainbow = R...
Any ETA on this one in CircuitPython?
attiny seesaw has 9 ADC pins, or any old analog mux (e.g., 4051 family) would let you do up to 8
We are announcing the deprecation of building without a configuration file(.readtehdocs.yaml) together with the deprecation of configuration file v1 as well. Read the Docs will soon start requiring a.readthedocs.yaml configuration file for all projects in order to build documentation successfully...
@idle owl @proven garnet this may need your attention across the libraries
Cookie cutter has a v2 file so maybe it's all ok
pre-commit passes for me locally on this branch. I must have something out of date compared to the actions container.
I will try getting my stuff updated and re-run it later on tonight.
Do the trailing characters in the version string have significant meaning?
In the actions container I found:
uncrustify (0.72.0+dfsg1-2)
Whereas locally I have:
β― uncrustify --version
Uncrustify-0.72.0_f
Which appears to be the same major version but does differ with the ...
This was disabled years ago here: https://github.com/micropython/micropython/commit/6c3faf6c17521940eb3ec48a8af3d28b513e2ba2
Allow to compile without warnings by disabling deque_clear.
Not sure if the original reason is still relevant.
I feel like we're good. But I'll take a look.
Now that 8.1.0 is out, I am finally getting back to this (sorry!). I think we could target this for 9.0.0. A couple of preliminary questions:
- Has your thinking changed since https://docs.google.com/document/d/1xlzTEdP8ovTtz5Sx8voP8R9M8fY88LuyiWBYu0muiRc/edit#, which was written in early February?
- Perhaps we could split this into a cleanup PR and a "new features" PR. I'm under the impression this will break the current
asyncioimpl. But if the current library stops using the currrent...
Let me know if we need to address anything! And thanks @onyx hinge!
drivers/lsm303 has ".readthedocs.yml" while the standard seems to be ".readtehdocs.yaml". that one also lacks a "version: 2" line. The others all seem to have it. So, just one outlier. [in adafruit bundle]
in the community bundle, there are more outliers. https://gist.github.com/jepler/30114a9905feb4a9f0aee6ea137ca3e5 -- "biplane" seems to be incorrectly located, too
continuing to pile on, I noticed that there may also be deprecated nodejs actions in community bundle, there sure are in https://github.com/jepler/Jepler_CircuitPython_udecimal/ https://github.com/jepler/Jepler_CircuitPython_udecimal/actions/runs/5134723945
Oh wow these are good catches, I should have time to get to them in a little bit or worst case this evening!
https://github.com/jepler/Jepler_CircuitPython_udecimal/pull/38 I tried to do my own package ...
I can't seem to invite you as a reviewer
since it's in my personal github
@timid bolt now that 8.1.0 is done, I have finally gotten back to looking at asyncio. You'll see my comments in the PR's, but we could have a more general audio or video chat about it too if you have time.
I'll still leave a comment if you want if I see anything
please do
it won't be eurorack compatible though
I'd want each module to be separate so I'd need 5 at most but could do that as two separate stemmas of 3 and 2
Could you just OBJ += it from the board def?
CircuitPython version
This was verified using a Raspberry Pi Pico W & CircuitPython 8.1
Earlier this year the team did a wonderful job of allowing our campus network, which approves devices based on MAC address, not password, to work properly. Campus requires the MAC address to be registered. This works great, but when taking devices from my home network to the campus network, I need to first modify the settings.toml file remotely, otherwise when plugging the device into the c...
Thanks for looking into this! How does this work on the frame after an object is hidden? I think my design was to rely on tilegrids alone because for the first frame they are hidden, they have to put a refresh area where they were on the previous frame. This is true regardless of whether they were hidden directly or indirectly.
Nope, it is still blocked on #5926. Why do you want it on espressif instead of using nrf?
How are you powering the neopixels? This can happen if you are using 3.3v logic but powering the pixels at 5v.
I am powering it with on board 5v supply...
Thanks! That looks like a MicroChip flash chip instead of micron as the board def says. Want to make a PR adding "SST26VF064B" to the list here: https://github.com/adafruit/circuitpython/blob/main/ports/atmel-samd/boards/same54_xplained/mpconfigboard.mk#L10 ? That's the full name of the MicroChip flash (nvm.toml define here.)
How are you powering the neopixels? This can happen if you are using 3.3v logic but powering the pixels at 5v.
I am powering it with on board 5v supply...
Thanks! I think Zero2 is 64 bit and Zero is 32 bit. That could explain it. They could also have different alignment requirements.
I tried that an one point, but it looked like adding to OBJ triggered a make rule and caused a failure
Thank you!
Ah, right. it tries to compile it. maybe a LIB def exists? I don't remember exactly
For reliable communication you'll either want to power them at 3v or level shift the data stream up to 5v logic. This is why the ItsyBitsy has pin 5 be 5v logic.
sounds like c-stack
Because I just bought Adafrtuit ESP32-S3 Feather :) But no worries, thanks
for the update.
Εr., 31 maj 2023, 19:26 uΕΌytkownik Scott Shawcroft @.***>
napisaΕ:
Nope, it is still blocked on #5926
https://github.com/adafruit/circuitpython/issues/5926. Why do you want
it on espressif instead of using nrf?β
Reply to this email directly, view it on GitHub
https://github.com/adafruit/circuitpython/issues/7171#issuecomment-1570627197,
or unsubscribe
<https://github.com/n...
@tannewt Thank you. This will definitely need some changes, it does not properly hide elements if you try to do it after they're created and shown due to what you mentioned needing to have a refresh area for the next frame after it becomes hidden.
Do you know if first_draw is meaning conceptually like the first time this thing has been drawn on the display? i.e. it would be expected to be false once, then get drawn and become true and stay true so long as no further changes are made to i...
This library is archived so we could fix it but have to unarchived it first. Otherwise if all of them have it, we should be good.
I could write a script to auto-PR these libraries, but I think for a while docs were not enforced for community libs (I may be mistaken though and thinking of PyPI related things). I suppose on some level of there aren't docs then if they ever get added then it can be fixed then.
Also took a look at your repository - looks like as long as there is a pyproject.toml file at all (which triggers the CI) the metadata is allowed to still be defined in setup.py.
anyone know of a full implementation of uart using PIO?
PIOASM only has two separate examples
I enabled MICROPY_STACKLESS which resulted in the same "RuntimeError: maximum recursion depth exceeded" message but without the traceback.
I then disabled CIRCUITPY_FULL_BUILD, CIRCUITPY_COUNTIO and CIRCUITPY_BITBANGIO and enabled CIRCUITPY_AUDIOIO and CIRCUITPY_PIXELBUF and the example scripts from the forum post ran without crashing.
I know this isn't a solution but figured it might at least help zero in on the issue.
Stackless should never print that message..
Across all the testing I ever did on stackless it never showed it, even in depths >2.000.000.
Something is horribly going wrong for that to show.
@ladyada ping for eventual review
The CPX has a lot less SRAM (32K I believe) than the chips you were probably testing on, would actually running out of available memory possibly trigger the error?
hey thanks a lot, that's awesome; I'll check that out right now...
I'm all kinds of useless with stuff like registers and byte shifting so a library that handles that sorta stuff a bit is great
@proven garnet I'm wondering if there also needs to be a way to specify the --package_folder_prefix during the non-release build, build/action.yml. Because the artifacts I get from the jepler_udecimal build are just empty. I may be missing something of course
How are you checking it for build/action.yml?
I didn't even realize the non-release build had artifacts
@proven garnet yeah you can grab the bundles from https://github.com/jepler/Jepler_CircuitPython_udecimal/actions/runs/5138862173 look inside one of the zips inside the zip (π) and see that it only has examples, no py or mpy files...
build/action.yml makes the bundle files here:76 run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . and then uploads them 78 uses: actions/upload-artifact@v3 but the resulting files are incomplete due to the same --package_folder_prefix problem .. but I don't see a way to speecify it, unlike at the actual release step
Oh interesting. Yeah, I think the mpy compilation is only patched in the release build, but it should be easy enough to add it to the non-release builds as you suggest
Ah, I didn't realize there was an upload step! Is it worth adding it instead of removing the upload? I haven't thought about the use case of checking a build CI for release artifacts, but if there is one it's definitely worth updating.
I don't even think it would be a library patch - just patch the cookiecutter, find the few libraries that use it, and add the new info to them.
I'm up for it! As far as I can grep only asyncio (and circuitpython_typing) technically need the fix
neopixel too? or not because it is a single file library?
Yup, safe because it's a single file!
I named the argument with "package" for that reason, but it's still somewhat confusing because it's still regarding "packaging"
Anyone know where within the core to find the code that is responsible for changing the display back to displayio.CIRCUITPYTHON_TERMINAL when an exception has been raised? I.e. user has drawn something with displayio and it was successfully rendered, but then some time after that an exception is raised. By default the display goes back to showing the CircuitPython Terminal with the traceback from the exception being the last thing printed and visible.
I may have worked that out. The display always gets reset after code.py is finished, whether or not it finished successfully or with an exception. During the reset it shows the terminal. If there was an exception it gets printed and can be seen on the display which is now showing the terminal. So there is nothing responsible specifically in the instance of an exception for changing the display it just happens because of the reset, which occurs whether or not there was an exception.
That matches my understanding
Thank you! I've tweaked it so it'll hopefully build.
I think the idea is that first_draw should be true when the previous area is empty (aka x1 == x2).
This could be a consequence of optimizing for bitmap changes. (Is that how line works?) If no previous changes happen, then maybe previous area is empty even though some line pixels are still showing.
@tomiahola Please test the build for the board under artifacts here: https://github.com/adafruit/circuitpython/actions/runs/5147018667?pr=8054
@tannewt Oddly these work:
ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/mpconfigboard.mk:10:EXTERNAL_FLASH_DEVICES = "MX25L51245G","GD25S512MD"
ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.mk:13:EXTERNAL_FLASH_DEVICES = "MX25L12833F","MX25L51245G","GD25S512MD"
ports/atmel-samd/boards/bdmicro_vina_d21/mpconfigboard.mk:10:EXTERNAL_FLASH_DEVICES = "MX25L51245G","GD25S512MD"
Maybe because there are no spaces.
While building a simple eBook reader project, I realized if the eBook reader lost power, I would lose the position in the eBook.
I would like to be able to use tell(), to log how much has been played, and seek() to start at the last logged tell() point to continue the reading journey.
I posted this question in the forums and learned that audiocore.WaveFile doesn't support this.
It would be great if we could add support for beginn...
That would be nice. I just wait a long time for every submodules just to change one line of an esp32 board definition. Then the esp-idf build failed anyway. π
tested:
- board.LED
- neopixel as status LED
- i2c scan finds lis3dh sensor
- psram capacity
not tested:
- rgb matrix o_O
- the gpio pins
Introduce new board properties for matrixportal-style boards:
- MTX_COMMON
- MTX_ADDRESS
These are intended to simplify use of the RGBMatrix constructor:
matrix = RGBMatrix(..., addr_pins=MTX_ADDRESS[:3], **MTX_COMMON)
removing the need for sending in the following individual parameters:
- rgb_pins
- clock_p...
Hi @tulip sleet, good to hear from you. Does meeting 10 am PT tomorrow (Friday) or before/after the weekly meeting on Monday work for you?
thanks! - tomorrow or monday is fine. We have an internal meeting on Monday at 10am PT before the public meeting, so it would need to be before that
@tannewt, Hi, I downloaded the .uf2 file under the artifacts and installed it into the board:
Now there is no response from the board, neither CIRCUITPY or USB Drive appears, and no COM port is detected.
CircuitPython version
N/A
Code/REPL
N/A
Building from the latest Git release.
Behavior
I get the following log when running esp-idf/install.sh :
Detecting the Python interpreter
Checking "python" ...
Python 3.10.6
"python" has been detected
Installing ESP-IDF tools
Current system platform: linux-amd64
Selected targets are: esp32h2, esp32c3, esp32, esp32s3, esp32s2
Installing tools: xtensa-esp-elf-gdb, riscv32-esp-elf-gdb, xtensa-esp32-...
Can't get esp-idf to build within CircuitPython. Don't know if this is just me doing something dumb. I followed all the guides but there's still this weird error from Git.
Anyway, ping me if you have any ideas what's going wrong. Seems like Git can't retrieve the branch it wants?
I suggest having a copy of espidf outside of your CP clone, and exporting that instead.
However if you want to fix the one inside your cp clone you should go inside the submodule and inspect with git status
I'm getting the response to git status:
nothing to commit, working tree clean```
I might try building seperately. What version should I use?:
The latest?
nope, 4.4.4 iirc (the latest 4.4.x release)
that is the intended output, idk
Alright I'll try building from the 'releases/v4.4' branch.
you could just git clone -b as they suggest in their release notes
esp-idf ones
After running make fetch-submodules the esp builds would sometimes fail for me. I don't know if you're running into the same issue but for me running a make remove-submodules and then re-running the make fetch-submodules would resolve the error. I recently moved my build machine from a WiFi SBC to a wired desktop and don't think I've seen the issue since.
@vocal badger Brent, I think this is you, you asked me to reach out to you but wanted to make sure this was the correct handle.
I apologize this before testing; I misunderstood about whether testing had happened. Since it didn't work before, not such big deal, but sounds like the flash chip definition may be wrong. There is no other board that uses this chip (or the smaller 2MB version), so there may be an error in the chip definition in nvm.toml.
Please try a fresh clone, or do make remove-submodules and then make fetch-submodules at the top level. Is your clone checked out on main or a branch, or something else. (I am looking at the discord discussion as well.)
If it persists, let us know the Linux version and the git version.
What does "previous area" refer to in this context?
Is it the rectangle of space that we occupied on the previous render frame? i.e. it's expected to change when the x or y position of the element has changed since the last render?
CircuitPython version
Adafruit CircuitPython 8.1.0 on 2023-05-22; Seeeduino XIAO RP2040 with rp2040
Code/REPL
>>> import board
>>> import audiobusio
>>> audio=audiobusio.I2SOut(bit_clock=board.D8, word_select=board.D9, data=board.D10)
Behavior
Traceback (most recent call last):
File "", line 1, in
ValueError: Bit clock and word select must be sequential pins
Description
Attempting to create an I2S object in CircuitPython us...
We could include the GPIO numbers in the error message. That may help.
@jepler any interest in doing this?
I think that's the confusion. I suspect that it is "the area we refreshed last time" when it should be "all pixels we produced last frame" for a removal.
hey @tulip sleet, do you want to chat now?
I'm trying to build this on my system (and it very well could be my particular setup), but am running into this error when building:
[851/851] Generating ld/sections.ld
FAILED: esp-idf/esp_system/ld/sections.ld /Users/melissa/Developer/c/circuitpython/ports/espressif/build-adafruit_matrixportal_s3/esp-idf/esp-idf/esp_system/ld/sections.ld
cd /Users/melissa/Developer/c/circuitpython/ports/espressif/build-adafruit_matrixportal_s3/esp-idf/esp-idf/esp_system && python /Users/melissa/Devel...
whoops, sorry, I got interrupted, sure, that's fine
all right, which room?
amelia earhart is fine
@timid bolt https://discuss.python.org/c/async-sig/20
Ok, I've gotten past that issue (plus a few more that I already figured out) and am now stuck on:
In file included from ../../py/obj.h:29,
from ../../shared-module/displayio/Bitmap.h:33,
from ../../shared-bindings/displayio/Bitmap.h:30,
from build-adafruit_matrixportal_s3/autogen_display_resources-en_US.c:2:
esp-idf/components/newlib/platform_include/assert.h:20:10: fatal error: sdkconfig.h: No such file or directory
#include <sdk...
Ok, I just tried again and this time it worked.
Okay, I'll rerun the command to make the submodules.
But it's a fresh build that I haven't modified at all.
Yep that was when it happened to me as well
Ah, well I don't understand why. But if it works, I don't have to know! π
I was hoping to make some small modifications to my firmware. Namely including the audioio module.
That was me as well π
audioio depends on the existence of a DAC, so it may not work on the board you have in mind.
It works on the ESP32 right?
Just tell me I'm not doing all this only to run into some unsolvable technical problem? Right? π
(but I have tested that sending a pwm signal to the pin will produce the correct frequency on the speaker)
So do I need audiopwmio instead?
Didn't Adafruit just add a little add on board with i2s out?
audioio is only implemented for atmel-samd
audioio should really be called audioanalogio. Yes, you could use audiopwmio or audiobusio (I2C) if available
Okay so what I want is audiopwmio then. I already have audiobusio, it's just not very helpful as I don't have a digital audio device.
So after fetching the submodules I need to run 'esp-idf/install.sh'... I think?
right
then, before you do a build, run esp-idf/export.sh
that sets up the right PATH, etc.
Still the same problem.
Checking "python" ...
Python 3.10.6
"python" has been detected
Installing ESP-IDF tools
Current system platform: linux-amd64
Selected targets are: esp32s2, esp32h2, esp32c3, esp32s3, esp32
Installing tools: xtensa-esp-elf-gdb, riscv32-esp-elf-gdb, xtensa-esp32-elf, xtensa-esp32s2-elf, xtensa-esp32s3-elf, riscv32-esp-elf, esp32ulp-elf, openocd-esp32
Skipping xtensa-esp-elf-gdb@11.2_20220823 (already installed)
Skipping riscv32-esp-elf-gdb@11.2_20220823 (already installed)
Skipping xtensa-esp32-elf@esp-2021r2-patch5-8.4.0 (already installed)
Skipping xtensa-esp32s2-elf@esp-2021r2-patch5-8.4.0 (already installed)
Skipping xtensa-esp32s3-elf@esp-2021r2-patch5-8.4.0 (already installed)
Skipping riscv32-esp-elf@esp-2021r2-patch5-8.4.0 (already installed)
Skipping esp32ulp-elf@2.35_20220830 (already installed)
Skipping openocd-esp32@v0.11.0-esp32-20221026 (already installed)
Installing Python environment and packages
fatal: No tags can describe '630c2724fc8c69eeaaa1bb025de52b99c5cb11aa'.
Try --always, or create some tags.
WARNING: Git describe was unsuccessful: b''
ERROR: This script was called from a virtual environment, can not create a virtual environment again
Hmm, well maybe I can try building my own version of esp-idf from the 4.4 branch of their GitHub?
if git status shows modified submodules, you need to go into each submodule and do git restore .
that should not be necessary at all. another simple thing is just to clone again and do make fetch-submodules on the fresh clone
git status says it's clean.
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
can also try make remove-submodules and then make fetch-submodules. But the re-clone is easiest unless you will lose some work
when submodules move around or change, git can get pretty confused
I was already using a fresh clone, and I just ran make remove-submodules and make fetch-submodules.
I guess I could burn it all and try again?
what is the host OS, and what is the version of git you are using?
another idea: isudo apt install git-lfs. This was missing from the instructions. I just added it -- sorry. THen do the remove and fetch again, or a fresh clone. I have added a new page just today https://learn.adafruit.com/building-circuitpython/recent-changes
CircuitPython version
Adafruit CircuitPython 8.2.0-beta.0 on 2023-05-24; Adafruit Feather ESP32-S2 TFT with ESP32S2
Code/REPL
import wifi
wifi.radio.connect('...','...')
Behavior
Traceback (most recent call last):
File "", line 1, in
ConnectionError: Unknown failure 15
Description
This test done in the REPL window of mu 1.2.0.
In another testscript with wifi scanning networks results, the transmission I was trying to connect to (...
yes, you are using an older version of git than I am, but same OS. git 2.36.0 is the minimum required to do "partial clones", but you don't really need those
I am working on make fetch-submodules variations that will be only for a specfic port, to avoid having to fetch tons of useless stuff
I can try updating git? I'll grab a snap package or something similar. I expect the distro version is pretty old.
I use the git ppa: https://launchpad.net/~git-core/+archive/ubuntu/ppa
but a staff member had the same problem you are having earlier today (on macOS, though), and installing git-lfs fixed it
Okay. I've added the 'ppa:git-core/ppa' repository. I'll remove and fetch the submodules again.
git version 2.40.1
That would be pretty useful right about now, haha.
Alright that the submodules fetched. Seems to be working a little differently now. Git was throwing errors about things being not a tree before. So the lack of errors now gives my some reason for optimism!
Ah... crap. ```Detecting the Python interpreter
Checking "python" ...
Python 3.10.6
"python" has been detected
Installing ESP-IDF tools
Current system platform: linux-amd64
Selected targets are: esp32, esp32s3, esp32c3, esp32s2, esp32h2
Installing tools: xtensa-esp-elf-gdb, riscv32-esp-elf-gdb, xtensa-esp32-elf, xtensa-esp32s2-elf, xtensa-esp32s3-elf, riscv32-esp-elf, esp32ulp-elf, openocd-esp32
Skipping xtensa-esp-elf-gdb@11.2_20220823 (already installed)
Skipping riscv32-esp-elf-gdb@11.2_20220823 (already installed)
Skipping xtensa-esp32-elf@esp-2021r2-patch5-8.4.0 (already installed)
Skipping xtensa-esp32s2-elf@esp-2021r2-patch5-8.4.0 (already installed)
Skipping xtensa-esp32s3-elf@esp-2021r2-patch5-8.4.0 (already installed)
Skipping riscv32-esp-elf@esp-2021r2-patch5-8.4.0 (already installed)
Skipping esp32ulp-elf@2.35_20220830 (already installed)
Skipping openocd-esp32@v0.11.0-esp32-20221026 (already installed)
Installing Python environment and packages
ERROR: This script was called from a virtual environment, can not create a virtual environment again
I think that's a known bug with the ESP-IDF build.
so you are running Python in its own virtual environment? I use the system one and don't see this.
No I am not running Python in a virtual environment.
But I found this post in the ESP-IDF Github issues:
https://github.com/espressif/esp-idf/issues/8470#issuecomment-1477324664
Installing latest clone of 'esp-idf', running ./install.sh fails with error: Extracting /home/kylemallory/.espressif/dist/openocd-esp32-linux-amd64-0.11.0-esp32-20211220.tar.gz to /home/kyl...
are you using the submodule version of ESP-IDF in CircuitPython, or is this some separate thing?
It seems there was an unrelated virtualenv in my PATH from an old PlatformIO install. Not active, just in the path. Removing it fixes the problem.
Excellent, now to build.
I can't reproduce this on my ESP32-S2 with 8.2.0-beta.0 (or prior). Is connect successful on prior releases on the same board and in the same physical environment (same AP, same distance from AP, etc.)?
If you catch the exception and retry, does it eventually connect? Something like...
import time
import os
import wifi
time.sleep(3) # wait for serial
print(f" {time.time()} Connecting...")
while not wifi.radio.connected:
print(f" {time.time()} {wifi.radio.connect(os.g...
Alright the build is successful. Time to mod.
So if I'm reading this documentation correctly, all I need to do is to add CIRCUITPY_AUDIOPWMIO = 1 to the specific board's 'mpconfigboard.mk' file?
Is that really it?
Ah, maybe not.
that might be because you need a make clean ?
I ran make clean from the top level directory. Is that correct? Or there some different version I need to run for the espressif directory?
which board is this?
M5Stack Core Basic (m5stack_core_basic)
I ran make BOARD=m5stack_core_basic clean from the espressif directory, but still the same issue.
That's an ESP32 based board.
run make clean in ports/espressif
I did run make BOARD=m5stack_core_basic clean from that directory.
(it doesn't seem to work without specifying the board)
if it were, it probably already be turned on. We don't generally turn things off unless the board is extremely small and it wouldn't fit. ... So you need an I2s amp
no
you can use PWMOut to make tones, but nothing fancier than that
Ah, well I guess it's a dead end then. I'll just have to convert my compositions into an array of PWM frequencies or something like that. Maybe I'll write a script for that. Anyway, problem solved.
I know, but I'd probably need to design my own module to mod it to the existing board.
To explain, this is a unit contained within a case. I can't just stick a module on.
does it already have some kind of audio? Was it running Arduino or something?
Yeah, Arduino and MicroPython I think. Though I think it was just doing tones there as well.
I might just have to update to the newer version of the board which does have an I2S amp in the schematic.
Anyway, gotta go now, but thanks for all your help! It's been really useful in getting my build working.
sure! sorry it was disappointing. The DAC audio was not really working well (or was not usable) in ESP-IDF when we first looked at it.
After testing, the CIRCUITPY drive appears, however there is no output to the matrix. I went ahead and ran one of the examples from the RGB Matrices Learn guide and plugged in the correct pins. After running the code, I'm getting ValueError: rgb_pins[0] is not on the same port as clock. I double-checked pin assignments and they appear correct. Looking at where itβs happening in CP (https://github.com/adafruit/circuitpython/blob/main/shared-bindings/rgbmatrix/RGBMatrix.c#L77), it looks like ...
Problem resolved: I made a mistake. I mixed the passwords of the two SSID's of the WiFi system (Netgear Orbi Satellites).
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
946688072 Connecting...
192.168.1.80
Code done running.
Press any key to enter the REPL. Use CTRL-D to reload.
@anecdata thank you for your rapid reply.
hello friends, does anyone know the difference between MP_OBJ_NEW_QSTR and MP_ROM_QSTR in circuit python port/$arch/$board/pin.c? was trying to port circuit python to a custom board with different pin layouts but confused which one should I use for my pins
Any thoughts on this ?
Just confused about the pins claiming in pin.c
some of pins are defined like this:
{ MP_ROM_QSTR(MP_QSTR_FREELINK_TX), MP_ROM_PTR(&pin_GPIO_AD_B0_12) },
meanwhile, some of pins are defined in another way:
{ MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO_AD_B1_07) },
So what's the difference between these 2 macros MP_ROM_QSTR MP_OBJ_NEW_QSTR? which one should I go if I port to a custom board with a different pins layout from EVKB?
sorry if this isn't the ri...
Diagnostic testing:
If you roll back to 8.0.0 or 7.3.3, do you see the same problem?
If you remove boot.py, do you see the same problem?
What version of Raspberry Pi OS is running on the Pi 4? Is the the latest, brought up to date?
Pinging @hathach for his work on the Adafruit_nRFCrypto Arduino library
Initially, removing and fetching the modules again did not resolve the problem; however updating my Git version from the distro's version 2.26 to the PPA's version 2.40 and doing the same did.
It seems like this problem is just due to an old version of Git not fetching submodules correctly.
In future it might be nice to have a better warning of this Git issue, or even a fatal error if an old version is detected, but I think the issue is resolved for now.
Enable support for usb_hid module in order to use HID Keyboard and Mouse
I believe ESP32C3 has only USB serial capability not full native USB.
Yea that.
It can't do hid.
It's serial + jtag only.
Hi folks, I'm hoping to spend some time digging into https://github.com/adafruit/circuitpython/issues/7966 to see if I can find a way to enable native code emitters. Since I'm using an esp32s3 (UM FeatherS3, specifically), I was hoping to using the builtin JTAG for live debugging to see what's going on when CP crashes.
However, all my attempts at using openocd and gdb with this board have failed. For the devs here, I'd love to hear what kind of debug processes you use, especially for developing with the esp32s3. Anyone have a reliable way to live debug w/ gdb? What about getting backtraces from crashes?
Thanks!
Seems to make no difference with.out the boot.py and uf2 versions either (been back as far as 6.3.3). Setup is running RetroPie 4.8.4, rpi4 (armv7l) - Raspbian GNU/Linux 10 (buster) - Linux retropie 5.10.103-v7l+
c3 is the only esp you can debug without burning fuses currently
CP switches out the jtag for the Circuitpy drive on S3
I want to get that changed on DEBUG eventually
Waveshare has an updated ESP32 board: the S3-Pico. The pin mapping is different from the S2 Pico. Can somebody help with building Circuitpython for this? Or- a quick way for me to add support myself? - Not affiliated to Waveshare in any way.
Link to Board and Specs: https://www.waveshare.com/wiki/ESP32-S3-Pico
Hello, I was recently playing around with the espnow module and encountered most of these issues.
However, I found some workarounds and made some examples that are might be worth sharing for anyone who will need to work on these issues or want to use the module thoroughly.
Broadcast messages
While the send method may return a 0x3066 or 0x3069 error when broadcasting, it is only does so under some specific conditions:
- If you only have the broadcast peer registered, you *...
@todbot and @bill88t are correct. HID is not possible, nor is MSC, to expose the CIRCUITPY drive. The chip has "native USB" only in the sense that it has on-board USB serial.
i have had very little success trying to do use gdb with a J-Link on the ESP boards. It may sort of work for a while, but gets stuck, or is very limited. Instead we have compiled DEBUG=1 and used the ESP_LOG*() macros to see debugging printouts on a designated set of UART pins.
Hi newbie here. This was my enhancement request. Now that I have the board I might as well contribute to add one other board. Is there a guide that adafruit has on how to add a new device for circuitpython support? I know it has micropython support cause the main page provides a build. And the device exists in their repo.
I was building my project on the Pico W - ran out of memory sigh and so would be grateful if someone could help π
@left iris ^^
Thanks.
Do you think it should be possible to use the adafruit_hid.consumer_control also without the usb_hid modul?
It seems to be possible looking at this project:
https://learn.adafruit.com/bluetooth-le-hid-volume-knob-with-circuitpython/code-the-ble-volume-knob
The ESP32-S3-DevKitC-1-N8R8 has good support for pwm and there is a working pwmio library in circuitpython for it.
So why not put audiopwmio on it too, i already use PWM for audio on Arduino Framework.
Hey all. Iβm still working on my library to get the Pimoroni IO Expanded Board (Nuvoton ms51 chip) working in circuitpython
Run into a glitch tho - Ive managed to get regular IO pins working - I can see input on pull-up pins etc when theyβre switched on etc etc BUT 2 pins donβt work at all. Others do so I canβt see what Iβm doing wrong. Iβve checked the registers for those pins against the micropython and arduibo libraries and theyβre correct. Is my code wrong or is my board toast..
Hereβs the library:
https://github.com/mathcampbell/IOExpanderCircuitPython
The BLE support available for the Espressif chips is quite limited right now, due to a mismatch between how the the underlying software works and what we need fir CircuitPython. The capabilities are explained here: https://learn.adafruit.com/welcome-to-circuitpython/frequently-asked-questions#faq-3129409. So sorry, no, you can't use the BLE support for HID now. If you are interested in HID support over USB, we'd recommend an ESP32-S2 or ESP32-S3 board if you want to stick with a WiFi-capable ...
Thanks for the info, even if it's non-ideal. I noticed with Arduino there is the option to select USB Modes like "Hardware CDC and JTAG" as well as "MSC". I assume that CP is using the "MSC" option, or something like it, to expose the CP drive, whereas the "Hardware CDC and JTAG" option, aka Serial JTAG, is what we'd want for debugging. What I can't figure out is what settings Arduino is changing when a user selects one or more of these USB Modes. Do you know if it is just a config change like in sdkconfig? It'd be great if the only thing that needed to be done to temporarily disable the CP drive and enable JTAG was to change a couple values in sdkconfig.
Nope it's actually code changes.
i have read through
https://github.com/adafruit/circuitpython/issues/6174
but all i found is to create the settings.toml and put in some credentials to existing networks ... my issue is that i use the board outside far away from any wifi but i do not want to plugin it into something but use it from a tablet or smartphone, so i wna tto use the board in AP mode not STA mode, so now i am a little lost how i can enable the webrepl in AP mode
so i would either suggest adding AP mode as an...
CircuitPython version
Official Adafruit CircuitPython v8.1.0
and
Custom compiled Adafruit CircuitPython v8.2.0
Code/REPL
# no custom code (just the factory default code.py file)
Behavior
Description
I have noticed that all pins output 3.3V after a power up. Presumably the internal pull-ups have been activated by default. So I ask here where this is defined in the source code of CircuitPython. Is this intentional or a bug?
_This is my...
The default pin reset code provided by the ESP-IDF resets the pins with pull-up (instead of floating). According to the documentation, this minimizes power consumption. It also prevents glitches on external pins that might trigger NeoPixels, etc. This is discussed in the comments in #5931.
CircuitPython version
Circuitpython for esp32
Code/REPL
'''import time
import board
from analogio import AnalogIn
GasIn = AnalogIn(board.D34)
TempIn = AnalogIn(board.D35)
Vref=1.65
while True:
time.sleep(2)
Vgas=(GasIn.value/4096)3.3
Vtemp=(TempIn.value/4096)3.3
M=32.27
T=29.0Vtemp-18.0
if T<20:
Mc=M((1.3T)+74)
else:
Mc=M((0.4T)+92)
Cx=(1/Mc)(Vgas-Vref)
print(Cx*1000, "ppb")'''
Behavior
Hi! I am using ULPSM sensors from Digik...
Which specific board is this?
The "D" vs "A" nomenclature is a holdover from Arduino. It doesn't mean that the "D" pins can't do analog (it only meant that on the original Arduino).
This is being covered in this forum topic: https://forums.adafruit.com/viewtopic.php?t=201964. I'll close this for now; I think it is a support issue.
yeah great thx, seems my search request was unable to match that issue
Which specific board is this?
The "D" vs "A" nomenclature is a holdover from Arduino. It doesn't mean that the "D" pins can't do analog (it only meant that on the original Arduino).
I am using ESP32-WROOM-32U
Please post in the forum topic you opened, and please mention exactly which CircuitPython firmware file you are using.
Do they work in the MP library?
I've never had a lot of luck using a debugger when timing sensitive protocols like BLE and Wifi are running. I too do printf debugging on ESP. During faults, the panic handler will print out a backtrace for you. You can also add backtrace prints for yourself if you want to too.
thanks; realised soon after I should check that so I did, also checked using the arduino library someone did. WOrks fine in them so it's my code that's to blame...
A logic analyzer could help you determine what the driver difference is
seems to be i can read ll the pins, except those where the port needs to be acssed with the 0th bit
@slender iron I need to take care of something that happens the same time as the meeting. Could you read my notes?
yup! no problem
Thank you
<@&356864093652516868> hey y'all! We'll be holding the weekly meeting in about 30 minutes -- now's a great time to finish up your notes in the notes doc: https://docs.google.com/document/d/1v476RNCHysQUjWEPVojGsr7lcRD1saa2d9-Sdhbq3_Y/edit?usp=sharing
CircuitPython Weekly Meeting for June 5, 2023 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 partici...
thanks, meant to do that
How is the "In the weeds" section structured? I know it's a place to put other topics of interest, but do I put things in there stated as questions?
we read each item and then respond/discuss
I'll either read the topic or handoff to the poster if they are in the meeting
Ok, thanks for clarifying!
np π
I formatted it a little differently for you. It's usually easier to keep track of things with that formatting, especially if there are many topics. π
Thanks, it does looks better now!
@slender iron kattni asked me to read the libraries section today (also noted in the doc)
@slender iron about ready to kick things off?
oh no we're going up against the apple keynote? π°
Thonny 4.1.0 is out: https://t.co/hPnrp9jsaL.
Beside bug-fixes there are some new features:
π§΅
PyCon US is the largest annual gathering for the community that uses and develops the open-source Python programming language. It is a conference produced and underwritten by the Python Software Foundation (https://www.python.org/psf/)
PyCon US (https://us.pycon.org/2023/) is organized by the Python community for the community. We try to keep r...
Did you know you can (mostly) replicate all of Python 3.8's syntax using only 11 core pieces of syntax (plus some magical functions)? Come to this talk to hear about how "simple" things like + and . actually unravel into chunks of Python code!
Looks like I'll be missing the rest of this meeting, sorry. Can someone read off my in the weeds question?
Thanks!
I can read it
I'm going to listen in, but I'm text only
It's a displayio based "emulator" that draws on a display to mimic 7segments, 14segments, or 8x8 matrices.
This "survived" testing by @gamblor21 who used it to make some great percussion sounds by frequency-filtering a noise sample... so I dropped it into review status. There are still some potentially useful biquad filters to add, which should be entered as a feature request issue:
- low & high shelf
- notch
- peak
@lone axle ooh cool!
[hum should we put the required mpy version in the banner or boot_out.txt?]
weeds topic?
Oh those filters take me back
I missed most of what Dan said but I'll look at the recording. Docker is basically a reproducible VM.
That's a fair point about USB, I wonder if there's a better container solution or something else to make it easier. Thanks for the input!
If you want to run anything past me about it let me know. If I'm really stuck I can probably ask someone I know for a hint
ha ha
π€£
But it would need to exist on a bunch of CDs for the authentic Microsoft experience!
I do think if skipping a 9.0 full release makes the process of maintaining code easier, then it's worth skipping after an alpha
rationale: we don't know how much existing software checks for "9" as the first digit of the number and assumes it's working with windows 95/98 and not circuitpython
Next meeting is at the normal time on Monday June 12!
Windows Forever
π§π§
Python 3.11 for workgroups
Bye all!
π
Thanks for hosting Scott. Have a great day everyone π
Thank you all! Have a great week!
If hypothetically the docker build looked like sh tools/docker-build espressif adafruit_matrixportal_s3 i'd be super into it because i wouldn't have to worry about anything but getting docker set up initially (and having enough resources)
It wouldn't be all that hard to configure really. Just slapping pwd as a bind mount and and an env for the board should be all that it takes.
If nobody does it, I will do it eventually, now stuck doing telnet.
I was fumbling around with the chinese w801 chip yesterday, and lost a decent bit of time.
I got uart, wifi and gpio going. The docs are basically non-existent, but I am a tryhard, so did it without any.
I got heap (malloc's) and stack (static allocations in code) going, along with freertos task scheduling.
I wonder how much effort would it take to port circuitpy to it.
The functions it has for all the hardware are very simple, and just work.
Also that chip goes like 60Β°C and draws .12A just doing some leds.
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/1GiH22DPaCVQ8D4cjhq2yJR73_bm3sTRZ35IE_L2bFBc/edit?usp=sharing
CircuitPython Weekly Meeting for June , 2023 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 atte...
Hi! Sorry I've not been able to get to this until now. I am having a hard time using this. It seems to be geared to creating static filters that do not change. But filters in synths are usually modulated, a common sound being the low-pass filter sweep bwwwowwww sound. E.g. I would like to do something like the below, but I cannot access the function that goes from frequency & q_factor to biquad coeffs a1,a2,b0,b1,b2:
top_f = 1600
q = 0.5
myfilter = synth.low_pass_filter(frequenc...
CircuitPython version
8.1.0
Code/REPL
import wifi
Behavior
Locks up. Full log from REPL:
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun 8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,...
Two other things:
- it appears one cannot set the filter coeffs after instantiation. e.g. this does not work:
def adjust_filter(afilter,w0,Q): # f,q
s,c = math.sin(w0), math.cos(w0)
alpha = s / (2 * Q)
a0 = 1 + alpha
afilter.a1 = -2 * c
afilter.a2 = 1 - alpha
afilter.b0 = (1 - c) / 2
afilter.b1 = 1 - c;
afilter.b2 = (1 - c) / 2
- Doing
lpf = synth.low_pass_filter(frequency=1600, q_factor=0.5)fails with "extra keyword argume...
CircuitPython version
adafruit-circuitpython-hardkernel_odroid_go-en_US-8.1.0.bin
Code/REPL
import os
os.listdir()
Behavior
reboot freshly imaged ODroid. Go into REPL, control-C
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun 8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_...
@slender iron this layout of holes gets all the multiples of 0.2" and also allows placing feathers with holes on an 0.7 x 1.8" grid at a variety of locations and orientations. you could do the overlapping holes as shown or as slots.
assuming I mathed correctly anyway
oh, fancy
I was thinking about surveying our existing designs
that's a very cool design
Fixes #8036.
- Rename top-level
makefetch-submodulesandremove-submodulestofetch-all-submodulesandremove-all-submodules`. - In each
ports/*, providemake fetch-port-submodules, which fetches only the submodules needed for that port. make fetch-port-submodulesdoes not requireBOARDto be set, but most port-specific Makefiles assumed thatBOARDwould always be set. They did not anticipate non-board-specific make targets. Fix that, by fixing how bad or missing `BO...
is it possible to enable Web Workflow on devices that are connected to the network via Ethernet instead of Wi-Fi?
Guys. I have some very painful news.
CIRCUITPY_PYSTACK_SIZE=12288
Adafruit CircuitPython 8.2.0-beta.0 on 2023-05-24; Adafruit Feather ESP32-S3 TFT with ESP32S3
>>> from time import sleep
>>> d=0
>>> a = """try:
... sleep(0.1)
... print(d)
... d += 1
... exec(a)
... except KeyboardInterrupt:
... pass
... """
>>> exec(a)
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[01:14:13.515] Disconnected
seems fine, didn't test. there's a low probability of folks invoking other targets in a port directory and not setting BOARD= but they can keep all the resulting pieces for themselves.
urgh I'm beginning to hate this library lol.
2 weeks i've been smashing away at it. I can read some pins but not others..the pin addresses are correct, Iv'e checked the hardware in the arduino and micropython version...
i even had chatgpt sit and compute the binary for me for each i2c write etc...
Anyone care to take aa look and see where i've gone wrong?
https://github.com/mathcampbell/IOExpanderCircuitPython
you'll need to provide more specifics. that's 500 lines of code
and chatgpt makes stuff up
hahm, fair, I didn't wanna launch into a whole explanataion if nobody was wanting to
yeah..it broke off from exaplining the hex-binary conversion to tell me about president of france
so at line 219, the _set_mode method
the pin map showing pins: port/bit, taken and cross referenced from the arduino and micropython versions
that uses that to decide which registers to address in the setting of the io mode for each pin (input/pullup/adc/input//output etc etc)
thing is, pin's 2, 5 and 10 do NOT work. At all.
The rest, do.
The only commomon linking them is that pins 2, 5 and 10, you have to use their port, 0 bit.
so I'm thinking the code that assigns that particular pins is doing something bitwise and adressing the wrong bit or something, expect that the code looks right...
i got one erroe message suggesting those pins may even be getting set to output instead of pullup
no; i'm just trying to get the general IO mode going for starters...
line 266
haven't even really touched that code yet...
302 doesn't look right since bit doesn't shift anything
bypassing all of that to just get IO pins working since on this board all pins can be IO (and are by default), and some are also PWM or ADC
a lot of the code is my just copying the (working fully) arduino library;
//5th bit of mode encodes default output pin state
i2cWrite8(ioPin._reg_p, (initialState << 3) | ioPin._pin);
do you have a datasheet to look at?
pin in that librbary fo some reason was waht he confusingly labelled not only the actual pin but also the bit to address on teh in pin
yes and no
but i'm not sure it's entirely accureate cos Pimoroni reference them having their own custom firmware, and it talks about some registers being shifted...
right, so it's their version of seesaw
I'd use a logic analyzer to compare the implementations' i2c traffic
i'm also getting from the print status messages that my schmitt trigger isn't actually assigned, but i've double triple checked and i'm using the exact same registers and bit operations etc as the other libraries, but it's not writing them for some reason...
the other thing I'd do is slim the code down to just one thing you are trying to do
i haven't got one (and wouldn't know hopw to use one if I did tbh, I'm not a programmer really..)
seems fine, didn't test. there's a low probability of folks invoking other targets in a port directory and not setting BOARD= but they can keep all the resulting pieces for themselves.
pimoroni are the folks to ask for support since it is their hardware and firmware
frankly i'm amazed I've even gotten this working enough to actrually get any data out of it...the other pins work..
i only got the board coes I'm building a joystick and it fits neatly in te space I had my mcp23017 but has some adc on it..
I was expecting to find an if bits: but didn't see any
where?
in your code since the value 0 evaluates to false
no i meant in what section
any of them
is that a convention?
I really dont' do much codding otehr than editing other people's, and python of any kind is kinda new to me, I learned a bit of objC years ago then some c++ etc
bitwise stuff is just alien to me...
that's something that could explain why non-zero bits work
this code is literally just me trying to copy the arduino and c++ code
with "what does this mean" questions at chatgpt lol
it is quite amazing i've somehow accidentally managed to not only read some data out of it but it even works...I can reliably read an io input pin 1-14 except those whose port needs 0pth bit addressed
the annoying thing tho is i'm moderately sure I basically understand how to get data out, and I'm positive I've copied the arduino code perfectly:
you get the bit using the Px registers array, corespoinding to teh port you're acessing; and the value is found in the corect bit of the returned string
pimoroni may be better to ask since they know the firmware
yeah I'm thinking so...I even checked the logic thru etc, and it seems to be "right" but trying to write the register for the schmitt trigger doesn't seem to "take"
which suggests to me something else is wrong (all likely tied to the 0th bit being read from the port)
i just realised I'm not setting bits using the special case registers it mentions///
probaly wouldn't explain why the pins don't work propelry buit might explain why they won't pullup
Okay this works as expected*:
# synthio_filter_test.py --
# 5 Jun 2023 - @todbot / Tod Kurt
import time, random, board, analogio, audiopwmio, synthio
knob1 = analogio.AnalogIn(board.GP26)
knob2 = analogio.AnalogIn(board.GP27)
audio = audiopwmio.PWMAudioOut(board.GP10)
synth = synthio.Synthesizer(sample_rate=22050)
audio.play(synth)
note1 = synthio.Note(frequency=110)
synth.press(note1)
while True:
lpf_f = 10 + knob1.value / 32
lpf_q = knob2.value / 20000
n...
@jepler I found some bugs in the original intent of the PR -- I was so wrapped up in the other part I neglected to re-test. Tested again and make fetch-port-submodules now works.
@slender iron I made a slotted version of that layout and printed it .. a feather fits. the stemma board I grabbed to test with is https://learn.adafruit.com/adafruit-stemma-non-latching-mini-relay/downloads which is NOT on the 0.2" grid but the slots allow it to be screwed in at 2 positions which is also better than what a simple 0.2" grid of holes allows.
@dhalbert, thank you for pointing me to the right direction. This is not good because the board always goes into DFU mode on single reset if DOUBLE_RESET_RC has been activated when using the TinyUF2 bootloader (https://github.com/adafruit/tinyuf2/tree/master/ports/espressif#usage). A simple but ugly workaround will be to set the PIN_DOUBLE_RESET_RC as an input pin in code.py (or main.py)
In CircuitPython espressif port, we have a special case for what Adafruit terms the "double tap pin":
// _reset_pin in common-hal/microcontroller/Pin.c
#ifdef DOUBLE_TAP_PIN
// Pull the double tap pin down so that resets come back to CircuitPython.
pull_down = pull_down || pin_number == DOUBLE_TAP_PIN->number;
#endif
I do not know if this is equivalent to the functionality on this board; there's also espressif_board_reset_pin_number which allows a particular...
No, that is not possible at this time. If there's not an open Issue about "web workflow over ethernet", it would be appropriate to open one. That said, it's not likely to be prioritized by Adafruit to work on.
Please go ahead and remove this section from the document.
Amazing, thanks so much for the in-depth look at this issue.
Oops, yes, that was to prove that GNU Make basename is not the same /usr/bin/basename.
Oops, yes, that was to prove that GNU Make basename is not the same /usr/bin/basename.
Thanks! again, didn't test.
Thank you for adding these! The 1040 picture is of the 1015. Please update it. Thanks!
Please try 8.2.0 as well.
Please try 8.2.0-beta.0 and post a picture of the screen. Thanks!
seem to have fixed the issues with my library. The write function I was using was not constructing teh bytearray properly so that it weas only sending 1's but not 0's...
yes, I know i suck at coding
Nice! That's how you learn. Last week I spent a non-trivial time debugging what turned out to be swapped wires.
yep it sucks doesn't it
all part of the game π
Given itβs only my second time doing any kind of circuitpython (any kind of Python in fact) coding, and the first time was my joysticks βif this pin reads true, so the joystick button of the same nameβ simple stuff, Iβm quite smug
it's a good feeling to get things working
Admittedly the adc function doesnβt work yet but Iβll get there. It was this or buy a brand new board at 3x the price and have got change my 3d printed joystick design to fit it in.
Plus it also means other people can now use this board and not have the pain I have had since I put it on GitHub
same problem with 8.2.0-beta.0. After hitting the return on the 'import wifi' in the REPL, REPL locks up, and garbage characters also show up on the ODroid Go screen (see attached pix of screen before and after hitting the enter key). Similar to screen in issue #8069 and #6936.
Before Enter key:
After Enter key:
,boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun 8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:12748...
@T94T is the DOUBLE_TAP_PIN definition missing from this particular board? If so, that would fix the problem, I think.
<@&356864093652516868> ALL FOLKS who do CircuitPython builds: as of today, https://github.com/adafruit/circuitpython/pull/8070 was merged. ***Fetching submodules has changed. ***There is now a target in the top-level Makefile, make fetch-all-submodules, and there is a target in each port's Makefile, make fetch-port-submodules, which fetches only the submodules needed for that port, to save time and disk space. (Note that the actual target is an an included .mk file: you won't see it directly in the port Makefile.) The instructions in the guide have been updated: https://learn.adafruit.com/building-circuitpython/build-circuitpython#fetch-submodules-3141425. Also note there now is a "Recent Changes" page in the Building CircuitPython guide: https://learn.adafruit.com/building-circuitpython/recent-changes
@vale spire have you looked into stack size optimization at all? our copy of mp_execute_bytecode takes just over 200 bytes a call
This reduces the stack frame size of mp_builtin___import__ by limiting the support path length of files from 256 to 96. This function can be called recursively for nested imports so it adds up.
Also reduce mp_execute_bytecode (vm.c) from 206 a bc call to 124. This too is recursive and adds up. It is reduced by preventing some inlining. It may decrease performance slightly when importing and unpacking.
Adds two new scripts for debugging. One is used from gdb to print frame sizes in a bac...
can i get the circuitpythonista role please
got it added for you.
thankyou! π
Very nice. There is a gcc flag to issue a diagnostic when a stack frame exceeds a given size, maybe we want to use it (and mark select functions as being permitted bigger stacks) but doing so might need a lot of annotations, I mention it just as an aside
π had the following error for the raspberrypi port
fatal: Unable to checkout '2001c62d1a0361c44acc7076d8ce91e1d1c66141' in submodule path '../../tools/python-semver' fatal: Unable to checkout '1421ca7fe72a2b173b08be05f9042b79409e783a' in submodule path '../../tools/uf2' Entering '../../data/nvm.toml' error: cannot run data: No such file or directory fatal: run_command returned non-zero status for ../../data/nvm.toml
full log here https://gist.github.com/jposada202020/f0f70d561715e20f8abf8ffdd134732e. This is a fresh cloned repo. I have tried before with an old one doing make remove-all-submodules same thing, I am in ubuntu, maybe doing something wrong...idk
what is git --version
2.34.1
i'll bet this is a git version issue. I will put that version in my path and debug. 2.40 (2.36 or later, really) should work. You can use the git ppa if you want to get a later version.
thanks for testing that
will do, will need to investigate how to add the ppa because keep forgeting :).
https://launchpad.net/~git-core/+archive/ubuntu/ppa ; the instrutions are right near the top of the page
Thanks doing that atm, I found your previous instructions here π
are you on ubuntu 22.04?
great, I will need to fix this for people who can't upgrade,
Thanks dahn!
#8070 did not work properly with older versions of git that could not do partial clones (before git 2.36). I tested this with git 2.30.1 on several ports, starting with no submodules each time. I was able to simplify the older shallow-depth commands a bit.
Thanks @jposada202020 who found the initial problem.
If you has an older version of git (before 2.36) and are interested in testing, you could try this. The simplest way is probably just replacing tools/fetch-submodules.sh from `mai...
As discussed tested manually. Code looks good to me. Really useful update! Thanks.
I'm running ubuntu 22.04 & git 2.34.1. I was seeing the issue reported by @jposada202020 but after replacing tools/fetch-submodules.sh with this version I've run the new fetch-port-submodules and built a board on atmel-samd, broadcom, espressif, mimxrt10xx, nrf, raspberrypi, silabs and stm without any issue.
I loaded this on a CPX and the test script from the issue does now run. Both this solution and the test I made of turning off CP modules seems to resolve the issue by making more memory available for (I'm guessing) the C-stack. Do you believe the "maximum recursion depth exceeded" message is actually the correct error and the issue was simply caused by starving the stack?
I would request that this is not merged immediately.
I want to run extensive tests onto it.
Looks good to me.
Two Tests:
- Machine test ubuntu 22.04 with Git 2.40.1 ---- Worked fetching port submodules
- Machine test ubuntu 22.04 with git 2.34.1 --- Worked fetching port submodules
Approving based on others testing
https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v6.1.1/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html?cp=5_7_4_4_2_1_2_38#gad10e80ba20ddab42d1753fd1be2d8c26. The transmit power during a connection is set per connection.
Could you be more specific?
So this may not be related, but I got the P2ZeroW to boot and the following code produces a rectangle as expected.
However if I try much else, for instance uncomment any of the other shapes like the triange then I get a "RuntimeError: pystack exhauseted "
#print("Hello World!")
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
"""
This example shows the use color and background_color
"""
#Just the rectangle is ok.
#Try any o...
I loaded this on a CPX and the test script from the issue does now run. Both this solution and the test I made of turning off CP modules seems to resolve the issue by making more memory available for (I'm guessing) the C-stack. Do you believe the "maximum recursion depth exceeded" message is actually the correct error and the issue was simply caused by starving the stack?
I couldn't really determine what change pushed this over the edge. The 8.0.0 release binaries work for me but buildin...
Bumping to 8.2 since this looks like a memory bounds issue.
@jepler Any comments wrt todbot's feedback before I do a final review?
@Macrosii I assume you commented out the mp_stack_set_top call to get the board to boot. That fix is likely to result in some instabilities but you could try setting a larger pystack using the settings.toml file.
Just add the following line to settings.toml:
CIRCUITPY_PYSTACK_SIZE=3600
If that doesn't help try increasing the size, you probably can go pretty high since the pizero has plenty of RAM.
I couldn't really determine what change pushed this over the edge. The 8.0.0 release binaries work for me but building 8.0.0 with a newer gcc doesn't work. I suspect it depends on inlining decisions that different compiler versions make. I couldn't attribute it to library changes either.
@tannewt When I tried a bisect I ended at this exact commit, which looks like changes in inlining, but there are other things, because reverting it in latest did not help: https://github.com/adafruit/cir...
I have actually been able to run your test script displaying all four shapes without adding a settings.toml file or getting the pystack exhausted message.
I don't think my comments should hold this up. The code is behaving as intended, as this is a common issue with filters at high resonance/feedback values. I'm sure we can devise band-aids as needed later.
CircuitPython version
Normal 8.0.5 Germany
Code/REPL
from adafruit_macropad import MacroPad
import time
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS
from adafruit_hid.keycode import Keycode
from adafruit_hid.consumer_control import ConsumerControl
from adafruit_hid.consumer_control_code import ConsumerControlCode
from adafruit_hid.mouse import Mouse
#from hid_gamepad import Gamepad
import u...
Let's slip it in @tannewt !
@slender iron should I make an 8.1.1 release to fix the CircuitPlayground issue with stack overflow? The changes are pretty significant, though.