#circuitpython-dev
1 messages ยท Page 41 of 1
This updates esp32spi and requests submodules to the latest releases which contain the socket API compatibility.
- Backport #8189 to 8.2.x
Let's update all the frozen modules: go to the top level, and do make update-frozen-modules.
qq around the type annotation topic (with apologies if I overlooked some documentation) - is there a CI config one can enable to pre-commit/check for missing type annotations once they've been added? (I've been running mypy by hand, but looking for a more standardized config if such a thing already exists)
CircuitPython version
Adafruit CircuitPython 8.1.0 on 2023-05-22; TinyS2 with ESP32S2
Board ID:unexpectedmaker_tinys2
UID:4D9FD807FEC4
Code/REPL
import board
import pwmio
import supervisor
import analogbufio
import array
rate = 83333
# Define names for In and Out pins
print("Rate =", rate)
Vin2 = analogbufio.BufferedIn(board.A2, sample_rate=rate)
Vin3 = analogbufio.BufferedIn(board.A4, sample_rate=rate)
Vin4 = analogbufio.BufferedIn(board....
running mypy by hand is the only way right now really. Once we finish up the remaining library types I imagine at some point we'll add the check to pre-commit or actions somehow. There was this one: https://github.com/adafruit/Adafruit_CircuitPython_PIOASM/pull/51 which is one way that it could be integrated. You could carryout similar changes in your local instance while your working so you could test slighly less manually. But in the actual repos I think we won't want to enable the automated check until we are ready to do it on all of the libraries accross the board, so that we don't end up with some libraries using different checks than other ones.
Circuitypython support for the opensource Pajenicko PicoPad gaming console based on RPi Pico (W) and ST7789 LCD.
https://github.com/Pajenicko/Picopad
All features working:
โ
Display
โ
Buttons
โ
User LED
โ
Audio
โ
SD Card
โ
WiFi
โ
External Connector
โ
CircuitPython Stage
Makes sense - a couple of quick follow-ups: can I find a set of options for mypy that would be the "canonical" one enabled across the libraries? (Was also interested in your thoughts around regression - i.e., might it become an issue to fix one repo, and new changes cause issues before the global pre-commit check is enabled?)
The command that was used to generate all of the initial issues can be found here: https://github.com/FoamyGuy/missing_type_issue_maker/blob/06cd8949061a812ff7648d5c020b7577eb9d5667/find_missing_type_annotations.py#L8 it was essentially mypy [path to lib] --disallow-untyped-defs And for the initial pass we only went after lines that mypy reported "Function is missing a type annotation" on. Those would have been the ones that appeared within the list in the issue. That is probably as close as we have atm to a canonical configuration. We'll probably take some time during a meeting one week when we're ready to enable it more widely to discuss what configuration options we want to use and how strictly we will enforce mypy's preference.
I'm not sure if I understand you're second question. If you mean would it have been possible for the libraries to get changed in a way that created new code that now needs to be typed in order to satisfy mypy, even when that code didn't exist at the time we ran the check initially. I do think that's possible and likely something we'll have to work through when we "flip the switch" The goal before that is to get the vast majority of the "low hanging fruit" taken care of before that switch flips so that we lessen how much additional work will be needed once the checks do actually begin.
perfect - thx for the pointer to the script!
Re: second question - gotcha. I'm realizing I'm probably confused about the mechanics ๐ at a high-level, when the flip is made would all repos get a new stanza in .pre-commit-config.yaml pointing to a common workflow with the shared options? Or would the shared options be copied into each stanza directly? The comon standard makes perfect sense; and I was sort of wondering if it might be also be achievable incrementally (aka, one repo at a time, but adhering to the same standard.)
I don't think we have the full plan nailed down yet, and I'll admit that actions / pre-commit is not an area of strength in my knowledge. That being said I do think adding a new section to the pre-commit-config.yaml that points to a common workflow would be what we do. Or maybe we have that mechanism in place already, so we'd be adding it into that already existing actions task repo (these are the specifics I don't quite know about).
It would be technologically possible to do at different times, but I think the preference will be to do them all at once so that we keep a level of consistency across all libraries as best we can. Enabling it on individual repos as they're ready would mean that some libraries have different "rules" for PR submissions which would add complexity to reviews and could cause confusion among less technical contributors if it's unclear why one library PR is failing for a reason that they happen to know a different library PR passed on.
All of that being said, these are all great questions. And all I can say is my best guess. If you happen to ever be available on a Monday this would be a great topic for 'In the weeds' during the weekly meeting to get a wider discussion going involving the rest of the team as well.
Thx for the extra context, makes sense!
(Not easy to manage a large collection of open-source repos for sure, and kudos to all of you for making it work well ๐ )
synthio has a different maximum polyphony depending on the board (because processing more notes takes more CPU time and does more RAM waveform accesses). The original implementation used 2, and I've increased it to 12 on various boards where that tested OK. CPU usage can be greater or lesser depending on the sample rate as well as whether advanced features are used (ring modulation, filters, and to a lesser extent math & lfo blocks).
With recent changes to docs generation we COULD include the information about polyphony in the docs automatically, rather than having an outdated sentence about it.
one problem is that the list can't replace the existing 'supported on these boards' block.
anyway, is this worth it?
The latest commit updates the remaining ones. I was getting something like 'Unknown command update-frozen-modules, but I did find update-frozen-libraries in the makefile and ran that one. If there are other steps needed let me know and I can carry those out.
The latest commit updates the remaining ones. I was getting something like 'Unknown command update-frozen-modules, but I did find update-frozen-libraries in the makefile and ran that one. If there are other steps needed let me know and I can carry those out.
Just my misremembering, sorry!
Adding the Pajenicko PicoPad open-source DIY gaming console kit based on RPi Pico.
Could the hard limit be removed? That is, for simple synthesizing, could the polyphony be greater than 12?
@slender iron @onyx hinge I have made draft release notes for 9.0.0-alpha.1. There is a PR I will merge soon to update the frozen libraries, and there are a few pending new board defs I might wait for.
It would be difficult to make it fully dynamic, I think
ok, so there is an array def or something somewhere that depends on the value. I wasn't sure about that
Yes that's right, I think there are 2 or 3 parallel arrays of that size in the synthesizer
shared-module/synthio/__init__.h: mp_obj_t note_obj[CIRCUITPY_SYNTHIO_MAX_CHANNELS];
shared-module/synthio/__init__.h: uint32_t accum[CIRCUITPY_SYNTHIO_MAX_CHANNELS];
shared-module/synthio/__init__.h: uint32_t ring_accum[CIRCUITPY_SYNTHIO_MAX_CHANNELS];
shared-module/synthio/__init__.h: synthio_envelope_state_t envelope_state[CIRCUITPY_SYNTHIO_MAX_CHANNELS];
and there are some things that do linear searches of all the note_obj[]s which might become a problem
@tulip sleet I thought there were more PRs needing review by me but I just saw the one. If there are more, give me a ping
I originally had you on some of the backports, but added Scott since you were away most of yesterday.
thanks scott ๐
@lone axle hey, I filed https://github.com/adafruit/Adafruit_CircuitPython_Requests/issues/128 because I noticed the docs say that requests.set_socket is deprecated .. however .. I'm not sure what the equivalent would be with Session() and esp32spi, because of the whole fakessl thing. do you know?
it sorta feels like fakessl belongs in esp32spi in some way but that'd be another incompatible change ๐
I don't know for certain. I think the new way would look more like this:
socket = socketpool.SocketPool(wifi.radio)
https = requests.Session(socket, ssl.create_default_context())
but as far as I am aware ESP32SPI would still need the FakeSSLContext stuff in order to work.
Upon first consideration I would probably agree that FakeSSLContext probably makes more sense to exist in ESP32SPI as it's equivalent of the ssl core module for the devices that have it. Then it could be situated so the user code could be very similar, differing only in imports I think.
I would mean a breaking change for requests if we enforce the deprecation / removal of set_socket. But I think it's more positive overall because then the usercode for ESP32SPI and built-in wifi will be more similar.
I guess maybe user code could be structured that way today even without moving FakeSSLContext though now that I think about it a bit more. So perhaps that is actually a different thing apart from moving it. If ESP32SPI is the only thing that use the FakeSSL stuff (to my knowledge it is, but perhaps there is something I'm unaware of) then I do think it's more fitting over in ESP32SPI.
I didn't test this due to not having the hardware, but gave @ladyada the compiled firmware.
I'm not sure if/how wiznet does ssl
As far as I know it doesn't. All of the examples in that repo have http:// URLs specifically. I do think I tried it at one point, but it would have been a while ago, and I don't recall exactly how it behaves.
Do we want to wait for a 9.x pre-release until 1.20 is merged with the mpy version we'll release with?
Oooh hmm.
From my perspective, that sounds like a good idea.
mpy versions changing in the middle of an existing release seems like asking for support issues.
That could be a while; I was wondering whether I should call it 8.9.0-alpha.1 or 8.3.0-alpha.1 or something. We don't have to release either of those as stable.
IT would be nice to have a named release with the usb host and other new stuff in it
8.99.0-alpha.1
Concur.
but I'd also like to not distract from the mp merge
The real reason I made release notes for an alpha is that I had to write up the summary lines for each 8.2.1 PR anyway.
so there is a lot of overlap between the x.x.x-alpha.1 and 8.2.1 release notes
I am about to finish the 8.2.1 release and didn't plan to do anything with the alpha release for several days, until we got more stuff merged. So we can cogitate and discuss this tomw or Monday.
I'm not 100% sure that I set up to use the external flash correctly either. It matches other boards in the parameters used and the external flash file is looking for the parameters I used, but I'm not getting the full 16MB of space. It may just a FAT12 thing, but that should be able to get up to 16MB.
How much memory are you seeing?
Oh yeah, it's failing duplicate VID/PID now because of the 2 board defs for the same board.
You can exempt it here: https://github.com/adafruit/circu...
I'm not 100% sure that I set up to use the external flash correctly either. It matches other boards in the parameters used and the external flash file is looking for the parameters I used, but I'm not getting the full 16MB of space. It may just a FAT12 thing, but that should be able to get up to 16MB.
How much memory are you seeing?
5.9MB, which now that I think about it more, probably means it's using internal flash rather than external.
Looks like there are a few minor formatting things. pre-commit can help auto-format it: https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/check-your-code
How much memory are you seeing?
5.9MB, which now that I think about it more, probably means it's using internal flash rather than external.
Did you try erasing the filesystem? I think this is how much you'd get if it was configured for 8MB flash. (There isn't internal flash so the remaining 1MB or so is for CircuitPython.)
No, I didn't try that. I'll give it a go.
That's what I remember and the reason I waited so long before getting two modules (a Feather and a generic one).
At one point I was thinking you could use your magic and play the trick you did for the Pico W SSL support... but except for the technical challenge, I don't see the interest for Adafruit.
Same size and I just realized it's actually fat16.
One day I will play with those, waiting for that, I watch @lone axle stream that frequently review PR.
Also, it has 8mb internal flash and an additional 16mb external flash. Arduino just used all the internal flash for the bootloader I think.
I added some comments after manual precommit ๐คฆโโ๏ธ Fixed.
Automated website update for release 8.2.1 by Blinka.
New boards:
- adafruit_metro_m7_1011_sd
- adafruit_metro_rp2040
- adafruit_qtpy_esp32s3_4mbflash_2mbpsram
- datanoise_picoadk
- makerdiary_nrf52840_connectkit
- splitkb_liatris
Use 8.2.1 for the Adafruit MatrixPortal S3.
Also, it has 8mb internal flash and an additional 16mb external flash. Arduino just used all the internal flash for the bootloader I think.
Oh weird! The module has 8MB qspi plus 16MB externally. Do you know which flash is used by micropython?
Any tag/recommendation for "mid-level" PRs/milestones i could help with?
Like, i dont want to cleanup or add type hints, but wont write the best code ever either
Im familiar with both py and C(not with the bindings between them but shouldnt be much trouble getting stuff to work i hope).
Available hw: RP2040, STM32H750 (is it supported?) and ESP32S3
Lemme look. The H750 may not be too bad to support
we have H743 support
Here is a pretty straightforward bug fix for stm: https://github.com/adafruit/circuitpython/issues/7615
Will take a look, thx for the pointers
FWIW: i also have a few displays (will try and write a driver for STM's LTDC peripheral as soon as another screen arrives), and have been working on a TOML library lately, not sure if we want further func on getenv (supporting bools would be nice imo)
thank you, Dan!
I think bool values could be nice but not sure if getenv would actually give you them in CPython
40 pin RGB display support is definitely on our radar
so it'd be cool to support
My radar is 27 i think
we're not actively working on it though
RGB888(24) + a couple control signals
I think this is the same, just more control signals: https://www.adafruit.com/search?q=40+pin+display
Adafruit Industries, Unique & fun DIY electronics and kits : Search Results - Tools Gift Certificates Arduino Cables Sensors LEDs Books Breakout Boards Power EL Wire/Tape/Panel Components & Parts LCDs & Displays Wearables Prototyping Raspberry Pi Wireless Young Engineers 3D printing NeoPixels Kits & Projects Robotics & CNC Accessories Cosplay/Co...
from the datasheet for https://www.adafruit.com/product/1596
I dont see a reason not to, but will check in a min, as soon as i get back to the computer
My current parser allows un-quoted strings (foo = bar), which afaik arent supported on TOML spec, but seems easier to use ๐
I also allow both TOML (true) and python syntax (True) - read: case insensitive - for bools. Again out of the spec but seems useful
Differences, if documented and/or for QoL, doesnt sound bad imo
I had to slim down a number of builds for this to fit. Are we entering the era of this for samd51 ? :sweat:
But again, dunno how much of a compliant parser we want....
I think thats the same i have bought, some extra pins for power and touch sensor
Will hopefully get something working at some point :p
I had to slim down a number of builds for this to fit. Are we entering the era of this for samd51 ? ๐
We could also consider turning off little-used features in ulab. I think we already made the SAMx5x builds -Os, but you could check that.
In issues notes it says Espressif boards have ESP-IDF storage leaks and occasionally crash after extended WiFi use. What time frame is considered "extended use"? Weeks/Months? I've had my Adafruit ESP32-S3 feather pulling weather data from openweathermaps & local sensors then pushing it to adafruitIO via MQTT for weeks at a time without issue. Most I've run it (according to monotonic) is for 2.5 weeks before coming back to it for some more coding. It sits on my workbench running 24/7 updating every 15 minutes. I've not had a single issue with it since about CP 8.0 beta 3.
any news on that long-term enhancement issue with bluetooth mesh ?
Hi guys, a little bump on this open feature. Whats the status? Keyboard community is eagerly looking forward to this! :)
Yeah, if I do requests only, ESP projects will run virtually forever (though I do occasionally reload or reset in software if certain conditions arise). Several have been running since some time in 2022 (still on CP7). But I get spontaneous resets or hard faults on some projects where AP or HTTP Server or other wifi or socket stuff is thrown into the mix. More specialized issues with ESP-Now frequently resetting, or monitor init hard faults are probably separate issues.
CircuitPython version
Adafruit CircuitPython 8.1.0-beta.2 on 2023-04-26; ESP32-S3-Box-2.5 with ESP32S3
Code/REPL
# SPDX-FileCopyrightText: 2022 Paulus Schulinck
#
# SPDX-License-Identifier: MIT
##############################
# 2022-10-22. Last update: 2023-07-26
# by @PaulskPt
#
# touch test results on an Espressif ESP32-S3-BOX
#
# 319 X 0
# | |
# ---+--------------------+--- 0
# | ...
I don't think this is a CircuitPython core bug. There would be no board.HOME because the red "button" is just an area on the touch screen. There might also be a separate pin on the touch controller for these special areas, but I've been unable to find a datasheet for the TT21100 yet. Moving this issue to the library repo.
@tulip sleet did you mean to tag me on the TT21100 issue?
I don't have a datasheet but suspect you meant to tag someone else most likely, unless I'm not understanding something.
I don't think I have the device either
I thought you wrote the library, but I was looking in the wrong place - sorry!
Scott wrote it
No worries! I just felt bad giving an entirely unhelpful answer of "no" ๐
@ladyada if you want to test, the artifacts are ready
@crude blaze y0000000000ooooooooooooooooo...............
@meager fog hey!
yea I got time for a good while!
ok so i think i just dont have the right dto setup
i cloned/ran the example for the icn on the pi4
yea sounds likely, i2c worked fine via the Pi? Or did you ran it on the samd?
i did have to run it twice due to a CRC error (?) but i dont think thats important
root@devpi:/home/pi/Adafruit_CircuitPython_ICN6211# python3 examples/icn6211_simpletest.py
0x00 = 0xc1
0x01 = 0x62
0x02 = 0x11
0x03 = 0xff
0x08 = 0x00
0x09 = 0x10
0x10 = 0x40
0x11 = 0x88
0x14 = 0x83
0x20 = 0x20
0x21 = 0xe0
0x22 = 0x13
0x23 = 0x28
0x24 = 0x28
0x25 = 0x28
0x26 = 0x00
0x27 = 0x0a
0x28 = 0x0a
0x29 = 0x0a
0x2a = 0x01
0x31 = 0x78
0x32 = 0x04
0x33 = 0xff
0x34 = 0x80
0x35 = 0x08
0x36 = 0x28
0x51 = 0x20
0x56 = 0x92
0x63 = 0xff
0x64 = 0x00
0x65 = 0x00
0x66 = 0x00
0x67 = 0x00
0x68 = 0x00
0x69 = 0x03
0x6a = 0x00
0x6b = 0x31
0x7a = 0x3e
0x7b = 0xff
0x7c = 0xf1
0x7d = 0x01
0x80 = 0x43
0x81 = 0x0f
0x84 = 0x94
0x85 = 0xc9
0x86 = 0x28
0x87 = 0x00
0x90 = 0x05
0x91 = 0x0a
0x92 = 0x18
0x94 = 0x0d
0x95 = 0x04
0x96 = 0x64
0x97 = 0x00
0x99 = 0x05
0x9a = 0x96
0xb5 = 0xa0
0xb6 = 0x20
SoT error
SoT sync error
False control error
ECC error, single-bit
ECC error, multi-bit
CRC error
DSI Data type Not Recognized
root@devpi:/home/pi/Adafruit_CircuitPython_ICN6211# python3 examples/icn6211_simpletest.py
0x00 = 0xc1
0x01 = 0x62
0x02 = 0x11
0x03 = 0xff
0x08 = 0x00
0x09 = 0x10
0x10 = 0x40
0x11 = 0x88
0x14 = 0x83
0x20 = 0x20
0x21 = 0xe0
0x22 = 0x13
0x23 = 0x28
0x24 = 0x28
0x25 = 0x28
0x26 = 0x00
0x27 = 0x0a
0x28 = 0x0a
0x29 = 0x0a
0x2a = 0x01
0x31 = 0x78
0x32 = 0x04
0x33 = 0xff
0x34 = 0x80
0x35 = 0x08
0x36 = 0x28
0x51 = 0x20
0x56 = 0x92
0x63 = 0xff
0x64 = 0x00
0x65 = 0x00
0x66 = 0x00
0x67 = 0x00
0x68 = 0x00
0x69 = 0x03
0x6a = 0x00
0x6b = 0x31
0x7a = 0x3e
0x7b = 0xff
0x7c = 0xf1
0x7d = 0x01
0x80 = 0x00
0x81 = 0x00
0x84 = 0x94
0x85 = 0xc9
0x86 = 0x28
0x87 = 0x00
0x90 = 0x05
0x91 = 0x0a
0x92 = 0x18
0x94 = 0x0d
0x95 = 0x04
0x96 = 0x64
0x97 = 0x00
0x99 = 0x05
0x9a = 0x96
0xb5 = 0xa0
0xb6 = 0x20
im running it on the pi, since the samd21 is low on ram, and i figured the pi is easier to tweak
yea for sure! I have not tested the lib at all on MCU CPY actually so far
the errors I imagine are likely due to lack of DSI signal
i have the icn wired to main i2c bus and i just tweaked the i2c bus instantiation in the example
lemme look up the boot flag that I used last time to debug the device tree stuff, that gave a whole lot more error logs in the syslog
dsi is just a plain dsi cable
i didnt change any boot flags, i just added the compiled icn.dto you gave me
root@devpi:/home/pi/Adafruit_CircuitPython_ICN6211# cat /boot/config.txt
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16
# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720
# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1
# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2
# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4
# uncomment for composite PAL
#sdtv_mode=2
#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800
# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on
dtparam=spi=on
# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18
# Additional overlays and parameters are documented /boot/overlays/README
# Enable audio (loads snd_bcm2835)
dtparam=audio=on
# Automatically load overlays for detected cameras
start_x=1
# Automatically load overlays for detected DSI displays
#display_auto_detect=1
# Enable DRM VC4 V3D driver
#dtoverlay=vc4-kms-v3d
max_framebuffers=2
# Disable compensation for displays with overscan
disable_overscan=1
[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1
[all]
[pi4]
#dtoverlay=vc4-fkms-v3d
# Run as fast as firmware / board allows
arm_boost=1
dtoverlay=vc4-kms-dsi-7inch
[all]
enable_uart=1
dtparam=i2c_arm_baudrate=100000
gpu_mem=128
e.g. removed #dtoverlay=vc4-fkms-v3d and added dtoverlay=vc4-kms-dsi-7inch
ah might be because the kms driver is not enabled, if you uncomment "#dtoverlay=vc4-kms-v3d" that might make it work already
yeah i tried that but will do again
think we already made the SAMx5x builds
-Os, but you could check that.
Yes, they are already -Os.
Thanks for seeing this through.
#dtoverlay=vc4-fkms-v3d
# Run as fast as firmware / board allows
arm_boost=1
dtoverlay=vc4-kms-dsi-7inch
[all]
enable_uart=1
dtparam=i2c_arm_baudrate=100000
gpu_mem=128
root@devpi:/home/pi/Adafruit_CircuitPython_ICN6211# nano /boot/config.txt
root@devpi:/home/pi/Adafruit_CircuitPython_ICN6211# tail /boot/config.txt
# Run as fast as firmware / board allows
arm_boost=1
dtoverlay=vc4-kms-dsi-7inch
[all]
enable_uart=1
dtparam=i2c_arm_baudrate=100000
gpu_mem=128
otherwise I had not tested the official 7inch overlay in a recent OS version, lemme see how that plays out on my end if I use that
i probably am using the very latest
in /boot/cmdline.txt I added loglevel=6 drm.debug=0xfwhich enables error logs for DSI on syslog
ok let me do that now
ill reboot now, should i be looking at uart console or can i just check dmesg
i have a headless pi4 i ssh into
should show up in dmesg
hmm
ok the official 7inch overlay doesn't work for me either, then maybe try the overlay I had attached in the zip, compile and copy instructions in the .sh file
ok
thats dmesg
ill swap the dto
i did have compilation warnings...
ICN6211.dts:58.5-15: Warning (reg_format): /fragment@1/__overlay__/panel_disp1@0:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
ICN6211.dts:71.5-15: Warning (reg_format): /fragment@1/__overlay__/reg_bridge@0:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
ICN6211.dtbo: Warning (pci_device_reg): Failed prerequisite 'reg_format'
ICN6211.dtbo: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
ICN6211.dtbo: Warning (simple_bus_reg): Failed prerequisite 'reg_format'
ICN6211.dtbo: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
ICN6211.dtbo: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
ICN6211.dts:57.31-68.6: Warning (avoid_default_addr_size): /fragment@1/__overlay__/panel_disp1@0: Relying on default #address-cells value
ICN6211.dts:57.31-68.6: Warning (avoid_default_addr_size): /fragment@1/__overlay__/panel_disp1@0: Relying on default #size-cells value
ICN6211.dts:70.29-77.6: Warning (avoid_default_addr_size): /fragment@1/__overlay__/reg_bridge@0: Relying on default #address-cells value
ICN6211.dts:70.29-77.6: Warning (avoid_default_addr_size): /fragment@1/__overlay__/reg_bridge@0: Relying on default #size-cells value
ICN6211.dtbo: Warning (avoid_unnecessary_addr_size): Failed prerequisite 'avoid_default_addr_size'
ICN6211.dtbo: Warning (unique_unit_address): Failed prerequisite 'avoid_default_addr_size'
dtoverlay=vc4-fkms-v3d
# Run as fast as firmware / board allows
arm_boost=1
dtoverlay=ICN6211
ah yea but those are inherent to the PI's DT setup afaik I always get those with every DT file
as long as its just the warnings it should work
@crude blaze @ladyada could you start a thread, since there is a lot of text here?
thanks
Nope, no one has worked on it further.
Hi guys, a little bump on this open feature. Whats the status? Keyboard community is eagerly looking forward to this! :)
No one is working on it that I know of. The nRF52840 is a good existing option for BLE support.
I had to slim down a number of builds for this to fit. Are we entering the era of this for samd51 ? ๐
I think we need a plan for ulab since it keeps growing. Maybe we need to freeze versions for smaller MCUs. We basically do this by omitting newer python modules.
reviewed! camera, tft, gpio expander and sd card are all workin :)
reviewed! camera, tft, gpio expander and sd card are all workin :)
This depends on https://github.com/adafruit/esp32-camera/pull/5/files which also needs to be reviewed.
Waiting on an unexpected extra layer bureaucracy for my approval. Should I refer to the Milestones in GitHub for roadmap? Or is there a dedicated roadmap somewhere?
I had to slim down a number of builds for this to fit. Are we entering the era of this for samd51 ? ๐
I think we need a plan for
ulabsince it keeps growing. Maybe we need to freeze versions for smaller MCUs. We basically do this by omitting newer python modules.
After looking at ulab for the synth filter stuff, if parts of the ulab python need to be omitted having someplace where people can find the omitted parts of the library would be helpful. I never realized that a lot of...
I never realized that a lot of ulab is written in python
What parts are you seeing in Python? Everything in https://github.com/v923z/micropython-ulab is C except for tests.
"Howdy. A customer was having issues with a long RGB matrix chain on Matrix Portal S3. Made a microscopic change in Protomatter that seems to improve the situation in Arduino. Could you see that the next CircuitPython build gets the same change? (1.5.9 release)"
(not sure what approval you are referring to) Milestones in github are used for adafruit-funded prioritization. There isn't a separate roadmap.
we discuss it during the weekly meetings usually
we're just about to switch to 9.0.0 dev once the micropython merge bumps the mpy version number
we're going to update to esp-idf 5.0 then too
I'm waiting on official approval to contribute from my day job's Legal team (software engineering, so this is necessary for me to contribute). While I wait, I'm trying to plot out issues to prioritize and get my head wrapped around the intended direction, etc.
Good stuff.
Ok, not beauracy I can help with then. ๐
@cunning orchid any specific platforms or topics that interest you?
User with the issue is here: https://forums.adafruit.com/viewtopic.php?t=203310.
We can point them to the artifact after it's built for them to test, and I could make an 8.2.2 soon.
I'm intending to dig into multicore support at some point but, think it will be better to start elsewhere. I've a few MCUs at my disposal (ESP32-S3, SAMD21, RP2040), and, an Arty Z7 FPGA (not well-versed in its configuration yet) so, should be able to test on a good chunk of archs.
Mainly, I'm looking to work on lower-level things as I've done a lot of Python and Go in my day jobs and really want to get closer to the hardware again and have been digging into communication protocol implementations, RISC-V, and FPGAs lately in my free time. Not ruling out porting Python code though.
Thank yโall! If this only partly remedies their problem, think itโs just a matter of further increasing this constant then.
I have a long term wish to support the zynqs.
I've also started a "I wish my SoC did X" wishlist
exposing the second RP2040 core for C code could be doable
my list of "I should do it for circuitpython" things is now so long, that I just stopped adding to it
maybe when I'm retired...
๐
After previous discussions, I've been contemplating approaches that would be applicable to RP2040s and other multicore. Definitely think that running low-level code makes the most sense (ex. Reserve x memory space for inter-proc comms, reserve y memory space for CPU1 processing, and run this.binary on CPU1). Would be fun to have the type of binary fairly agnostic, as long as it's compiled for the correct arch.
I would love to see displayio running on the second core
that'd only work if you aren't doing dvi on the second core
of course
even a very dumb mechanism that loaded a .bin on boot into the second core and provided a small amount of RAM "scribble space" to talk between C-core and CirPy could be useful for a huge number of applications
that's essentially what dvi and usb host do. no need to do it at boot though
That's exactly what I'm thinking. For safety, I think it makes most sense to have two dedicated regions (one for said "scribble space" and one as a dedicated communication buffer). Not sure that safety could or should be enforced for the primary proc though.
the cpu does have an MPU you can use to crash instead of allowing a memory write
Oooh. Interesting.
While graceful failure seems preferable in many cases, that could be a good route.
dvi and usb host use it to prevent rogue flash reads
If that's the case, I'll definitely dig further into that as reusing the established approach makes most sense.
User reports:
With that image + original hardware config (four 64 x 32 RGB Matrixes) + original sketch... No artifacts from the S3 observed when "bit_depth=3". Problems still there when "bit_depth=4"
@PaintYourDragon Would it make sense / is it possible to make that timing parameter bit_depth dependent, or maybe it should be a user-supplied parameter?
xref to https://github.com/adafruit/Adafruit_Protomatter/commit/5f0b4...
Iโm working on two libraries, one for DMX sending, and the other for DMX receiving. Both use RP2040โs PIO. They both work. Iโm now doing some clean-up and hope I can get them into the Community Bundle.
Iโm working on two libraries, one for DMX sending, and the other for DMX receiving. Both use RP2040โs PIO. They both work. Iโm now doing some clean-up and hope I can get them into the Community Bundle.
Awesome! Can you provide some GitHub links when you are ready?
I never realized that a lot of ulab is written in python
What parts are you seeing in Python? Everything in https://github.com/v923z/micropython-ulab is C except for tests.
Ah sorry! I got confused with the CPython implementation.
@ladyada tested this a couple of days ago.
Hardware/Version: RP2040 with circuitpython 8.2.1.
Assuming sm as a rp2pio.StateMachine it is possible to write a pio program with no in instruction and then read an internal state using a run command as sm.run(adafruit_pioasm.assemble("in x, 32")) to fill the buffer and then read the state with sm.readinto.
readinto will cause a RuntimeError: No in in program error if no in instruction was found in the original state machine code.
Adding an unreachable in instruct...
The motivation for this is a good one, an implementation of quadrature encoder that doesn't require the FIFO to be constantly monitored. https://github.com/jamon/pi-pico-pio-quadrature-encoder/blob/main/src/quadrature.pio
This will need to be optional, controlled by a new constructor argument because in general we still want to continue "join"ing the fifos when only one direction is used.
FYI Iโm off and on today because Ari is home with a rash
please change or add Dn to IOn (matching other Metro boards)
https://github.com/adafruit/circuitpython/blob/main/ports/atmel-samd/boards/metro_m4_express/pins.c#L16
and also sanity-check the init instructions, thanks to the newly factored-out checker.
Closes: #8221
Not yet tested on hardware!
@slender iron Kinda curious from yesterday's chat. What direction were you thinking for Zynq ports? Blinka? Bare metal on hardcores? RTOS on hardcores? Some sort of RISC-V softcore?
Bare metal on hardcores is what I was thinking. It has hard usb as well. Then you could have custom peripherals in the fpga fabric that are managed by CP>
risc-v softcore would be cool eventually too. orangecrabs (w/ecp5) are probably best for full soft soc
CP runs bare metal on raspberry pi's w/cortex-a already
Is there a way to print messages to the REPL from common-hal code?
Also I think the documentation is wrong here (not sure where to share it): https://docs.circuitpython.org/en/latest/shared-bindings/canio/index.html
The example says:
can = canio.CAN(board.CAN_RX, board.CAN_TX
But based on common-hal coding and also the documentation down below says:
class canio.CAN(tx: microcontroller.Pin, rx: microcontroller.Pin,
So the RX and TX pins are wrong in the example. Took me a couple of hours to realize what was wrong.
No idea bout the name, but "print" has to be mapped to a C function on shared-bindings (or perhaps somewhere else)
You can probably call that one (or another func used inside that one) from your code
thanks
and it also adds offset= which is needed for encoder implementations like https://github.com/adamgreen/QuadratureDecoder/blob/master/QuadratureDecoder.pio
@onyx hinge does the MPy PIO impl also have a zillion arguments? or is more implied by the the "native" code?
... not quite as many: https://docs.micropython.org/en/latest/library/rp2.html#rp2.asm_pio
@tulip sleet it seems to have fewer https://docs.micropython.org/en/latest/library/rp2.StateMachine.html#rp2.StateMachine.init
they're also spread out a bit differently it seems
yah
but for instance they omit the count of in/out/set pins in that signature, and leave it up to the coder to just make sure there's no error
it looks like there may be no fifo-joining, not sure
i like our hand-holding better
@crude blaze hihi im not sure if you're around again
@meager fog I am, currently editing some photos but have some time in a bit
@crude blaze np tag me when yr done! (if you wanna do another attack run)
Iโm working on two libraries, one for DMX sending, and the other for DMX receiving. Both use RP2040โs PIO. They both work. Iโm now doing some clean-up and hope I can get them into the Community Bundle.
We are really pleased to hear this!
Hi, that's great! Is there any example how to read a connected keyboard to an RP2040 board?
Hi, I saw that this was merged lately: https://github.com/adafruit/circuitpython/pull/8155 Is there any example how to read a USB keyboard that's connected to a RP2040 board (RP Pico) ? (custom RX/TX pins)
I have installed CircuitPython 8.2.1 and if I try this, it doesn't work:
Did you compile/flash a fw with the feature enabled?
No, just downloaded the "official" one. How do it do this?
Dunno if the compiled is somewhere to be downloaded...
You could setup your machine to compile yourself, but that's trickier
Given it was merged on the main branch, i would expect the compiled to have this new code available
Did you download in the past few days?
ah, ok ... found this one here: https://learn.adafruit.com/building-circuitpython/build-circuitpython
So at the end, it should be:
cd ports/raspberrypi
make BOARD=raspberry_pi_pico CIRCUITPY_USB_HOST=1
Am I right?
I downloaded it just now, but it seems not to be enabled. But I don't really know
You can also look for images on the storage (S3 bucket) where adafruit stores them, no idea whether there will smthing there with that enabled
Command looks good to me, but not that im an expert
I just installed this one here: adafruit-circuitpython-raspberry_pi_pico-en_US-20230728-75ba17e.uf2
There it seems to be enabled! Thanks for your support! ๐๐ป
Cool ๐ค
hm, but seems not to work ... or I'm doing smth wrong ๐ I tried this here: https://github.com/adafruit/circuitpython/blob/main/tests/circuitpython-manual/usb/device_info.py (slightly changed)
But it will not recognize my USB keyboard. Also tried to swap GP4 / GP5 ... don't know. Maybe I'm to early trying this out. ๐
I made the neccessary changes however when I try to test using the following setup:
Teensy MicroMod board [RX, TX pins] <==> [RX, TX pins] TI SN65HVD230 CAN-bus transceiver module (3.3V) [CAN H, L pins] <==> [CAN H, L pins] MCP2515 CAN Bus Controller Module [SPI bus] <==> 5v to 3.3V logic level shifter <==> Adafruit QT Py
ESP32-S3 No PSRAM
it doesn't work with the following code examples:
MCP2525 side.
`from time import sleep
import board
from digitalio import DigitalInOut
from adaf...
I've tested my MCP2515 board with VESC controllers and I can receive and send without any issues. So the problem must not be on that side. I am 99% sure that the SN65HVD230 chips must be bad. I read online that there are a lot of fake chips. I don't know where to get a genuine one. Maybe I'll try to order one from Farnell or DigiKey.
hm but seems not to work or I m doing
Is it possible that I2S audio is broken on the Teensy MicroMod board?
We relied on a community member for that port; we don't have one to test.
you could test I2S on a regular Teensy as well
the wrong pin is listed in the pin config file
i think
so you cannot init the audiobusio ๐ฆ
i"d compare it with the equivalent regular Teensy. Are you able to make your own build to test? We would welcome a PR.
I can build, and i can test. But i don't know how to make PRs.
https://learn.adafruit.com/contribute-to-circuitpython-with-git-and-github. But if this is a one-character ( ! sounds like), you can use the web interface in github to edit the file and make a PR.
This file is generated by a python script, so even if i'd edit the next python file update would just undo my changes?
python3 /home/qute/gen_peripherals_data.py /home/qute/mcux-soc-svd /home/qute/Downloads/ MIMXRT1062
this would overwrite it
@rancid pilot @slender iron would know more but from what I recall, the chip maker does not permit distribution of the "svd files" that this script uses as input, which is why the results are committed instead of the original files.
does the same error appear in the Teensy 4.0 or 4.1 pins.c file?
and if it's the same, does I2S not work on those boards?
I wonder if this is some kind of pin-mapping confusion on the micromod carrier board
it is hard to tell from the screenshots @rancid pilot pasted (please use text when possible!) but I assumed the content they were talking about was in a file like ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/pins.c which would depend on the mcu chip, not a circuitpython board definition.
i.e. look at all the 1062 boards
got it; the q would still apply about other 1062 boards.
if the base 1062 pin map is in error that would carry over
I could test, I have all possible teensy boards, but I feel like I should just use smtg else that works ๐ฆ
well, I think it would be a quick test just to see if you could create an I2SOut on a Teensy 4.x using the same pins.
it sounds like the same issue would occur
i.MX RT1060 Processor Reference Manual, Rev. 2, 12/2019 page 313 lists GPIO_AD_B1_14 as a possible alternative for SAI1_TX_BCLK and does not list GPIO_AD_B1_11.
and the generated periph.c seems to match this
from the board pins.c:
{MP_OBJ_NEW_QSTR(MP_QSTR_MM_I2S_CLK), MP_ROM_PTR(&pin_GPIO_AD_B1_11)}, // D21
AD_B1_11 can be used as SAI1_RX_BCLK
The teensy41 board pins.c does not list I2S-specific pins
@onyx hinge so are you saying the generated pins.c (not the board pins.c) does appear wrong? Perhaps there was an SVD error and we should update the submodule
or maybe there is a pin validation error in common-ah
At least with the implementation in circuitpython, a "TX" clock has to be used to transmit audio data via i2s
there may be some register level configuration that lets an "RX" clock be used to transmit data but if so CircuitPython doesn't implement it
const mcu_periph_obj_t *bclk_periph = find_pin_function(mcu_i2s_tx_bclk_list, bit_clock, &instance, MP_QSTR_bit_clock);
in I2SOut.c for mimxrt
D4 is accepted (BCLK2) in the diagram
but the MicroMod has designated pins, and silkscreened I2S pins, which are wrong :/
that diagram might represent what works in some other environment
in circuitpython, the pin has to be a "TX BCLK", but AD_B1_11 is an "RX BCLK".
Thanks for the help. I'll figure smtg out. Maybe there is an Adafruit board with i2s and can bus with better circuitpython support.
I don't think we've implemented canio on any mimxrt10xx microcontrollers yet
I just did ๐ But something is wrong with my CAN transciver chip. I think. Bad chinese fake or...
This is what MicroPython allows for I2S pins: SCK are allowed clock pins:
#define I2S_GPIO_MAP \
{ \
I2S_GPIO(1, SCK, RX, GPIO_AD_B1_11, IOMUXC_GPIO_AD_B1_11_SAI1_RX_BCLK), /* pin 21 */ \
I2S_GPIO(1, WS, RX, GPIO_AD_B1_10, IOMUXC_GPIO_AD_B1_10_SAI1_RX_SYNC), /* pin 20 */ \
I2S_GPIO(1, SD, RX, GPIO_AD_B1_12, IOMUXC_GPIO_AD_B1_12_SAI1_RX_DATA00), /* pin 38 */ \
I2S_GPIO(1, SD, RX, GPIO_B1_00, IOMUXC_GPIO_B1_00_SAI1_RX_DATA00), /* pin 8 */ \
I2S_GPIO(1, SCK, TX, GPIO_AD_B1_14, IOMUXC_GPIO_AD_B1_14_SAI1_TX_BCLK), /* pin 26 */ \
I2S_GPIO(1, SCK, TX, GPIO_B1_02, IOMUXC_GPIO_B1_02_SAI1_TX_BCLK), /* pin 36 */ \
I2S_GPIO(1, WS, TX, GPIO_AD_B1_15, IOMUXC_GPIO_AD_B1_15_SAI1_TX_SYNC), /* pin 27 */ \
I2S_GPIO(1, WS, TX, GPIO_B1_03, IOMUXC_GPIO_B1_03_SAI1_TX_SYNC), /* pin 37 */ \
I2S_GPIO(1, SD, TX, GPIO_AD_B1_13, IOMUXC_GPIO_AD_B1_13_SAI1_TX_DATA00), /* pin 39 */ \
I2S_GPIO(1, SD, TX, GPIO_B1_01, IOMUXC_GPIO_B1_01_SAI1_TX_DATA00), /* pin 7 */ \
I2S_GPIO(1, MCK, TX, GPIO_AD_B1_09, IOMUXC_GPIO_AD_B1_09_SAI1_MCLK), /* pin 23 */ \
I2S_GPIO(2, SCK, TX, GPIO_EMC_06, IOMUXC_GPIO_EMC_06_SAI2_TX_BCLK), /* pin 4 */ \
I2S_GPIO(2, WS, TX, GPIO_EMC_05, IOMUXC_GPIO_EMC_05_SAI2_TX_SYNC), /* pin 3 */ \
I2S_GPIO(2, SD, TX, GPIO_EMC_04, IOMUXC_GPIO_EMC_04_SAI2_TX_DATA), /* pin 2 */ \
I2S_GPIO(2, MCK, TX, GPIO_EMC_07, IOMUXC_GPIO_EMC_07_SAI2_MCLK) /* pin 33 */ \
}
but does it allow using an RX clock when transmitting audio?
every source agrees AD_B1_11 is a transmitting clock and AD_B1_14 is a receiving clock, from what I saw.
the MicroPython code appears not to care
hmm, it might check futher down
@rancid pilot ESP32-S2 and -S3 support canio. I think someone else contributed that port, or did you do it @onyx hinge?
saiConfig.syncMode = kSAI_ModeAsync;
SAI_RxSetConfig(self->i2s_inst, &saiConfig);
saiConfig.bitClock.bclkSrcSwap = true;
saiConfig.syncMode = kSAI_ModeSync;
SAI_TxSetConfig(self->i2s_inst, &saiConfig);
```yeah it looks like there's some register setting that allows using an RX clock when transmitting data. We'd be happy to see this implemented in circuitpython, but as it's not needed for adafruit hardware we probably wouldn't prioritize it.
is the pin you want accessible on the micromod carrier?
Mine is here. I don't know how to make a PR and when testing and doing logic analyser checks the signals appear to stop at me CAN bus transcivere IC so I can't test. : https://github.com/adafruit/circuitpython/issues/8151
the I2S pins are on the top
yeah but if the pin you want is available elsewhere then you don't have to use the labeled ones
๐
It's possible to use a pin designated "RX BCLK" when transmitting audio data. This can be done, but circuitpython lacks the necessary code. This may be necessary for some boards such as the micromod.
Here's a snippet from micropython:
} else if ((self->mode == TX) && (i2s_gpio_map[sck_index].mode == RX)) {
saiConfig.syncMode = kSAI_ModeAsync;
SAI_RxSetConfig(self->i2s_inst, &saiConfig); ...
I went ahead and entered an issue about supporting RX BCLK but it's not likely to be a priority-- community help to implement it would be appreciated. ^
@crude blaze ok heres the latest draft for rev B - i am gonna at the TSC2007 but im kinda wondering now how does the raspi 7" handle CTP IRQ... (?) kinda wish they'd added another GPIO or two to the DSI connector ๐
@jepler Looks good, includes the new IO SSL Cert.
Could you test connection to AdafruitIO with a new build? Thanks.
@dhalbert Do pull requests in this repository produce UF2 builds?
SVD files you can distribute but there are other descriptive files that you can't distribute. You can get them for your own use though.
@brentru In the "Checks" tab, select "Build CI" and find an esp32s2 board you have. The download will contain both .bin and .uf2 firmware.
Keyboards are treated specially by CircuitPython. It should automatically read the keyboard and convert keypresses into a serial stream. Then, you can do input() like you normally would.
You can also detach CircuitPython from the keyboard and manage it yourself. However, I haven't tested that thoroughly yet.
One copy paste issue. Good otherwise. Thanks!
I am sorry to ask so many questions. Is I2CTarget (aka I2C peripheral, aka I2C slave) in a working condition? I am using board "Adafruit QT Py ESP32-S3 No PSRAM" as the slave. I am waiting for requests. Nothing is connected at all and I keep getting a lot of requests. Like circuitpython is spamming itself with non-existent requests. When I connect a master and do an I2C scan I can see that the slave is alive and responding. When I try to read from the slave I get garbage as response.
We don't often use it so it could be broken.
timonsku ok heres the latest draft for
@dhalbert @jepler IO Connection is OK,
Testing on Adafruit CircuitPython 8.2.1-1-g82c429f714 on 2023-07-28; Adafruit Feather ESP32S3 4MB Flash 2MB PSRAM with ESP32S3
Connecting to Adafruit IO...
Connected to Adafruit IO! Listening for NeoPixel changes...
Current 'random' number: 91
Current 'random' number: 103
Feed neopixel received new value: hello
Oh weird! The module has 8MB qspi plus 16MB externally. Do you know which flash is used by micropython?
That's my understanding. It looks like MicroPython has implemented custom partition tables and it's making use of that. It almost looks like they have it set for 16mb internal flash. I attempted to set it to 16mb and compile, but the file system was still the same size.
a discord user reports this doesn't work right, so I'll need to revisit it and do more testing
Closes #7615
Perhaps i mis-understood something on the code + i dont have any hardware to test this with, please review it throughtfully.
From my understanding:
- num_blocks: amount of memory we want to read
- count: amount of memory we can read from cache
If that is correct (bold assumption):
- < should have been <=. That is, reading the same or less amount of memory than there's in cache
- Why would we use MIN on count there at all? Since the...
looking into #8178 (beware im not too familiar with CircuitPy architecture)
im seeing that main.c has a function named run_code_py (assuming this is the early code that triggers executing code.py)....which in turn calls common_hal_release_displays, but only inside #if CIRCUITPY_ALARM (plus some other C-checks inside this pre-processor-check)
if i understand correctly, "alarm" is used to go into sleep mode until some condition is met and then re-execute the whole code.py file
ideas so far
- small addition: shouldn't harm calling
releaseon an#elseblock... i can see most ports have the feature enabled by default, tho - should i dig further to understand the entire function and try to automatically release on very first pass at the code(maybe just add a
static bool) and/or some other states, or does that sound bad?
In general, we don't want to automatically release: the display is kept alive across VM instantiations so one can see errors. The idea of #8178 is to give a better error if the user code wants to release the display, but not to always release the display.
Ok thx, will take a closer look, didnt see any code that would detect unreleased on a quick glance, but i can probably find a way ๐ค
The error happens because someone is trying to create a display, but there already is one (hence "too many display busses"). The error is uninformative, because the user is not necessarily trying to create a second display, but simply to use one. If you read the thread referenced in that issue, I think it describes the error case pretty well, esp see Neradoc's reply
I was just thinking of changing the text of the error
But my quick glance lead to the understanding that this error is the same as actually (trying) creating too many displays, ie: no way to tell both events apart
So, straight up changing the error message wouldnt be nice for the other event
I think you can't determine the user's intent at the time, we can just offer an extra hint, making the text longer
paraphrasing: "too many display buses -- did you forget to release the current display?". That's a bit too long, but that's the idea
alright, yeah, makes sense
Closing this PR as I decided this board is so horrible it's better off being used as parts.
Good enough? "Too many displays. Forgot displayio.release_displays() ?"
How would i go about updating(spanish) and/or invalidating(other langs) translations?
It happens automatically.
let me look at the the msg...
The specific error is Too many display busses, so Too many display busses; need display.release_displays() ? or '; forgot`. Either is probably fine. What would you say in Spanish?
My doubt right now is... Is this even related to busses (hardware lines), or amount of display "objects"(probably RAM concerns)? I mean, error is not bad but maybe isnt 100% technically correct (plus a user may not know, and doesnt need to know, what a bus is)
Thats the only reason i removed "busses"
Is it hardcoded on the translations or whatever, making it hard to change the text?
There is already a "too many displays" error, which gets raised under different cirucmstances. The error specifically happens when you try to create a new display bus in the process of creating a new display.
Oh... guess i didnt look far enough in the chain of functions that get executed to get down here ๐
you can search for "Too many displays" and "Too many display busses"; i think you did already
the error is changed in the .c code, not in the .pot file, which is generated automatically. But I think I am telling you something you know already.
yeah, i figured that out, some magic going on to find strings and re-gen those
yeah, we look for translate(...)
(but i was looking at the code without "busses" on it, how dumb am i hahahaha)
the discord link in the issue has some specific failing code in it
Cant get pre-commit to like my changes, tried both make translate(as suggested by error msg) and make msgmerge(after digging Makefile), but still not going through
Translations..........................................................Failed
- hook id: translations
- files were modified by this hook
find extmod lib main.c ports/atmel-samd ports/cxd56 ports/espressif ports/mimxrt10xx ports/nrf ports/raspberrypi ports/stm py shared-bindings shared-module supervisor -type d \( -path "ports/*/build-*" -o -path "ports/*/build" -o -path ports/atmel-samd/asf4 -o -path ports/cxd56/spresense-exported-sdk -o -path ports/espressif/esp-idf -o -path ports/mimxrt10xx/sdk -o -path ports/raspberrypi/sdk -o -path ports/stm/st_driver -o -path lib/tinyusb -o -path lib/lwip -o -path extmod/ulab/circuitpython -o -path extmod/ulab/micropython \) -prune -o -type f \( -iname "*.c" -o -iname "*.h" \) -print | (LC_ALL=C sort) | xgettext -f- -L C -s --add-location=file --keyword=translate --keyword=MP_ERROR_TEXT -o circuitpython.pot.tmp -p locale
python3 tools/check_translations.py locale/circuitpython.pot.tmp locale/circuitpython.pot; status=$?; rm -f locale/circuitpython.pot.tmp; exit $status
Checking locale/circuitpython.pot
Missing message id. Please run `make translate`
{'Too many display busses; forgot display.release_displays() ?'}
make: *** [Makefile:256: check-translate] Error 255
find extmod lib main.c ports/atmel-samd ports/cxd56 ports/espressif ports/mimxrt10xx ports/nrf ports/raspberrypi ports/stm py shared-bindings shared-module supervisor -type d \( -path "ports/*/build-*" -o -path "ports/*/build" -o -path ports/atmel-samd/asf4 -o -path ports/cxd56/spresense-exported-sdk -o -path ports/espressif/esp-idf -o -path ports/mimxrt10xx/sdk -o -path ports/raspberrypi/sdk -o -path ports/stm/st_driver -o -path lib/tinyusb -o -path lib/lwip -o -path extmod/ulab/circuitpython -o -path extmod/ulab/micropython \) -prune -o -type f \( -iname "*.c" -o -iname "*.h" \) -print | (LC_ALL=C sort) | xgettext -f- -L C -s --add-location=file --keyword=translate --keyword=MP_ERROR_TEXT -o - | sed -e '/"POT-Creation-Date: /d' > locale/circuitpython.pot
what happens when you run make translate?
wait, am i dumb and im just missing a git commit locale?
[my possible suggestion above is not feasible, never mind, has to do with using qstrs in message]
yes, you have to add the modified circuitpython.pot to the commit
will also add to the PR an extra output line to the command making the suggestions (if i find where it comes from found!) to also tell about the file to be committed, thx
@AkshayaVarshieni14 are you still working on it, or is this issue free to be taken by someone else?
@diamant3 are you still working on this, or is it free to be taken by other people?
I don't think this is a good first issue anymore, because it's not clear what needs to be done. I'm going to remove the label.
@YashasviChaurasia are you still working on this, or is it free ot be taken by other people?
[adafruit/circuitpython] New comment on issue #4303: [FeatureRequest] configparser to read ini files
I don't think this is a good first issue, a whole library with proper api and tests seems like something an experienced programmer should make. Should we remove the label?
[adafruit/circuitpython] New comment on issue #2590: Strange problem with pin in use after power on.
I don't think this is a good first issue. It looks like a complex thing that needs a lot of knowledge to debug properly. Should we remove the label?
Should we remove the good first issue label until a decision is made what exactly needs to be done here?
@stuck elbow thanks for making this sweep; do you have privs to remove the labels in libraries and adafruit/circuitpython (or only the latter)? I can make executive decisions for thecircircuitpython repo
I do, but I don't feel like I have the authority to make the decision in most cases
i will trail behind and remove; i agree with all the choices so far
Should we remove the good first issue label until a decision is made what exactly needs to be done here?
done
there was only a handful, so I'm pretty much done in the main repo
the libraries don't seem as bad
Closes #8178
Suggest releasing displays upon allocation fails (and thus exception is raised).
Along the way i had a fierce battle with pre-commit because the error message ("run make translate") is incomplete, so i also took care of that
@diamant3 are you still working on this, or is it free to be taken by other people?
Yes it's free!, sorry.
Thanks for this, and also for the explication of what to do after make translate.
i messed up @tulip sleet ๐
display vs displayio
np, i'll approve another one; I should have seen that
omw
I will stop the builds so as not to waste resources
I've been working on a (still very incomplete) library for parsing TOML, see it here.
Sharing it in for visibility, just in case someone wants to use it or contribute, or core team wants to merge it (after some fixes).
Supported types:
- ints
- floats
- bin/oct/hex literals
- strings
- lists (details below)
Current workflow is
- For each line in the input:
- Iterate the line to find some metadata, eg tokens (like quotes or br...
translated latest (11) texts to spanish on weblate, are they automatically added to the PR or do i have to click some button that i didnt see?
@spare jacinth weblate I think uses a scheduled task to make a new PR; you don't have to do anything.
I'm just experimenting with circuitpython and I thought it would be fun to add support for our upcoming keyboard.
One thing I can't figure out is how to get the CIRCUITPY drive to pop up.
So far I'm only able to interact using the repl. It works to turn on the capslock LED and PWM backlight brightness.
This is the correct flash chip.
Take a look at other existing RP2040 boards, such as KB2040 and QT Py RP2040.
Initially I copied it from the QT Py RP2040. But the flash chip is different. So that config won't even run.
Once I change the flash chip description to the correct one, it runs but there's no folder.
guess i will need to compile a new board config, so asking here instead of #help
i have bought and am trying to setup a Luatos ESP32C3, however the code for it (https://circuitpython.org/board/luatos_core_esp32c3/) is for a prior version without UART/USB converter
looks like both manually running esptool, and using the web tool have actually flashed the firmware, and i even got the popup on the webtool to configure credentials (tho it didnt close, perhaps due to errors?)
right now i cant get to it by neither mu/thonny/putty (REPL) nor web workflow (files?)
is this a missing setting (letting CircuitPy about the UART/USB) or just part of C3 port not being completely done?
../../shared-module/displayio/Bitmap.c:219:28: error: comparison of integer expressions of different signedness: โuint32_tโ {aka โlong unsigned intโ} and โintโ [-Werror=sign-compare]
219 | for (uint32_t i = 0; i < self->stride * self->height; i++) {
and now i'm down to just compiler warnings, my distro is fairly strict by default
39 uint16_t height;
41 uint16_t stride; // uint32_t's
but the error doesnt make much sense, its already unsigned!?
u16 * u16 wont fit on another u16, seems like its getting casted to i32(int) automatically
what if you: for (uint32_t i = 0; i < (uint32_t)self->stride * self->height; i++) {
i would say thats a bug, it should have become a u32
i32 is also smaller then u32, so it might still truncate
[nix-shell:~/apps/rpi/circuitpython/ports/raspberrypi]$ make -j 16 BOARD=raspberry_pi_pico
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
QSTR not updated
/nix/store/7bir7rgpr9i95ky49cxpg9mk1x28il24-arm-none-eabi-binutils-2.35.1/bin/arm-none-eabi-ld: warning: -z relro ignored
/nix/store/7bir7rgpr9i95ky49cxpg9mk1x28il24-arm-none-eabi-binutils-2.35.1/bin/arm-none-eabi-ld: cannot find -lc_nano
collect2: error: ld returned 1 exit status
make: *** [Makefile:456: build-raspberry_pi_pico/firmware.elf] Error 1
@spare jacinth the cast does fix the compile error, now its on to a link error!
i have no idea what the "rules" are for type promotions inside the compiler's logic...
there's likely a good reason to default to i32 instead of u32, anyway i it works it works ๐
@tulip sleet any idea about this new link error?
we recommend you download the ARM toolchain specified in the guide rather than use what your distro provides. I will look at it.
I don't know, but I don't think so -- the binaries are built to work on a lot of different platforms
the toolchain ive loaded, is known to work on the pico
what version of gcc are you using
$ arm-none-eabi-gcc --version
arm-none-eabi-gcc (GCC) 10.2.0
i cant find c_nano in the source anywhere
that is similar to what we ask you to use here: https://learn.adafruit.com/building-circuitpython/linux#install-build-tools-on-ubuntu-2986713 See the "ARM Cortex-M toolchain" link
../../ports/mimxrt10xx/sdk/tools/cmake_toolchain_files/mcux_config.cmake: set(TARGET_LINK_SYSTEM_LIBRARIES "-lgcc -lc_nano -lm" PARENT_SCOPE)
only in another port, and git grep is being stupid and wont show it
we use ag a lot for searching
this does build without errors on the standard setup. I can't explain why yours is different.
do you know where c_nano.a is normally coming from?
it's in the toolchain we're using: gcc-arm-none-eabi-10-2020-q4-major/arm-none-eabi/lib/libc_nano.a
ahhh
my toolchain comes with newlib, but most of the things i build provide their own libc
simplest option then, docker!
that will fix my missing /lib and let me just apt-get install whatever the directions say
I just unpack the toolchain and put it on my PATH. It does not require a system install
See the link above and read the paragaph for explanation
Most people use Ubuntu 22.04. Scott (tannewt) uses arch
but the guide is written for 22.04
[clever@amd-nixos:~/apps/rpi/circuitpython]$ gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/bin/aarch64-none-elf-gcc
bash: gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/bin/aarch64-none-elf-gcc: cannot execute: required file not found
yep, fail, just like expected
it expects /lib64/ld-linux-x86-64.so.2 to exist
[clever@amd-nixos:~/apps/rpi/circuitpython]$ ls /lib
ls: cannot access '/lib': No such file or directory
[clever@amd-nixos:~/apps/rpi/circuitpython]$ ls /lib64
ls: cannot access '/lib64': No such file or directory
Do other boards show CIRCUITPY? (Just making sure there's nothing weird about your host system.)
Do take away the lines above; they are for an nRF board, and maybe some other things, not RP2040. Your mpconfigboard.h should look at a lot the Feather or QT Py RP2040.
You can try re-creating CIRCUITPY from the REPL:
import storage
storage.erase_filesystem()
but I'm thinking there might be something else wrong.
moved from other channel:
make remove-all-submodules at the top level will remove them all cleanly.
I took a look at https://github.com/adafruit/circuitpython/issues/8119
The naive fix seemed to be to add a reference to the circuitpython_typing online repo at:
https://github.com/adafruit/circuitpython/blob/8050b07a687277cb277e4c13de83cfdc076682d5/conf.py#L444
Unfortunately, there's some long-standing Sphinx issue, which doesn't
support the current mechanism that the adafruit-typing module uses
(https://github.com/sphinx-doc/sphinx/issues/8934)
The symptom: the Sphinx html generator looks for a class definition
for (say) circuitpython_typing.ReadableBuffer but the online repository
tags it as data (https://pastebin.com/21ZjBX3g) so it never gets resolved.
Am I missing a trick here?
I don't have an instant answer for that, but that sounds like good research -- can you add what you've learned to the issue as well?
Sg - fwiw, I saw there was some 'good first issue' cleanup going on, and this one seemed to get into the weeds; so maybe worth reviewing for that tag
little bump
Closes #4408
Adds the method in the title. First time i write a C-Python binding, please let me know if anything should be changed
- Should maybe remove the doctstring to follow other funcs not having it on the file
- Is there a way to extend existing array instead of duplicating? Could save a bit of space
My little test:
Adafruit CircuitPython 8.2.0-47-g8050b07a6-dirty on 2023-07-30; WeAct ESP32S3-B-N16R8 with ESP32S3R8
>>> from collections import OrderedDict
>>> d =...
Cleaning up my GitHub (removing the repo to mark if as a fork of Circuit instead of Micro) closed the PR, all information can be seen there.
Sorry for the inconvenience
@spare jacinth fwiw there's some ongoing upstream idea https://github.com/micropython/micropython/issues/6170 and I'm guessing the CP maintainers may have some thoughts on how best to merge this with that
good thing is: regardless of how items are inserted, this method should still work (unless the definition of the structure holding the data changes)
and we were lacking it anyway to have better coverage of CPython's API
Right - I was thinking (because of the new duplication of the method pointers) if it might become more tricky to merge any upstream changes, but (thankfully!) someone more experienced will no doubt figure this out ๐
@spare jacinth (I also found https://github.com/adafruit/circuitpython/blob/main/tests/basics/ordereddict1.py handy to add new tests for regression, maybe that could be another way to flag any breaking future changes... good luck ๐ )
im not sure what that file is used for, tho... other tests seem to have a .exp to match their output, but this one doesnt (?)
Yea - it's confusing (but better documented in micropython.) The way it seems to work is that for anything without a .exp suffix, it runs cpython first, and compares with micro/circuitpython output
oh, makes sense, lets see if i can run the test (and check its output)
I have an issue that I posted over at general help circuitpython chaneel, but I doubt anyone is going to be able to help me over there. Would someone mind taking a look at #help-with-circuitpython message. I'll pretty sure there's an issue in the sockpool lib. I can also file an issue on GitHub if that works better for you folks.
The "easy" solution seemed to be to add a reference to the circuitpython_typing repo around here:
https://github.com/adafruit/circuitpython/blob/8050b07a687277cb277e4c13de83cfdc076682d5/conf.py#L444
However, there's an additional long-standing Sphinx issue, which appears to have trouble with TypeAlias definitions (see https://github.com/sphinx-doc/sphinx/issues/8934)
The symptom: the Sphinx doc generator looks for a class definition for a TypeAliased definition like
`circui...
- Adds circuitpython_typing to the intersphinx configuration.
- Adds a workaround to resolve TypeAliased references.
fyi @onyx hinge - not a high priority; I tried to find the least unappealing workaround while I was looking at it.
Thanks! this makes sense. I didn't look at the generated docs, though.
Thx for the quick turnaround! I downloaded the docs.zip artifact from the passing workflow for this PR, and did a spot check on a few files - they seem to have a clickable link in place now.
I guess I'll give an update on something I did last year (or maybe earlier this year) where this is relevant:
I wrote a CircuitPython (in C) to allow for playback of real-time generated audio, for use in synths. (No, I haven't pushed, because I haven't been able to fully test it; read on.) It seems to work, but I can't generate synth audio in CircuitPython fast enough to keep the buffer filled. That makes the audio generated sound really bad. Access to the second core might solve thi...
confirmed it's now correct in our published docs as well: https://docs.circuitpython.org/en/latest/shared-bindings/analogbufio/index.html#analogbufio.BufferedIn.readinto
Thanks for your sleuthing and a workable workaround!
Thanks @wtuemura, @bergdahl, and @andibing!
Thanks @wtuemura @bergdahl @andibing @elpekenin !
Oops, let get the issue linked to this PR too.
Closes #7615
TIL, thx again Dan :)
CircuitPython version
Adafruit CircuitPython 8.2.0-45-g75ba17e84 on 2023-07-28; ESP32-S3-DevKitC-1-N8R2 with ESP32S3
Board ID:espressif_esp32s3_devkitc_1_n8r2
Code/REPL
import board
import adafruit_rgbled
import neopixel
import wifi
import os
import socketpool
import ipaddress
import microcontroller
def processNetMsgs():
try:
buff = bytearray(128)
numbytes, addr = sock.recvfrom_into(buff)
if numbytes:
...
Is this a place (channel) for getting assistance adding support for a board? specifically waveshare esp32-s3-pico
Specifically troubleshooting getting it to run on the board after compiling (or configuring correctly to get to run on the board)
Title says installed on new ESP32-S2 Feather but links at the bottom to the ESP32-S2 TFT UF2. The ESP32-S2 Feather is different from the ESP32-S2 TFT. When posting the board's boot_out.txt it's best to include everything in it except the UID.
Very cool script. It's best to include a check for if connected to wifi with a try/except while making the request or ping. If Wifi goes down during the return it might crash the script. I don't think it would crash to safemode though. Checking for ...
Whenever someone says Python is slow compared to C, I ask to look at their code. Usually, I find they are writing in Python as if in C.
For example, this is โdead dog slowโ in Python but fast in C:
For i in range(something):
Someting(i) = something(i) +1
You should ALWAYS write this as
Something += 1
If โsomethingโ is a numpy array object, the above will likely be as fast as possible on your hardware, possibly even using vectorized math instructions. The first version doe...
I am extremely experienced in both Python and C. I do know how to maximize efficiency in both. That said, I don't typically use Numpy, because in my day-to-day work, if I need efficiency badly enough to bother with Numpy, I'm better off just using C directly. Unfortunately, writing C modules for CircuitPython is far more difficult and complicated than writing C modules for desktop Python. (And half the time, for my job, instead of writing a Python module, I just make a C executable and ...
@chrisalbertson
On a side note, using += is only marginally faster on my machine. There's a way to go far faster though.
for i in range(100000000):
a = a + 1
That takes 7.719s
for i in range(100000000):
a += 1
This takes 6.479s
a += sum({1 for i in range(100000000)})
That looks more complicated, because it generating a full list and then taking the sum, but it only takes 2.374s
If you do a = a + ... on that last...
Use the viper code emitter and you can the same back end native code that C uses,
Can you REALLY write C code that is as good as Numpy? Maybe. But a lot of smart people have spend time making numpy very fast. You could duplicate this work if you know about both numeric algorithms and the hardware in the chip.
OK, you had to write an RTOS, But Micropython already runs on Mbed. So it has a pretty good RTOS foundation. Multitasking and all.
On Jul 30, 2023, at 1:44 PM, Ben...
Well, let's see, I taught several semesters of college level ARM assembly, which included the use of vector instructions. You have to be good at numeric algorithms to write good audio synthesis code. The RP2040 has some hardware I'm not that great with (the PIOs mainly), but I don't need to use those for this.
Yeah, I think I could manage. In fact, I could probably one-up Numpy if I wanted to. See, Numpy is highly generalized, so that it will work with a broad range of applications. ...
Ran his code and was able to replicate the hard fault.
Adafruit CircuitPython 8.2.1 on 2023-07-25; Adafruit Feather ESP32S2 with ESP32S2
Board ID:adafruit_feather_esp32s2
code.py output:
https://api.open-meteo.com/v1/forecast?latitude=40.7259&longitude=-74.0055&daily=precipitation_sum,precipitation_probability_max¤t_weather=true&temperature_unit=fahrenheit&windspeed_unit=mph&precipitation_unit=inch&timezone=auto&past_days=3
Precipitation history: 0.0
Future pr...
Adafruit CircuitPython 8.2.1 on 2023-07-25; Adafruit Feather ESP32S2 with ESP32S2
Board ID:adafruit_feather_esp32s2
Setup AP and was able to connect to it with my phone. Green light on, everything looks good.
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
WiFi SSID: CustomNet
MAC addr: [obfuscated]
AP IP addr: 192.168.3.192
Time : 1843.76
After a while decided to soft reboot to see if that in itself would ca...
hi folks, if ya need to chat more please use discord so we can keep this thread on topic.
also, please check out synthio, you may be able to add whatever filters/generators to it - we are always happy to look at and help with PRs!
Appologies. I was not trying to clutter up this issue, and there are some bits that are still relevant. I'll quiet down in here.
I've looked at synthio before, and it was too primitive for my needs. Looking at that though, it seems to have come a long way, so I'll give it another look. If I do go the route of working in C, adding to an existing module would be far simpler for me than trying to make yet another one from scratch. Thanks for the suggestion! (Is there somewhere appropria...
(just a quick sanity check) on the esp32, is it feasible to implement a useful countio without a dedicated pulse counter peripheral? (I was rueing the lack of countio on an esp32c3, and realized it doesn't have such a peripheral.)
probably would require creative use of some existing peripheral. maybe rmt?
Will read up more on it - thx for the pointer!
This is an ultra-naive question - is pulseio already built on the rmt peripheral on the ESP32? (So one might creatively do any countio equivalent entirely in python?)
no, looks like the existing implementation is using PCNT
Discord is https://adafru.it/discord. The #help-with-circuitpython channel is for help; #circuitpython-dev is appropriate if you want to build CircuitPython or add features.
Oh, ok! (I was confused by https://github.com/adafruit/circuitpython/blob/55c82f45daf797af7de6d1edf86082a21f9df7d7/ports/espressif/common-hal/pulseio/PulseIn.c#L119 - I'll continue poking around with it - this is mostly for my weekend entertainment, so non-critical for sure. thx again for the tips!)
I was looking at countio/Counter.c, sorry for any confusion
After some discussions on Discord, another possibility to rule out:
Having CIRCUITPY_WIFI_SSID and CIRCUITPY_WIFI_PASSWORD in settings.toml will enable web workflow with auto-connect. That makes this device a wifi station trying to connect to the same SSID and password that this device's Access Point is using. That's probably an unnecessary complication. Separate settings.toml settings could be used for the AP credentials, and if web workflow isn't needed, those credentials could b...
CircuitPython version
Adafruit CircuitPython 8.2.1 on 2023-07-25; Raspberry Pi Pico W with rp2040
Code/REPL
import mdns
import socketpool
import wifi
from adafruit_httpserver import Server, Request, FileResponse
mdns_server = mdns.Server(wifi.radio)
mdns_server.hostname = "helloworld"
mdns_server.advertise_service(service_type="_http", protocol="_tcp", port=80)
pool = socketpool.SocketPool(wifi.radio)
server = Server(pool, "/static", debug=T...
CircuitPython version
CircuitPython at 55c82f45daf797af7de6d1edf86082a21f9df7d7
Code/REPL
# Building for beetle-esp32-c3 causes a non-critical error because of a
# typo in sdkconfig
Behavior
$ make BOARD=beetle-esp32-c3 PORT=/dev/ttyACM0 clean flash
...
/tmp/confgen_tmpoavy933y:4: warning: malformed string literal in assignment to LWIP_LOCAL_HOSTNAME (defined at esp-idf/components/lwip/Kconfig:3). Assignment ignored.
Also see logs...
Verified there was a clean run when loading sdkconfig in the workflow for this PR - https://github.com/adafruit/circuitpython/actions/runs/5710905904/job/15471827713?pr=8240#step:10:46
Is web workflow enabled via a settings.toml file?
Does it make a difference if wifi.radio.connect is moved before mdns_server.advertise_service?
A MiniDisc!? (a line from scooby-doo where velma finds a minidisc on the floor as part of an investigation, can't find it now)
Trying to explain the many features of this contraption and adding to it is the fun part. It's essentially just a disk drive but has otherwise completely redundant physicality details to commentate.
The main slide tray has 2 prod sticks which prod the minidisc out of the slot so it falls on the floor in amusing fashion.
It obviously also has a spindle motor for the actual disc which has decals.
There's a driving ring which looks complex and all it does is moves an axle 1 unit upwards to lock the minidisc in place.
Then it has (and why not) a Pneumatic Laser Arm with no air in it.
```I did consider while adding each feature that if you add a circuitpython device to this (or a motor to each motor and a pump to each pump)
and if the spinning disc were actually made out of actual optical glass & polycarbonate substrate, then it might actually work as a storage device -_(\
@Rybec
Python is slow compared to C.
The statement is obviously false, especially when we discuss Numpy functions coded in C and Fortran. Moreover, your own C code will always be slower than Numpy code if you do not utilize vectorization and other techniques implemented in Numpy. And with the Numba Python library, we can achieve pure assembler performance (though I suspect it may not be available in Micropython yet). I can certainly back up my claims: you can find my satellite interf...
So out of desperation I just tried commenting out the line that sets the static IP for operating in AP mode and it did not enter safemode. It ran all night (12 hours) with out a hiccup. The updated code is below that worked. I did take out more things that were not related. So its a more condensed version now.
import board
import wifi
import os
import socketpool
import ipaddress
def processNetMsgs():
try:
buff = bytearray(128)
numbytes, addr = sock.re...
I don't have a safemode.py but I do have the following boot.py:
import usb_hid
# This is only one example of a gamepad descriptor, and may not suit your needs.
GAMEPAD_REPORT_DESCRIPTOR = bytes((
0x05, 0x01, # Usage Page (Generic Desktop Ctrls)
0x09, 0x05, # Usage (Game Pad)
0xA1, 0x01, # Collection (Application)
0x85, 0x04, # Report ID (4)
0x05, 0x09, # Usage Page (Button)
0x19, 0x01, # Usage Minimum (Button 1)
0x29, 0x20, # ...
there was a website with a list of issues from (all?) repos, but i cant find it... can someone share the link for me to bookmark?
would like to try and fix some ๐
ha, my keywords "adafruit contributing" should have been "circuitpython" instead
ended up with links to docs for how to make a PR and the like
thx ๐
@tulip sleet if you have a bit of time a review of https://github.com/adafruit/circuitpython/pull/8218 would be appreciated! -- it also goes with a related change in a submodule, see comment from last week.
Unfortunately, this change is overflowing the available flash size on a few builds :-/ there's no easy solution for this, the resolution may be to choose not to include it, or to disable some other feature on the failing board.
I think the W25Q80DV chip is 8Mbit = 1 megabyte.
By default, CircuitPython allocates the first 1MB for the firmware and the remaining portion for the CIRCUITPY drive. In this case, that means there's no left over space, so the CIRCUITPY drive can't be formatted or mounted.
You can check out the raspberry pi pico w board definition for how to change this default. That board allocates a LARGER space for the firmware. You would try allocating LESS such as 900*1024 (900k), as the size o...
I did see the other issue that mentioned web workflow. I've tried completely erasing the contents of my settings.toml along with deleting it entirely and had the same issues. As far as I'm aware I'm not using the web workflow at all but I could still be missing something.
I've tried moving it before, after, inside functions, outside functions and the conclusion I came to was that if I put mdns_server.advertise_service inside of an async function then it won't work at all, but if I put ...
Nice way of doing any and all!
Where does this magic number 6 come from? Could it be made more robust?
Is this test code? Did you mean to leave it here in the PR?
Could you add a comment about how to use these, with $(call ? Just an example would be fine.
I wondering if a more explicit name would be good: is-1-if-all-1, is-1-if-any-1, or maybe you can think of a better name.
sure! reviewed
Cool, as long as CIRCUITPY_WIFI_SSID / CIRCUITPY_WIFI_SSID aren't in settings.toml, there won't be a conflict of two MDNS servers using _http._tcp..
6 is the length of "../../". the old 7 was the length of "$(TOP)/". The difference is because in the new way of doing things, the value has undergone make variable-expansion.
I think I would feel more comfortable with a .remove_prefix() (https://docs.python.org/3.9/library/stdtypes.html#str.removeprefix, Python 3.9 and later) or an re replace, since then what's going is explicit.
The thing that is not great about remove_prefix is it's not exceptional if the expected prefix isn't present, but it is still a more explicit way to do the slice. @tulip sleet I think I addressed everything except the function names, which I am not sure your suggestions are better than my originals but I'll change it if you have a strong opinion.
I am interested in detecting if the prefix is wrong, since it could change out from under the code. Ohterwise it will fail in some mysterious way. So however is the easiest to do that would be good (replace failure or whatever).
Re names, don't have to change. I was just trying to indicate this is very specific to 0's and 1's, as opposed to using $(filter or something like that. That's why I asked for an example in a comment.
OK. does a comment referring the interested reader to a use below "cut it", or do you want the example right there?
the current new comment is great!
OK now the prefix is checked
i have to go out for 45 mins or so; will pre-approve
thanks dan, appreciated as always
Yeah, should i add a new #define + #ifdef to control whether the API's code gets added?
Could also add the method to dict's table, but this breaks worse than fixes:
- i dont think the method exists on regular dicts
- would only save a few bytes (not duplicating a couple of pointers and whatnot across two tables)
<@&356864093652516868> The meeting is in an hour and half today. See the pinned message for the notes doc. Talk to you soon!
According to my ISP shouldnโt expect my internet to be back online for a couple hours.
enjoy your time on the desert island
Didn't update the notes but just here lurking today while I review exceedingly exciting documents...
I'm going to assume there may be an element of sarcasm in that statement
maybe ๐
it's pretty good after turning david up to 200% in the right click menu
I haven't messed around with SynthIO yet. I've gotta get on that!
LIVE from the Hack Chat!
Date is now permanently every Monday morning US Eastern time
You can also email circuitpythonday (@) adafruit.com with your own events for CircuitPython Day!
thank you new & infrequent contributors! โค๏ธ 
I'd love to help review where I can, can someone help me get set up after the meeting?
We will want another 8.2.x release soon, due to the Adafruit IO certificate change. There's an open (I think*) PR for it, but not an Issue.
Yup!
If there is nothing else urgent, I can do this tonight or tomorrow, since it's a blocking issue for many people
@tulip sleet brent did check out the build and confirmed it can connect to IO. but if the actual certificates in nina-fw changed during your troubleshooting session on friday/the weekend I can update the PR again.
I am talking to brent about whether that's true or not
Is there a list of libraries available for Blinka
Yup! https://docs.circuitpython.org/projects/bundle/en/latest/drivers.html should be at least some of them
Edit: oops, I read blinka as CircuitPython! Most of them should work though
@royal rover you can search pypi based on package name https://pypi.org/search/?q=adafruit-circuitpython-&o= though a small number of packages that are not expected to work on blinka/desktop python are published on pypi anyway.
[and based on David's hug reports I second the HR to scottyp humanIthink and tyeth for bringing the issue up over here on the discord; I didn't directly see that part of the process]
Certificate are a pain...
nice to hear from you @thorny jay !
Micro Dot
If that's what I think it is, the display is about 0.3" (7.62mm) wide, the same as a classic DIP IC
thank you everyone, have a great week!
Thank you, everyone!
And remember
You can also email circuitpythonday (@) adafruit.com with your own events for CircuitPython Day!
we'd love to have your participation!
Bye everyone! Have a wonderful week!
August 7
Thanks Scott
Thanks for hosting Scott, have a great week everyone!
Yeah, should i add a new #define + #ifdef to control whether the API's code gets added?
Yup. We use #if instead of #ifdef so we make sure that the setting has a defined value. There are many examples of that in various places.
Instead of making yet another flag, there is a kitchen-sink one called MICROPY_CPYTHON_COMPAT which turns on various extra features. I think this feature should be controlled by that for now, so that it's not added for the smallest builds. In the long run ...
No worries, we're not in a rush :D
Will add the new #if soon, and make the #else do ordered_dict_locals_dict = dict_locals_dict
Let me know if any code should be re-written for readability/matching codestyle of the repo
Like this:
The "problem" with (most) Pimoroni product is that they have a Python driver for the Raspberry Pi SBC and a driver (maybe C) for thier own version of MicroPython. When a compatible CP library exist, it is possible to quickly reuse their hardware, else you are on your own.
The Daisy platform is amazing. Canโt wait to listen to the meeting to see why it came up
it is unrelated to the meeting. I found it via a video rec on the adafruit account as I was doing post-meeting stuff
@turbid radish @idle owl I don't need to do versions anymore right? only the meeting links and py dev of the week
Nice. Daisy is used in several commercial products now. Theyโve got a great ecosystem if you need real-time audio processing & generation. I just learned recently you can pretty easily load Pd or Max patches from your computer onto a Daisy. Thatโs a bit mind-boggling
I watched the pocket piano 201 video and then was recommended one on chompi. My natural tendancy is to figure out what the guts are. ๐
@digital ibex I've got time now if you want to chat about reviewing
Ok, should I hop in the voice channel?
sure, that may be fastest
"Clone failed: A submodule points to a commit which does not exist." ๐ฆ
does it say which one?
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/1vJq1BU6TdWuTJVSCUKHbE4F6m4ZoIcEMsjPUotB5LZg/edit?usp=sharing
Google Docs
CircuitPython Weekly Meeting for August 7th, 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 par...
it doesn't say which one, trying again in case it was a fluke
it can happen if a commit is in a different branch/repo than the one listed in .gitmodules
I'd prefer to be strictly TOML. By varying, you are leaving the potential for non-portable code.
Automated website update for release 8.2.2 by Blinka.
strict TOML
Ok, noted, thanks for the feedback.
Will try and get it pushed tomorrow, any other ideas so far?
How do I flash the bin to the board? I'm not sure what bootloader it has.
Only change is updated Adafruit IO SSL certificate
thank you!
How do I flash the bin to the board? I'm not sure what bootloader it has.
It comes with some bootloader that pulses when reset is double-clicked. But I was not able to load anything with that bootloader
.
MicroPython says to use dfu-util, but this did not work for me. It said there was no DFU device.
I also tried uploading Blink from the Arduino IDE (2.x.x) and that did not work either.
An Arduino Forum user [told](https:/...
When I first tested and rotated the display, I didn't notice that I had set the wrong RGB order bit. It is fixed now.
Do other boards show CIRCUITPY? (Just making sure there's nothing weird about your host system.)
Yep. QT Py 2040 works.
By default, CircuitPython allocates the first 1MB for the firmware and the remaining portion for the CIRCUITPY drive. In this case, that means there's no left over space, so the CIRCUITPY drive can't be formatted or mounted.
Ohh thanks. Yeah that must be it. Currently our flash size is only 1M. I'll try it later.
It's not really a dev board, so it's not a pri...
Hi sorry. yeah, as Dan said, you need to short the B1 pin to ground and flash via esptool or web serial esptool.
Ok, I've got it loaded. One thing I noticed is that the D13 LED is always on. I suspect this is due to the default pin state. You'll want to override it in boards.c
The safe mode blink on mine was red instead of yellow and I'm not sure why. I can do yellow on the LED myself through code.py.
Looks good to me. I didn't test but this will go into 9.x and get tested with it. Thanks!
Alright, I was able to compile and get a debug build running. But the backtrace gets corrupt each time after multiple attempts. I will trying in hopes I can get one that doesn't.
Here's the debug output:
FHFuRiBc)Ri~cI (215991) wifi:new:<1,1>, old:<1,1>, ap:<1,1>, sta:<0,0>, prof:1
I (215991) wifi:station: 58:1c:f8:a7:d7:e4 join, AID=1, bgn, 40U
I (216021) esp_netif_lwip: DHCP server assigned IP to a station, IP is: 192.168.99.2
I (217031) wifi:<ba-add>idx:2 (ifx:1, 58:1c:f8:...
I just realized double checking, i think i made it backwards (ie: should have been num_blocks <= count ๐คฆโโ๏ธ
I don't know which one of you or all devs who decided not to wipe nvm during a circuit python install but huge hug to you. ๐ค I had an API token stored in NVM, installed CP 8.2.2 and the token was still there and picked up right where it left off. Have no idea how or why that worked but thank you for allowing that possibility to exist. 
we never want to destroy people's work. And that's the way the UF2 bootloader worked anyway ๐
FYI This PR needed to update .gitmodules to point to @jepler's ulab repo because of the fix commit: https://github.com/jepler/circuitpython-ulab/commit/3728d22732dedc8a591b7df18a16d3ef1aed6a39
(teensy's bootloader wipes all of flash)
- Raise an exception when creating a USB device when host isn't initialized.
- Mark RP2040 dtcm_bss as NOLOAD since it doesn't need to be loaded (just zeroed.)
- Fix submodule location for ulab to Jeff's copy.
Do we want to merge this or close?
I'm going to close this because the Building CircuitPython learn guide is the de facto place for dependency install instructions. Thanks for the PR anyway!
I'm going to close this since it will be redone with the switch to IDF 5 #6913
@slender iron I don't have any teensy's... would that apply to the iMX?
nope, just teensies
awesome ๐
https://github.com/jepler/circuitpython-ulab/commit/3728d22732dedc8a591b7df18a16d3ef1aed6a39 was merged to their main branch so it should be OK?
The need to change the ulab submodule seems weird, as the change was merged by
CircuitPython version
Adafruit CircuitPython 8.2.0 on 2023-07-05; ESP32 Devkit V1 with ESP32
Adafruit CircuitPython 8.2.2 on 2023-08-01; VCC-GND Studio YD RP2040 with rp2040
Adafruit CircuitPython 8.2.0 on 2023-07-05; Adafruit KB2040 with rp2040
Code/REPL
def __example_print(string):
print(string)
class ExampleClass():
def __init__(self, string) -> None:
self.string = string
def do_print(self):
__example_print(self.stri...
CircuitPython version
Adafruit CircuitPython 8.2.0-beta.0-9-ge631350b9 on 2023-06-06; Metro MIMXRT1011 with IMXRT1011DAE5A
Board ID:metro_m7_1011
Code/REPL
import board, busio, sdcardio
spi = busio.SPI(board.SCK, MISO=board.MISO, MOSI=board.MOSI)
print("before config:", spi. frequency)
while not spi.try_lock():
pass
spi.configure(baudrate=30_000_000) # max according to mimxrt10xx/common-hal/busio/SPI.c
spi.unlock()
print("after config:", spi.fre...
This limitation perhaps should be mentioned here: https://docs.micropython.org/en/latest/genrst/index.html, but it's not.
You might want to file an issue in the MicroPython repo. We generally leave the language implementation as is (not always), and await additions from upstream.
The boards are not meant for general purpose IO, so we don't need many of the circuitpy modules.
I removed a bunch of them to get the fw size below 512K. Now there's plenty of space for the CIRCUITPY drive and it does work!
Just in case: Dont merge yet, i think key is positional-only right now (forgot its QSTR on the structure which parses args)
@stuck elbow are you able to share your streaming mjpeg code with me?
https://readthedocs.org/projects/circuitpython/builds/21473048/:
Error
Your documentation did not generate an 'index.html' at its root directory. This is required for documentation serving at the root URL for this version.
Build #21461183 succeeded (272a2dcdb0230cd13a6c7cc974805a919ef13a8d).
Build #21473048 [fail...
It doesn't help much to have a camera on your robot, if you don't do anything with the video. Displaying it on a display is cool, but not really that useful when it has to be attached to the same device. Vision algorithms are still a bit too advanced to me, so I decided to try the other useful option: streaming it into a browser.Displaying a sin...
thank you!
can't really verify this one until pushed to rtd on main branch :( but I looked locally and now have an index.html with content
<html>
<head><meta http-equiv="refresh" content="0; url=README.html"/></head>
</html>
CircuitPython version
Adafruit CircuitPython 8.2.0-49-g55c82f45d-dirty on 2023-08-01; DFRobot Beetle ESP32-C3 with ESP32-C3FN4
Code/REPL
#### a couple of reproducible examples
import wifi
import socketpool
wifi.radio.connect("mySSID", "myPASS")
pool = socketpool.SocketPool(wifi.radio)
sock = pool.socket(pool.AF_INET, pool.SOCK_STREAM)
sock.bind((str(wifi.radio.ipv4_address), 9876))
sock.listen(10)
sock.close()
# Blocks rather than raising EBADF...
closes #8246
can't really verify this one until pushed to rtd on main branch :( but I looked locally and now have an index.html with content
this version is for 8.2.x. If we're going to merge 8.2.x to main soon then #8247 can be closed.
Hi There:
I've updated the SPI and LED pins on my board. Accordingly I have updated to pins.c and mconfigboard.h to reflect the new pin assignments.
Thanks!
I could rewrite the i2c initialization code to use common hal but it was nice that I could essentially copy & paste the code out of tinyuf2
I had trailing white space. Will fix and resubmit.
Hi There:
I have removed the trailing white space. This commit updates the LED and SPI pin assignments (pins.c and mpconfigboard.h) for the BrainBoard Neuron. The SPI pins were changed and a board re-design.
OK but there's STILL the problem that bitmaptools.blit doesn't appear in the documentation that I can see! https://docs.circuitpython.org/en/latest/shared-bindings/bitmaptools/index.html
aha! the stub needs to be dedented 1 level
no that's not the only problem
this prevented bitmaptools.blit from properly appearing in documentation.
oh the other problem was my own making. yay.
I had trailing white space. Will fix and resubmit.
For next time: No need to close and resubmit. New commits to the same branch will automatically be included in an open PR.
Still waiting for the bureaucracy here before I can really materially contribute (my boss is ex-Cisco and wants to get all liability ducks in a row and thoroughly documented). Thinking that I may try putting together a little guide for navigating such waters. Maybe subsection of contributing? Or Adafruit learning?
That's where I was thinking, yeah. There is already some mention of the possibility of needing approval but, a bit sparse on details.
There's been mention of a waiver document of some sort, so, once that's figured out, I'll do a write-up and maybe see if there are documents/guidelines from the FSF to help folks in startups and other companies that aren't necessarily FOSS-averse but FOSS-inexperienced.
Hi Scott:
Awesome. Thanks!
bye for now,
Jeremy Littler
LEAD Emerging Technologies
The Creative School
Toronto Metropolitan University
416-979-5000 ext. 552222
RCC 353
On Wed, Aug 2, 2023 at 12:59โฏPM Scott Shawcroft @.***>
wrote:
Merged #8251 https://github.com/adafruit/circuitpython/pull/8251 into
main.โ
Reply to this email directly, view it on GitHub
<https://github.com/adafruit/circuitpython/pull/8251#event-9990419...
Ah true! Please make another PR. Thanks!
Maybe rename them too :-)
I wonder if something changed with GitHub. make fetch-all-submodules isn't working for me if I use the repo it was merged into.
Here is my esp32-camera failure even though I merged your PR yesterday:
fatal: transport 'file' not allowed
fatal: Fetched in submodule path 'ports/espressif/esp32-camera', but it did not contain 2cd2a6d69faaba9ebb6105814a50039d82e2f899. Direct fetching of that commit failed.
I think a read will boost the speed back up. This is an artifact of the constructor only doing the init at 250khz. Implementation is here.
What is the frequency after doing the wave file read?
Some open source projects will have you agree to a contributors license agreement (CLA): https://en.wikipedia.org/wiki/Contributor_License_Agreement
A Contributor License Agreement (CLA) defines the terms under which intellectual property has been contributed to a company/project, typically software under an open source license.
Thanks! I'm wondering as well if you folks have had any thought yet on project governance considerations with the CRA heading for adoption in the EU. (Maybe more of a weekly meeting question).
I'm not aware of what the CRA is. (I'm in the US)
I'm in the US too but it is looking like global open-source may be impacted (intentional in the committee version, pending on negotiation w/ the current rotating executive to finalize). It is the Cyber Resilience Act. Much of it seems rather sensitive but, currently it's looking likely to "left-shift" CE security/process certification liability for open-source software and hardware to the projects themselves, if they are to be available in the EU.
I take the THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND portion of the license literally. Any support I give is a bonus.
@onyx hinge I had to delete my .git/modules/ports/espressif/esp32-camera/ folders after deinit. sync doesn't seem to update the tracking branch
Agreed. That's a pretty central concept in most FOSS licenses. We won't know for certain how it stands until Sept, but the committee draft intent seems to be to explicitly nullify such terms. Here's an Apache Foundation article: https://news.apache.org/foundation/entry/save-open-source-the-impending-tragedy-of-the-cyber-resilience-act
By: Dirk-Willem van Gulik, VP, Public Affairs, ASF ย TLDR;ย Software, including open source, is becoming regulated the world over. This lengthy blog post explains the background to the Cyber Resilience Act in the Europe Union, what is good, its flaws and the likely negative impact on open source. And it also explains the arcane process [โฆ]
Did you try make remove-all-submodules and then make fetch-all-submodules? Did .gitmodules change?
If/when that becomes law I'm sure Adafruit will chek with lawyers to determine the response. Until then it's not clear why we'd do anything but the status quo.
I've been in a lot of liability and licensing discussions in my day job as of late so, might be a bit hyper-aware at the moment.
I appreciate you have good intent bringing it to our attention ๐
The need to change the ulab submodule seems weird, as the change was merged by
* [Fix -Wunused-variable diagnostic when !ULAB_SUPPORTS_COMPLEX v923z/micropython-ulab#631](https://github.com/v923z/micropython-ulab/pull/631)
Yup, weird. I think it may have to do with my submodules tracking the wrong branch. (Sync doesn't sync them.) I've reverted that bit.
As title, correcting #8235 (see comments)
Apparently i cant make PRs without introducing further isues :,) This should sort it out for once and for all. Didn't rename the argument because it is part of the API (also used on other functions) and didnt feel like changing every port's code just to get slightly-easier-to-read code.
@tannewt friendly ping
I didn't do remove. I manually removed the troubled one.
stuff like control+arrow not working on REPL is an issue with app connecting to the serial port (Mu currently, but im pretty sure Thonny did the same), or that's simply not handled by the code on fw?
seems like it is the later and there's a good reason (code complexity?) for it, but if it feels somewhat feasible to implement i could poke at it ๐
that should probably go towards MicoPy tho, i assume
I don't know what control+arrow is meant to do ๐
on right/left, move entire words instead of single chars
on up/down, most likely nothing special ๐
There is somewhere where we interpret the special vt100 codes
I know the display spot but not the repl one
funny enough, shift+control+left/right does select entire words, lol
so, the logic is there already, hopefully not too coupled with select-mode
yeah, definitely some terminal stuff in play too, putty doesnt select on whole words
so... sadly, something with no fix :(
I'm sure you could fix it. It just won't be easy ๐
support for using key as kwarg added, and also realized i had no KeyError(to match CPython), but output is ```py
d.move_to_end("foo")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError:
```copied from the only place i found that raises aKeyError(in my case:if (!found) mp_raise_type(&mp_type_KeyError);)
so.. it is not returning the key (?), how do i set it up? ๐
a quick grep shows mp_raise_type_arg(&mp_type_KeyError, field_q);
there is also mp_raise_msg_varg(&mp_type_KeyError, MP_ERROR_TEXT("pop from empty %q"), MP_QSTR_set);
need to work on searching skills, thx that should be it
I use ag, aka the silversearcher
i use Ctrl+Shift+F, aka VSCode's builtin lol
(Just my 0.02) depending on each company's culture/lawyercats of course - it may be helpful to start with a set of licences (rather than specific projects). and see if it's possible to pre-approve contributing in one's personal capacity to repos only governed by those licences.
This is not generally how we do self handling. Instead, delete this line, and use the suggestions below.
Change the mp_arg_parse_all() to:
mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
Change the self assignment to:
mp_obj_dict_t *self = MP_OBJ_TO_PTR(pos_args[0]);
Don't use ARG_self:
enum { ARG_key, ARG_last };
Could you add some tests to tests/basic? There are some OrderedDict tests there already. Add a new one. See tests/README for whether you need a .exp file or not. The testing procedure runs the test in both CircuitPython and CPython (regular Python). If they are the same the test passes. If the tests might not be the same, then a .exp file is provided that is the result one would expect from running the test in CircuitPython.
@spare jacinth interpreting ctrl-arrow into the propre code is likely a PC-side thing. Mu does things on its side like sending the right amount of "move left/right" when clicking in the "command line".
But there is extended (while still limited) emacs keys support that can be enabled with MICROPY_REPL_EMACS_KEYS and MICROPY_REPL_EMACS_EXTRA_WORDS_MOVE
https://github.com/adafruit/circuitpython/blob/main/shared/readline/readline.c
don't ask me how I ended up in this section of the code a long time ago
getting this when trying to compile py ../../extmod/ulab/code/numpy/vector.c: In function โvector_sinc1โ: ../../extmod/ulab/code/numpy/vector.c:787:20: error: conversion from โmp_float_tโ {aka โdoubleโ} to โfloatโ may change value [-Werror=float-conversion] 787 | if (fpclassify(x) == FP_ZERO) { | ^ adding -Wno-float-conversion didnt work as Makefile contains -Wfloat-conversion, does this happen to somebody else?
commenting out on Makefile does workaround, ofc
(WSL with Ubuntu22)
Update: Fun, test gets skipped hahaha
https://github.com/v923z/micropython-ulab/pull/636 was for a similar issue, wonder if this is a new one or somehow didn't get merged (edited to refer to the fix)
we probably didn't update ulab again since the fix went in?
I'm thinking of making adafruit_usb_host_descriptors and adafruit_usb_host_mass_storage libraries. Any alternatives I should consider?
One is helpers for reading and parsing descriptors, the other is for interfacing over mass storage.
We use it to open endpoints as they are used. Fetching the descriptor as needed can cause issues with devices that we're expecting a control packet while another transaction was ongoing. Specifically, a usb thumb drive didn't expect a control transaction while doing a SCSI transaction.
This PR also aborts transactions on timeout or ctrl-c interrupt. It doesn't always recover though...
any idea why it gets ignored? and/or how to prevent it?
seems like --target esp32 and/or building the variant/coverage unix port (did it even get used?) got the test to run, but it wont pass checks because of different format, shall i rather make a long .exp for one of existing folders, or make a new test? well, i can perhaps print the keys instead of whole dict
(I had the impression a good place to make any changes would be in the upstream repo) but I've also forgotten what I actually poked at around this.
Here are the test failure details:
True
abcdefghij
abcdefghij
-odict_keys(['a', 'b'])
-odict_keys(['b', 'a'])
-odict_keys(['a', 'b'])
-odict_keys(['b', 'a'])
-odict_keys(['a', 'b'])
-odict_keys(['b', 'a'])
-odict_keys(['a', 'b'])
+dict_keys(['a', 'b'])
+dict_keys(['b', 'a'])
+dict_keys(['a', 'b'])
+dict_keys(['b', 'a'])
+dict_keys(['a', 'b'])
+dict_keys(['b', 'a'])
+dict_keys(['a', 'b'])
FAILURE /home/runner/work/circuitpython/circuitpython/tests/results/basics_ord...
Should i have that many tests, for every combination of positional and keyword usage (made that to confirm i made things correctly), or would it be better to just check moving either way?
Sorry for the delay, This issue can be taken up by others.
thank you
How complex is that to implement? โคด๏ธ
(No previous experience with PIO)
You'd need to understnd to understand the feature. I don't think it is a lot of code.
Should i have that many tests, for every combination of positional and keyword usage (made that to confirm i made things correctly), or would it be better to just check moving either way?
I think the main thing is to test the moving and edge cases (e.g. on an empty dict, key not found, etc.) not so much the arg parsing. It doesn't hurt but the testing is more about the functionality than the arg parsing. Also test arg validation maybe: suppose you pass a non-bool for the bool arg.
Basic Fitbit API example for Adafruit_Requests library pull request added this morning. https://github.com/adafruit/Adafruit_CircuitPython_Requests/pull/140
GitHub
requires google account, fitbit device, fitbit developer app, api tokens. Non-graphing display example just serial output.
I wrote a brief walkthrough for fitbit dev app and token creation for Circ...
@slender iron @tulip sleet OK I was mistaken in part about ulab. The specific ref that circuitpython pointed at was NOT in the history of their main branch, possibly because the PR was resolved with "squash and merge". Their main branch has "38caf84 Fix -Wunused-variable diagnostic when !ULAB_SUPPORTS_COMPLEX (#631)" while CP was pointing at "< 3728d22 (HEAD) Fix -Wunused-variable diagnostic when !ULAB_SUPPORTS_COMPLEX. So it's interesting that this worked for me & for the CI system but not for others including scott.
makes sense, do you want to PR to repoint it?
as well as the problem that, due to the use of squash merges in upstream(?), we were NOT pointing at a commit in the history of their primary branch.
@onyx hinge there is a pre-commit failure in 8256 โฌ๏ธ
oops, I'll fix it
the "translations" check is not run if only the submodule extmod/ulab is changed, so it wasn't caught locally. pre-commit run --all does though
The failure here is due to a change of mine; the fix is now part of #8252, so this PR will need to be updated with the latest changes once that one's been merged.
ah did an engineer ever fix a problem without making more? ๐
@tulip sleet since it also fixes a build problem (that I introduced ๐ฉ), your review on https://github.com/adafruit/circuitpython/pull/8252 would be appreciated.
I am behind on PR's ๐
Tests are now checking (all?) edge cases + are successful, however flash is still too large...
I'm unable to get the number of users we have on the server, / serverinfo isn't showing it
?membercount
@turbid radish apparently I don't either
@turbid radish on the discord desktop client, click the "v" icon next to "adafruit" above the listing of channels. then click "server settings" and "members". the screen will show you the current count.
if you have the rights, seems like there's a "members" tab on server's settings
"jinx" I think they say.
weirdly no ports were re-built despite the change in shared-module/usb/core/Device.c. This may be a problem with the build system I introduced and have hopefully now fixed in #8252.
sigh, feeling a bit distressed that I apparently messed up the build system pretty good with a change I didn't even think would have an impact on it. well, it'll get put right soon. if I understood the problem now.
@lone axle I have some questions when you get a chance about bitmaptools and displayio.
I am around for a bit now. Whats up?
I'm pretty familiar with some of it's functions but less so with others.
Well, I've been trying to use the alphablend function and I can sort of get it to work, but because palettes are separate to bitmaps, the colors aren't correct. Any ideas?
That is one of the ones I haven't used yet. But my interpretation of whats mentioned in the colorspace docs here: https://docs.circuitpython.org/en/latest/shared-bindings/bitmaptools/index.html#bitmaptools.alphablend
The colorspace of the bitmaps. They must all have the same colorspace. Only the following colorspaces are permitted: L8, RGB565, RGB565_SWAPPED, BGR565 and BGR565_SWAPPED.
means it may not work for indexed bitmaps with different palettes. I think they would need to have the same palette. This mentions using one of those listed colorspaces, but I would expect if you happen to have 2 different indexed bitmaps with the same palette even if it's not specifically one of these full color spaces it could still work with them.
My best idea would be to try non-indexed BMPs and see if it makes a difference, or if possible try to merge the palettes for your two images into one so that they each can use the same palette.
Ok, well I was pulling the bitmaps in with imageload (which only works with indexed bitmaps) as it doesn't work with OnDiskBitmaps. Any ideas how to pull in an non-indexed bitmap?
Hmm, that is a good point. In my head I had mistakenly had that restriction backwards. I was thinking OnDisk was only indexed, and imageload was indexed or rgb.
Yeah, I think ondisk only works with 24-bit bmps and imageload only works with 8-bit bmps.
8-bit of course means indexed.
It looks like when it was added originally the test case was using directio rather than displayio to get it onto the display: https://github.com/adafruit/circuitpython/pull/5544 I wasn't aware of directio module before, though I think I recall something about GIFs using a similar technique.
Huh, I haven't seen directio. I'll have to look at that
Oh, ok. I think directio is for camera data
He mentioned something like that
I am curious about alphablend after poking through the documentation a bit. I'll try out the merged palette approach in the next few days and see if I can get a "simpletest" that works with displayio. If I'm understanding things correctly it would mean that it's restricted to only working on images whose combined palettes occupy less than 256 colors.
It still may be useful
According to the pr you linked, it should work with RGB565 16-bit images
Also, I may take a look at what gifio might be able to do
Anyway, thanks for chatting. I think you helped. I am interested to check out your simpletest when you get it working.
This line is surprising. -I arguments are usually to directories that exist, but I don't think this path exists and if it did it'd be a file rather than a directory. Can you just remove this line?
We prefer to keep our code free of -Wundef diagnostics by leaving the flag as-is for most files. My comment suggested how to apply the -Wno-undef compiler flag only to files within the SDK. Did you try this?
[whoops, this and the other comment are outdated; I selected "cancel review" but didn't realize it'd still post these comments]
@dhalbert @bill88t I think this is ready for review now. It looks good to me but I'm not marking it "approved" since I made changes in the branch & I want to make sure it's not premature to go ahead and merge.
alphablend is about combining two input images colors proportionally, like output[0] = 50% * input1[0] + 50% * input2[0]. I'm not sure how that makes sense with palette images, because that RGB value you get by combining two pixels might not be anywhere in the palette.
it's not about combining image according to the transparency information one or the other of those images has
I went ahead and fixed this as I intended. The suggestion in my earlier comment had an error that was probably not easy to spot, so it wouldn't have worked as-is.
Yeah. I'm working on a way to get the input bitmaps to be 16-bit in which case, the palettes become the same for the images, which is why it works.
I don't think it will work for palette images, even if they're 16 bits.
they have to be RGB565 or one of the variations
Right
My initial strategy is to try and load an ondiskbitmap, convert to (RGB565) 16-bit with color converter and if necessary copy pixel by pixel into a regular Bitmap.
OK.
If that works, I can try and optimize it from there
First and foremost... the code i pushed the other day was an old version by mistake. I pushed the newer one yesterday.
I have now pushed:
- Require quotes for things to be considered strings
- bools have to be all-lowercase
- Implemented better parsing of lists, it somewhat works but breaks/parses wrong on some scenarios. Will try and fix it during the week, but a second pair of eyes would definitely help locating bugs :)
Fortunately the images needed for these matrices are fairly small.
I tried to update this PR by merging main into it, but github denied my attempt to push the result to tannewt's fork even though it says "maintainers are allowed to edit this pull request". :shrug:
@turbid radish Are you looking for total members or members currently online?
Online Members
Scott had to give me extra permissions to do that. I think it's because it's forked from micropython.
fixed, or at least improved, the list-parsing bug
would love some feedback for improvement, as the lib is pretty much feature-complete from my end (i dont feel like adding support for dates, line breaks inside lists, nor multiline -aka triple quoted- strings)
Ah I see that @bill88t encountered problems when testing with an earlier build of this PR. I did no testing on hardware. So, we should probably have another round of testing before this is considered merge-worthy.
@jepler I sent you an invite to collaborate on my fork. Thanks for trying to update it!
first time I've seen this: ```
#0 0x00002dea in FLEXSPI_ReadBlocking (base=0x402a8000,
buffer=0x20007a9c "C", size=1) at sdk/drivers/flexspi/fsl_flexspi.c:760
#1 0x00002fc2 in FLEXSPI_TransferBlocking (base=base@entry=0x402a8000,
xfer=xfer@entry=0x20007aa0) at sdk/drivers/flexspi/fsl_flexspi.c:876
#2 0x00002a24 in flexspi_nor_wait_bus_busy (base=base@entry=0x402a8000)
at supervisor/flexspi_nor_flash_ops.c:62
#3 0x00002a86 in flexspi_nor_flash_erase_sector (base=base@entry=0x402a8000,
address=2097152) at supervisor/flexspi_nor_flash_ops.c:103
#4 0x00002924 in port_internal_flash_flush ()
at supervisor/internal_flash.c:133
#5 0x000027c4 in supervisor_flash_flush ()
at ../../supervisor/shared/flash.c:137
#6 0x00002816 in filesystem_flush ()
at ../../supervisor/shared/filesystem.c:172
#7 0x000029ce in reset () at reset.c:34
#8 0x00002696 in reset_cpu () at supervisor/port.c:490
#9 0x00002804 in reset_into_safe_mode (
reason=reason@entry=SAFE_MODE_HARD_FAULT)
at ../../supervisor/shared/safe_mode.c:139
#10 0x000026ec in HardFault_Handler () at supervisor/port.c:636
#11 <signal handler called>
#12 0x00003da0 in tu_fifo_write (f=f@entry=0x20008004,
flash flush from hard fault
hmmmm maybe for some safe mode resets you'd want to do that but probably not hard fault.
pending the outcome of building
higher in the stack it was also reading from flash
no idea how it faulted
wish I had trace going ๐
it did corrupt my fs
Oh I forgot this existed. I will look into it tomorrow.
@tannewt ah, ok, after doing a read it is 26666666
Updated Unexpected Maker NanoS3 entry with correct details and new images
@turbid radish It's much easier to find if using a mobile device than desktop discord app. The UI's are not the same and show more server info on the mobile app.
hold down on the Adafruit channel icon and a menu popout with more options appears
which displays online members and total members
There is also an adafruit_requests example where you can get the info with a microcontroller. ๐ https://github.com/adafruit/Adafruit_CircuitPython_Requests/blob/main/examples/requests_api_discord.py
but that one requires a data scraping method detailed here: https://github.com/lorenz234/Discord-Data-Scraping
Damien on Embedded.fm:
https://embedded.fm/episodes/456
Embedded
Damien George spoke with us about developing with and for MicroPython while Elecia tries not to spill all the secrets about her client. To start at the beginning, you probably want to check out micropython.org . Wait, no, one step back. Before listening to the show, you probably should read the
Uhh, somehow all the anomalities cannot be reproduced on current commit.
I tested 3 different wifi networks and AP from REPL.
I reluctantly want to give it a stamp of approval.
Put a warning to to update the bootloader on nRF boards right in the download box for CircuitPython, not just in the bootloader box.
Not everyone reads the release notes before updating. This will save support time.
Thank you, should be a good improvement.
this implementation is hoped to be smaller. (feather_m4_express/fr fits unlike the other PR; approximate savings ~600 bytes)
Minor difference to standard Python: A dict object has a move_to_end method. However, calling this method always results in TypeError.
Implementing it this way means that the method table can still be shared between OrderedDict and builtin dict.
Hug report to @elpekenin who provided the initial implementation!
Closes #4408.
I wrote #8258 which also implements move_to_end, but at smaller flash cost. Thank you for the original implementation!
Great, thx for the cleanup. I initially tried to use pointers but got confused as f*k, ngl... ๐คฃ
With the pin_alarm enabled I see wildly inconsistent results (even though nothing was connected to the pin);
Nothing connected means floating... Can you reproduce the behavior with a small pullup attached?
@onyx hinge May I please DM you when you have a moment? I have a question for you regarding CircuitPython Day
@random junco DM away but if it needs a detailed answer I won't get right back to you.
Pinging @dhalbert and @jepler here. I was doing some work on the Arduino side of Protomatter today and found that this latest batch of P4 and P5 matrix panels are super persnickety about the clock signal. Todayโs 1.5.10 release should fix this, and the change (just moving some NOPs) ought to work in CircuitPython as well.
I think what mightโve happened is occasionally thereโs a PR that fixes one personโs flicker issue, unaware that this may lay waste to other situations. So earlier Circu...
This now updates to 1.5.10, and may fix #7912.
@PaintYourDragon posted https://forums.adafruit.com/viewtopic.php?p=981739#p981739 this evening. @PaintYourDragon should we wait on this?
CircuitPython version
Adafruit CircuitPython 8.2.0 on 2023-07-05; Raspberry Pi Pico with rp2040
Code/REPL
import alarm
import time
import microcontroller
microcontroller.cpu.frequency = 20000000
...
time_alarm = alarm.time.TimeAlarm(monotonic_time=time.monotonic()+INT_TIME)
alarm.exit_and_deep_sleep_until_alarms(time_alarm)
Behavior
Deep-Sleep with standard cpu frequency (125MHz) uses about 6.8mA. With 20MHz, it is only about 4.1mA (40%...
Closing this as stalled, because https://github.com/adafruit/circuitpython/pull/7141 is stalled. We'll reopen if 7141 is merged.
revised and now working with https://gist.github.com/jepler/597b80caa61a4a71f094959c1df66001 (self._sm.run(self.get))
I tested this today with a QT Py RP2040 & jog wheel encoder.
Tests may_exec=: https://gist.github.com/jepler/597b80caa61a4a71f094959c1df66001 (note that I think this PIO code may have a bug that occasionally allows the incorrect value ~x (bitwise not of the actual value) to be read; this is a bug in the PIO code and not in CP; I think this can be fixed by using 'y' as the temporary register)
Tests offset=0: https://gist.github.com/jepler/891a3c48e2f9f9fb9759bdb5ce081265 (revised b...
@Ultrawipf please re-test if you have the time & interest!
(just curious) I saw an adafruit_debug_i2c wrapper library but the comparable adafruit_debug_spi library seems to have stopped development. Is there any new thinking around such wrapper libraries, or just lack of time/priority to move that forward?
updated yet again and using https://gist.github.com/jepler/0f162eb04c2b4e36e9ae9d6a228e4112 as test of offset=.
I also manually tested that offset conflicts are detected, though the error message says "All state machines in use" when the real problem is that the requested load address was not available.
This interactive session shows how the "same" program can be loaded multiple times at offset 0, then a 2nd program can be loaded at offset 0 of the second SM. A third program can't be ...
@small comet probably mostly lack of time. If offered it sounds like something we'd be happy to add to the community bundle!
๐ thx for the context.
@onyx hinge just confirming, as https://github.com/adafruit/Adafruit_CircuitPython_Debug_SPI seemed intended to be an adafruit bundle library (like the i2c library). Not that I'm throwing my hat in the ring ๐ but do you think it would it be preferable to make contributions as pull requests there, or do you have in mind having this be a new repo outside the Adafruit organization altogether?
It looks like no Adafruit person ever actually wrote any runnable code in there, it's all just updates of infrastructural stuff.
If Adafruit is not planning to maintain it, it's better that it go in the community bundle.
Because there's no runnable code I don't think anything's lost by starting fresh.
Ack - thx for extra context! (Awkwardly, it's more red tape work-wise to moonlight on a new project vs contributing to an existing adafruit one, but that's a whole other story ๐คทโโ๏ธ )
I don't understand why the Picopad is not available in a stable release: https://circuitpython.org/board/pajenicko_picopad/
I think it was there in time for 8.2.2 (maybe 8.2.1), but that was only for patching the certificate, so nothing was backported.
Or maybe backporting board only occurs on minor version and it will be in 8.3?
@onyx hinge I just submitted a PR against the unified workflow repo for the issue you tagged me in!
that was fast
any idea why it worked previously, or appeared to?
No, I don't, which is the weird part. I actually would have expected it to fail up until now actually, based on the information you linked
I've started using what I PR'd exclusively for this reason though, and for our purposes makes the most sense anyways. I'll probably do some digging into why we only just hit this issue, or at least didn't originally.
oh! pip install . installs this library to a place on pythonpath; you removed that in favor of .. other commands.
successful run ```
Successfully installed adafruit-circuitpython-pioasm-0.0.0+auto.0
============================= test session starts ==============================
platform linux -- Python 3.11.4, pytest-7.4.0, pluggy-1.2.0
rootdir: /home/runner/work/Adafruit_CircuitPython_PIOASM/Adafruit_CircuitPython_PIOASM
collected 15 items
tests/test_mov.py ... [ 20%]```
notice how it has just installed the library
[also noted on the issue] @proven garnet
OHHHHH
Confidently wrong about how confident I was about not introducing a breaking change ๐
That makes sense though, thank you for discovering and explaining that!
@proven garnet (was curious about your PR because I was curious about testing; a driveby fyi - wondering if the pyhron here might be a typo. https://github.com/adafruit/workflows-circuitpython-libs/pull/30/files#diff-5881ec64b771c47aba005f7a992b077a0d509f0acc5671b7576b1eb4714603f5L70
๐ Thanks for catching that!
My personal belief is that python -m pytest is best since it always includes the library you mean to test, though it is interesting to see how the change @onyx hinge mentioned affected it. Makes a lot of sense, and something I should be more mindful of when working with the CI files!
And I learnt something about how the CI is put together by watching from the peanut gallery, so win-win ๐
@proven garnet can you add a comment about why so we don't mess it up again accidentally?
# this includes the current directory in sys.path so that the tests can find the module being tested or similar
Sure thing!
Updated, please let me know if more details is needed
nah that'll hopefully make someone at least check before changing it.
tests passed in that other PR now. yay. thanks and have a great rest of your weekend.
well, actually, it failed, just later. argh
actions don't work with python 3.9, but that was something I'd changed trying to figure out the problem
any chance I could ask for the new synthio to supply the elementary waveforms out-of-the-box? understand that memory is limited, but something like synthio.sine_wave, synthio.sawtooth, etc. would be quite helpful
I'm working through implementing the HomeKit Accessory Protocol in CIrcuitPython on a Pico W and needed to be able to publish TXT records along with the mDNS service. lwIP supports this functionality, so I'm exposing the functionality through the mdns module.
also I submitted a PR for NAU7802 to enable polling rate selection
CircuitPython version
Adafruit CircuitPython 8.2.1 on 2023-07-25; Adafruit PyPortal Titano with samd51j20
Code/REPL
>>> import microcontroller
>>> microcontroller.on_next_reset(microcontroller.RunMode.UF2)
>>> microcontroller.reset()
Behavior
Reboots to normal running CircuitPython
Description
When I run the provided code, it just goes back to normal user mode.
Additional information
If I use the older RunMode.BOOTLOADER it moun...
I was able to build and install the firmware.uf2 and this patch acts as I expect on the PyPortal Titano.
Adafruit CircuitPython 8.2.0-68-ge7e6fc844 on 2023-08-06; Adafruit PyPortal Titano with samd51j20
>>> import microcontroller
>>> microcontroller.on_next_reset(microcontroller.RunMode.UF2)
>>> microcontroller.reset()
probably not, but someday I hope we'll have a pure-Python library to help generate them. It's just a few lines of code, but horrible to have to copy & paste them everywhere.
Good catch. Can you prepare a pull request? It looks like all ports should probably be reviewed but if your PR is just for one port that's fine.
OK, my 124 checks seem to have passed.
I have something to say about CircuitPython.org nRF warning:
If I check an NRF board from Adafruit ( like https://circuitpython.org/board/circuitplayground_bluefruit/ ) there is a warning about UF2 bootloader version 0.61+ and See Update UF2 Bootloader below.
If I go on a non Adafruit board ( like https://circuitpython.org/board/Seeed_XIAO_nRF52840_Sense/ ) I have the same warning but there is no section "Update UF2 Bootloader" below.
My Bootloader was the following:
UF2 Bootloader 0.6.2-12-g459adc9-dirty lib/nrfx (v2.0.0) lib/tinyusb (0.10.1-293-gaf8e5a90) lib/uf2 (remotes/origin/configupdate-9-gadbb8c7)
Model: Seeed XIAO nRF52840
Board-ID: Seeed_XIAO_nRF52840_Sense
Date: Nov 30 2021
SoftDevice: S140 7.3.0
I went ahead as it does not cost to give it a try... and it worked.
So I don't know what the "problem" is... is it misleading warning? is it absence of bootloader section? or no problem at all?
Ok 0.6.2 is > 0.6.1 so I did not have the issue. So the only thing is the absence of section and the reference to a section that maybe does not exist for non-adafruit board.
I don't know what is the criteria to display or not the section Update UF2 Bootloader but here are the nRF board without it:
- https://circuitpython.org/board/microbit_v2/
- https://circuitpython.org/board/Seeed_XIAO_nRF52840_Sense/
- https://circuitpython.org/board/makerdiary_nrf52840_mdk/
- https://circuitpython.org/board/ssci_isp1807_dev_board/
- https://circuitpython.org/board/tinkeringtech_scoutmakes_azul/
- https://circuitpython.org/board/teknikio_bluebird/
- https://circuitpython.org/board/simmel/
- https://circuitpython.org/board/electronut_labs_blip/
- https://circuitpython.org/board/sparkfun_nrf52840_mini/
- https://circuitpython.org/board/challenger_840/
- https://circuitpython.org/board/ssci_isp1807_micro_board/
- https://circuitpython.org/board/ADM_B_NRF52840_1/
- https://circuitpython.org/board/espruino_banglejs2/
- https://circuitpython.org/board/makerdiary_nrf52840_connectkit/
yup, they all say See Update UF2 Bootloader below. but the section is missing. That could easily cause confusion and frustration.
that section is present when the condition is true: {% if bootloader_version and bootloader_id %}
It's missing because the metadata of those non-Adafruit boards is incomplete, and/or they do not use the UF2 bootloader.
Feel free to submit patches to circuitpython-org to improve the metadata for third party boards.
I made the See Update UF2 Bootloader below. I dind't know there were so many third-party boards that didn't have that setion. I was addressing several forum posts that didn't realize their boards needed a bootloader update.
The following probably need review, I did not find any other places. I can make these changes if you like but I have no testing environment.
https://github.com/adafruit/circuitpython/blob/6b36bf59e30a4d3d93ec9df1f92ae8adc5fe2094/ports/cxd56/common-hal/microcontroller/__init__.c#L74
https://github.com/adafruit/circuitpython/blob/272a2dcdb0230cd13a6c7cc974805a919ef13a8d/ports/mimxrt10xx/common-hal/microcontroller/__init__.c#L70
https://github.com/adafruit/circuitpython/blob/272a2dcdb0230cd...
In standard Python, socket.settimeout() sets a timeout for both TCP connections and data transfer. In CircuitPython, socket.settimeout() sets a timeout for data transfer, but doesn't affect the TCP connection timeout. It sure would be nice to set a TCP connection timeout, either via settimeout() or some other method.
For example, using CircuitPython 8.2.2 on an Adafruit Feather ESP32-S3 (no PSRAM), an attempted TCP connection always times out after 30 seconds, regardless of the settimeou...
not clear on the current status, does UART block on a write until all bytes are transmitted? If not, are we going to get a flush() command that does? Or is this complicated because different MCUs handle things differently?
CircuitPython version
Adafruit CircuitPython 8.2.2 on 2023-08-01; splitkb.com Liatris with rp2040
Code/REPL
import microcontroller
print(microcontroller.cpu.temperature)
Behavior
Reports between 68-80 degrees, when the room temperature is around 20 degrees celcius
Description
I have a feeling it reports a wrong temperature, or fahrenheit.
Additional information
No response
a CPU temperature sensor is designed to measure temperature at some point inside the CPU chip itself, not the ambient temperature. This can be quite a bit above the ambient temperature.
https://learn.adafruit.com/adafruit-feather-rp2040-pico/cpu-temperature
Here's what we say about it, generally speaking for all circuitpython boards:
There is a temperature sensor built into the CPU on your microcontroller board. It reads the internal CPU temperature, which varies depending on how lon...
https://daniel.feldroy.com/posts/2023-08-pypi-project-urls-cheatsheet hum it's just come to my attention that it's possible to add a discord link to a pypi page. not sure it's worth the trouble to do so, we'd have to patch all the libraries.
Hi,
Thank you for this AWESOME initiative!
Any plan to have an example for SSL http server?
I think the intention is that it blocks until everything is sent. There may be cases that queueing to the hardware is enough to unblock
I think the minimum guarantee may be: it has been submitted to a hardware FIFO or other hidden queue so the passed-in buffer can be freely modified. but I'm not sure we guarantee the bits have actually 'gone out'. For SPI I hope it's stronger than for UART, since the SPI FIFO has to be fully drained before /CS may be deasserted and there's not an explicit 'flush'...
I know we had issues with PIO and shutting it down because the OSR was actually flushed.
@tulip sleet heads up you are scheduled to host today's meeting
<@&356864093652516868> Reminder of Monday meeting, in 2 hours, 2pm US ET / 11am US PT. Add you notes to https://docs.google.com/document/d/1vJq1BU6TdWuTJVSCUKHbE4F6m4ZoIcEMsjPUotB5LZg/edit?usp=sharing
I had this notice stashed to send now
thanks for the reminder, though, sometimes i don't remember!
So that would be <t:1691431200:F>
Just a friendly reminder Discord do support local time stamps - https://c.r74n.com/discord/timestamps
I had no idea, thanks!
There are other generators out there that might suit you better though.
last I looked, there was no way to do recurring times