#circuitpython-dev
1 messages · Page 413 of 1
I guess you want to avoid writing to the same one twice ?
Does that mean one could use dd to copy the CIRCUITPY between two microcontrollers?
I think you can. But you may run into issues if anything else writes to either board and causes them to reset
but why ?
Or actually I should say I think you could use cp I am less sure about dd
Just unmount it :)
Isn't dding faster than cping, for obvious reasons?
what reasons ?
You're copying the entire partition, instead of dealing with the filesystem?
we are just copying files to a CIRCUITPY drive, why make it more complicated ?
don't play at the partition level, this is a microcontroller, not a hard rive
I'm not really sure about their different functionalities or speed of either. But since most circuitpython devices are <10mb I think most any copying method will be pretty quick.
But how does an OS mount a volume from USB without a partition?
Hm, I do have a MagTag or Funhouse or something, and I can try looking at Disk Management or diskpart and see
I mean, I guess it's technically got a partition? But, for example, Disk Utility on Mac shows the microcontroller different from the other drives.
I don't know for sure, I'm simply relaying the info I know how to find.
I'm simply stating what I think I know
the partition table of the CIRCUITPY drive is fixed
Thank you for the additional explanation!
Thanks for this! One fix for the doc build.
I think the doc build needs an annotations entry here for the stub.
No, I mean writing to the partition, not the entire disk
best way to know is test it out on your device
i usually have multiple CircuitPython volumes, but rename them uniquely, so it’s easier on me, on editors, and for simultaneous copying
I've got the Devkit N8R8 board for the ESP32-S3. It looks like it flashed properly using the "UART" usb plug. When I switch over to the "USB" plug I see the CIRCUITPY drive. I'm not seeing a REPL (I tried both USB ports). Any tricks to getting a serial connection to the REPL on the ESP32-S3?
I'm getting the REPL on the USB port (and the ESP debug output on the UART port)
Interesting. Maybe I need to pull the latest from GitHub and rebuild. Alternately, Is there an easy way to flash from the UF2 files rather than build with the flash command?
I did install the UF2 bootloader
Can you point me to instructions on loading the UF2 bootloader?
Strange, just tried again and now I get REPL. Only thing I did was double click the reset button. weird.
I believe I took the devkitC one https://github.com/adafruit/tinyuf2/releases
and then it's gonna be erase_flash and flash combined.bin to address 0
Ok I’ll see if I can decipher the process. Thanks for the help!
I think I narrowed it down to that, though I remember some tinkering, maybe lowering the baudrate or something, or maybe it was with the C3 that it was flaky 🤷
esptool.py --port THEPORT --after=no_reset erase_flash
esptool.py --chip esp32s3 --port THEPORT --no-stub -b 921600 --after=no_reset write_flash 0x0000 combined.bin
This is good to know, I've encountered a few scenarios where Protocol seemed to be a good solution, particularly socket-like classes and things of that nature in CircuitPython
I didn't know much about __future__ or the annotations package within so thank you!
thanks @tannewt @FoamyGuy I'll give it ago.
Done a bit more testing and it just feels odd that if the rgbmatrix bit_depth is anything other than 1 and using .play(mp3stream) I get memory allocation failed, and this only happens on a Metro M4 Express, and from what I read the Feather M4 Express has the same specs but does not have this issue when I tried.
@dhalbert Sorry for the delay. I have the time now, I will work on it.
I am trying to use one of the V2 Feather ESP32 boards with MicroPython. According to the silkscreen, the I2C pins are SCL-20 and SDA-22 but when I try to use them in MicroPyhton i2c = I2C(0, scl=Pin(20), sda=Pin(22)) I get an "invalid pin" error ```MicroPython v1.18 on 2022-01-17; ESP32 module (spiram) with ESP32
Type "help()" for more information.
import head_13
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "head_13.py", line 24, in <module>
ValueError: invalid pin
@solar whale maybe they are swapped?
Am I using the correct Board def for this board?
I'll try that
also, might need I2C 1 instead of 0
swapping them still gives invalid pin --- I'll try I2C1
still invalid on 1 .... 😦
the board says the module is an ESP32-PICO-MINI-02 with PSRAM so I think I have the correct build loaded...
hmmm -- I works OK if I just move SCL to another pin -- I am using 14 -- I t will not work with scl on Pin 20
Wow - rshell is really nice with MicroPython --- This is the first time I have used it. Big step up from ampy....
The reset and read pins should be optional, but the espressif
code had several places where it assumed they are not, and a bug that
caused a crash on release_displays if they were made optional.
The bug was caused by the fields for storing pin numbers being set
to NO_PIN, which has value of -1, while the fields have type
uint8_t. That set the actual value to 255, and a subsequent
comparison to NO_PIN returned false.
@onyx hinge I see the paralleldisplay now has a 16-bit mode, do you know if it is supposed to be functional on the esp32-s2?
because it hangs for me
@stuck elbow at one point I had wanted to add 16 bit displays but I never got anywhere with it.
at least that's how I remember it going
I see, that explains it
I'm trying to get https://www.makerfabs.com/wiki/index.php?title=ESP32-S2_Parallel_TFT_with_Touch(3.5'') working, but I can switch it to 8-bit with a jumper
The basic settings and pins are fine, I'm still working on getting the
display to work, I will update it when I get the right init sequence.
More information:
https://www.makerfabs.com/wiki/index.php?title=ESP32-S2_Parallel_TFT_with_Touch(3.5'')
In other ports, NO_PIN is 0xff. In this port, it is set by #define NO_PIN (GPIO_NUM_NC), where GPIO_NUM_NC is -1, but if that were changed to 0xff, it would make changing things to int8_t not necessary. I think it would be better not to use a signed byte for a pin number, in case we have pins > 128.
You can always change it to int16_t when needed, it's not like we are saving loads of memory here. And by the same argument, what if we have 255 pins?
I am just saying I think the initial idea of using #define NO_PIN (GPIO_NUM_NC) was not the best choice.
Isn't it needed for compatibility with idf?
You are right about compatibility with the IDF. But If you look at
https://github.com/adafruit/circuitpython/blob/08b44eade5f3caa25b986524d80ca6da2313bf20/ports/espressif/common-hal/imagecapture/ParallelImageCapture.h#L36-L38, it uses gpio_num_t for a similar purpose, and that's the actual enum type. So that's what I'd suggest here. That ends up being a 32-bit int, but that's OK. It could also use an mcu_pin_obj_t *, but that may not be an improvement.
gpio_num_t re...
Thanks for the change! I'd like @tannewt to comment on the overall PR: I don't have much experience with displays.
Just a quick late night look but I do not think the atmel or rp2040 ports will work if the read pin is left out (likely a bug as well with them). Also in the espressif port I noticed common_hal_never_reset_pin(read); was removed but never replaced if read was specified which I believe means if it is given it would be reset when the other display pins would not be.
Just a quick late night look but I do not think the atmel or rp2040 ports will work if the read pin is left out (likely a bug as well with them).
You are right! I started this with the reset pin, and after checking in all the ports that they do have the code to make it optional, I noticed that the espressif port also has that code for the read pin, and assumed the other ports would as well. I will fix that.
Also in the espressif port I noticed common_hal_never_reset_pin(read); was r...
Thanks for the change! I'd like @tannewt to comment on the overall PR: I don't have much experience with displays.
Anyone here using python 3.9 or 3.10? I'm curious if installing a library while specifying it's version is working in those environments:
pip install adafruit-circuitpython-lc709203f==2.2.1
Is it expected that this variable would be populated with a real value in the .py file that is downloaded from pip?
__version__ = "0.0.0-auto.0"
Or it's expected to stay as that 0.0.0-auto.0 value which is in the repo?
It worked for me with 3.10, with click==7.1.2
Thank you for trying it out. Is click used by pip? I didn't know the version of that could make a difference. Are you able to share what OS you're on as well? Someone on github reported issues installing it on mac, I'm trying to narrow down what factors could lead to it if possible.
it's populated by circuitpython-build-tools
when building the bundle (or each local release for each library)
Ahh I see. So it does get populated into the copy that ends up in the bundle. But maybe not into the copy that gets sent to PyPi.
I'm on Mac. Re click, specifically what I was doing was overriding the version that requirements installed:
1064 pip3 install -r requirements-dev.txt
1065 pip install --upgrade click==7.1.2
I think that you are right. That matches what I am seeing. Just checked the file in the py bundle and one inside site-packages inside of a venv after installing.
❯ ag "0.0.0-auto.0"
lib/python3.9/site-packages/adafruit_platformdetect/chip.py
32:__version__ = "0.0.0-auto.0"
lib/python3.9/site-packages/adafruit_platformdetect/board.py
33:__version__ = "0.0.0-auto.0"
lib/python3.9/site-packages/adafruit_mprls.py
32:__version__ = "0.0.0-auto.0"
lib/python3.9/site-packages/adafruit_bus_device/spi_device.py
23:__version__ = "0.0.0-auto.0"
lib/python3.9/site-packages/adafruit_bus_device/i2c_device.py
21:__version__ = "0.0.0-auto.0"
lib/python3.9/site-packages/Adafruit_PureIO/spi.py
50:__version__ = "0.0.0-auto.0"
Ahhh, I understand now what you mean. Click was library you installed.
Are you willing to try this driver library?
adafruit-circuitpython-lc709203f==2.2.1
yeah installing with ==*** should work, this is not linked to __version__
That installed a lotta stuff, but included the right version
Successfully installed Adafruit-Blinka-7.1.0 Adafruit-PlatformDetect-3.20.1 Adafruit-PureIO-1.1.9 adafruit-circuitpython-busdevice-5.1.8 adafruit-circuitpython-lc709203f-2.2.1 adafruit-circuitpython-register-1.9.8 pyftdi-0.53.3 pyserial-3.5 pyusb-1.2.1
I was thinking it was unrelated to that variable as well. The error reported here: https://github.com/adafruit/Adafruit_CircuitPython_LC709203F/issues/18 mentions differing versions expecting 2.2.1 but finding 0.0.0. The __version__ var was the only thing I could find with the zeros though. Even the METADATA file inside of site-packages is showing 2.2.1 for me. Not sure what could cause the issue Maybe some cached version in pypi infrastructure or something preventing it from actually downloading properly.
Thank you. Quite a perplexing issue. User was on Mac and python 3.10 as well though so good to know it's not causing trouble for everyone with that environement at least.
hmmm weird error
The first two lines of the pip output for me were
Collecting adafruit-circuitpython-lc709203f==2.2.1
Downloading adafruit-circuitpython-lc709203f-2.2.1.tar.gz (28 kB)
In that issue, the first two lines are
Collecting adafruit-circuitpython-lc709203f==2.2.1
Using cached adafruit-circuitpython-lc709203f-2.2.1.tar.gz (28 kB)
Good catch! thank you
Looks like there was something funky about their cached version.
CircuitPython version
Adafruit CircuitPython 7.2.0 on 2022-02-24; Seeeduino XIAO with samd21g18
Code/REPL
import board
import digitalio
l1 = digitalio.DigitalInOut(board.LED)
l1.direction = digitalio.Direction.OUTPUT
# in Xiao 1/True is off, 0/False is on for LEDs
l1.value = True
l1.value = False
l1.value = True
# first error ... same port for BLUE_LED
# and D13
l2 = digitalio.DigitalInOut(board.BLUE_LED)
###
l1.d...
The suggested changes work on my end. Maybe YELLOW_LED should also be added?
D13 should be removed because it doesn't appear on silkscreen or pinout diagrams and does not have a pin.
^ I'll leave rick some time to respond in case he wants to PR
I would be willing to learn that process ... I presume PR means "pull request"? (My background is "problem report")
I have little knowledge of git - in the large community development.
I tend to do all my work locally, and have a modified build from master as of 3/5/2022 with the changes .
- is YELLOW_LED desired for PA17? instead of LED?
- I believe D13 is a legacy from Arduino/AVR world where 'pin' 13 is the blinking LED port.
- are TX__LED and RX_LED okay names for the two bl...
Glad you are interested! Here is a guide about making and submitting pull requests.
- is YELLOW_LED desired for PA17? instead of LED?
We always want one LED to be available as board.LED, so examples that need an LED have pin for that. It's fine to have several aliases for the same pin. You can look at other LED names on other boards to see what is standard, but YELLOW_LED is fine.
- I believe D13 is a legacy from Arduino/AVR world where 'pin' 13 is the blinking LED port.
...
The Feather NRF52 Express has 2 LEDS, here is how it does it:
{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P1_15) },
{ MP_ROM_QSTR(MP_QSTR_RED_LED), MP_ROM_PTR(&pin_P1_15) },
{ MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_P1_15) },
{ MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_P1_10) },
RX_LED and TX_LED are labeled "R" and "T" on the silkscreen (I would still use RX_LED and TX_LED then), while the yellow one is labeled "L" (perfect for board.LED). I think it...
Modify and correct LED pin mappings and names for Seeduino SAMD21 Xiao
Added YELLOW_LED=LED=D13,
BLUE1_LED=RX_LED,
BLUE2_LED=TX_LED
Added clarifying comments about duplicate names for pins, and reverse wiring for LEDs on XIAO
Thanks! I've changed the names and ordering a bit, for the reasons given. If you are OK with these (and I didn't make a mistake!), you can accept these changes by pressing the "Commit suggestion" or "Add suggestion to batch" (and then committing the whole batch).
- Group aliases for the same pin together, with blank lines in between group.
- All these LED pins are active-low, so we add the
_INVERTEDsuffix on such pins. (So there is no plainboard.LEDany more.) - You can omit the comments because the names are pretty self-explanatory.
- We have tended to add a number after the word
LED
To see all the LED names in use (not completely consistent):
grep _LED ports/*/boards/*/pins.c
{ MP_ROM_QSTR(MP_QSTR...
Remove this, because we no longer use D13 for most boards except those that traditionally have D13, such as Arduino-shaped-boards.
Are these OK for you too? I'm committing them. As a repo maintainer, I can commit to your PR. You can pull from the branch to pick them.
There was an issue raised that Google returns the old RTD documenting site from before it got moved to circuitpython.org. Is there a way to close or redirect to the new site from the old one?
The content should match on both URLs, as far as I understand it. So while we'd prefer people discover docs.circuitpython.org I don't think they're getting out of date information.
and https://circuitpython.readthedocs.io/projects/ov7670/en/latest/ [just a random choice] does redirect automatically to https://docs.circuitpython.org/projects/ov7670/en/latest/
is there an issue as in a github issue? I should review the details, if so.
I think maybe there is actually a secondary page that isn't up to date
Note that the issue links to https://adafruit-minimqtt.readthedocs.io/en/latest/api.html (no circuitpython in the URL)
This URL also exists: https://adafruit-circuitpython-minimqtt.readthedocs.io/en/latest/api.html and does redirect automatically to the new style docs URL / page.
@onyx hinge GH issue is here: https://github.com/adafruit/Adafruit_CircuitPython_MiniMQTT/issues/105
ah that's yet another level of indirection away .. hmmm
I don't know if https://adafruit-minimqtt.readthedocs.io/en/latest/api.html was meant to be an arduino docs page? The repos missing "CircuitPython" in their name tend to be arduino. But the content of the page appears to be for circuitpython and the download link on the left does link back to the circuitpython repo. But I'm not sure where this docs page is actually getting it's content from
https://readthedocs.org/projects/adafruit-circuitpython-minimqtt/builds/ I wonder where the "copyright 2019" comes from; it has been re-built as recently as 5 days ago.
This one would be for the one lacking circuitpython: https://readthedocs.org/projects/adafruit-minimqtt/builds/ it was built much longer ago only.
so yeah there are a bunch of levels of indirection. Each 'project' gets its own blahblah.readthedocs.io site; then all the libs get placed under /projects/ of circuitpython.readthedocs.io, which now has the canonical location of docs.circuitpython.org.
possibly all of the copyright dates on docs pages show 2019? at least here is another one that does. https://docs.circuitpython.org/projects/display_text/en/latest/
docs/conf.py:copyright = "2019 Brent Rubell" yeah looks like the year is hard coded in the docs conf...
Ah, my guess is that cookiecutter populates it from values given during the prompts. This one shows 2021 and my name: https://docs.circuitpython.org/projects/24lc32/en/latest/ I ran cookie cutter and made the initial commits in that library.
In git, you can get the 'author date' of the latest commit with a command .. we could potentially run it during parsing of conf.py. git log --format=%ad --date=format:%Y -1
so that it would reflect the date of the last change built by RTD
(that'll print e.g., 2022, the 4-digit year)
ah, okay, so there are two similarly named things and the 'right' one does redirect and serve up the latest info but the wrong one doesn't. we could update the other one with a robots.txt that says never to index it and eventually that should make it disappear from search engine results.
Has anyone tried using the new Feather ESP32 V2 with Micropython. The pin definitions for the SPIRAM build do not seem to be correct for the ESP32 PICO MINI 02 module on the board. Pin 20 cannot be used for I2C SCL (give an invalid pin) -- Is there some other build that will support the V2 or is it not supported yet.
I can "workaround" the problem by using a different pin for SCL (Pin 14 works fine) with the SPIRAM build
hmm -- I just did a clean clone of the CP repository git clone https://github.com/adafruit/circuitpython.git then make fetch-submodules -- if if then do a git diff I get this discrepancy ```jerryneedell@Mac-mini circuitpython % git diff
diff --git a/ports/broadcom/firmware b/ports/broadcom/firmware
--- a/ports/broadcom/firmware
+++ b/ports/broadcom/firmware
@@ -1 +1 @@
-Subproject commit bf96d0eda5952595d717fedb797aeb168483e9fa
+Subproject commit bf96d0eda5952595d717fedb797aeb168483e9fa-dirty
If I cd into the ports/broadcom/firmware folder and do git diff I get
interesting -- this issue #circuitpython-dev message only occurs on my Mac, not on my linux box...??
<@&356864093652516868> Hey y'all, our weekly meeting is in about 30 minutes. Please add your notes to the document https://docs.google.com/document/d/1lQB-bN-XISGtWKES5DahLV3XOXG6elVJaedQBdsOd0Y/edit?usp=sharing and join us in the voice channel in a bit.
CircuitPython Weekly for March 7, 2022 Welcome to the CircuitPython Weekly meeting notes! Feel free to add your Hug Reports and Status Updates early. During the meeting, we go through them as a round robin sorted by username. If you can’t make the meeting and would still like to participate, ...
I can't make the meeting today, but i added a group hug - thanks to everyone who's listened and supported the podcast so far
Listening to it right now! Well done!
thanks, appreciate it!
we are finishing up an internal meeting, we'll be starting shortly
CircuitPython Weekly for March 7, 2022 Video is available on YouTube. Join here for the chat all week: http://adafru.it/discord. The CircuitPython Weekly happens normally at 2pm ET/11am PT on Mondays. Check the #circuitpython channel on Discord for notices of change in time and links to ...
my bad, the computer had a brain freeze 😦
No worries! You didn't make enough noise to come through, but I could see your name turn green in the list. Figured I'd have you catch it early.
Looks like making the read pin optional took the build size over the edge for the Japanese translation of Matrix Portal M4. Should I revert that and just leave the reset pin as optional, or can we do something to make that one build fit?
We hope to get the recording and post it within the next week.
maybe there are so many that the signed int counter has rolled over 😉
sounds plausible
Organising Adafruit folks attending PyCon * 😄
Congrats @proven garnet !
🎉 @proven garnet
Thanks y'all! 
Congrats, @proven garnet - that's exciting!
That's fantastic to hear--congrats @proven garnet
deshipu's projects: https://hackaday.io/project/184163-vegemite-sandwich-keyboard https://hackaday.io/project/178061-pewpew-s3
🍢
@solar whale Good to know! I'm supposed to get MicroPython going on the Feather ESP32 V2 for the guide.
more info here <#circuitpython-dev message>
Yeah, I would too
No notes
Congrats @minor plume ! 🎉
Congrats @minor plume !
@minor plume 🥳🥳🥳
Congrats @minor plume !
Congrats!! That's Wonderful news @minor plume
Congrats @minor plume
@solar whale Have you considered filing an issue with micropython about the "I/O 21" issue? they are probably unaware of it.
I thought about it, but held off since I was not sure I was looking at the correct board definitions. They only have a GENERIC_SPIRAM and I don't know what esp32 module it is targeted at.
there seem to be a few and it is not clear in MP how to distinguish them.
mmm
( I may have to leave in the next ten minutes or more because we have a person coming to quote us for a heat pump. They are supposed to arrive in 10 min.)
Heat pumps are nice!! Enjoy!
Ya, we're looking mainly to get the AC part
but not using gas to heat would be better too
and seattle is a good place to have a heat pump
Thats what we thought, but use the heat more than expected
So MP doesn't have a adafruit_platformdetect.board function??
Or am I misunderstanding?
All my long running wifi projects have a try block around the main routine. Not perfect but it does keep things going.
I don't use MP that much
not using Blinka
Ahh, OK
The only two WiFi projects I've done have try/except around the networking bits.
Like Mark said, not perfect, but it does keep going.
I need to test this reload_on_error thing and see if I can scroll the error message on the PewPews with that
perhaps some recourse on Safe Mode could help with more severe conditions
I ran out of time when I was digging at the wifi code but I think looking at the code to make sure it doesn't get into any loops that never get returned. I saw something along those lines but it was buried deep.
I've written a wifi manager class, that adjusts the try/excepts. The manager is suppose to make it easy to decide whether or not it retries right away, vs later. That's kept one of the esp32s2 feather online since.. November? Even when our router drops out
https://www.tindie.com/products/deshipu/pewpew-lite-featherwing/ - these pewpews @stuck elbow ?
there is a whole family of those now, that was the first one
Mmmkay....
My outdoor (admittingly Arduino) project has the watchdog to give it more stability if wifi errors occur
@hidden oxide the problem is we can't use displayio and repl with the 8x8 display, so I need to display the errors somehow myself
So is this the repo? https://github.com/pewpew-game/pewpew
Haha no worries
More info: http://pewpew.rtfd.io/
Ahh
Life was so simple when editors just did text 😉
I forget who said "the plain and simple truth is rarely plain and never simple". 🙂
so then you need to display the errors outside of repl then??
right, there is already a menu program that runs as main.py and lets you select the game to run, what I was thinking, I could use the reload_on_error mechanism to get back to that menu on error, detect there has been an error and scroll it on the display
Makes sense... esp if it sends you back to menu
Will stay tuned 
Ditto. I'm happy to find other stuff to do and wait for the dust to settle, too.
Boo DST
canada and parts of mexico follow the same rule as the US, when DST is observed
@proven garnet @minor plume Please continue as-is! The changes might come in how we do the imports, but we can always submit another PR at a later time.
UTC -4, no?
👋
I live in AZ and most of AZ doesn't do daylight savings, but the whole world shifts around us, which is very confusing.
Thanks!
Thanks!! cya next week!!
@solar whale oh yeah I think you're right
(For the curious, the part of Arizona that belongs to the Navajo Nation does do daylight savings, because part of their land is in AZ and part is in New Mexico, and they've decided they want their lands to be all in the same time zone.)
That would be very helpful !
I thought I was the only one who had no idea what a "type hint" was....
Absolutely not!
Thanks all!
I did not want to "step on any toes" by creating an issue on a new board like this since as noted, I'm not sure what esp32 modules MP actually supports. I can certainly create an issue if you think I should. I posted this to the Adafruit Forum a few days ago, but have not had any response.
@solar whale it doesn't seem like MP is going to be able to fix an issue if it's only discussed on Adafruit turf.
agreed -- I just did not know if the request should come from me of from someone at Adafruit.
I wanted to make sure Adafruit was aware of it since the product page says it works with MP
I considered a PR, but my MicroPython build environment is not working at present.
fwiw looking at the code I don't see any way that any ESP32 (not S2 etc) could end up with that pin available, regardless of which "board", it's something at the "port" level. but that's not based on actual testing, soo
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/1I8mIuR4dXWFDHa32M216Mh_Nj655kqJh2MeRtj4GpLU/edit?usp=sharing
Take note: The US changes to Daylight Saving Time (“summer time”) between now and the next meeting, making the time 2PM in UTC-4. Use our online calendar with your favorite calendar app so you always see the meeting in your local time.
It is not available on any of the other ESP32 modules that I have found -- only on the ESP32-PICO_MINI-02 used for the V2 board
arm switched how they release their version of gcc: https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain
the hardfloat version is separate: I wonder if they don't have M0 support?? A bit confusing
that's a linux target, not bare metal
I'm gonna make a PR to switch. should free up room for deshipu's PR
I've been on 11.2 for a while
what size diffs are you seeing/
the matrix portal has a compilation issue. will let you know after I fix it
"AArch32 bare-metal target (arm-none-eabi)" is the one we'd be using @slender iron ?
yup
for samd/etc
though I can't get the pragma to actually work for the warning...
If you are open source maker, then you can request a PID from http://pid.codes
Otherwise, companies should pay the USB-IF for a vendor ID: https://www.usb.org/getting-vendor-id
Oh nice, I didn't realize the message even directed what to do about the problem
Is fine by me, once the CI is content.
@prplz hey while you're fresh in the area can you check whether there are a couple more that could use the same fix? I think I found these:
$ git grep --files-without-match BOARD_DICT_STANDARD_ITEMS -- ports/*/boards/*/pins.c
ports/atmel-samd/boards/seeeduino_xiao_kb/pins.c
ports/raspberrypi/boards/melopero_shake_rp2040/pins.c
Do we submit board defs, or whatever MicroPython calls them, for Adafruit boards, or does that come from the community? There's no specific build for this Feather, and I'm not sure if there should be....
I'm now clearer on Jerry's fuzziness earlier.
There's not a lot of Adafruit boards listed, so I'm guessing it's not as common...?
@idle owl no I don't think we do it on the regular
I'm... not seeing easy to find info on how to add a board. There's "Porting CircuitPython", which I'm sure is wrong, and that says "A port will typically contain definitions for multiple boards" so I doubly don't think that's what I'm looking for. Probably this is not a path I should be heading down.
@solar whale What build did you use for the Feather ESP32 V2 to get MicroPython "going" on it? ("going" because I realise you ran into issues.)
GENERIC_SPIRAM -- I just used SCL on Pin 14
Got it. Thanks.
The confusing part for me is taht the board defs do not have a place for different pins. All the pins are defined for the general port -- It has a bunch of conditional compiles, but they are not really board specific.
Really? I guess I assumed it was like CP. A forum post says there's a pins.csv file for each board...?
Hmm.
CircuitPython version
adafruit-circuitpython-feather_m4_express-en_US-7.2.0
adafruit-circuitpython-bundle-7.x-mpy-20220304
update-bootloader-feather_m4-v3.14.0
Code/REPL
import board
import digitalio
import neopixel
pixels = neopixel.NeoPixel(board.D22, 54, brightness=0.2)
while True:
pixels.fill((255, 0, 0))
Behavior
AttributeError: 'module' object has no attribute 'D22'
AttributeError: 'module' object has no attribute 'D21'...
hmm -- I may have missed something -- I did not see anything like that
at least not for the esp32 port
Wait... The UM Feather S2 has this: https://github.com/micropython/micropython/blob/master/ports/esp32/boards/UM_FEATHERS2/modules/feathers2.py
Wait is that a default file for it?
Or what's the deal there?
Ah helper lib.
other ports are board specific https://github.com/micropython/micropython/tree/master/ports/samd/boards/ADAFRUIT_FEATHER_M0_EXPRESS
Nevermind.
Hmmmmm
Why is ESP32 different I wonder? Because there's no remapping done?
@slender iron So I don't know if it's a right fix but I added CFLAGS += -fno-builtin-memcpy and matrixportal builds.
How much space is left?
I don't know WHY gcc thinks that memory region starting at QSPI_AHB is only 0 bytes long (I can't see any reason why it should) but it stops concluding that the improper write is occurring when it is told not to treat memcpy as working like the standard function of that name
||
|| 494976 bytes used, 4736 bytes free in flash firmware space out of 499712 bytes (488.0kB).
Ja was the one failing
trying it now
maybe i'm just impatient but the builds feel kinda slow.
500764 bytes used, -1052 bytes free in flash firmware space out of 499712 bytes (488.0kB). drat
Use board.SDA and board.SCL instead, as labeled on the board and the diagrams. We don't always provide the Dnn names for pins that have primary names as labelled on the silkscreen.
Bummer. I’m off for lunch and walk
- Copy xiao's pins.c to xiao kb to get changes from #6121
- Add missing board dict items to melopero_shake_rp2040 (thanks @jepler via #6107)
that's a filesystem not case sensitive thing, they have two files with identical names only the case differs. If you didn't setup your mac drive in case sensitive, it will interpret 2 file entries as the same file and one will be considered wrong
so like it should have xt_RATEEST.ko and xt_rateest.ko but it only has the latter, so the former is marked as "modified"
❯ git st .
## HEAD (no branch)
M xt_DSCP.ko
M xt_HL.ko
M xt_RATEEST.ko
M xt_TCPMSS.ko
❯ ls | grep -i xt_RATEEST.ko
xt_rateest.ko
Interesting, this is the first time I’ve run into it. Thanks.
if you ask me, having 2 files with the same name that only differs by the case is not user friendly, we humans don't "see" case that much when we think about file names, but there it is
It’s good to know what happened.
I don't build for broadcom, so I just ignore it, though on APFS it would be rather easy to add a small case-sensitive partition just for that, rather than reformat or use a disk image
actually it doesn't have to be small, they share space anyway
I have one I used to use. But I’ll just stay on my Linux box.
Just out of curiosity, how hard would it be to add circuitpython support for a custom board I was making?
I have a project I want to make that is based on a SAM E51 (Adafruit already has support via the Feather M4 CAN Express) that I would like users to have the option of using Arduino and circuitpython on. The difference between my board and the Feather board is that my board will have specific headers broken out for specific applications
take a look at the ports/atmel-samd/boards directory, each directory is one supported board
@timber mango the trickiest thing can be adding support for a new external flash chip
@onyx hinge how did you add that flag? I tried $(BUILD)/ports/atmel-samd/supervisor/qspi_flash.o: CFLAGS += -fno-builtin-memcpy and it still failed to compile
diff --git a/ports/atmel-samd/Makefile b/ports/atmel-samd/Makefile
index b9bc36344..b6d8b75b0 100644
--- a/ports/atmel-samd/Makefile
+++ b/ports/atmel-samd/Makefile
@@ -158,7 +158,7 @@ else
endif
endif
-CFLAGS += $(INC) -Wall -Werror -std=gnu11 -nostdlib -fshort-enums $(BASE_CFLAGS) $(CFLAGS_MOD) $(COPT) -Werror=missing-prototypes
+CFLAGS += $(INC) -Wall -Werror -std=gnu11 -nostdlib -fshort-enums $(BASE_CFLAGS) $(CFLAGS_MOD) $(COPT) -Werror=missing-prototypes -fno-builtin-memcpy
ifeq ($(CHIP_FAMILY), samd21)
CFLAGS += \
I applied it to all files
the error is coming from linking which is why global cflags works
I disabled the errors instead
my build is -392 even though it has the -Os lib
@dhalbert You look into this a bit right? What did you run into?
The build has matrixportal build has paralleldisplay enabled and clearly doesn't need it. You can disable it and then the build should fit.
Draft PR to see what fits
I tried to build libgcc.a as part of building the ARM gcc toolchain from their supplied sources, so I could then change libgccs build flags and make sure I got a library that would be cleanly substitutable. Despite following the directions carefully, I was unable to get the toolchain to build far enough to build that library. I think I tried this twice. Perhaps it will be easier with the 11.2 sources
This allows you to list and explore connected USB devices. It
only stubs out the methods to communicate to endpoints. That will
come in a follow up once TinyUSB has it. (It's in progress.)
Related to #5986
The 11.2 doesn't look like the libs were stripped so it's huge
I tried stripping it but apparently did too much
may look tomorrow
i'm looking at their bugtracker
forum more active: https://community.arm.com/support-forums/f/compilers-and-libraries-forum/?
I shrank the matrixportal build here: https://github.com/adafruit/circuitpython/pull/6117/commits/eff6057fa3e9951ad4f6c800cce19481cae4efcd
So if that works, and gets merged, we can merge this afterwards and you won't have to submit that patch.
What if I use a flash chip that’s already supported? Is there a list somewhere?
Hi everyone, I'm currently using
Adafruit CircuitPython 7.1.1 on 2022-01-14; Adafruit FunHouse with ESP32S2
and I appear to be encountering a similar issue as reported here.
Never an issue with the first request, 200 OK status with get time from Adafruit IO, but fails on second request.
I've made sure to only start one Session as suggested above and tried catching any of the following errors ConnectionError, OSError, and RuntimeError but get the following:
Traceback (most recent ca...
Related: #5906 and #5908.
The i2c pullup check usually passes on the the espressif port with floating pins. The fix is to disable the pullups when draining the bus prior to the pullup test. This is needed because pullups are on by default in espressif (#5931).
Tested on s3, c3 and s2.
@idle owl @tulip sleet FYI -- take a look at this discussion <#circuitpython-dev message> -- it looks like the case sensitive file system is once again necessary for the broadcom builds...We discussed this awhile ago and found it was not needed for the espressif builds any more, but ... it's back -- I just verified that it woks fine with a case sensitive file system but not with the "standard" MacOS file system. sigh,,, I guess I'll go back to using my case sensitive partition when I want to build on the Mac.
ugh -- I guess i never tried a broadcom build on my Mac . Now I ham having issues getting the correct version of gcc for the M1 Mac -- I think I'll stick to Linux for the broadcom builds -- probably for all builds...
There appears to be an issue with the arm compiler (aarch64) and rosetta on the m1 mac. I suppose I could try building gcc locally, but for me, it is not worth the trouble to resolve just for the broadcom ports.
We have a guide: https://learn.adafruit.com/how-to-add-a-new-board-to-circuitpython
@jepler ready to re-review, thanks.
Would be good to backport to 7.2.x. Added to milestone.
@onyx hinge if you are willing to approve #6117 (from future) then I can merge #6118 immediately after that. tnx
@tulip sleet I'll take a look right now
ty
Thanks for this! One fix for the doc build.
Can merge now with shrink in from #6117.
black (formatter) failed
it reformatted adafruit_vl53l0x.py
ya, we have standard formatting
stylistic
vscode probably has a black extension you can install
it's a standard python formatter
🙂
Thank you and thank everyone who pointed me in the right direction. Some developer communities are not as friendly
Consider backporting to 7.2.x.
I'm going to close this and will open an issue.
Switch to GCC 11.2. Arm now releases it on a different page: https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/downloads
The builds are generated in a new way and the libraries have debug info. The compressed archive is 400+ mb vs <200 mb for the current version we use.
Stripping the libraries makes them smaller but breaks linking for some reason.
It looks like it also increases build size. So, we make way to make our own libraries compil...
I kept my CP build environment in a case sensitive image anyway. So that works out for me.
Could you merge or rebase from adafruit/circuitpython? There should not be a deletion in locale/circuitpython.pot.
Could you merge or rebase from adafruit/circuitpython? There should not be a deletion in locale/circuitpython.pot.
@tulip sleet should i open a pull request to 7.2.x or is the backport note for yourself?
a PR would be great - you can just cherry-pick the commit(s). thanks!
Backport #6126 to 7.2.x
🍒
Could you add a bit of whitespace around the board images. Here's a guide with some information about the image sizes we're looking for:
https://learn.adafruit.com/how-to-add-a-new-board-to-the-circuitpython-org-website/preparing-the-images
Thanks! Could you now submit a PR to https://github.com/adafruit/circuitpython-or for the board?
(I'll merge once the CI completes.)
Thanks! Could you now submit a PR to https://github.com/adafruit/circuitpython-or for the board?
@prplz Shall we close this now that you fixed the pullup problem? I think it's still true that ESP-IDF really needs a fix for https://github.com/adafruit/circuitpython/pull/5908#issuecomment-1029047409. We could open a separate issue about that.
@tidal kiln mind taking a look at this when you have a chance? https://forums.adafruit.com/viewtopic.php?f=60&t=189077&p=915505#p915505
I get that, it's very noisy
thanks! we'll need an issue to fix it
Hello! I am currently working with Arduino. Can you please tell me if it is possible to implement a Dynamic USB HID descriptor? The most convenient would be, for example, changing the USB HID descriptor when a certain pin is shorted to ground. I saw the following code on the Internet – and I understand that this is possible.
—————code———————-
`0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x09, 0x30, // USAGE (X)
0x09, 0x31, // USAGE (Y)
0x09, 0x38, // USAGE (Wheel)
#ifdef ABSOLUTE_MOUSE_...
CircuitPython version
adafruit-circuitpython-metro_m4_express-en_US-7.2.0
update-bootloader-metro_m4-v3.14.0
Code/REPL
boot.py:
mport board
import digitalio
import storage
# Metro M4 Express
switch = digitalio.DigitalInOut(board.D13)
switch.direction = digitalio.Direction.INPUT
switch.pull = digitalio.Pull.UP
# If the switch pin is connected to ground CircuitPython can write to the drive
storage.remount("/", switch.value)
code.py:
print("H...
Pin D13 is connected to the red LED through a resistor, which is going to try to pull the signal to ground all the time. Pick a different pin that has no other connection.
You can get into safe mode by pressing the reset button when the NeoPixel is yellow. This is hard to do because of human reaction time, but a "slow" double-click reset can usually hit it. See https://learn.adafruit.com/welcome-to-circuitpython?view=all#circuitpython-7-dot-0-0-and-later-2978455-21.
Closing this for now. Please reopen if you are still having trouble.
@dmccue128 Did you get to a resolution on this?
Could you add a bit of whitespace around the board images.
Images are now replaced by "actual" images.
@lone axle you were asking the other day about the 'version' marker in __init__.py. I think that it is SUPPOSED to be correct in pypi. It's these two lines that are supposed to do it:
use_scm_version=True,
setup_requires=["setuptools_scm"],
https://github.com/adafruit/Adafruit_CircuitPython_LC709203F/blob/main/setup.py#L27
Maybe something's become broken about it? Or maybe I'm mistaken.
I see it's become different in current cookiecutter, maybe it just needs to be updated? https://github.com/adafruit/cookiecutter-adafruit-circuitpython/blob/main/{{ cookiecutter and 'tmp_repo' }}/{%25 if cookiecutter.pypi_release in ['y'%2C 'yes'] %25}setup.py{%25 endif %25}#L60
Dan,
Thanks for following up! I apologize for not responding sooner.
I think I have convinced the device manufacturer to produce a version of
their firmware that conforms to the practice of sending a stop bit
following the write. This will solve my problem so I will not need to
convert my code from circuitpython to c++. You can close this issue now.
However, after my discussions with the vendor and review of other I2C
devices, I am less certain that it benefits circuitpython to enforce th...
Thanks for the reply. As @ladyada mentioned:
we do this because linux kernel doesn't allow a write without a stop in a single call without a followup read. this way we can make sure drivers will work on linux as well as microcontrollers.
We did used to support full control of the stop bit, and found it that we had more support problems supplying it than not. People would write drivers that would sort of work, but not well, and not on Linux. So we made the capabilities adhere to the I2C...
yep. noisy for me also. looks like this might be a soon-to-be-created core issue. need me to test anything else?
Looks great. Thank you.
Looks good and the dependent PR is merged now.
-
Fixes #6007.
-
Add reset for autoreload. De-request ticks.
-
Separate state a little more in autoreload.c
-
Rename some routines and variables.
-
Reset
_tick_event_channelwhen ticks are disabled, in atmel_samd/supervisor/port.c -
Add
PYEXEC_RELOADas a specific reason for a forced termination of code, instead of checking the exception. -
Remove redundant settings of
CIRCUITPY_AUTORELOAD_DELAY_MS.
The most vital changes are the autoreload reset, and perhaps the `_tick_event...
- Spec were moved down and synced with vendor page
- Links
- Update formatting of list to improve readability
CC @bd34n
hmm why was the text that the board is unavailable added?
https://bdmicro.com/products/vina-d51
Dan,
Makes sense, thanks. I value the compatibility with Linux and I can
appreciate the burden of attempting to support non-compliant devices. This
is a good decision. Thanks for the explanation.
Cheers,
Dan
On Wed, Mar 9, 2022 at 9:23 AM Dan Halbert @.***> wrote:
Thanks for the reply. As @ladyada https://github.com/ladyada mentioned:
we do this because linux kernel doesn't allow a write without a stop in a
single call without a followup read. this way we can make sure d...
The "VINA-D21" can't be found anymore. The URL is 404, thus it looks like that this board was discontinued and replaced by "VINA-D51".
I tagged @bd34n who is the owner of BDMICRO LLC to be sure.
Nope. Thanks! I'll make an issue and then post a link to the forum
You could just remove the purchase section altogether since the board isn't available. That's what I usually do for boards without a purchase link.
Reported on the forum and confirmed by Neradoc and cater on Discord:
https://forums.adafruit.com/viewtopic.php?f=60&t=189077&p=915505#p915505
Ah thx. I've thought the provided source does already contain the fix.
Meanwhile i found another descriptor and can confirm working with a startech kvm switch 👍
Other USB functions like storage, midi, and cdc needs to be turned off.
I'm using Circuitpython 7.2.0
BOOT_KEYBOARD_DESCRIPTOR=bytes((
0x05, 0x01, # Usage Page (Generic Desktop Ctrls)
0x09, 0x06, # Usage (Keyboard)
0xA1, 0x01, # Collection (Application)
0x75, 0x01, # Report...
So we made the capabilities adhere to the I2C standard.
Just a formal note. The way Linux does it does not adhere to the I2C standard. They did it according to SMBus standard and tried (poorly) to retrofit to I2C.
Funnily enough, the way CircuitPython is implemented, you can't even implement SMBus, because there is no way to do a block read call with the current API.
Are you trying to switch between a normal and an absolute mouse?
Are you trying to switch between a normal and an absolute mouse?
Yes, but I don't know how to read logical level from the PIN and then use the result in the .cpp source to select the descriptor code I need.
whats missing from the api to do a block read call?
When you do an I2C read in CircuitPython, you have to specify the number of bytes to read up front, and it's always a whole transactions. But with SMBus, the first byte you read specifies how many more bytes to read. So we would need some way to do a read without ending the transaction, and then a second read that ends it.
oh thats freaky - ive never actually seen it done in a device before! i think for now we'd have to just read MAX_EXPECTED, then look to see what the first byte is
PN532 is one of the wierdest i2c devices - https://github.com/adafruit/Adafruit_CircuitPython_PN532/blob/main/adafruit_pn532/i2c.py#L72
they use a status byte to indicate whether to read the rest, but thankfully not repeated start. i guess if something had both we'd be out of luck, but so far that zebra hasnt appeared
Everything looks good to me. Just one typo that should break the CI.
Sadly, if a combination is possible, someone is going to use it sooner or later.
Looks good! Glad you're figuring it out. I subscribed to that bug.
sounds like something you should take up with the linux kernel mailing list ;)
Oh, I've read those threads. I'm not getting anywhere near that community.
CI failure is GitHub Action's problem.
and @lone axle here's when @viscid pine added that SCM Version change he could likely advise on your libraries implementation of same.
https://github.com/adafruit/cookiecutter-adafruit-circuitpython/pull/146
wrong @ ? i dont know what this is
wrong purple person 🙂
@onyx hinge did you do anything with the touchscreen on the s3 box?
no I don't think I got that far
kk, you got pretty far! it's nice that the screen comes up
I got one of these today: https://github.com/Xinyuan-LilyGO/T-01C3, is it ok to add it to circuitpy?
it doesn't expose any usb
yup, that's ok for C3. we'll have ble at some point
it's kind of cool, it's a c3 replacement for the esp8266 boards with the same pinout
lots of compatible carriers that it should work with
@slender iron I don't think anything in particular stopped me from working on the touchscreen unless it was an i2c problem, is that how it's interfaced? I think i2c is better now
ya, it is i2c. datasheet is under nda though 😕
but there is this source
that should be enough
Adafruit CircuitPython 7.2.0 on 2022-02-24; Cytron Maker Pi RP2040 with rp2040
>>> pin_counter = countio.Counter(board.GP3, edge=countio.Edge.RISE_AND_FALL)
Traceback (most recent call last):
File "", line 1, in
NotImplementedError: RISE_AND_FALL not available on this chip
I know RISE_AND_FALL works on the M4, but it would be nice for the 2040 if it's possible.
@mental nexus may have looked into touchscreens too
Sorry @viscid pine ..
I never studied the S3 Box since none were available for a while and I never found final specs for the parts it was using other than that the display is SPI (I think). For touchscreens recently I extended the FocalTouch library for a chip from the same supplier.
cool cool. it looks like that driver will generate a bunch of dicts so it might be nice to have a non-alloc version in the future
I'll copy it for now
it looks like the touch chip is a tt21100
Ah, yes I think this is it. The libraries that have been made after that change to cookiecutter do end up having the correct version number in them, I just tested it with one of the newer ones. Thank you to @idle wharf also. I think we could update the others with a sweep in the libraries if we want to get the versions embedding into them when installed via pip.
Check this out @slender iron and @tulip sleet
Got the boards today
One more
I have this one too bu I’m going to rework it to have a male jack instead of the pcb jack
👍 👍
Thanks for all the work on the usb host stuff.
I need to head home and watch all the streams
scott is the one doing all of it (and Thach)
Thank you @gentle bronze !
I love the way the host #bff works with only the one set of headers. So slim and tiny!
Easier to see with my hand for perspective
Hello, please add support to my custom esp32-s2 board.
thanks
CircuitPython version
Adafruit CircuitPython 7.2.0 on 2022-02-24; AITHinker ESP32-C3S_Kit with ESP32-C3FN4
Code/REPL
from adafruit_ble.services import Service
from adafruit_ble.uuid import StandardUUID
class MyService(Service):
uuid = StandardUUID(0xA000) # (0xA000 - my/Custom Service ID)
mySevice= MyService()
Behavior
Traceback (most recent call last):
File "", line 8, in
File "adafruit_ble/services/init.py", line 3...
Could you say where you got the VID/PID from?
USB_VID = 0x303A
USB_PID = 0x80D9
Hi, your mpconfigboard.h file is using tabs instead of spaces for some indentation. Please use only spaces, and make them line up. I think this is causing the formatting error mentioned in https://github.com/adafruit/circuitpython/runs/5491224618?check_suite_focus=true. You can check for this in your local repo by using pre-commit: https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/check-your-code
not surprising because we haven't added native BLE support for the ESP32 series :)
https://github.com/adafruit/circuitpython/issues/5926
closing as a duplicate, please subscribe to the above for updates!
Sorry for reporting a known bug. But thanks for replying :)
BLE support is not complete. It supports GATT client but not GATT server.
wasn't sure what you meant by "convert them to bytes() before passing them down" Does it mean like on this line: https://github.com/FoamyGuy/circuitpython/blob/6a792ab373bff7e47adcaffaca02019506037f20/shared-bindings/wifi/Radio.c#L291
it would wrap that value in bytes() call like this?
common_hal_wifi_radio_start_ap(self, bytes(ssid.buf), ssid.len, bytes(password.buf), password.len, args[ARG_channel].u_int, authmode, args[ARG_max_connections].u_int);
Ah, OK, i...
OK, I think this is good as it stands. Thanks!
@tulip sleet what is your release plan? I think it'd be good to move to 7.3 after 7.2.1 is out
if you feel the 1.18 merge is stable, etc., I wonder if I should even bother with 7.2.1.
ya, I'd skip alpha
we haven't had any pre-releases on 1.18
so we should definitely do one
but I haven't personally had any issues
7.2.1 is basically ready after these backports afaict
so we might as well do it
https://github.com/adafruit/circuitpython/issues/6115 was in 7.2.0 but I'll move it forward
@jepler is this already fixed in main, or are you awaiting something from ulab upstream?
@slender iron should I make a 7.2.1-rc.0 or just do it? Main fix from my point of view is the auto-reload stuff
then I'll make release notes and release it by tonight
thank you
@dhalbert The corresponding PR https://github.com/v923z/micropython-ulab/pull/514 crashes with the circuitpython documentation: https://github.com/v923z/micropython-ulab/runs/5425878718?check_suite_focus=true
@tough flax did you start the intellikeys pyusb code?
No, I have Ella coming down for a visit and have been swamped... I got the PCBs and snuck in time for assembly 🙂
Very happy with the hardware though
I am thinking about installing the C-API version that you referenced just to see if the hardware works
Thach's WIP is here: https://github.com/hathach/tinyusb/commits/pio-host
I've distracted him a bit from it requesting a lower level host api
his work for that is in the more-host-bare-api branch
@solar whale https://github.com/micropython/micropython/pull/8406 🙂
Woohoo! Thank you!
You're welcome! First contribution to MicroPython 😊
Thanks @slender iron
The last build was mostly network failures and one size failure that seems to be unrelated. Please review and I'll likely need to do some tweaks that will lead to another CI run.
Looks good to me! Did not test.
@lone axle I've got the start of a painter on touchscreen now
pleasantly responsive too
I think this is the one I saw: https://github.com/adafruit/Adafruit_Learning_System_Guides/tree/main/CircuitPython_PyPaint
thank you!
ok, I won't go crazy with mine. that looks neat
could be upgraded to bitmaptools
It could use an adjustment for a maximum size maybe as well. PyPortal Titano has memory allocation error running it
@jaunty juniper another WSGI server: https://github.com/deckerego/ampule
I did find some information about wbits (putting it here for future reference if needed):
- to (de-)compress deflate format, use wbits = -zlib.MAX_WBITS
- to (de-)compress zlib format, use wbits = zlib.MAX_WBITS
- to (de-)compress gzip format, use wbits = zlib.MAX_WBITS | 16
From https://stackoverflow.com/questions/3122145/zlib-error-error-3-while-decompressing-incorrect-header-check
(More information located there as well)
@slender iron @onyx hinge fyi I found a regression in the autore-load fix in the proposed 7.2.1: it will not auto-reload during fake deep sleep. Fixing that, but that seems to reintroduce some of the other older problems. So no 7.2.1 tonight. I'll wait until next week.
https://github.com/adafruit/circuitpython/runs/5491224618?check_suite_focus=true
my VID/PID from espressif, here is a link to the approval from them
https://github.com/espressif/usb-pids/pull/32
Could you say where you got the VID/PID from?
USB_VID = 0x303A USB_PID = 0x80D9
my VID/PID from espressif, here is a link to the approval from them
https://github.com/espressif/usb-pids/pull/32
Hi, your
mpconfigboard.hfile is using tabs instead of spaces for some indentation. Please use only spaces, and make them line up. I think this is causing the formatting error mentioned in https://github.com/adafruit/circuitpython/runs/5491224618?check_suite_focus=true. You can check for this in your local repo by using pre-commit: https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/check-your-code
OKay will check now. thanks
my VID/PID from espressif, here is a link to the approval from them espressif/usb-pids#32
Great, thanks!
@tulip sleet I'm glad you found that before you shipped it. waiting a bit longer can't hurt.
Problem now is trailing spaces after the commas in pins.c.
Problem now is trailing spaces after the commas in
pins.c.
Some editors have settings to remove trailing spaces automatically.
Problem now is trailing spaces after the commas in
pins.c.Some editors have settings to remove trailing spaces automatically.
working on that still. had to switch from mac to windows
Can’t find much detail on this touch controller chip TT21100. Looks like it was made by Cypress but may have been discontinued https://www.mouser.com/PCN/Cypress_Semiconductor_PTN181204.pdf. Maybe now made by Parade Tech, but I can’t find a source with it available. Perhaps this product uses some NOS stock displays? Interestingly your new repo is actually one of the top hits on the big search engine.
A couple of notes from my experience with the Itaca uChip.
I didn't verify the i.MX stuff, though I did look it over. That's what your testing is doing.
Mostly some arg validation stuff. You could make these explicitly called-out TODO's if you don't have time.
Thanks for cleaning up and generalizing the debug UART stuff!
I think this must be an int?
{ MP_QSTR_endpoint, MP_ARG_REQUIRED | MP_ARG_INT},
The default is given as None in the signature. In the pyusb, it doesn't look like this is implemented?
https://github.com/pyusb/pyusb/blob/441d2800166bdfee6acddfa03f22a52a3dbccb21/usb/core.py#L1043
{ MP_QSTR_endpoint, MP_ARG_REQUIRED | MP_ARG_INT },
What do you mean? I assume the converter code would raise an exception when given None.
Added a comment. It shouldn't need any other logic.
I wasn't sure if it was just the callback logic or not.
The signature says the default is None, but if you tried to pass an explicit timeout=None, you'd get an error, despite what the signature says.
@tulip sleet where do you think the utf16 file should go?
I think Damien created the shared directory for that purpose
some but not all are submodules?
the README states the purpose
i wasn't sure about readline, etc. but I guess those are copies
could be in shared/runtime
I have it in shared-module/usb/utf16le.* for now
I hesitate to put it in an existing subfolder because it'd be better if they matched mp
probably it will only get used in USB; I think there is also some UTF16 code in the USB device layer, but maybe it's in tinyusb
I remember writing something, but maybe it was in python for descriptor strings
I offered to put it in tinyusb and thach didn't want it there
the outer function is mp specific anyway
it could be a long-term thing, not a big deal
I borrowed a bunch of the code from FATFS anyway
ok, I've at least split it apart now
CircuitPython version
Adafruit CircuitPython 7.2.0 (local dirty build) for ODT Branch ESP32-S2
Code/REPL
import board, busio, digitalio
cs = digitalio.DigitalInOut(board.D4)
cs.direction = digitalio.Direction.OUTPUT
cs.value = True
spi = busio.SPI(board.SCK, MISO=board.MISO) # SCK = GPIO35 MISO = GPIO37
while not spi.try_lock():
pass
spi.configure(baudrate=5000000, phase=0, polarity=0)
cs.value = False
result = bytearray(4)
spi.readin...
#6132 had a regression: when doing fake deep sleep, a write to CIRCUITPY waited until sleep was done instead of restarting immediately. I fixed this but still saw some flakiness.
After some cogitation, I reworked the basic logic of auto-reload. Instead of using ticks to count down a time before raising the reload exception, I raise the exception immediately, and then wait in main.c for the auto-reload delay, restarting the clock if new writes occur. auto-reload is also check in the fake/re...
I raise the exception immediately, and then wait in main.c for the auto-reload delay, restarting the clock if new writes occur.
This sounds good! It will help with a problem I often saw, where a program would stutter just before auto-reload would kick in.
Looks like the wake from pin failure in light sleep or fake deep sleep was an IDF bug that has been fixed: https://github.com/espressif/esp-idf/commit/41e452e7d8aacb0c6e2aea5b18fe9d6e2c334b9c
I'll update the IDF to fix it.
Deep sleep is broken as described in #6090
Where would we want to put the safemode.py? Next to code.py and boot.py et al?
I looked into implementing this, or at least starting to, and I quickly ran into a comment in main.py
// Create a new filesystem only if we're not in a safe mode.
// A power brownout here could make it appear as if there's
// no SPI flash filesystem, and we might erase the existing one.
One board is not fitting.
This is in response to @tannewt suggestion in https://github.com/adafruit/circuitpython/pull/6074#discussion_r812309726
I believe I have set it up correctly (certainly the sequences match what we do in C++ and MP). One query though, what is the default background color meant to be?
As it currently stands with our config it is white, but that means that to draw black text with displayio I have to do label.Label(font, text=text, color=0xFFFFFF) which seems backwards, but I cannot figure...
@lone axle ping. non-urgent CP text question.
I got some time, what's up?
hey. i seem to remember someone putting together some basic UI elements. like a text list, etc.?
essentially extensions of label, as i recall
There is this library: https://github.com/adafruit/Adafruit_CircuitPython_Simple_Text_Display
that one is like a wrapper around Label that takes care of some of the more specific details around text.
cool. thanks. that might be it. let me take a look.
I've also used GridLayout with a single column and multiple rows in the past to create a vertical list of text items. https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_Layout/blob/main/adafruit_displayio_layout/layouts/grid_layout.py I used it as menu that the user scrolls through in this project: https://github.com/FoamyGuy/CircuitPython_Blink_A_Sketch/blob/f8e0dd7e8e70e5e7cdcdd6a6e8a3fc7666194ed2/code.py#L80-L87
Kmatch also created this one recently: https://github.com/circuitpython/DisplayIO_ScrollBox it's a scrollable text box so it can hold more text than will fit visually in the rectangle it occupies and be scrolled up and down by the user.
Is there anything special to get CP to build with CIRCUITPY_UHEAP on the atmel-samd port?
just enabling it in the board definition causes conflicts with gc
@lone axle sry. got distracted. thanks for the links! those look like what i was trying to remember.
@igrr Has anyone seen issues entering deep sleep from the APP core? It looks like it's hanging when trying to stall the PRO core and then the watchdog resets things.
Thanks @gilded cradle . I saw this and then immediately forgot to comment. Anything you still need from me?
No worries. If everything looks good to you, then no changes are needed.
TinyUSB grew in size:
_usbd_rhport +1
dcd_mutex_def +2
dcd_mutex +4
usbd_int_set +20
storage_erase_filesystem +8
complex_attr +2
osal_queue_send.isra.0 ...
may just be outdated. its not on in any build by default
should probably be removed
golfing a minimal asyncio example a bit:
import asyncio
async def printy(name, period):
while True:
print(name)
await asyncio.sleep(period)
asyncio.run(asyncio.gather(printy("t1", 0.7), printy("t2", 1)))
gather automatically promotes to task, no need to create_task, gather returns an awaitable, pass that straight to run instead of creating a main func. Edit: turns out it isnt compatible with cpython
Nice! I love the simplification.
I believe the background should be black by default. That way it'll match displayio on TFTs.
Thank you for your help, have a great day
is there anyway to query the heap size of an object without uheap?
fyi you can also use bitbangio while-u-wait !
We have these two patches in our own fork:
https://github.com/adafruit/esp-idf/commit/2775b6e213a1876dd1abe4923097ca5b437397e3
The I2C one it appears we don't need, but do you need the esp_phy one?
Thanks for the clarification. So the CircuitPy mini REPL that appears on screen should be classic terminal style of white text on black?
I'll get that inverted then. A related question, how can I easily draw a white background from python code with display IO? I found some guides but it suggested that the only way to do it is to create a white bitmap that is then shown to the screen, but if feels like there's got to be a simpler way. Maybe I've been spoilt by our freedom with the custom Mi...
@ZodiusInfuser AFAIK the way to make a blank white screen with displayio is to make a white something and add it as the first element in the group that you show() on the display, you could then stack more things on top of it.
There is some flexibility with what the white something can be though... It could be a Bitmap that is the same size as the display filled with white pixels. Or it could be a Bitmap that is an even multiple smaller than the display and then use the Group objec...
I’m just starting to evaluate the ESP32-S3 for driving RGB LCD displays. I’ve hacked the lcd RGB esp-IDF example code to strip out the LVGL parts and just draw a colored square “bouncing” along the screen.
I’m struggling to understand how all the timing works for defining each frame.
In my code, I use esp_lcd_panel_draw_bitmap to draw my colored 50x50 pixel box along its motion path inside a while True loop. What appears to be happening is that each frame draws just one new position movement of the box (move by x and y by 1 pixel each). It seems like I can only get one draw_bitmap call in each frame. That doesn’t seem right to me, I suspect something must be blocking to prevent multiple draws in a frame.
I expected that this box would fly around the screen since the while loop would be updating much faster than the frame rate. But alas it’s not the case. Any suggestions on how to understand the sequence of events of queuing up several calls to draw_bitmap and have them all happen before the next frame?
Frame rate is about 12 fps on an 800x480 display, it’s a start.
There is a call back function in the display configuration but I’m not exactly sure how to use it.
.on_frame_trans_done
Can I do a bunch of bitmap drawing and then trigger the next frame? Do I have to do all the work in the callback routine?
Let me explain my rationale for these proposed changes.
Since the vast majority of CircuitPython, its docs, and supporting boards are products of Adafruit, I feel it would be useful to describe how this board differs from common expectations of those Adafruit boards, to prevent accidental assumptions. Ex: if a project for some reason requires green light, it could be handy to know that isn't included, not even via an RGB LED; AFAIK that LED color is not actually documented anywhere, not...
CircuitPython version
Adafruit CircuitPython 7.2.0 on 2022-02-24; Adafruit MagTag with ESP32S2
Code/REPL
#
# MagTag date and time circuitpython script
# modified by @Paulskpt
# Version of 2022-02-08
#
# MAGTAG flashed with CircuitPython version:
# Using library files from:
# a) https://github.com/adafruit/Adafruit_CircuitPython_Bundle/adafruit-circuitpython-bundle-7.x-mpy-20220208.zip and from
# b) https://github.com/adafruit/Adafruit_CircuitP...
@mew-cx: To clarify, @fabaff is an independent reviewer, and is not working for Adafruit.
@fabaff we appreciate your reviews and PR's. We may differ on policy questions.
Thanks! One request re bossac.
We have a writeup of using bossac here
Yep, I used that :-) that's how I created the script. Agree RE adding a link. However, I believe there's utility in a known-good script with all the decisions resolved and documented (albeit for one usecase), rather than requiring every user to resolve from a description. It's an idiom I've embraced over the years.
edited and squashed. TPAL
CircuitPython version
CircuitPython 7.2.0 on Raspberry Pi Pico RP2040
Code/REPL
Pull directly from the RFM69HCW tutorial on your website. Code adapted to use the Pico pins
# SPDX-FileCopyrightText: 2018 Tony DiCola for Adafruit Industries
# SPDX-License-Identifier: MIT
# Simple example to send a message and then wait indefinitely for messages
# to be received. This uses the default RadioHead compatible GFSK_Rb250_Fd250
# modulation and packet for...
I think I found the problem of the OSError -2. I let the MAGTAG connect to a WiFi extender. I just went to the livingroom where is the router of the ISP. I let the MAGTAG connect to the WiFi AP of that router. It worked! I have to do more investigation why the MAGTAG has problems with the WiFi extender. For the moment I close this issue.
CircuitPython version
Adafruit CircuitPython 7.3.0-alpha.0-38-g862210b3f-dirty on 2022-03-13; Adafruit Trinket M0 with samd21e18
Code/REPL
import asyncio
async def foo(bar):
print("foobar")
Behavior
Traceback (most recent call last):
File "code.py", line 2
SyntaxError: invalid syntax
Description
I managed to squeeze asyncio into a fw build for the trinket_m0 using `FROZEN_MPY_DIRS += $(TOP)/../Adafruit_CircuitPyth...
It looks like you swapped MOSI and MISO. GP19 is SPI0 TX (MOSI) and GP16 is SPI0 RX (MISO). So you get "invalid pins".
The signature is busio.SPI(clock, MOSI, MISO)
Thanks. Tried adding MICROPY_PY_ASYNC_AWAIT = 1 to mpconfigboard.h which didn't work, so I edited circuitpy_mpconfig.mk.
The build was successful but at runtime asyncio failed on missing module adafruit_ticks. I added it and then it was missing select and later traceback which I enabled all in mpconfigboard.h. It still complains about missing traceback though.
Thanks. Tried adding
MICROPY_PY_ASYNC_AWAIT = 1tompconfigboard.hwhich didn't work, so I editedcircuitpy_mpconfig.mk.
Add it to mpconfigboard.mk, but it sounds like we need to add some dependencies as well in circuitpy_mpconfig.mk or .h
Digging into the esp-IDF source code a bit more, I’m beginning to suspect that the draw_bitmap code triggers a new frame update. https://github.com/espressif/esp-idf/blob/a8ba5a0264d50f9aadd79838e2672a2828704770/components/esp_lcd/src/esp_lcd_rgb_panel.c#L337. I guess I’ll need to brush up on semaphores to understand how to hack this code to update several different regions before triggering a frame update.
CircuitPython version
Adafruit CircuitPython 7.2.0 on 2022-02-24; Adafruit MagTag with ESP32S2
Code/REPL
import analogio
import board
battery_value = (analogio.AnalogIn(board.BATTERY).value / 65535.0) * 3.3 * 2
Behavior
It seems the battery voltage calculated from the code is longer correct in CircuitPython 7.2.0 (code based on https://github.com/adafruit/Adafruit_CircuitPython_MagTag/blob/main/adafruit_magtag/peripherals.py).
Using 7.0.0 ...
I’ve been poking around with the example code and removing the LVGL parts so that I can directly manipulate the calls to draw_bitmap.
Unfortunately based on my testing and some code review, I think that the function esp_lcd_panel_draw_bitmap only provides for transfer of one bitmap for each frame. I don’t think this is adequate for CircuitPython since it draws several rectangles of data in the [_refresh_area function](https://github.com/adafruit/circuitpython/blob/f13d2187498974a6f5...
Afterburner: the error AttributeError: 'WiFi' object has no attribute 'get_mac_address' is very probably caused by the fact that the latest version of CircuitPython (5.2.0) has inside a class with the name 'WiFi'. To avoid this AttributeError (and other unwanted errors) I made the following name changes:
a) change folder name '/lib/adafruit_portalbase' into '/lib/adafruit_portalbase_psk';
b) change the filename '/lib/adafruit_portalbase/wifi_esp32s2.py' into '/lib/adafruit_portalbase/w...
That helped for sure, ran into another error but it was soldering flux that didn't quite get washed off.
code.py output:
Temperature: 22.0C
Frequency: 914.999mhz
Bit rate: 250.0kbit/s
Frequency deviation: 250000.0hz
Sent hello world message!
Waiting for packets...```
https://nedbatchelder.com/blog/202203/dinghy_digests.html neat looking tool, should try it on circuitpython related repos
Dinghy is a tool I wrote to summarize activity on GitHub issues and pull requests. You configure it to look at certain GitHub resources over a recent time period, and it produces a compact digest of what’s been happening:
It looks like the ESP IDF function esp_adc_cal_raw_to_voltage() may be returning a different value. Running on CP 7.1 (using USB power, which also shows the reported issue) I see a voltage value returned of 2114. On CP 7.2, I see a value returned of 2613. After all the adjusting calculations; 2114 converts to 4.22 volts and 2613 converts to 5.22 volts.
I broke it into three chunks and it’s doing better but not exactly what I wanted.
I have a loop doing 100 “copy” to the buffer before calling “finish”. It appears to operate smoothly during the “copy” phase but stutters at the “finish” phase. Periodically the code will crash due to CPU0 watchdog timeout and cause the processor to restart.
I currently have serial debug statements t...
is this worth addressing ?
>>> rainbowio.colorwheel(-10)
-7680
TileGrid.setitem enforces, but does not document, a limitation to 255 tile elements.
This limitation is not great for my needs, but the failure to document what's going on, or provide a more informative error message, led to a merry hour of debugging. TileGrid also doesn't allow introspection in any way of how many tiles are available to be addressed, so I was extremely conf...
I think the original Python impl didn't check for negative either.
pypixelbuff and Blinka do:
if pos < 0 or pos > 255:
return 0, 0, 0
it would be fine to fix it. the >255 check is already a recent fix.
what would be the preferred fix ? black below 0 and % 256 above ? (add return 0 if < 0 in builtin rainbowio)
Personally I wish it worked for any number like sin.. though if it runs into trouble after 224 or 230 that's less ideal and it's "good" to cause the user to think about what happens after 255.
I would prefer just using % 256 which works great in python for negative numbers too, but how much more complex is it for the C code, that had to be trimmed down to fit ?
&255?
That work s for negative numbers, good call
Do you want to change pypixelbuf and Blinka too?
should they be more consistent (and is % more useful?)
yeah, I noticed the discrepancy when posting code for blinka in the forum and was about to submit a PR to blinka when I noticed the negative numbers issue in the builtin module
I like the time trick for a rainbow animation for its simplicity but had to add a % 256 on blinka
colorwheel( time.monotonic() * some_speed_factor )
I would say we could modify blinka and pypixelbuf to do the modulus. It's more useful. I doubt if any example relies on out-of-range going to (0,0,0)
It turns out you just need to call lcd_ll_start once and then you can keep writing away to the display buffer to your heart’s content. I added vTaskDelay(pdMS_TO_TICKS(10)); to prevent the crashing.
(So far I’ve hacked into the ESP-IDF and changed some of the structure to accommodate these drawing functions. I’ll eventually need some guidance how to make it into a standalone packag...
Thanks for the vectorio suggestion @FoamyGuy! That seems simple enough to set up.
I'm getting this twitter user to try a build with these changes in, and if it checks out I'll take this PR out of being a draft.
https://twitter.com/BeBoXoS/status/1503147248472973318?s=20&t=w7q_tvnk14GlHRFtjeUSsA
Yes, in general the build system does not account for changes to '.mk' files so you should make BOARD=??? clean after changing an mk file.
Btw, if you want to make a clean build in one command, you can do make BOARD=??? clean all — "all" is the command it does by default when no command is specified, and you can specify multiple commands to be done, so this will do clean followed by a build.
Btw, if you want to make a clean build in one command, you can do
make BOARD=??? clean all— "all" is the command it does by default when no command is specified, and you can specify multiple commands to be done, so this will do clean followed by a build.
Does this work reliably when using "-j" to perform a parallel build? If so ... how ?
Automated website update for release 7.2.1 by Blinka.
Does displayio.FourWire.send() accept a str as the data argument? It's typed as circuitpython_typing.ReadableBuffer but I saw recently that str happens to implement that protocol but is not behavior that is intended. Should the argument be typed as a Union or should libraries (I think I see one) that use a str (it's typically a blank string) be changed to b""?
I think it doesn't care internally, it just takes the bytes from the memory
you could also use an array
Make it Union[ReadableBuffer, str] since that's the most correct. The type-checking tools are not going to know that str gets treated as a bunch of bytes.
since that's not true for CPython (regular Python)
displayio.FourWire.send() accepts str for data argument despite being type annotated as circuitpython_typing.ReadableBuffer. Should the fix be:
- Type the argument as
Union[circuitpython_typing.ReadableBuffer, str] - Change implementations of
displayio.FourWire.send()to use validcircuitpython_typing.ReadableBuffer
For what it's worth, I've only seen this in display libraries that use a blank string "" as the data argument, so it may be a special case? Examples:
...
Thanks, I'll submit that fix!
Resolves #6150 by adding str as a valid type for data in the type annotation for displayio.FourWire.send()
@proven garnet @tulip sleet The other position to take would be that the type annotation gives the "ideal" types, even if a relaxed type check within CircuitPython means that specifying some other type today (str) is not rejected. It's not "here's all the things that in fact work today", it's "here's the contract we make about what types will work now and in the future; and what types need to work in an alternate implementation, such as blinka".
the previous case of this were SSID and password in wifi.radio, and there it seems quite fine to take str's. For displayio.FourWire.send(), it makes sense to only take buffer protocol, since you really want bytes. But if we don't change our examples not to use str, or validate the argument not to use str, then there's a case where it works, but not as documented (too permissive).
Good day to all <@&356864093652516868> 👋 The weekly meeting will begin in about 1 hour and 10 minutes in the CircuitPython voice channel here on Discord. If you're participating please add your notes to the document: https://docs.google.com/document/d/1I8mIuR4dXWFDHa32M216Mh_Nj655kqJh2MeRtj4GpLU/edit?usp=sharing
CircuitPython Weekly for March 14, 2022 Welcome to the CircuitPython Weekly meeting notes! Feel free to add your Hug Reports and Status Updates early. During the meeting, we go through them as a round robin sorted by username. If you can’t make the meeting and would still like to participate, ...
Surprised by the meeting time shift? It's because of "summer time" observation in most of the US. View our calendar online in your timezone: https://open-web-calendar.herokuapp.com/calendar.html?url=https%3A%2F%2Fraw.githubusercontent.com%2Fadafruit%2Fadafruit-circuitpython-weekly-meeting%2Fmain%2Fmeeting.ical&title=CircuitPython Meeting Schedule&tab=agenda&tabs=month&tabs=agenda or add it to your calendar app https://raw.githubusercontent.com/adafruit/adafruit-circuitpython-weekly-meeting/main/meeting.ical
@tulip sleet @onyx hinge those are really good points. I think mostly what would worry me is that it isn't just examples but other libraries relying on str being acceptable, and what would cascade if that ever changed for some reason. I guess if it really does rely on the Buffer protocol, maybe it just makes sense to make sure we're using something that will always rely on that.
I don't know much about the core so I don't know what the likelihood or reason that behavior would change, but if it would, maybe it makes sense to futureproof it?
(fix libraries using str as opposed to fixing typing to include str that happens to work right now)
also @onyx hinge another consideration is whether we should actually prevent str's from being buffer protocol in some or all cases
that would be an incompatibility with micropython
we need it internally because there is a lot of shared code betwen strs and bytes, but we could prevent memoryview from taking a str, etc.
what would be the advantage of doing that, in practical terms?
only preventing incompatibility with CPython
e.g. memoryview(str) in CPy/MPy provides access to the raw UTF-8 bytes, not possible in CPython
@lone axle Are you still available after the CP Weekly to work with Eva and I for her to teach us about Adabot patches?
Yep, I am.
Ok, excellent. We'll start after you do the post-meeting whatnot. So let me know when you're done.
I'm happy to file issues with the offending libraries if we decide to go that way. Should be quick fixes too, should just be changing "" to b"" from a quick search on GitHub.
Added!
Thanks Jeff!
@candid sun you might have to close out and re-open the voice channel with the added role
maybe do a mic check before recording starts
thank you!
lurking
lurking
meow
lurking today, didn't have any updates
🐕🦺 🤷
I have a dog too
leave cat and dog notifications enabled
Yay Paul!
thanks. 🙂
The Apoca-pi Now is proof that anything worth building is worth over-building. 🙂
Tag on Twitter & email please
🎉
yay! glad it was helpful 🙂
Good problem: always too many things to want to learn and explore.
Great solution: lots of guides help you get up to speed fast!
🎉
🎊
yay liz
Congrats @candid sun ! Super exciting
thank you all!
Congrats @candid sun !
that would be awesome @onyx hinge
great to see you here @candid sun!
Joining Adafruit on Pi Day will make it easy to remember you work anniversary. 🙂
That came up in our meeting before this 😄
And if you're going to be at pycon, please feel free to open a DM or otherwise chat with me if you are interested in meeting in the hallway track. I will be there the conference days but will leave as the sprints get started.
Melissa and I will be attending the day before the conference (Education Summit), and through the Sprints. Feel free to message me as well if you'll be attending PyCon 2022!
@idle owl wow what a coincidence. want to get together while we're there?
Thanks @minor plume for your contribution to the newsletter and for broadcasting your making
Totally! 😄
I hope to cross PyCon off my bucket list next year
I've heard of it and kinda wish I had more time this year to figure out how I could attend. I miss conferences
I hope to be able to attend PyCon next year too...but it's hard to think that far into the future when the world still feels so uncertain right now.
I've been to one PyCon (2002? a looong time ago, I think it was the inagural one) and one PyOhio (2019). Good experiences.
hope to make pycon a more regular feature of my life while i'm working on CircuitPython, which I have no plans to stop
travelling to events feels so unreal now
Totally does.
i will be running circuitpython workshops on EuroPython this year
when is EuroPython?
Thanks
that's last year
@mental nexus curious how many/any I/Os are left after connecting to the lcd & touchscreen
Congrats @mental nexus!
hah just noticed I pasted 2021 info 
Getting your first PCB is a real awesome feeling @mental nexus good job!
I could have hit Google, too. 🙂
Right now I’ve just got six left (and keeping several not in use that I think are required left alone for PSRAM pins 35-39).
And plus I’ve left the USB pins free (19 and 20)
Oops and one in my six is the Boot button so I think one must be cautious with that one.
Fingers crossed! Amazing that PCBs can be made and populated in small volume in just a few days and “palatable” cost for hobbyists.
I was surprised of the big changes made to remove so-called "marketing statements"
I suspect micropython deliberately made trade offs that are different than ours, but I wouldn't call it "lazy".
🥧
@idle owl When is CircuitPython day again in 2022? I can't find my notes (sorry!)
please subscribe!!
August 19
Tell your friends and others to subscribe too
@turbid radish can we make subscriptions for our cats and dogs, or is it just for people?
thanks. I just noticed earlier today that the 5 year anniversary of the 1.0 release is this July
thanks tim!
Thanks all!👋
thanks foamyguy!
Thanks everyone
thanks everyone! and great job hosting @lone axle !
Thanks
Adafruit CircuitPython 7.2.1 on 2022-03-14; Adafruit Matrix Portal M4 with samd51j19
>>> from adafruit_ble import BLERadio
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "adafruit_ble/__init__.py", line 21, in <module>
ImportError: no module named '_bleio'
>>>
am i missing something?
looks like it was disabled: https://github.com/adafruit/circuitpython/commit/8f741e77675e0b773579fe1cf2384e446ea4fb5e
@slender iron thanks.
Adafruit CircuitPython 7.1.0 on 2021-12-28; Adafruit Matrix Portal M4 with samd51j19
>>> import _bleio
>>>
does it need to be put back in?
yup
more general question. since this:
https://learn.adafruit.com/adafruit-airlift-breakout/circuitpython-ble
could be on potentially any board, is there any case where it should not be included?
This reload thing is awful. This over and over while copying libs to the board. Ended with it working, apparently.Auto-reload is on. Simply save files over USB to run them or enter REPL to disable. code.py output: Traceback (most recent call last): File "code.py", line 7, in <module> RuntimeError: Corrupt .mpy file
It takes space so I'm not sure we want to blanket enable
@idle owl what board are you on?
Feather RP2040.
k, I can try it once I'm done with email
Ok
dan will likely see this once he's back from his meeting too
Yep.
Are you saying 7.2.1 is not working?
i just got out of a non-work meeting
It's reloading repeatedly on every save and every write. 6 times on saves, copying files, it reloaded every 1/4 second the whole time.
No worries
it's supposed to stretch out the restart time
that is not the way I want it to work
@idle owl which board are you trying?
Feather RP2040
CircuitPython version
Adafruit CircuitPython 7.2.1 on 2022-03-14; Adafruit Matrix Portal M4 with samd51j19
Code/REPL
import _bleio
Behavior
Adafruit CircuitPython 7.2.1 on 2022-03-14; Adafruit Matrix Portal M4 with samd51j19
>>> import _bleio
ImportError: no module named '_bleio'
>>>
Description
see above
Additional information
Introduced here:
https://github.com/adafruit/circuitpython/pull/6043
Needed to use ...
are you using pycharm as the editor, on Mac? I don't see repeated reloads on Linux with emacs or circup
I will try it on the Mac
PyCharm.
And iTerm 2, and tio.
Finder did it too though.
So maybe it's a MacOS issue.
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/1oq50yQiocKcPcGAHEyFuRJqNOz5ipXDD62D0aPNctq8/edit?usp=sharing
CircuitPython Weekly for 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 participate, add your note...
I don't know if it helps, but I can reproduce the issue on macOS
I am trying it with Mu - I see two auto-reloads (not 4)
I am using an M1 Mac Mini
I will instrument the restart loop for myself to see what is going on
This is what happens when I edit this code: ```0.489988
0.519988
Code stopped by auto-reload.
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Code stopped by auto-reload.
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Code stopped by auto-reload.
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
That last one finally lets me do something.
I'm on an M1 Macbook, and I copied a font to my feather, and it did it 6 times it looks like, just like Kattni above
I'm also on M1.
the way the code is written, if the writes are <0.75 seconds apart, it should not restart multiple times
so I will verify that
@idle owl okay, post meeting things are wrapped up. I am ready any time.
@lone axle Ok, BRB, refilling water. Then we can get going.
When you say crash do you mean safe mode or a Python exception? If exception, what is the current exception that we raise?
That shared bindings file is where the docs come from so it'd be awesome to add a note to it there.
did you copy with the Finder or in the shell?
Finder
I am copying Arial-12.bdf to the drive. On Linux, I get one autorestart. On MacOS, in the shell, I got two
Become a user, Dan. Use .... Finder....
@adamwolf Yes, I'd do it like code.py I think. That way serial output can go out usb potentially.
Just trying to figure out what is different 🙂
Nooooo
it may be the metadata writes that apple/finder does
it seems to be worse with the RP2040. I tried an ESP32-S2 and a SAMD51 on Mac and I am not seeing multiple restarts
maybe writes take longer on rp2040?
Yes, I may just need to stretch the 0.75 seconds. XIP and writes are getting in the way of each other
maybe
it has aggressive interrupt disabling while writing flash that may have delayed supervisor_ticks before
that would make a lot of sense
We are having dinner guests in a couple of hours and I have to cook. I will do some more work on this later.
so you .75 measurement is truer than before
want me to take a look?
aka, increase the reload time on rp2040?
if you'd like, sure. I did try the RP2040 on Linux and it doesn't seem as bad, so there may be multiple writes: all the junk files macOS writes
yup, that's my guess too
I'll take a look shortly
7.2.2 can have this tweak plus re-enabling bleio on matrix portal
ty!
np
A Python exception -- was the link I provided to the code unclear? It raises the ValueError specified on line 435 there.
(Sorry, I don't mean to sound accusatory; I just meant that I linked that code to demonstrate that that was where the tile number got rejected, and to point out where I was getting the relevant error.)
@lone axle I moved the if START_TIME: indentation out one, and it works now. 🙂 I realised what might be happening, and that fixed it. I'll submit a PR to your repo!
@slender iron Reload using ctrl+D does not reload a bunch, only once. Same out of the REPL using CTRL+D
that's good 🙂
I suspect we just need to increase the timeout for reloads on the rp2040
Oki
(I'm distracted now trying to test my esp change)
No worries, simply wanted to let you know I had more data.
ty
Ok, I've confirmed that import wifi still works ok on this change. For reference, the original issue is: https://github.com/adafruit/circuitpython/issues/5662
@lone axle Turns out you can't set brightness on a single pixel. So, my code isn't doing what I wanted it to. Debating between leaving it with both keys pulsing, trying to figure out another way to do it, or using the LED Animation library.
I wanted only the time-start key to pulse.
Ah, I discovered recently that Dotstars can do individual brightnesses. Hadn't known the differences before.
Interesting.
I wonder why.
Maybe I'm doing it wrong. 😄
I was trying to do pixels[1].brightness which failed.
Is that a code thing or hardware?
For neopixels one option for "lower brightness" would be to use a color closer to black. i.e. 0xff0000 is full bright red, but 0xaa0000 is less bright red. It may get convoluted if you are attempting to puslse it up and down for a fade in / out effect though so maybe isn't the best solution for that.
Yeah I was thinking the same thing. Easier to do using RGB I think. At least for me.
My understanding is it's a difference in hardware, but I did happen to discover it because I noticed code somewhere that was setting it individually and then further confirmed it in the library code.
ATMakers Bill ended up finding code in the core I think as well that referenced the same behavior. There should be a link and brief discussion somewhere in the #live-broadcast-chat history if you're interested in going deeper through what we found.
I always used what you just said change the value from 0x00 to 0xFF but will have to take a look at the dotstars thanks
Anybody have a SharpMemoryDisplay? Would love some help on quickly testing a PR for the library!
@lone axle Called in a loop, but it doesn't update: pixels[1] = (0, (g + 1) % 255, (b + 1) % 150) What obvious thing am I missing? Is that not how % works? 😄
Now that I think about it, it's not going to be the right color anyway.
it will for part of the time. But never again after that.
If they're updating at the same speed anyway.
I could change it to straight up cyan, which might make this simpler. But I'm still not sure how to do this.
Ah, it looks to me like if g and b are incrementing it would work as far as I can tell. Only gotcha I can think of is probably need some time.sleep() or some way to slow it down some, by default it might iterate so fast that it's difficult to see the changes.
b/g are 0 before the while loop.
I have time.monotonic() around it.
In the loop. That's how I timed the pulsing before.
It's not iterating though, afaict.
Printing (b, g) is (0, 0).
Maybe it's my lack of python knowledge but isn't g and b not incrementing? you're just adding one to them
Shouldn't they add 1 255 times?
And actually overflow at that point because I haven't added the "if 255, to back to 0" code.
The modulo % would take care of that so it wouldn't be strictly necessary if I understand.
Either way, it's not even adding 1. They're set to 0 before the loop, and it prints 0 after that pixel line in my code.
That's what I thought... ok..
can you drop it into a gist? I can take a look in context and see if anything jumps out
This seems like something I'm trying to do simply, and maybe it's not so simple.
Sure!
I guess it could all be under one if now because indentation changed.
Updated that. Still doesn't work, but at least it's not redundant.
Also going to have to not leave this plugged in or I'm going to be sending timestamps to random things when I get distracted and start pressing toebeans. 😆
FWIW, I tried the LED pulse line outside of the if in only the while True: and it still didn't do anything.
I also understand this would only pulse up. I was going to tackle the other direction once I got this working.
Ah I think you'll need to increment b and g inside of this if statement:
if time.monotonic() - PULSE_TIME > 0.05:
pixels[1] = (0, (g + 1) % 255, (b + 1) % 255)
print(b, g)
PULSE_TIME = time.monotonic()
b += 1
g += 1
ya sorry that is what i was (badly) trying to say earlier 🙂
Wait, no it doesn't....
😂 It's up to 721 by now.
It was a soft reload that made it look right.
Do I put the % in the loop outside the pixel line?
it will probably be blinking from full bright to full dark if I understand correctly. And "fading" up from full dark to full bright.
Yep
Oof. Autoreloaded on 253 🤦🏻♀️
Oh!
Code is working, print is incorrect.
Alright.
in order to fade back down instead of blink you can use b -= 1 and g -= 1 but you'll also need some logic to tell it when to do which. I would probably make a new boolean fading_up or something and set it to true for increasing and then false once it reaches 255 to start the decrementing. And set it back to true once it reaches 0. At that point you could also get rid of the modulo as well I think.
you can use like b = (b + 1) % 255 and remove any long term overflow possibility (which would take forever to hit)
Ok
Nope.
Check the gist above, that's the basic code I'm running. (Modified now, but I'll update it in a minute.)
ok, one thing I'm seeing is that the autoreload delay only applies if code.py was interrupted
Like by me hitting save? Also when it decides to auto-reload on its own, it reloads a bunch of times. But once every 10 times, it's fine.
hrm. I'll definitely get my mac out to try it too
The autoreload flag is checked in the sleep loop, because that's fake sleeping (even though the VM is gone), so that it will autoreload immediately if sleeping. But yes, it should have the delay loop there too, in case there are multiple writes (which there will be). So I bet it's restarting immediately, and then it falls into the actual running check. So need to factor out the delay loop and call it two places, I guess.
I'm thinking it might be clearer to have the global just be the last write completion time
i was thinking of that too, but I was a little worried about the cache
Just changing the obvious confusion between ESP32-S2 and ESP32-S3...
But maybe the first YouTube video need to be removed, it does not seems to talk about ESP32-S3 but only about ESP32 and playing doom or game emulation.
the cache is flushed explicitly on VM exit, but maybe not on VM entry
seems like flushing on vm entry could be good too
since the ticks are uint_64, it can't be an atomic volatile. so maybe need to make setting it be non-interruptible.
or we add some 32 bit tick math
instead of being a global, it could be a few routines in reload.c that you call to set and check or get it
@lone axle I got it working, but it flickers every so often, and when it does, both LEDs flicker, not only the one being pulsed. No consistency on the flickering. When it does, it's a single flicker every so often. Gist updated.
Initially the flickering was because it was hitting -1 or 256, but I fixed that.
Flickering is not consistent though. It's not happening right now. 🤷🏻♀️
The only issue I can foresee with this is if the reloading is this finicky, it's going to lose its elapsed time on reboot. But hopefully that's resolved soon 🙂
I'm not about to figure out how to save the elapsed time in nvm or whatever the right term is. 😄
weird. Nothing jumps out to me from the current version as a potential cause of that. Tonight is the first night of an online course I'm teaching for the next few weeks, so I won't have time to get further into it tonight. But I should have some time tomorrow to find and assemble one of the neokey featherwings I have and try it out to see if I can replicate the flicker.
No worries! Have fun! I'll keep the gist updated if I make any more changes. Simply let me know when you get around to it.
will do
I am trying to make this more neutral and applicable to both the build-in antenna and the uFL connector version.
(I wish Adafruit could produce a picture that show both product next to each other for use on this page)
I also made similar suggestion for the learn guide to try to have both ESP32-S2 QT Py more equal even if one came later.
@idle owl around still? want to try what I have now?
I haven't tried it on my mac yet though
Yes, and very yes!
