Get a chunk of data from readinto instead of a single byte. This
speeds up the parsing by reducing the number of function calls.
Fixes #3703
1 messages ยท Page 339 of 1
Get a chunk of data from readinto instead of a single byte. This
speeds up the parsing by reducing the number of function calls.
Fixes #3703
@hollow gazelle โ๏ธ
@tulip sleet do you have the download count info handy for beta 1?
yes please ๐
doing oct and nov
@slender iron ok, pushed!
Hello!
I've been wrapping up development of my first Circuit Python compatible board, the CP Sapling. I've built and tested the configuration today in making sure everything works and is up to standards. Let me know if I missed anything.
Thanks! ๐
I fully intend to do this when I return from working away, start of December. Also been working on UF2 for it. Pushing to develop my code-fu!!
ok, beta 1 is out!
Woo!
and I'm out as well. See you all monday!
Have a great weekend @slender iron
have a nice break!
I tried to build @tannewt's tannewt/circuitpython/tree/esp32s2_udp and test it with tannewt/Adafruit_CircuitPython_NTP/tree/raw_ntp but could not successfully build esp32s2_upd.
Although I can build circuitpython@main.
Anyone else had a go at testing these?
parameter 'size' was used
../../extmod/modujson.c: In function โujson_python_readintoโ:
../../extmod/modujson.c:87:75: **error: unused parameter โsize**โ [-Werror=unused-parameter]
87 | STATIC mp_uint_t ujson_python_readinto(mp_obj_t obj, void *buf, mp_uint_t size, int *errcode) {
| ~~~~~~~~~~^~~~
cc1: all warnings being treated as errors
download_url_template = "https://downloads.circuitpython.org/bin/{board}/{locale}/adafruit-circuitpython-{board}-{locale}-{version}.{extension}" -- that should take care of that
INFO:root:Executing ['C:\\Program Files (x86)\\BOSSA\\bossac.exe', '-p', 'COM5', '-e', '-w', '-v', '-R', '--offset=0x2000', 'C:\\Users\\bcr00\\AppData\\Local\\Temp\\tmp7306f3ae\\adafruit-circuitpython-feather_m0_rfm69-en_US-6.0.0.bin'] ๐ฐ
I'll update the PR this evening, but WIFI_FAST_SCAN would be the default anyway (behaviour as before the change).
} else {
config->sta.scan_method = WIFI_FAST_SCAN;
}
@lone axle @tulip sleet @slender iron survived! ```PS C:\Users\bcr00\Source\bcr\blinka-cli> python .\blinka.py bossa --port COM5 --board feather_m0_rfm69
INFO:root:Using en_US for the locale
INFO:root:Executing C:\Program Files (x86)\BOSSA\bossac.exe -h
INFO:root:BOSSA version 1.9.1
INFO:root:Executing C:\Program Files (x86)\BOSSA\bossac.exe -p COM5 -i
INFO:root:Address for device ATSAMD21x18 is 0x2000
I will be executing the command line:
C:\Program Files (x86)\BOSSA\bossac.exe -p COM5 -e -w -v -R --offset=0x2000 C:\Users\bcr00\AppData\Local\Temp\tmpnq38_s8f\adafruit-circuitpython-feather_m0_rfm69-en_US-6.0.0.bin
PLEASE REVIEW IT
Ready to do this? [y/N]y
INFO:root:Executing C:\Program Files (x86)\BOSSA\bossac.exe -p COM5 -e -w -v -R --offset=0x2000 C:\Users\bcr00\AppData\Local\Temp\tmpnq38_s8f\adafruit-circuitpython-feather_m0_rfm69-en_US-6.0.0.bin
Erase flash
Done in 0.911 seconds
Write 181416 bytes to flash (2835 pages)
[==============================] 100% (2835/2835 pages)
Done in 2.106 seconds
Verify 181416 bytes of flash
[==============================] 100% (2835/2835 pages)
Verify successful
Done in 5.960 seconds
PS C:\Users\bcr00\Source\bcr\blinka-cli> type E:\boot_out.txt
Adafruit CircuitPython 6.0.0 on 2020-11-16; Adafruit Feather M0 RFM69 with samd21g18
PS C:\Users\bcr00\Source\bcr\blinka-cli> ```
@lament sentinel Awesome! I see it has a y/N before it flashes which gives the user the chance to bail. Thats even better than the --dryrun flag I was thinking of.
I just fired up Adafruit Learn: CLUE Rock, Paper, Scissors Game using Bluetooth in 6.0.0 with a fresh (20201120) set of 6.x libraries and it throws an exception as soon as it starts the relatively complicated bluetooth chatter on a CLUE.
I tried a bit of REPLing to reproduce a small example of it. This seems ok:
Adafruit CircuitPython 6.0.0 on 2020-11-16; Adafruit CLUE nRF52840 Express with nRF52840
>>> from adafruit_...
@timber mango ๐
I'll PR in a few hours. Pretty good refactor of Adafruit IO CircuitPython in that by removing the requirement for a wifimanager object and using a socket instead, added ESP32S2 compat, CPython compat, 32spi backwards-compat, and I'm going to test with ethernet (should "just work")
What is the current naming convention for a CircuitPython device which can import its ssl/socket implementation natively? Native networking?
For examples, we'll have adafruit_io_simpletest which uses ESP32SPI socket object, adafruit_io_cpython which uses sockets and adafruit_io_simpletest_wifi which uses native sockets ?
Does this make sense? Should we be defaulting the _simpletest to native sockets now?
I would recommend a new set/folder/names for ESP32S2 compatible
I will be writing up a howto on my project and will likely steer newcomers that may trip on that subtlety
Maybe a "native sockets" folder or example set?
I think I'll default to native socket example for simpletest, and then append _esp32spi onto another simpletest since it's another network interface type
We're already in 2x folders (HTTP API/MQTT API) for this library so I don't want to make users drill deeper than they need to...I'll bring it up during the mon. meeting, we can always do a PR to reorganize examples ๐
@onyx hinge Could I ask you an enum q? I want to initialize a mutable locals dict with an enum value, but I don't see a way to look up an enum value at compile time to get a pointer to it to put in the dict.
hmmmm good question
I want to put ResetReason.INVALID in as the initial value.
there are no symbols that correspond to each enum vaslue
right
and then I also can't compare a returned enum value with its object; i have to extract its integer value
The macro MAKE_ENUM_VALUE does create a named singleton object but it is given STATIC linkage
we could take the STATIC out of MAKE_ENUM_VALUE (and MAKE_ENUM_MAP)
@lone axle yeah, I understand where you were coming from -- there is the git approach ("interactive" and "dry-run") and then there is the apt approach (Do you want to continue? [Y/n]) and I went that way
or if it's in the same translation unit you can just use the named object, which comes from preprocessor pasting: prefix ## _ ## name ## _obj
i don't know that the map needs to be unstatic, but it might be convenient. So then it would be RESET_REASON_INVALID_obj
for the object
that works for me
I think that's right
I will try that, thanks
it will just be a part of my upcoming PR unless you want to separate it out
probably no need
which reminds me I have reviews to do .. but I also really need to finish i2s up
๐
@timber mango if you have time to test today, I checked out the update to AIO CPY here - https://github.com/adafruit/Adafruit_CircuitPython_AdafruitIO/pull/53
will do, busy day with meetings but I will pull and test. Do I need to update to the latest nightly CP 6.x?
In that case you can PR with just the DurationAlarm working and I can continue here with everything else I have got staged. I will update my branch from main accordingly.
Yep!
@prime flower I've seen the chipset used as a prefix to sample file names where they have been updated.
Downloads/adafruit-circuitpython-bundle-6.x-mpy-20201120/examples via ๐ system
โ grep -e "import adafruit_requests" * --recursive
esp32spi_simpletest.py:import adafruit_requests as requests
esp32spi_wpa2ent_simpletest.py:import adafruit_requests as requests
esp_atcontrol_countviewer.py:import adafruit_requests as requests
esp_atcontrol_webclient.py:import adafruit_requests as requests
fona_aio_post.py:import adafruit_requests as requests
fona_cheerlights.py:import adafruit_requests as requests
fona_simpletest.py:import adafruit_requests as requests
requests_advanced.py:import adafruit_requests as requests
requests_advanced_cellular.py:import adafruit_requests as requests
requests_advanced_cpython.py:import adafruit_requests
requests_advanced_ethernet.py:import adafruit_requests as requests
requests_github_cpython.py:import adafruit_requests
requests_https_cpython.py:import adafruit_requests as requests
requests_simpletest.py:import adafruit_requests as requests
requests_simpletest_cellular.py:import adafruit_requests as requests
requests_simpletest_cpython.py:import adafruit_requests
requests_simpletest_ethernet.py:import adafruit_requests as requests
wiznet5k_aio_post.py:import adafruit_requests as requests
wiznet5k_cheerlights.py:import adafruit_requests as requests
wiznet5k_simpletest.py:import adafruit_requests as requests
wiznet5k_simpletest_manual_network.py:import adafruit_requests as requests
If you grep the examples Downloads/adafruit-circuitpython-bundle-6.x-mpy-20201120/examples via ๐ system โ grep -e "import adafruit_minimqtt" * --recursive I see some examples with the suffix related to the connectivity. Maybe _wifi_esp32s2 _wifi_esp32spi ?
I kind of like the folder root folder for ALL boards, subfolders for chipset specific examples. But in your case all the examples would be in subfolders I guess.
@idle wharf Interesting, I checked it out. The thing which is/should be variable between the examples is the network interface (socket), not the chipset
Maybe we should go for folders for each interface and put a matching example_interface.py in each folder
Main issue I see is that some examples (like requests_github) are specific to one interface so a user would need to adapt the code
Hmm, maybe native v. coprocessor would have been a better word choice in my example.
I don't have a suggestion better than your strategy. But I think the scenario is. "I'm new to CP, I have this board in my hand, which example do I use?" So what naming helps best with that ... I'm not sure ๐
same. I think "I have an ethernet wing, I see adafruit_io_ethernet"
"_native_wifi" and "_esp32spi_wifi" might be self-explanatory...or confusing. Not sure.
Will all the esp32s2 boards have "s2" in them? But I assume any new chipset with native wifi would also use the same examples...
Yeah, I think "_native_wifi" and "_esp32spi_wifi" is the best way
_native_wifi v. _coprocessor_wifi its a repeatable model for other boards
I'm going to test your IO change PR #53 today.
between meetings
Ah True. More support for your approach perfect !
esp32spi is not airlift?
@onyx hinge removing the STATIC worked, but I ended up having to add a "manual" declaration of RESET_REASON_INVALID_obj in ResetReason.h. So a longer-term fix would probably add some kind of macro to handle the initial C enum declaration and provide the declarations for the _obj (and map) objects
Same question for BLE. Build-in wifi from a NRF52 and BLE as a ESP32 airlift and maybe some old UART Bluefruit things?
ESP32SPI is "airlift", maybe _airlift would be a proper prefix
the Adafruit_CircuitPython_Airlift library does some management for both BLE and wifi (wifi part is not used yet)
it is meant to support radio coprocessors in general; right now it only supports ESP32 (not ESP32-S2, which is not a co-processor)
(I am going afk)
@tulip sleet thanks for the notes -- I am sure there is room for improvements. in any case I'm glad you could get it working for your needs.
@prime flower I hit the OError 0 issue on my magtag. https://github.com/adafruit/circuitpython/issues/3686
I'll try again later and on my Feather S2 as well later today
what's the minimum esptool version needed for ESP32S2?
@prime flower I'm getting an error importing socket- what library does that come with?
looks like 3.0?
I've read from the Feather S2 they ask for the latest
yeah 3.0 To install the ESP32-S2 UF2 bootloader on your FeatherS2 you will need to have the latest esptool installed (3.0 as of this time). You can grab esptool tool from the github repo
yep. thanks.
also seeing in release notes for 2.8
support for flashing ESP32-S2 will be added in a future version
and in 3.0
Support for ESP32-S2 SoC has been added
There is something strange on /download from circuitpython.org. When I want to download CircuitPython 6.1.0-beta.1 it default to French (my browser is maybe configured for advertising I prefer french content) but 6.0.0. is proposed in English.
As if the page was smart, but only for one of the version.
@timber mango For an S2? There is no socket module. Here's what I import:```import ipaddress
import wifi
import socketpool
import ssl
import espidf
import adafruit_requests```
On the S2 do we still need the ESP stuff?
Like this? # If you are using a board with pre-defined ESP32 Pins: esp32_cs = DigitalInOut(board.ESP_CS) esp32_ready = DigitalInOut(board.ESP_BUSY) esp32_reset = DigitalInOut(board.ESP_RESET)
nope
not unless you also have a co-processor ๐ https://gist.github.com/anecdata/cdf0d931d8b2dee21775d34d0df69879
I'm looking at Brett's new samples and I am still a little confused: https://github.com/adafruit/Adafruit_CircuitPython_AdafruitIO/tree/1ebad058e17b93ea051b1975171d7e7acd7fe10b/examples/adafruit_io_http
looking at the wrong one
@timber mango Yes, that's the right one
@onyx hinge Jeff, I just wanted to thank you for the support that you provided in the past couple of days. I have split the test scripts, and circuitpy checks pass now.
That's excellent news, thanks for the update and you're welcome -- you are doing the heavy lifting, I have offered a little advice and a little tidying
That might very well be true, but without the icing the cake is, well...
@thorny jay There may well be something wrong. Feel free to file an issue on https://github.com/adafruit/circuitpython-org
I can honestly say that in this case your contribution was instrumental.
Need to pick through why my PR isnโt passing precommit.
everyone wins
@timber mango adafruit_io_simpletest.py uses socketpool for esp32s2
@onyx hinge One one-second question, though: I have this now #ifdef CIRCUITPY #define ULAB_NUMPY_COMPATIBILITY (0) #else #define ULAB_NUMPY_COMPATIBILITY (1) #endif but this is probably not the way. I have tried #define ULAB_NUMPY_COMPATIBILITY (1 & !CIRCUITPY) but that didn't fly. Basically, I wanted to make sure that in circuitpython, you always have sub-modules. The #ifdef clause doesn't prevent that.
One option off the top of my head and untested would be #ifndef ULAB_NUMPY_COMPATIBILITY #define ULAB_NUMPY_COMPATIBILITY (!defined(CIRCUITPY)) #endif
There might be people, who run micropython, but do not want numpy-compatibility.
I would like a construct, where you can set ULAB_NUMPY_COMPATIBILITY, and it is re-set to 0, if you are running circuitpython.
I think the sub-modules have their place.
The ifndef guards make it so that you can supply your setting in some other way, such as (I think this is the micropython way?) make CFLAGS_EXTRA=-DULAB_NUMPY_COMPATIBILITY=0
Yeah, that much is clear, but won't people be unhappy, if they have to supply pre-processor constants on the command line?
You would prefer to see them edit the file with the #define ULAB_NUMPY_COMPATIBILITY line in it?
and not seeing (0) or (1) as the current value might confuse?
in that case maybe you just needed (1 && !defined(CIRCUITPY)) in lieu of (1 && !CIRCUITPY) ?
@prime flower I'm using a snippet and getting an error that it wants WiFiManager ```Traceback (most recent call last):
File "code.py", line 47, in <module>
File "adafruit_io/adafruit_io.py", line 480, in init
TypeError: This library requires a WiFiManager object.
nm, I needed to pull the latest release
Personally, I prefer definitions in header files, but that shouldn't matter. If you think that command line arguments are OK, we could go with that. But then we don't really need any safeguards for circuitpython, you can just set the constant in your makefile.
(1 && !defined(CIRCUITPY)) in lieu of (1 && !CIRCUITPY) I think this is the missing link.
sure, circuitpython can start supplying -DULAB_NUMPY_COMPATIBILITY=0 next time we synch up
OK.
thank you @prime flower it's working with one variable uploading to Adafruit IO. If all goes well I can post and share in the next several days. Thanks for making this a priority!
@timber mango did that sample work for you with the wifi.connect call and no wifi.radio.start_scanning ? I thought you had to scan, check each network for a match and then connect when its found. Maybe its changed though
As shown in the MagTag example https://learn.adafruit.com/adafruit-magtag#connect-to-wifi-3077422-5
this is what I am doing
print("Connecting to %s"%secrets["ssid"])
wifi.radio.connect(secrets["ssid"], secrets["password"])
print(print("Connected to %s!"%secrets["ssid"]))
print("My IP address is", wifi.radio.ipv4_address)```
NVM... it does work as written.
My feather was just unhappy and then the magtag worked...
Thanks @timber mango !
np!
Thanks @prime flower for the HTTP updates to IO
...what is that plate ๐ฎ
more surprises
``` now with emojis
@idle wharf connect implicitly does a scan, and you may be interested in this scan-connect improvement in progress https://github.com/adafruit/circuitpython/pull/3727
@crimson ferry you're a mind reader. I am using that PR!. saw on the deep dive yesterday. Also super easy to try PRs with the new github cli gh pr checkout 3727
I think I do the scan because Scott did it that way months ago and my guess is connect changed since then when he first got it to work. The code keeps changing on me. ๐
Yes, things change fast, I have a hard time keeping up, let alone testing
especially on this port
We'll have a really nice S2 connect function... connect directly to a BSSID, connect to first available AP on a channel, or connect to best RSSI among multiple APs of same SSID
@onyx hinge do you know anything of the CI test process for PRs?
wondering if there is anything I can do to fix the failure issues of the CI Test on my end
It's not critical to my project, but just a heads up this breakout board/code is pretty unstable on the S2: https://learn.adafruit.com/adafruit-lc709203f-lipo-lipoly-battery-monitor/python-circuitpython
Just doing a library include causes frequent hangs on the S2 board
@ornate breach enough to be a menace.
I assume we're talking about https://github.com/adafruit/circuitpython/pull/3729
oui
failing pre-commit and CI test (at build stubs)
the build stubs test I'm not entirely sure there is anything I can do about that
well, first thing to deal with is a common snafu when using git
it looks like various "interesting" things have happened in your git history, including some changes you don't intend to make
these are changes in "submodules". I've never been good at explaining submodules, but one of your commits makes unintentional changes to them: https://github.com/adafruit/circuitpython/pull/3729/commits/06c7e6f22a7c9e6d3834e9a090f9c29c70af3b01
git has a deceptive way of presenting submodules as though you've changed them, and encourages you to add and commit them. You have to learn that git is tricking you.
makes sense
so now that you're in this situation, what to do? Here's what I would do: I would make sure and take a copy of all my intentionally added files and stash them somewhere safe outside of git
then I'd get a fresh git situation, where my branch was exactly equal to adafruit's "main" branch, but it has a meaningful name, such as "add-sapling"
then I'd copy my new files back in, add and commit them
and create a fresh pull request
which of those steps do you feel comfortable trying on your own and which do you want coaching with?
also do you have reasonably fast/unmetered internet or are access costs a concern?
should be able to manage
I could talk you through advanced stuff like using git rebase etc, depends if you want to get the job done, expand your git know-how, or what
closing the request to deal with issues with submodules per discussion with @jepler
also I sometimes give different advice than the guides, so I may teach you something different than what the "official" is; I did a lot of git before ever starting on circuitpython
so just be aware of that
I learned the really hard way to managing Git team repositories this summer
so so many merge conflicts and whatnot
@timber mango we know that in some versions including "6.0.0 stable", i2c is very _un_stable on esp32s2. However, we believed it was fixed in 6.1.0.alpha.1. If you're finding it's not, it may merit a fresh issue on github. At least I think that is an i2c breakout you're working with.
What common things should I look into if I'm only seeing memory allocation errors AFTER converting all my files to mpy??๐ข
mpy-cross compiling issues? Some strange import order thing?
(xpost from help-with-cp)
@onyx hinge it is the latest build for the S2 and the latest libraries too. Adafruit CircuitPython 6.1.0-beta.1 on 2020-11-20; FeatherS2 with ESP32S2 all is over I2C
@timber mango OK, can you file an issue on github and describe in a little more detail what you're seeing?
yes, I will do a new script using the demo code and document what I am seeing
Okay,
Here is the updated pull request. Built off a clean fork and new branch specific to the CP Sapling. Hopefully this clears up the CI Pre commit & CI Test issues.
Thanks!
@ornate breach OK now you have the unwanted changes taken care of, yay! CI will still fail, boo!
It is somewhere in the javascript:
reading about esp32-s2 logging library https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-reference/system/log.html. i don't have experience with error logging systems, but intuitively it seems backwards to me: you set a default level at compile, but you can narrow it down to only higher-severity messages at runtime.
"trim trailing whitespace" failed
To me, it seems I'd want to enable more (lower-severity messages) at runtime if debugging, and seems that requires extensive changes all over ๐ฆ
huh..
@ornate breach so there are at least two things left to do .. first is set up pre-commit locally and use it to help you resolve the problems. https://pre-commit.com/
so you'll install the pre-commit program (e.g., with pip) and then activate it in your particular git clone (pre-commit install).
Then you can run pre-commit and commit the result manually, like so: ```$ pre-commit run --all-files
Check Yaml...............................................................Passed
Fix End of Files.........................................................Passed
Trim Trailing Whitespace.................................................Failed
Fixing ports/atmel-samd/boards/CP_Sapling_m0/pins.c
Fixing ports/atmel-samd/boards/CP_Sapling_m0/board.c
$ git commit -m"trim trailing whitespace" ports/atmel-samd/boards/CP_Sapling_m0/board.c ports/atmel-samd/boards/CP_Sapling_m0/pins.c
Check Yaml...........................................(no files to check)Skipped
Fix End of Files.........................................................Passed
Trim Trailing Whitespace.................................................Passed
[detached HEAD 84145a8f6] trim trailing whitespace
2 files changed, 3 insertions(+), 3 deletions(-)
once you've set this up the good thing is, it actually gets checked locally instead of remotely. BUT we still have one more thing to do if I'm not mistaken
there's a file .github/workflows/build.yml -- you may have to "show hidden files" to get to the .github directory/folder, depending on your os and editor
on about line 178, add your new board in case sensitive alphabetical order, so between ADM_B_NRF52840_1 and TG-Watch02A if I'm not mistaken.
make a new commit and then push your two new commits and we'll see what happens
okay
passed precommit
now waiting on CI test
Thank you for the direction @onyx hinge ๐
thanks for your contributions!
It can feel onerous to get through all the hoops so I appreciate you and your time
yeah, it's all worth it in the end ๐
makes it easier for the next board I add
odd, the new commit didn't reflect the change.
in my app I am using several sensors for i2c using this: i2c = busio.I2C(board.SCL, board.SDA, frequency=100000)
I want to use another but the example is this sensor = LC709023F(board.I2C()) what is the correct call here for the sensor?
IIRC busio is the older way of doing it
would the newer way be something like sensor = LC709023F(i2c())?
This activate when my browser connect to accounts.adafruit.com and if I browse in an anonymous browser, I don't have that behaviour.
This also explain that I don't have the behaviour in Edge, I never connected to Adafruit.com with Edge (Chromium version).
It might also be linked to 2Factor, because I enabled that recently, and do not remember that behaviour.
Maybe why is it a bug you may ask?
The page should change both language selection (for 6.0.0 and 6.1.0 beta) or none.
There is ...
I think it would be the second way you had it: sensor = LC709023F(board.I2C())
@tulip sleet For https://github.com/adafruit/circuitpython/pull/3677 Scott wants me to add a new "IDFError" exception. What module would I put IDFError in?
@fathom shell that's from the example, but I don't think I can use busio and board at the same time
Oh i see I misunderstood @timber mango If you want to use just busio then I think it would be sensor = LC709023F(i2c) where i2c is the busio object. That's how I did it until I learned that board.I2C() is the "newer" way
@ornate breach looks like the change to build.yml is still absent
umm and pre-commit is unhappy again
okay, ran pre-commit local and pushed again
as for build.yml... do I need to change the locally/manually?
@timber mango hope it worked!
It did, thank you
woot!
@ornate breach right, you need to edit and commt that file, adding your new board to the list of all boards in the right spot alphabetically
I think board.I2C() just creates a busio I2C object on the default I2C, so you can i2c = board.I2C() as a shortcut for using board.SCL, board.SDA
where is the build.yml file? i know it's a hidden file, just curious what directory?
.github/workflows/build.yml```
it's not just an idle question, when you need to edit it
@jaunty juniper I think you're right from when I was last reading about this
oh I guess there's an espidf module
If I connect to wifi, upload to Adafruit IO, then sleep for a minute or more, do I need to do anything to reconnect to wifi, such as put this in my "while" loop? # Connect to WiFi try: print("Connecting to %s"%secrets["ssid"]) wifi.radio.connect(secrets["ssid"], secrets["password"]) print(print("Connected to %s!"%secrets["ssid"])) print("My IP address is", wifi.radio.ipv4_address) except ImportError: print("WiFi issues") raise
Do I need to poke the CI again?
github gets tired sometimes, I'd give it an hour to shake loose
@timber mango esp32-s2 automatically reconnects when necessary (once you've done a connect)
eh now there's an issue with the check yaml
okay so it was because I used a tab instead of spaces.
darn those ascii character representation of tabs compared to spaces
I can see now why people argue over 2/4 spaces vs tabbing
@crimson ferry I see this error where my code posts to AIO, sleeps, then fails. ```Traceback (most recent call last):
File "code.py", line 86, in <module>
File "code.py", line 72, in <module>
File "adafruit_io/adafruit_io.py", line 656, in get_feed
File "adafruit_io/adafruit_io.py", line 542, in _get
File "adafruit_requests.py", line 594, in get
File "adafruit_requests.py", line 581, in request
File "adafruit_requests.py", line 119, in init
RuntimeError: Unable to read HTTP response.
apparently I need to revisit the alphabet
@timber mango if you try/except and retry, what happens?
Hi! I'm very new at using the circuit python libraries. Does anyone know which libraries I can use to output images and text to an e-ink display? I'm using a magtag. Can I just use displayio? and if so which displayio should I use? Sorry if that is a really basic question.
@blissful badger Yes, displayio. Have you checked out https://learn.adafruit.com/circuitpython-display-support-using-displayio (more questions? better in #help-with-circuitpython )
yay it worked! thanks @onyx hinge again
excellent!
now just to get through all the other builds
Fine to merge if it passes CI
ty @crimson ferry I will read through that! also I thought i was in that channel whoops โค๏ธ tyvm
Testing performed:
The good:
The bad:
import array
import audiobusio
import audiocore
import board
import supervisor
...
@timber mango I also see that sort of errror and no sleep involved. Just doing a get.
>>> wifi.radio.connect(config.SSID, config.WIFI_PASSWORD)
>>> print(f"ip: {wifi.radio.ipv4_address}")
ip: 192.168.1.246
>>> pool = socketpool.SocketPool(wifi.radio)
>>> requests = adafruit_requests.Session(pool, ssl.create_default_context())
>>> response = requests.get("https://io.adafruit.com/api/v2/time/seconds")
>>> response.text
'1605909658'
>>>
paste mode; Ctrl-C to cancel, Ctrl-D to finish
=== for i in range(0, 10):
=== try:
=== response = requests.get("https://io.adafruit.com/api/v2/time/seconds")
=== except OSError:
=== print(f"Try #{i} failed with OSError: Sleeping for 2 secs before next try.")
=== time.sleep(2)
=== continue
===
Traceback (most recent call last):
File "<stdin>", line 7, in <module>
File "<stdin>", line 3, in <module>
File "/lib/adafruit_requests.py", line 594, in get
File "/lib/adafruit_requests.py", line 581, in request
File "/lib/adafruit_requests.py", line 119, in __init__
RuntimeError: Unable to read HTTP response.
>>> print(f"ip: {wifi.radio.ipv4_address}")
ip: 192.168.1.246
@idle wharf I'm seeing this too , every other GET, and takes a full minute to get the RuntimeError: Unable to read HTTP response. exception. (FeatherS2; 6.1.0-beta.1)
@lone axle And I got your bootloader reboot snippet to work on my Titano. ```PS C:\Users\bcr00\Source\bcr\blinka-cli> python .\blinka.py bootloader --port com3
๐ Rebooting device in bootloader mode
Nice! it connects and executes via REPL?
Yeah, basically it's "fire and forget" so I send like three Ctrl+C and then the code and then ๐
I am familiar with this technique ๐
Would you be interested in a command that will read a local .py file and send it into the REPL one line at a time?
Yeah, sweet
I have something like that in the old Android Circuit Python editor I made, and I always really liked the agility of being able to run a script without changeing code.py
I think collecting the output is the only derp part of that
I see this on the MetroS2, bit I have also seen it on the UMFeatherS2.
Did you find something you like for timing? I think if I just honk Ctrl+C three times with no sleep it doesn't work. So I added in 0.2s between each
@lament sentinel iirc it was a bit of a guess and check venture until it got mostly reliable. The code I ended up with is here: https://github.com/FoamyGuy/Android_CircuitPython_Editor/blob/master/app/src/main/java/com/foamyguy/circuitpythoneditor/MainActivity.java#L442 Looks like I landed on 100ms between most things that I sent into the REPL.
interestingly it also looks like I went a bit lower, only 50ms between commands when re-writing the code file on the device via REPL.
what's the formatting example for try/retry? I can't find any examples besides try/except
@timber mango Easiest is try/except, and just pass in the except to skip that time (retry would be manually set up somehow... timing, loops, within the except, etc)while True: try: r = requests.get(TEXT_URL) print(r.status_code, r.reason, r.headers, r.text) except Exception as e: # RuntimeError: Unable to read HTTP response. # ConnectionError: Unknown failure sys.print_exception(e) # ...
OK thank you
what's interesting is that I have a bme680 sensor, the battery gauge, and the pm25 air sensor all connected via stemma cables to a Feather S2. Alone on the circuit the battery sensor runs the test sketch fine, but when I fold it in with the rest of the sketch it routinely crashes the board. Without the battery sensor library, the AIO stuff runs pretty reliably
It looks like my board hangs before it even connects to wifi
This is super common: ```Press any key to enter the REPL. Use CTRL-D to reload.soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Connecting to dha
then it disconnects and the board comes back as "not recognized" until I reset it again
@timber mango I feel like you are doing the exact same things as I am today.
I also see these wifi.connect hangs after reboots that work fine with a reset.
I will unhook my battery
( I am using my MetroS2 right now, but I was seeing the same things on a FeatherS2)
ew gross, it is hanging Putty too ๐
I just disconnected my battery too @idle wharf
are you using wifi.connect or wifi.radio.connect?
Other than I'm only using my BME and I store my secrets differently (has no impact on this) we're doing the same thing.
I am running my own build from cp@main
Hello everyone, does anyone know of a project that measures decibels? I need references on this topic
Hi @somber epoch let's jump over to #help-with-projects
Is there a branch for testing this out? This could be super handy for my magtag
Is there a branch for testing this out? This could be super handy for my magtag
This is my first priority right now. Iwill submit a PR as soon as something is working. The ESP32-S2 is the first targeted port.
Attached is a very slimmed down example. I was doing more sending data from a sensor, but you can reproduce this just using the time server on AIO.
sleep_bug.txt
## SETUP BLOCK ##
print("Setup Requests & IO_HTTP")
POOL = socketpool.SocketPool(wifi.radio)
REQUESTS = adafruit_requests.Session(POOL, ssl.create_default_context())
# Initialize an Adafruit IO HTTP API object
AIO = ...
That's not ready to read yet. Accidentally hit submit. Still entering.
OK, ready.
I'm working on a library and happened to grab a Feather STM32F405 to work on and eventually found that the bug I was experiencing was due to the following code not being executed as a repeated start;
buffer = bytearray([0x80, command_id])
with self.i2c_device as i2c:
i2c.write_then_readinto(buffer, buffer, in_end=1)
return buffer[0]
Here's the trace of the STM32, flashed to CP6.1.0beta 1

Model: PyPortal M4 Express
Board-ID: SAMD51J20A-PyPortal-v0
``` rrrr not enough info here to get the right firmware (this is a Titano)
In circuitpython how to send data from adfruit BLE LE module to andoid app.
PS C:\Users\bcr00\Source\bcr\blinka-cli> type E:\boot_out.txt
Adafruit CircuitPython 6.0.0 on 2020-11-16; Adafruit PyPortal Titano with samd51j20
PS C:\Users\bcr00\Source\bcr\blinka-cli> python .\blinka.py update --unstable
๐ The latest available version is 6.1.0-beta.1 and you have version 6.0.0
๐ Retrieving firmware from https://downloads.circuitpython.org/bin/pyportal_titano/en_US/adafruit-circuitpython-pyportal_titano-en_US-6.1.0-beta.1.uf2
At this point I would like to:
1. Reboot your device in bootloader mode
2. Copy the firmware to the bootloader drive to update it
ALWAYS BACKUP YOUR CODE BEFORE INSTALLING OR UPDATING CIRCUITPYTHON
You can use the convenient "blinka backup" command to do this!
For more information please see https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython
OK, have you made your backup and are you ready to do this? [y/N]y
๐ Rebooting device in bootloader mode
๐ Waiting a bit for things to settle
๐ Copying adafruit-circuitpython-pyportal_titano-en_US-6.1.0-beta.1.uf2 to E:\
๐ Waiting a bit for things to settle
๐ I checked the current version and it looks right! All updated.
PS C:\Users\bcr00\Source\bcr\blinka-cli> type E:\boot_out.txt
Adafruit CircuitPython 6.1.0-beta.1 on 2020-11-20; Adafruit PyPortal Titano with samd51j20```
@maiden kettle see some examples from the ble repo: https://github.com/adafruit/Adafruit_CircuitPython_BLE/tree/master/examples also this basic chat bot is a good example: https://github.com/mytechnotalent/CircuitPython_BlinkaBot.
these are capable of sending to the bluefruit connect app on Android
but they don't use the module
ah, missed that part, I don't think I'm familiar with that module
Thank u for your input.
How does the boot_out.txt file get generated? is the code that creates that relatively accessible?
Thought it was an artifact of the CP uf2 initization
So with that in mind, it might be specified in a file in the build path for make command.
But thatโs just a guess
looks like some of the relavent info is in mpconfigboard.h in the device folder.
that may be enough for what I'm thinking about.
I have just made a backup of all my board and upgraded them to 6.0.0. (except MagTag). Some board have corrupted files, I can format the drive from my host... but is there a python command to format the file system and automate a bit the process? Thanks.
are you looking for storage.erase_filesystem() ?
is there a place in the repo somewhere I could look to find the [WHATEVER]BOOT that every device uses?
ah, to follow up on the Q above, it looks like boot_out.txt gets written by this code: https://github.com/adafruit/circuitpython/blob/2f146090444492c344a0260faa151660f5ec3c7a/main.c#L406
which in turn ends up coming from here https://github.com/adafruit/circuitpython/blob/2f146090444492c344a0260faa151660f5ec3c7a/py/makeversionhdr.py#L89.
Nice hunting!
#MagTag network issues...
My clock demo would run for an hour till it was time to fetch new localtime
After things got hung up, I got the "feeling" that pressing reset to restart the demo gave me more reliable reconnections
then I switched from using Mu editor serial to putty and learned something
often putty serial would stay connected, and I could just type ctrl-d to restart the app, though often it would not connect
What was interesting was that sometimes putty would disconnect and I would get the network connection again
( is there a watchdog time in the #MagTag? why would it disconnect from USB serial ? did it reboot the #MagTag ? )
Getting time for timezone America/Los_Angeles
Traceback (.....
File "adafruit_magtag/magtag.py", line 288, in get_local_time
File "adafruit_magtag/network.py", line 203, in get_local_time
File "adafruit_magtag/network.py", line 185, in get_local_time
File "adafruit_requests.py", line 594, in get
File "adafruit_requests.py", line 581, in request
File "adafruit_requests.py", line 119, in init
RuntimeError: Unable to read HTTP response.
Code done running. Waiting for reload.
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
Press any key to enter the REPL. Use CTRL-D to reload.soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Connecting to AP NETGEAR18
Traceback (.....
File "adafruit_magtag/network.py", line 309, in connect
File "adafruit_magtag/network.py", line 304, in connect
File "adafruit_magtag/wifi_module.py", line 67, in connect
ConnectionError: No network with that ssid
Press any key to enter the REPL. Use CTRL-D to reload**.soft reboot**
### this last time was where the serial disconnect occurred, and I was able to connect
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Connecting to AP NETGEAR18
I have similar failures to connect to network sometimes. You can add some retry logic in the code if you want, it will usualloy succeed on subsequent tries as long as there is not an actual issue with the network.
@lament sentinel how do the backup zips work in windows? are all of the files right inside the root of the zip? or are there intermediary folders like CIRCUITPY and/or others?
Archive: backup-2020-11-21-02-18-49.zip
Length Date Time Name
--------- ---------- ----- ----
0 2000-01-01 00:36 .metadata_never_index
0 2000-01-01 00:36 .Trashes
85 2000-01-03 01:37 boot_out.txt
614538 2020-09-05 12:53 pyportal_startup.bmp
268856 2019-12-09 17:25 quote_background.bmp
86828 2019-12-09 16:53 pyportal_startup.wav
378 2020-09-05 16:17 secrets.py
1803 2020-09-08 01:56 code.py
0 2000-01-01 00:36 .fseventsd/no_log
21755 2020-09-06 06:09 lib/adafruit_pyportal.mpy```
no intermediates. Hmm. On linux I ended up with /media/$USER/CIRCUITPY/ inside my zip
not a huge problem but might look for a way to cut out the extras
Trailing slash needed?
That is, for me the root looks like E:\
Oh, you ended up with the whole path? Hm. Yeah, this is probably a Python-ism. Plus when StackOverflow wrote the code for me they may not have gotten it right ๐ -- specifically zipdir
I think its because drives like E:\ are pretty much at the root of the computer. But in my environment the CIRCUITPY drive shows up in /media/$USER/CIRCUITPY.
where $USER is my actualy username. Since it's deeper in the filesystem they are ending up in the zip too. is my guess
Yep, good point. So "relative to the root" here needs to be redefined to your prefix
Hey, super happy you dropped some PRs, I am sorting through them
Happy to help out. This is a really nifty utility.
Probably adds 20% to my energy level that someone likes it
I'd like to get it to the point where there's a top-level blinka you can run (like pip) but my Python-fu needs work.
(holy smokes those bitmaps for the portal are pretty beaucoup i just noticed)
Makes me feel spoiled to have 1MB just to blow on pictures
if you haven't seen it yet check out https://github.com/adafruit/circup it's also a python based CLI and it does have that top level command magic. I'm not sure how that part of it works though.
Update 'adafruit_binascii'? [y/N]: Y these fine folks have great taste
I didn't know of this -- I was actually going to mess with the package side of this next (copy over the latest libraries depending on the version.)
I think there's a partnership here of some sort, thank you for pointing this out
yep you're welcome. ๐
I am thinking of also adding erase command that will run storage.erase_filesystem() in the REPL. After stern warnings and a prompt.
something like python blinka.py restore ./backup.zip might be cool as well that will wipe the device and then copy the backup things back into it.
extra fancy would be to read boot_out from inside the zip and flash that version before restoring the rest of the files.
Yeah, I think a restore is definitely in the cards
And yeah, the meta point here is "how can I get my device in a known good state"
Like some days I'm working on this project on my Titano. And other days this one. And I want to keep each environment in sync so I can just swtich without drama
Which seems to be complicated a little bit by keeping libraries and CircuitPython versions in sync, and then maybe your two projects need different versions right now
seems like it could be super helpful for helping troubleshoot if we can pass a full "image" of the device around as well.
(so when you switch to Project B, does it downgrade your CircuitPython to 5.3.1)
Yeah absolutely on the troubleshooting through backups
I think it should be able to downgrade as well
Yeah, so the metadata I have only has the latest version
But I can put in the "you're the doctor" force of the version you'd like to stick on it
so blinka update --version=5.3.1
or whatever
yep, I would definitely like that
perhaps down the line a bit, but even being able to specify a git commit hash from the list builds on S3 would be cool as well.
If we can come up with some way to get to a URL of a UF2 I don't care how we get there. I mean, the easiest is blinka update --firmware=https://downloads.circuitpython.org/bin/matrixportal_m4/en_US/adafruit-circuitpython-matrixportal_m4-en_US-6.0.0.uf2 and OK, pal, you're the doctor
(likewise that can be in the local FS too)
"but you're on a Titano, sir!" "tut tut i am an expert"
I think we'll be able to build the URLs as needed based on a bit of input from the user
Well yeah, but at what point do we stop hand-holding. Like if you're doing poweruser partying, hey, go get 'em. Not for beginners
I do see your point, and I already have --locale and --board and whatever to help out
Oh by the way, if you run --verbose when you do stuff, does the temp directory stuff look right? It should
I think so
I'm not sure what this icon is:
if it's an icon to the left thjere
doh, it's a quote and a comma.
Did you find the answer in the bootloader? https://github.com/adafruit/tinyuf2/blob/16a562b0b648b15f0816991eb78b1f3c2680e78e/ports/esp32s2/boards/unexpectedmaker_feathers2/board.h#L63
(spent way too much time grep-ing circuitpython before realizing the bootloader was totally separate)
Yep I did end up finding it for atmel boards specifically
it seems there are a few different bootloader repos though I hadn't come across that one yet. thank you.
hey pal not everything is an icon
I'm glad the emojis work. I kinda like them
Hey, can you fix the board list in that other PR, and then I'll commit that
(first one is merged, so you can pull that)
@lament sentinel got it merged now. Thank you.
@onyx hinge Jeff, is it possible to run a script on github, and then save the output back into the repository? I am thinking of adding benchmarks to ulab, and my idea is that people would have to upload only two lines, the platform information, and the execution time, and github would format these fragments into a nice-looking rst file.
@lapis hemlock yes there are various ways to do this. I can tell you about one I've used...
OK, I am all ears
in this repo, I have a script which is run based on time; it fetches some data from the internet, processes it, commits and pushes the commit https://github.com/jepler/wwvbpy/blob/main/.github/workflows/cron.yml
Line 30 is where my updating happens, that would be your hypothetical benchmark data
then lines 36-40 are where it creates a new commit and pushes it.
Fantastic, many thanks!
I'm not 1000% this is correct, but it's intended to "push only if the commit actually makes a change" if git commit -m"update iersdata" iersdata.py; then git push origin HEAD:main; fi
if the file iersdata.py didn't change, I don't want any commit to be pushed
These are minor details, and the workflow file that you linked is definitely an excellent starting point.
I know that I took the technique from someone else, but I don't know who to credit.
one thing to note is that this will NOT start the normal "on push to your main branch" steps
oh and notice that I am explicitly pushing to "main", I think you still use the "master" convention for your primary branch in ulab
Yeah, I kept "master".
one thing to note is that this will NOT start the normal "on push to your main branch" steps
I can still set the trigger, right?
I mean, there is nothing preventing me from doing so, is there?
@lapis hemlock https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token if you read that you'll know all I do about it
You can configure your workflows to run when specific activity on GitHub happens, at a scheduled time, or when an event outside of GitHub occurs.
in my case I'll have to tackle it someday if I decide to publish the package -- I would want to publish a new package whenever the data file changed
I think I should set this as my start page. This is really useful stuff.
@lone axle https://github.com/bcr/blinka-cli/pull/3
Do I need to add you to the repo as a contributor in order to ask you for a review? I couldn't add your name
I am able to review (think anyone can by default) adding me as a contributor I think would give rights to push into the repo, but I am not certain.
code looks good to me, will test it out in just a moment.
and leave a review on there once I have
Ah, maybe in order to "request my review" within the system I might need to be actually. But I can leave a review even without that.
I'm not wound up about the actual formal review, just the notification getting to you that I did something
like hes all derp derp dont know no foamyguy
ah, yeah I do think that requires the user to have access to the project
you can always ping me in the comment on a PR if you want though I should see it that way. I also just turned on did "watch" for PRs so if I understand correctly I'll get a message about the next one
np, happy for the help
Basically the same here with a feathers2 and CPY built yesterday from main. I stripped everything out of the code besides connecting to wifi and instantiating the i2c bus. Hangs after interrrupting the running code (which is just printing and delaying a second) and the CTRL-D.
@supple gale do you have a "DEBUG=1" build?
To me that was the stuff that didn't work properly. I'll look at some i2c tomorrow and probably also stumble upon some issues.
I could rebuild it with that flag. I was actually almost about to. Almost ๐
the output looks identical up to here
I (120928) wifi:AP's beacon interval = 102400 us, DTIM period = 1
then nothing.
@lone axle ```PS C:\Users\bcr00\Source\bcr\blinka-cli> python .\blinka.py update
๐ The latest available version is 6.0.0 and you have version 6.1.0-beta.1
๐ No upgrade required, thanks for checking!
PS C:\Users\bcr00\Source\bcr\blinka-cli> type E:\boot_out.txt
Adafruit CircuitPython 6.1.0-beta.1 on 2020-11-20; Adafruit PyPortal Titano with samd51j20
PS C:\Users\bcr00\Source\bcr\blinka-cli> python .\blinka.py update --firmware-version=6.0.0
๐ Retrieving firmware from https://downloads.circuitpython.org/bin/pyportal_titano/en_US/adafruit-circuitpython-pyportal_titano-en_US-6.0.0.uf2
ALWAYS BACKUP YOUR CODE BEFORE INSTALLING OR UPDATING CIRCUITPYTHON
You can use the convenient "blinka backup" command to do this!
For more information please see https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython
OK, have you made your backup and are you ready to do this? [y/N]y
๐ Rebooting device in bootloader mode
๐ Waiting a bit for things to settle
๐ Copying adafruit-circuitpython-pyportal_titano-en_US-6.0.0.uf2 to E:
๐ Waiting a bit for things to settle
๐ I checked the current version and it looks right! All updated.
PS C:\Users\bcr00\Source\bcr\blinka-cli> type E:\boot_out.txt
Adafruit CircuitPython 6.0.0 on 2020-11-16; Adafruit PyPortal Titano with samd51j20
PS C:\Users\bcr00\Source\bcr\blinka-cli>```
nice!
@lapis hemlock an alternative for you to consider: Write a numpy.py for the circuitpython-ulab, and arrange for it to be in a directory listed in MICROPYPATH. Now, a test which says try: import numpy as np except: import ulab as np will get the compatibility numpy.py when you run the circuitpython tests. bonus, cp users who prefer numpy-compatible naming can get it by adding this file to their CIRCUITPY lib!
I assume this numpy.py mostly says from ulab import *; from ulab.<each submodule with a few exceptions> import *
the goal being to get back to a single set of test files
shIRtty was probably clever in someone's head, but I have trouble saying it out loud
When you say delaying, do you mean you called time.sleep() or something else ?
time.sleep(1)
If i remove the i2c object instantiation so the code is only connect to wifi then loop, it runs until CTRL-C, then restarts correctly with CTL-D
I have the DEBUG output enabled and not much there.
At least nothing from the wifi that is different.
In my bug, I see two different things going. In one case after the first sleep, the http requests is using vanishes. I put print(http) after line 113 and there is an HTTP then there's not. https://github.com/adafruit/Adafruit_CircuitPython_Requests/blob/master/adafruit_requests.py#L113
In my second case where it works 2 times. (and some my code is inside the While) I think the pool is disappearing but I didn't dig into it too deeply.
If these are all related, what happens during time.sleep() which causes things to go away? Is the underling os, IDF, or MP doing some sort of cleanup ? No idea.. but that's my natural question...
Well i rebuilt the main branch using the previous esp_idf submodule commit. Now it tends to die after a restart with core 0 panic. I seem to be going backwards fast. I will now watch some comedy on netflix. ๐
will try this in the morning.
The tiny code snippet sometimes hangs, sometimes panics core 0
When breaking out of loop (CTRL-C) then continuing (CTRL-D)
If I comment out the I2C instantiation it works.
And if I pull the wifi code out and leave the i2c in it will hang sometimes when interrupting and attempting to restart the program with CTRL-D.
Calling touch_pad_fsm_start() resets previously set configuration, this deinitializes already set touch pads.
I was mistaken about the failing M0 boards โ some of them include terminalio, so I canโt just remove the moving code for them. Maybe I can simplify it in the case that there is only one movable allocation.
This is wrong. It prevents printing an exception twice, which I do in #3696 (once to measure the length of the traceback, once to get the text) and which people may want to do for other reasons, itโs available from Python via sys.print_exception(). (For some reason, it also causes the terminalio screen to be drawn over the stage screen, havenโt investigated that yet.)
The problem observed in #2056 is specific to adafruit_midi in that it raises the same exception instance every time...
@dhalbert Just wanting to check with you if I should change/leave this for the 4 bytes?
This is a new one: AttributeError: 'TextIOWrapper' object has no attribute 'datetime' triggered by if (time.time() < 946684800) or (time.time() > (2**31 - 1)):?
Haven't changed that code in ages. 6.0.0 doesn't like it (Feather M4).
time.time() itself seems to be the culprit. In REPL, went to safe mode.
erase_filesystem() fixed it, then it came back. Must be a deeper flash or hardware issue.
Is there a way to tell which bootloader is on a device specifically?
besides the INFO_UF2.TXT?
ah, thank you.
I wish there was a way to see that partition from CircuitPython
how about checking for esptool or bossa type ones? just try to issue a basic id command or something and see if it succeeds?
no idea there
oh, lol, never looked at it before, but the INDEX.HTM on the *BOOT drive is a JS redirect to the Adafruit product page
In order to get the version, or to do something else? An alternative might be a Pythonic way to get the bootloader version
@lone axle I looked at the version info that Bossa reports for my board and it's junk. PS C:\Users\bcr00\Source\bcr\blinka-cli> python .\blinka.py bootloader ๐ Rebooting device in bootloader mode PS C:\Users\bcr00\Source\bcr\blinka-cli> type E:\INFO_UF2.TXT UF2 Bootloader v1.23.1-adafruit.1-89-gcfdd5ba SFHWRO Model: PyPortal M4 Express Board-ID: SAMD51J20A-PyPortal-v0 PS C:\Users\bcr00\Source\bcr\blinka-cli> & 'C:\Program Files (x86)\BOSSA\bossac.exe' -p COM9 -i Device : ATSAMD51x20 Version : v1.1 [Arduino:XYZ] Feb 22 2019 12:20:42 Address : 0x0 Pages : 2048 Page Size : 512 bytes Total Size : 1024KB Planes : 1 Lock Regions : 32 Locked : none Security : false BOD : false BOR : true PS C:\Users\bcr00\Source\bcr\blinka-cli>
I assume this numpy.py mostly says from ulab import *; from ulab.<each submodule with a few exceptions> import *
the goal being to get back to a single set of test files
But the circuitpython stuff would have to be tested anyway, so I am not sure, we can get rid of the two-tier solution.
Yes, the bootloader version is the key thing, so that CP code can fully characterize its own environment for display, logging, potentially even logic decisions.
I've been researching this -- there may not be enough information (specifically for Titano it won't work) -- https://github.com/bcr/blinka-cli#observations-about-namespaces
@lament sentinel That's very cool. Looks like some of those identifiers need a step to check for completeness and uniqueness when integrating a new board.
Namespaces are super hard -- like what relevant characteristics are we trying to jam into this fun little string. See: User-Agent
And do we just party hard and make a JSON file that dumps in all kinds of attributes. And then what happens when someone defines a new attribute. ๐ข
And yeah, maybe a certifying authority of some sort -- not too much of a bureaucracy, but some attempt to peer-validate the choices so we don't make a mess out of this place.
If I ran the asylum, presuming our UF2 world sticks around, is mount a volume in bootloader mode with a particular file in it that has a well-known JSON file (maybe just key / value pairs if we don't want to make life too hard) with "enough metadata" and then have a discussion about what constitutes "enough", and then when we make new boards, have a review process to try and keep it clean
Unfortunately, because CircuitPython is a fork of MicroPython, it is not searchable independently. That is a GitHub assumption (and flaw, in this case).
I am surprised this works, because I would expect numpy and ulab to complain that the values are out of range for a signed int8:
import ulab as np
print(np.array(range(2**8-5, 2**8), dtype=np.int8))
In CPython:
>>> import numpy as np
>>> print(np.array(range(2**8-5, 2**8), dtype=np.int8))
[-5 -4 -3 -2 -1]
>>> print(np.array(range(2**8-5, 2**8), dtype=np.uint8))
[251 252 253 254 255]
But for regular arrays:
>>> import array
>>> a = array.array('B', [0]*3)
>>> a[0] = 255
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: signed char is greater than maximum
The latter is what I'd expect numpy and ulab to do, but there must be some historical reason why numpy allows you to alias signed and unsigned values. (It may or may not be a good reason.)
@tulip sleet Even in python, int8(255) returns -1.
The PR you mention https://github.com/adafruit/circuitpython/pull/1879 brought CircuitPython more into line with CPython semantics, and away from MicroPython. Unfortunately it sounds like you are relying on some bytearray, etc. routines that now have stricter semantics.
you mean numpy.int8()?
And the conversion, or the lack of thereof, is caused by the mp_binary_get_val_array/mp_binary_set_val_array functions, which are internal to micropython.
Yeah, I meant np.int8().
right, so I'm saying that numpy doesn't rely on internal CPython routines analogous to those, or else it would get errors too. Instead it has its own conversion routines which allow that aliasing.
but ulab does rely on the MicroPython routines
as a timesaver and shortcut
A workaround could be that we just implement the conversion function in ulab, and if you compile for circuitpython, then it will be called.
if you did not rely on mp_binary_get_val_array/mp_binary_set_val_array, then you would have your own routines, as numpy does. But that would be expensive in terms of code space.
would it make sense to add flags to those routines to allow the signed/unsigned aliasing?
Do you mean, in micropython?
but then you'd be changing an internal MicroPython API, I guess, which is hard
actually, it would be in CircuitPython, because the errors are due to CircuitPython. MicroPython lets the (erroneous) aliasing through.
As I said, we can implement the function conditionally for circuitpython, and then you would have to decide, whether the flash space is worth it.
I think this is really a typical case of two wrongs make one right.
which function do you mean? Do you mean alternate versions of mp_binary_get_val_array/mp_binary_set_val_array ?
Is this true only for 8-bit, or does it happen on 16-bit too? 32-bit is yet another case
mp_binary_get_val_array/mp_binary_set_val_array.
I am not concerned about 32-bit integers, because ulab does not support those.
you just need to suppress the check, right, so that could be a boolean flag to the routine
I'll actually go look at the code, instead of just imagining...
I believe so.
np.int8(512) is 0, so numpy is very casual about this.
it always just maps the bits and truncates, it doesn't care.
MicroPython 6.0.0-dirty on 2020-11-20; linux version
Use Ctrl-D to exit, Ctrl-E for paste mode
>>> import ulab
>>> ulab.array([65534], dtype=ulab.int16)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: value must fit in 2 byte(s)
>>>
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: value must fit in 1 byte(s)
>>>
In micropython this works.
oh, I saw MicroPython 6.0.0-dirty , I thought you were testing actual MicroPython
I missed the 6.0-.0
No, that was circuitpython.
from setval_array:
mp_int_t val = mp_obj_get_int(val_in);
// Small int checking is separate, to be fast.
mp_small_int_buffer_overflow_check(val, size, signed_type);
mp_binary_set_val_array_from_int(typecode, p, index, val);
}
mp_small_int_buffer_overflow_check is probably missing in micropython.
so the buffer_overflow_check could be conditionalized, not at compile time, but with an extra argument to the routine. The routine could be renamed, the extra argument added, and you could call the new routine. The existing code would call the old routine name, which would pass the proper bool to the new routine to do checking.
I think that's what I added. Interestingly, I have zero memory of actually doing that PR. My brain is getting old.
OK, then this should settle the problem, I guess.
i think that sounds like a good solution. I am still a little amazed at numpy's casualness, but it could be in the interest of data conversion or speed.
I have never mused the casualness of numpy, but such glitches certainly come out, when you have to re-implement certain things.
@lapis hemlock of course we are not the first to encounter this: https://github.com/numpy/numpy/issues/8987; see https://mail.python.org/pipermail/numpy-discussion/2009-April/041624.html for old historical background
OK, then here is another one for you a = np.array(range(5), dtype=np.uint8) a **= 2.0 is fine, but a = np.array(range(5), dtype=np.uint8) a **= 1.0 throws an exception ```---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-9a18d92b25ac> in <module>
1 a = np.array(range(5), dtype=np.uint8)
----> 2 a **= 1.0
3 a
TypeError: ufunc 'power' output (typecode 'd') could not be coerced to provided output parameter (typecode 'B') according to the casting rule ''same_kind''```
Go figure!
I found this while testing ulab, and it baffles me a bit.
it's something in the depths of the exponentiation operator, i guess :/
Thanks for the historical reference!
But type-coercion seems to be an issue only for 1.0. With 2.0, the output is still an array of dtype uint8. I don't quite get it.
@lapis hemlock It seems that **= of the float 2 is special case to be "squared", other float values (even the other integers) are not.
even weirder, the non-inplace version changes the type to float64.. ```>>> (np.uint8((1,)) ** 2.0).dtype
dtype('float64')
dtype('float64')
``` `**=` can change the type for scalars, but not for arrays !?
I wouldn't obsess over exact compatibility in these cases
On ESP32S2 right now, common_hal_mcu_delay_us() looks like this, and doesn't do any delays.
void common_hal_mcu_delay_us(uint32_t delay) {
}
This routine is used in a number of places (I2C pullup detection, PulseIO, display stuff), so it is probably causing some problems.
Looks fine (mp_hal_delay_us doesn't just call right back here :1st_place_medal:) though it sure prompts the question of why have both...
Seems to be just historical. I found ports where the common_hal calls mp_hal, and vice versa!
Update tinyusb stack with PR https://github.com/hathach/tinyusb/pull/557 that fix race condition with host terminal on cdc connection. That cause echoed back message on connection with esp32 as follows.
Adafruit CircuitPython 6.0.0-278-g66fb09506 on 2020-11-16; MagTag with ESP32S2
>>> uto-reload is o
Traceback (most recent call last):
File "", line 1, in
NameError: name 'uto' is not defined
>>>
The issue is also observed with nrf52840 as mentioned by @jepler
only 169 checks remaining to run
Some M0 de_DE builds are too big again. Not sure what to trim. We could turn _pixelbuf off temporarily on these builds until we get gcc 10.
There is a gcc 10 preview release, but I'm not sure if we should use it. The usual Nov/Dec gcc ARM toolchain release is not out yet.
Some M0 de_DE builds are too big again. Not sure what to trim. We could turn
_pixelbufoff temporarily on these builds until we get gcc 10.There is a gcc 10 preview release, but I'm not sure if we should use it. The usual Nov/Dec gcc ARM toolchain release is not out yet.
Ooops, the build must be very tight before since the code size increase is very minimal.
Ooops, the build must be very tight before since the code size increase is very minimal.
@hathach, yes, totally not your fault, we are suffering from translations that are too complete :smile:. @tannewt says gcc 10 should recover a couple of thousand bytes, but the expected gcc toolchain release is not there yet. (It's not late, but we are anxiously awaiting it.)
Curious... Once my board is merged into main and in a release, it should show up just fine in the MU Editor, right?
Mu has a list of USB ID that they know are Circuit Python. So if you have an Adafruit UUID it will work by default, else you will have to send a PR to Mu-editor to have it added.
It use to take a lot of time, to get inside Mu, but recently they approuved a batch and changed the way to add.
Looks good to me! Just needs a merge.
Rebased to resolve translation conflict, no other changes intended.
I'm looking at their github and I don't see where I would even add my board. Anyone familiar with this process?
ah thanks!
@ornate breach also you want to be on circuitpython.org so that your board firmware can be downloaded (not sure what board you are talking about).
just waiting on review and merge
Next step might be described here https://learn.adafruit.com/how-to-add-a-new-board-to-the-circuitpython-org-website and the repo for CircuiPython.org.
Want to add your CircuitPython or Blinka board to CircuitPython.org? Here's how.
Yeah, need to finish the Markdown and get the images ready
Did you see the new ESP32-C3 (prototype) chip? https://esp32.com/download/file.php?id=5437 @slender iron I'm not entirely sure if this USB support is "enough" for CPY as they differentiate between "USB OTG" and "USB Device" in their data sheets. On the pro-side, it has some USB embedded in the chip .. ๐
did someone who is experiencing i2c related crashes with esp32s2 open an issue with their reproduction steps? I'm not seeing it.
@onyx hinge my biggest challenge is that my Pi4 is getting major hiccups due to the USB connection with my featherS2. I have a Kernel Exception/Panic on my dmesg very frequently. I believe I should file this issue more at the TinyUSB page though - or not? What would be your guidance?
Many people have experienced that their linux host can crash by hotplugging circuitpython devices. These are bugs in the host computer OS, if the host computer OS can crash.
(it's not a BADUSB attack where we put 300V in the power lines, after all; it's just sending data on the D-/D+ lines)
that said, danh's efforts to interest linux kernel maintainers have not led to improvements
On @atomic summit Discord, you may find more user that experienced that.
?serverinfo
@thorny jay & @onyx hinge thx. I'm part of UMs discord and I've seen multiple people reporting it. I agree that the issue is with the Host PC/OS, but likely this topic gets probably "political" quickly and emotions boil up. (I see this with myself, I'm not enjoying that red "cut here" on my backtrace either.) I'm just afraid I'll not be of much help, coming with my "single line"-patch experience ๐
@hearty tapir I agree it's frustrating. I have a whole "sacrificial" pi zero I use for nothing but running the serial terminals of my circuitpython devices.
(the part where esp32s2's usb especially will connect/disconnect IS a circuitpython or tinyusb bug though)
is circuitpython.readthedocs.io slow to load for anyone else?
It is slow for me too
@onyx hinge Yes from the UK.
OK thanks
@onyx hinge I commented on that I2C issue, on a call I'll look for it shortly
@onyx hinge 525 errors too
@tidal kiln FYI, working on another Which CP Board is Right for You? page - Beginner Boards. I'll send it your way when it's ready for you.
I got a banner at the top that CloudFlare delivered a cached version of the page.
I also get the 525 error
I feel it is happening whenever the board resets itself "unexpectedly". I've identified a number of actions that make this more-or-less reproducible at will.
update... now I am getting 503 with the cpy docs
what's the expected behavior if a CP program is printing to serial in a loop and the host PC goes into sleep mode? so USB still has power, but host is suspended.
@onyx hinge This is the one issue I saw (though you are on it so maybe knew about it) https://github.com/adafruit/circuitpython/issues/3572
@blissful pollen OK, unfortunately folllowing the instructions in that issue no longer reproduces the problem for me since the merge of #3710 which I believe is in 6.1.0-alpha.1.
If I get a chance later today I'll try to grab the latest and try to break it again
Thanks, it's appreciated
Started getting pystack exhausted on 6.x beta buds, was able to make some changes. and got my project working, but now it's every time, and no matter what I do, I can't get my current source to run. and I don't think I made any changes that would effect stack usage.
Unfortunately I can not share the project. but there was a note in early 6.x alphas about "Letting us know" if we get pystack exhausted, and, well, I am getting that in spades now.
Thanks
@tidal kiln I guess I'm blocked at this point. I'll punt it to you and let you finesse it.
@tidal kiln I'll tag you in Basecamp.
okie mcdokie
<@&356864093652516868> Hi all -- I hope to see you at the meeting in a little over an hour from now. If you'll be speaking during the hug reports or status updates, or if you'll want me to read your notes, please add them to the notes doc. If you can't add your full notes, please add your name. Otherwise, we'll assume that you're just listening in. If you're not yet a circuitpythonista, just ask and we'll add you so that you can speak during the meeting. Notes doc link: https://docs.google.com/document/d/1uWRr_OQkfK9TygD2SGU9LpY60mK_euMQNsT0P-J0o2I/edit
@tulip sleet @onyx hinge I think the int8_t casting feature of numpy has its cause in C itself: ```#include <stdio.h>
#include <stdlib.h>
int main() {
int8_t a = (int8_t)65535;
printf("%d\n", a);
return 0;
}
Side comment: is it possible to enforce syntax highlighting in discord?
Some good discussion about the C3 and comments about USB here
https://hackaday.com/2020/11/22/espressif-leaks-esp32-c3-a-wifi-soc-thats-risc-v-and-is-esp8266-pin-compatible/
@lapis hemlock Yes. python print("Hello world")
#include <stdio.h>
#include <stdlib.h>
int main() {
int8_t a = (int8_t)65535;
printf("%d\n", a);
return 0;
}
@lapis hemlock
@analog bridge Thanks! This looks orders of magnitude better.
The only problem is, I haven't the foggiest idea as to what you did. That applies to you, too, @idle owl .
@lapis hemlock After the first three backticks, type the language
But it has to be the only thing on that line.
@lapis hemlock
After the first three backticks, type the language
the same applies for github as well
also when adding code blocks to html:
<pre><code>print("hello world")</code/</pre>
lol..
@idle owl Many thanks!
I am about to rebuild a 'clean' version from main. And try some more.
@lapis hemlock You're entirely welcome!
The trick is that the first line should not contain anything beyond the language. This is what I missed.
Ah, yes. Indeed.
Happened to me too .. ๐
@hearty tapir While we are at it, how do you quote the question in a reply? In the past I could choose this from the drop-down menu, but not anymore.
You mean here?
Right, here. E.g., in your comment two lines above.
When you hover with your mouse over the message, you can choose "Reply" either directly via the reply-arrow or via the dots
But none of those lists an option for quoting the question. I believe, this changed a couple of weeks ago, because earlier I used this feature all the time.
I think "reply" recently began doing the quote part automatically.
workaround: you can ctrl-c copy the text you want to quote, type "> ", and then paste...
Or is it possible that I don't see the quoted part, but you do?
this is how it looks to me
you can also (as the reader) click the small text and go back to the original message
This works only on the last line, because the very act of insertion introduces a line break.
See, this is the problem: my previous comment makes absolutely no sense without the context.
Which was "workaround: you can ctrl-c copy the text you want to quote, type "> ", and then paste..."
I think I am cursed.
Browser or Discord app? (Me: current Firefox)
you might need to upgrade. I use the desktop app on linux as well and mine got an update sometime within the last week or so that changed the reply / quote behavior
Hey all, I'll be taking a few minutes before I get the meeting started. Please feel free to mic check amongst yourselves ๐
Lurking
lurking
lurking
@gilded cradle Yes.
I had a scheduling conflict come up part way through the meeting. Will have to bail out at some point. I am marked as text only in the notes already.
lurking
@lone axle Thanks!
It doesn't look like it will work. The device is just a usb to serial and jtag converter
En este nuevo liveCats Andrรฉs Sabas nos comparte como iniciar con la programaciรณn del ESP32-S2 en Arduino IDE y CircuitPython, como hacer desde un hola mundo hasta una conexiรณn WiFi, no te lo pierdas, todos lo miรฉrcoles 18:00 hrs
LIVE CATS 18/11/20 LIVE!
Visit the Electronic Cats shop online - https://www.electroniccats.com/store
------------...
@anne_engineer on Twitter
๐ฏ

D: ๐ฆ D:
Spatchcock the turkey
anger words
Unexpected Turkey = new garage band name
I feel like that's from unexpected maker
@tidal kiln Indeed.
Cooks faster and will fit on rack above or below other things that are cooking
It's the only option we have, the oven can't handle a whole turkey if we wanted it to.
Woes of temporary apartment living.
Alternative is to cut up the turkey prior to cooking (just like you might a chicken) and cook separately.
That's what I meant is likely. But evidently it's not a simple process.
NOTE: I did add a Hug report in the file for @prime flower for the original PyPortal version of Quarantine clock.
Do you have examples of the MQTT work that we can look at?
I wet brine mine in a dark beer, brown sugar, kosher salt, and other spices mix for 24 hrs. Then Spatchcock it (remove backbone -use for gravy stock).
@balmy stirrup very much not ready just yet..but it's on this branch (https://github.com/brentru/Adafruit_CircuitPython_MiniMQTT/tree/cpython-s2)
Thanks @prime flower!
np, I might not get to it today since I'm focused on fixing a bug I introduced on another project, cpython is working on it though.
@serene warren Sounds good.
Awesome will check it out!
Quarantine Clock on a MagTag (#eInk #IoT fridge badge from @adafruit). Because who need to know exactly what is the date and time...
Source code written in @CircuitPython: https://t.co/ccTX2OTv0k
@idle owl thanks. It is moister and quicker and great for smoking if you have the space and time.
@thorny jay thank you for the hug report, I think the magtag version looks better than the pyportal one ๐
By port might make sense.
advantage of manual is that Github viewing will match the downloads
@crimson ferry Excellent point, thank you.
Thanks!
looks like I did it january 1st last year. so I'm a little ahead of myself ๐
@idle owl @onyx hinge I'm gone for the 12/21 meeting
๐ ๐ฆ
๐ฆ
Thanks
Thanks!
https://blog.adafruit.com/2020/02/03/circuitpython2020-recap/ 2020 recap, i was lookin back
woah, cool, the Buyer Guide at the end of @thorny jay 's 2020 guide is @idle owl 's new Learn Guide! https://gist.github.com/dglaude/9a9ca530f2a96d6087142fcc42ac40fa
What was not in this list, still wanted but only discussed in the weed is that ZIP of library for learn guide or basic set of library for complex board such as CLUE, CPB, CPE, ...
Using the current (as of now) main App version: 6.1.0-beta.1-14-g16fe2de70 I can running code to hang after interrupting,
The code only instantiates an I2C object then loops forever printing something.
Interrupted with CTRL-C works 1st time
Interrupted again with CTRL-C hangs.
This was tested with both an Espressif Saola WROVER and Unexpectedmaker FeatherS2
import wifi
import time
import board
from busio import I2C,SPI
# i2c = I2C(board.SCL, board.SDA)
i2c = I2...
@onyx hinge I just set up my FeatherS2 and a BME280 so I'll try it
mine's 3700x too. me likey
i have an ancient intel thing from two years ago ๐
@supple gale I have an ancient Intel thing from 2011 ๐
lol,
@gilded cradle i feel like i'm missing something obvious for rotation with magtag. i can't even repeat the example here:
https://github.com/adafruit/Adafruit_CircuitPython_MagTag/issues/13
since EPaperDisplay doesn't have a rotation property.
It's kinda clunky at the moment. See https://github.com/adafruit/Adafruit_CircuitPython_MagTag/issues/13
yep. that's where i'm at.
Adafruit CircuitPython 6.1.0-beta.0-25-g2f1460904 on 2020-11-19; MagTag with ESP32S2
>>> import board
>>> board.DISPLAY.rotation = 270
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'EPaperDisplay' object cannot assign attribute 'rotation'
>>>
@slender iron is there a technical reason why EPaperDisplay doesn't have a rotation property?
at this point it's that we don't have space for it
@slender iron Just blasted my MagTag filesystem trying to copy files to it.
Wiped everything, returned it to base state.
6.1.0-beta.1
@idle owl yup, I've heard folks have had that issue. please file an issue so we can track it
Alright.
@tidal kiln I'm not sure. Ladyada opened it.
ok. no worries. looks like this is all sort of work in progress land.
i'll work around it for now
Attempting to test this PR, which involves copying a folder containing images and a json file over to CIRCUITPY. Copy failed. When the board reset, the filesystem was wiped, everything returned to base state, including the Hello world! code.py. There were already two libraries and an updated code.py file on the board that were running before the filesystem was wiped.
@tulip sleet @slender iron Found what I consider an issue with the MagTag pin def. The NeoPixels are labled on the silk as both "NeoPix" and "D4". We didn't include D4 in the pin def. I realised after checking the pin def I should use board.NEOPIXEL but with it being on the silk, we should include both. If I submit a PR can one of you test it? I don't have that build environment set up.
I was able to reproduce on my FeatherS2 (beta 6.1 beta 1).
If I comment out import wifi it continues to run perfectly. If I comment out of the I2C lines it works fine. When I put it all together then on the second Ctrl-C it locks up.
I also saw this:
Looping for fun
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
I also saw the "soft reboot" and restart come up randomly as well when I hit Ctrl-C.
@idle owl sure
Keen. I'll get the fix in.
Adding pin names from silk for on-board NeoPixels, buttons and light sensor.
@tulip sleet ^
@slender iron Scott, it seems to me that isclose is missing from circuitpython: ```python
MicroPython v1.13-dirty on 2020-11-23; linux version
Use Ctrl-D to exit, Ctrl-E for paste mode
import math
dir(math)
['class', 'name', 'pow', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'ceil', 'copysign', 'cos', 'cosh', 'degrees', 'e', 'erf', 'erfc', 'exp', 'expm1', 'fabs', 'floor', 'fmod', 'frexp', 'gamma', 'isclose', 'isfinite', 'isinf', 'isnan', 'ldexp', 'lgamma', 'log', 'log10', 'log2', 'modf', 'pi', 'radians', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc']
it's not intentional afaik
Do you want to have it?
I actually wanted to quote this one ```python
MicroPython 6.0.0-dirty on 2020-11-23; linux version
Use Ctrl-D to exit, Ctrl-E for paste mode
import math
dir(math)
['class', 'name', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'ceil', 'copysign', 'cos', 'cosh', 'degrees', 'e', 'erf', 'erfc', 'exp', 'expm1', 'fabs', 'floor', 'fmod', 'frexp', 'gamma', 'isfinite', 'isinf', 'isnan', 'ldexp', 'lgamma', 'log', 'log10', 'log2', 'modf', 'pi', 'pow', 'radians', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc']
I don't mind if you add it but it won't fit on everything
As long as you're editing to fix D1/D4, could you put in blank lines to group the aliases together?
Some of the ulab tests fail on circuitpython for this reason. I can re-write the tests, if you don't want isclose.
Either way is fine with me, just let me know.
@lapis hemlock I'm indifferent
Then ask Dan or Jeff!
Or whoever has a say in these matters.
I just don't want to interfere here, this is really a circuitpython call.
@gilded cradle You might know the answer to this - is there a way to disable the display on MagTag when testing code that doesn't involve the display so it's not waiting on refresh or refreshing too often while iterating?
I think you can release the display?
@lapis hemlock not necessarily as a forever-solution, I had copied the straw-implementation from the py3 docs: ```python
try:
from math import isclose
except:
def isclose(a, b, *, rel_tol=1e-9, abs_tol=0):
return abs(a-b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol)
Yeah, I was thinking the same. We could definitely insert this at the beginning of all tests.
there's a PR but it's far from ready...
@idle owl you could just use the magtag network module
@gilded cradle Limor and Scott gave me options as well. How would I use the network module to do that?
from magtag.network import Network
network = Network()
That wouldn't init the eink
Oh wait, it's inited in the firmware, but it just wouldn't use it.
@slender iron & @onyx hinge I moved my setup over to my Win10 system (where I also have my build environment). USB-Hub, CP2102 serial converter, Putty ... back in business ๐ and I could finally figure out that the hang of the esp32s2 doesn't happen in the scan-for-ssids-function but during connect. I was on the wrong track all along :/ However, "restart" in Putty is much faster than have to restart the Pi every five minutes ๐
@onyx hinge I have seen it. The snag is that the circuitpython sub-modules mix numpy and scipy functions, and there is no clear separation between modules. I would very soon (two weeks at most) like to implenent true numpy/scipy compatibility for micropython https://github.com/v923z/micropython-ulab/issues/250. Wouldn't it be a better time to fix the testing (module) issues?
What is really bad is that certain functions (lgamma, and gammaln, e.g.) have two different names in python. It is a bit of a mess.
I am actually hoping that an implementation of https://github.com/v923z/micropython-ulab/issues/250 would convince Scott.
@lapis hemlock sure, feel free to close that PR if it's not going to be relevant/mergeable
Curious, in the qt py haxpress mpconfigboard.mk file, the line that is EXTERNAL_FLASH_DEVICES = GD25Q16C is the GD25Q16C the SPI flash that is suggested to be used?
yes
Do I need to specify that in my SPI flash builds for CP?
I've got a 8Mb SPI flash I was going to use with it, but I don't want to specify something if others would like to use other spi chips
@onyx hinge What speaks against using sprintf or something similar for printing floating point numbers in circuitpython? In other words, why does one need formatfloat.c?
@ornate breach circuitpython won't use the spi flash if you don't define it
so I need to specify the part # on the devices line?
@gilded cradle How do I, or can I even, use the MagTag library to display a bitmap on the screen? set_background isn't working like it seems like it should, but I'm basically fumbling around with the MagTag lib. Sorted out the button presses and NeoPixels at least.
Hmm, set_background should work. Maybe something broke it.
I might not be using it right?
I tried magtag.magtag.set_background(image) and magtag.set_background(image) and image.bmp and none of that is working.
Wait should it be a string?
also @slender iron following the qt py haxpress as a template, (changed for my board pin wise and part) I get this: <artificial>:(.text.audioio_audioout_make_new+0x1ac): undefined reference to `pin_PA02' collect2: error: ld returned 1 exit status when attempting to build
I tried to make it easy
@gilded cradle Ok my code is running now, but nothing is displaying. This is a bmp that I grabbed from the Slideshow lib, that displayed properly earlier using the slideshow example.
My question is, do I need these bits for full CP?
CIRCUITPY_BITBANGIO = 0
CIRCUITPY_COUNTIO = 0
CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_I2CPERIPHERAL = 0```
It should be auto_refreshing, but make sure
@gilded cradle As in add magtag.refresh()?
@ornate breach the missing pin is usually do to an IGNORE line
I think it is, but maybe I messed that up
Kattni, yeah, try calling that.
Hmm, can you share the code?
Yep. It's got a bunch of extra imports because I haven't pruned them yet from the LED animation stuff.
@gilded cradle
I don't use PA02 on my board so I've got it ignored in the mpconfigboard.h file
ok, I'll take a look and see if I can see why it's not working
@gilded cradle Thanks. I want to add a feature to this project where it displays a different Winter-/holiday-themed image on each button press. The project is supposed to center around the LEDs but I figured it was silly to leave serial output on the display when it's included in the project.
@onyx hinge ok, I need to do some debugging printing on ESP32-S2 to the UART port. Could you remind me how to write to there with an mp_printf or similar? Thanks.
I use ESP_LOG but I think printf works
tnx! I was thinking printf but forgot ESP_LOG
@idle owl, I'm not seeing anything obvious. I'll try running it and see if that makes it more obvious.
@gilded cradle Sounds good.
@slender iron is there a way to avoid using audiobusio in the build process? I removed CIRCUITPY_AUDIOIO = 0 from my make file but it's hanging on the build trying to build audiobusio
can you add CIRCUITPY_AUDIOBUSIO = 0?
Trying that now
@idle owl, it's updating on my magtag. Maybe add some print statements to verify the button press is happening?
It's happening, there's an LED animation that runs when it's pressed. I had print statements earlier that were responding. I'll check one more time though
Yah it's working
oh good
Ah ha
Also, could you send me the image. Maybe it's a format thing
@stuck elbow that worked
Except it worked earlier through the Slideshow lib?
Does the MagTag lib process images somehow?
It shouldn't.
Trying a different one
ok
Same thing. Do you have one you know works?
@gilded cradle I swapped the LED animation code line with the display image code. It works now.
Weird.
Oh, hmm. Cool
So I need to call refresh() it seems like? You said it should automatically do that.
No, I think I made it so it didn't do that automatically unless you just use the graphics library because I didn't want to slow people down if doing multiple graphics operations.
Ah fair enough. I'll keep it in then. Thanks for your help!
You're welcome
A little something I've been working on to make CP project deployment easier: http://daveastels.com/cp-deploy.html
@lapis hemlock I imagine that the platform printf is avoided because it has larger code size than micropython's
if you're trying to solve the "numbers print wrong" problem, I salute you.
also printf will deal in doubles but circuitpython (as we build it for micros) deals in floats
newlib, the standard library that I think arm-gcc uses on embedded platforms, has ecvtf which deals in floats. however, it may not be on riscv, xtensa, etc. https://sourceware.org/newlib/libc.html#index-gcvtf
The Red Hat newlib C Library
I have both a NRF52840 Feather and an ItsyBitsy NRF52840 Express, and I'm trying to make the BLE HID Keyboard example here work:
This does not seem to work on CircuitPython 6.0. I have updated both the Itsybitsy and the Feather to CircuitPython 6.0, and installed the 6.0 libraries as listed (adafruit_ble,adafruit_bus_device,adafruit_hid,neopixel.mpy,simpleio.mpy).
Any id...
Looks good to me, only one small style note.
@kahveciderin Please explain the larger context. I want to understand why you are trying to execute without internal flash.
We don't have a way to execute from the external flash without something on the built in flash fs.
Wow! Nice work! Thank you so much.
I've handed UDP support off to @hierophect. He's made a PR here for it: https://github.com/adafruit/circuitpython/pull/3708
@tidal kiln this may be of interest to you: https://github.com/adafruit/circuitpython/pull/3718
@gilded cradle yep. just saw that. ๐
@anecdata Yes, we don't want to retry if we initiated the disconnect.
@microDev1 seems to be a conflict in port.c you need to check out.
So for local testing on the MU Editor, I was able to add my board to the adafruit.py file in the modes folder of the application. Works so far. I have the my terminal open for the board so... temporary success.
Since you've included a flash chip, you could consider removing the filesystem entirely and getting yourself some additional flash. We only keep that option for chips that may disable it for some reason or other, and a 32kb filesystem has pretty limited utility anyway.
You can just remove this, since you default to an external flash.
Looks good apart from your mpconfigboard.mk conflict.
@slender iron @onyx hinge My previous CI check for the UDP additions was running into issues with make check-stubs -j2. My first thought was that I forgot to add a __init__.c somewhere but for UDP I haven't actually created any files. Is this just actions being janky, or does that suggest I have to fix something?
Why do you need this buffer? I would think you could use values directly.
One question. Also needs a merge and undoing some mistaken submodule changes.
Jeff just found a bit of space to add .rotation to epaper. You might be able to squeeze in now with it.
@ionic elk I haven't seen that check be janky
so I suspect you do need to fix something
did you try running it locally?
Almost certainly related to #3643
@tannewt I've replaced the resets with gpio_matrix_out(pin_number, 0x100, 0, 0);, which is the mux changing magic function used by FastLED alongside the RMT. Seems to work fine for my Saola, but if you've seen another mux alteration function you think would be more appropriate, we could swap it out. Should solve #3715, but I haven't specifically tested Jeff's failing script yet.
0x239A is Adafruit's USB VID. Please change this to one you are allowed to use. If the board is open source, then you can get one from https://pid.codes.
Please fix pre-commit as well as getting your own USB VID/PID. You can automatically fix pre-commit errors by installing it locally: https://pre-commit.com/#installation
Weird! The code to generate the HTML is identical: https://github.com/adafruit/circuitpython-org/blob/master/_includes/download/board.html#L7
I wonder if this is a failure of the socketpool. I don't think we handle reconnects very well currently.
Want to reset this every VM run? That way it will be shutdown if no longer needed.
Please increase CIRCUITPY_PYSTACK_SIZE in py/circuitpy_mpconfig.h until it works for you and let us know. We should be able to increase it.
What microcontroller are you using?
@jepler build is green. Please review.
You were using Mac OSX too right?
@hierophect, I was able to build and test this on a UMFeatherS2.
Along with the changes to the NTP library, I also had to comment out the check for the Epoch on line 61 in the NTP library.
I could also set the RTC to ntp.datetime.
r = rtc.RTC()
r.datetime = ntp.datetime
>>> from adafruit_circuitplayground import cp
>>> dir(cp)
Traceback (most recent call last):
File "", line 1, in
File "adafruit_circuitplayground/express.py", line 82, in _unsupported
NotImplementedError: This feature is not supported on Circuit Playground Express.
>>> import math # to check that dir() works on something else
>>> dir(math)
['__class__', '__name__', 'acos', 'asin', 'atan', 'atan2', 'ceil', 'copysign', 'cos', 'degrees', 'e', 'exp', 'fabs', 'floor', 'fmod', 'fr...
Adding support for SPI Flash for the CP Sapling. Builds and runs without issues. Did pre-commit check so everything should work out fine this time. I'll monitor and commit fixes as needed.
Ah, realized there is a board in there that isn't ready for the world (Icy Tree) will remove with a commit.
I have not looked everywhere as Javascript is not my thing.
What I did not figured out either is that nowhere on my adafruit account I say "French".
So I am curious to know what is going on. :-)
A few questions. Thanks for adding this!
Why factor this out? The common-hal file looks pretty empty.
I think this is clearer. In particular, I don't think the macro name needs "call" in the name.
#define CHECK_ESP_RESULT(x) do { int res = (x); if(res != ESP_OK) raise_esp_error(res); } while(0)
You have this in bindings as well. One place please. :-)
@dglaude, what is returned from this request in your scenarios from above:
https://accounts.adafruit.com/users/locale.json
We're simply using the Accept-Language header sent by the browser. We have to use that accounts.adafruit.com callback, as this is a statically built site and we're not able to get the headers easily otherwise. It's not loading anything from an adafruit account, which should simplify debugging this issue for us.
I'm looking into if there is a javascript issue beyo...
Initially, before I knew that i2s could NOT drive the dacs in esp32s2, I hoped this code would support both digital and analog audio out. I think there's some chance it could still support pdmin (using i2s-to-pdm algorithm similar to samd; esp32 supports pdm "directly" (hardware decimator) but again -s2 doesn't) or even i2sin.
@microdev1 @unexpectedmaker if either of you have a chance to test this for functionality that would be great!
so mbedtls will lie that it was able to send bytes
Ohh
it says it sent as long as it queued it up
components/soc/soc/esp32s2/include/soc/i2s_caps.h:#define SOC_I2S_SUPPORTS_ADC_DAC (0) // ESP32-S2 don't support ADC and DAC
ok, here is an improved requests: https://github.com/adafruit/Adafruit_CircuitPython_Requests/pull/54
should be more reliable on the S2
On the ESP32S2 port, microcontroller.reset() makes the REPL unresponsive and does seemingly nothing else. The drive remains available. Pressing the reset button is necessary to recover.
@slender iron I tried ESP_LOGI() and printf(), and neither is printing to UART port (I do see reset startup messages, so the connection is good.). I using mp_printf() in the old way for now. do I need to compile with DEBUG or something to get ESP_LOGx to work? It appears the default log level is INFO, so I think it should work, and I think printf() should also just work, though maybe that is defined by micropython
ya, you need DEBUG=1
ah ha, ok, thanks. Some time I'll try ocd also, but I think the bugs I have right now are fairly simple
yup np. I'm doing uart debugging now too
I can check on this as part of the sleep/alarm work.
I am not sure what I have done to my working trellis, but when I plugging it in, I get a message that there is a problem (not a very helpful message) and I need to scan the drive and fix it. I searched a number of places and I can;t figure out how to " scan the drive and fix it". Any help would be appreciated. I can bring up Mu and it sees the code. I can change the code to try a scan example I found. It saves the file on the CIRCUITPY drive *write date is changed" but nothing happens. Rest the Trellis did not fix it - see three blue flashes, and then white (I think because I color limited) I unplug the Trellis and plug it in again but it still does not work.
UART output:
I (4804459) gpio: GPIO[12]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (4804469) gpio: GPIO[11]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
W (4804539) cp radio: connect()
I (4805269) wifi:new:<6,0>, old:<1,0>, ap:<255,255>, sta:<6,0>, prof:1
I (4805739) wifi:state: init -> auth (b0)
I (4805739) wifi:state: auth -> assoc (0)
I (4806749) wifi:state: assoc -> init (400)
I (4806749) wifi:new:<6,0>, old:<6,0>, ap:...
@bitter bronze The filesystem may have gotten corrupted. Can you copy off the files you need from CIRCUITPY? Then you can erase and reformat the filesystem. CLick the Serial button in mu, and type:
>>> import storage
>>> storage.erase_filesystem()
that will erase everything on CIRCUITPY and reformat it cleanly
@tulip sleet Thanks Dan. I saved all my files on another disk. I tried erase_filesystem and it seemed to work - it erased all my files and I put back the code.py but it is not working. Do I need to reinstall the uf2 file?
I downloaded the uf2 for the Trellis, double clicked the reset button, TREML4BOOT came up, copied the uf2 file to TREML4BOOT and it took a few seconds to pop up CIRCUITPY. Serial mode on the Trellis shows Circuit Python 6.0.0. Ctrl-D soft reboot tells me there is no module named adafruit_trellism4 ?
Here is the error from Serial and the code where the error occours:
Now I am getting:
code.py output:
Traceback (most recent call last):
File "code.py", line 12, in <module>
File "adafruit_trellism4.py", line 48, in <module>
ImportError: no module named 'adafruit_matrixkeypad'
Code is:
import time
import random
from board import SCL, SDA
import adafruit_trellism4
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keycode import Keycode
from adafruit_hid.consumer_control import ConsumerControl
from adafruit_hid.consumer_control_code import ConsumerControlCode
line 12 is "import adafruit_trellism4"
@tulip sleet I am stumped
@bitter bronze you also need to copy adafruit_matrixkeypad.mpy to your /lib folder
the adafruit_trellism4 library depends on it
@crimson ferry Thanks. Where might I find it? I think I use to know that, but I am drawing a blank now. I am also trying to get up to speed with Visual Studio Code and I see the similar missing library.
It's in the library bundle, you can download it from https://circuitpython.org/libraries (or Github)
you probably already have it with the rest of the libraries on your computer
but it needs to be on the CircuitPython device, in the /lib folder with the rest of the libraries needed by your code, like adafruit_trellism4.mpy
@crimson ferry. Thanks again. Should I just copy the whole download library over or should I move just what I need?
There's usually not room for the entire bundle, but the Trellis has 8MB I think so it might fit, depends on what other files you might be adding to flash later
(takes longer to copy a bunch of stuff you don't need too)
@crimson ferry I think I will only move what I need. I did that and have passed that problem but now I am getting an error about the Keyboard function needing two arguments when it required none previously. It seems something changed under the covers. I have not looked inside .mpy files in the past. Something else to research
The code that use to run has
from_hid.keyboard import Keyboard
...
later on it has kbd = Keyboard() which fails with "function takes 2 positional arguments but 1 were given" (actually none in this case so the error is wrong?). It use to run with no error until my problems earlier in the evening and the updating of libraries. Now I am trying to see what the code really says, but I do not know how to see the code that went into the keyboard.mpy file. Any pointers would be appreciated.
I deleted the parens after Keyboard and another similar call and it seems to be working. I still have two things to solve, how to get Visual Studio Code to look in the lib folder in the CIRCUITPY drive and where to find the .py code that corresponds to the various .mpy files.
@tulip sleet and @crimson ferry thanks for your help. I love this community.
Awesome! I wasn't sure that would be possible...but it also seemed like a waste to reserve space that wouldn't be used.
I'm sorry to disturb you. I use nanoesp32-s2 / firmware๏ผ https://github.com/wuxx/nanoESP32-S2/blob/master/firmware/flash_ image_ cdc_ msc.bin ๏ผ, write it to 0x00, connect gpio19 and gpio20 (the schematic diagram is the same as nano, add resistance in the middle), insert USB2.0 interface into the computer, and successfully display the small U disk.
Then we use adafruit circuit Python muselab_ nanoesp32_ s2-zh_ Latn_ Pinyin-6.0.0.bin, write to 0x00
Serial terminal display:
ESP- ROM:esp...
By the way, my motherboard is the esp-12k development board nodemocu-32-s2
At troubleshooting time, I changed my browser Accept-Language to German... but the consequence of that on my internet experience were so hard on me (I don't understand German) that I gave up on that silly idea.
If booth language selection box use the same code, then it must be the javascript that only modify one and not the other. Because there are two language drop box, one for Stable and one for next release.
hey @slender iron I added another PID on pidcodes for the CP Sapling w/ SPI Flash so it passes CI Tests for circuitpython. I'll be updating the PR for circuitpython with the new PID
Installing Adafruit library is as simple as getting the zip file with all the MPY from https://circuitpython.org/libraries
Copy what you need in your lib folder.
When you have no more import error, this mean you have the library you need.
You can also get matching example (simpletest) from the other example-bundle.
Those setup.py and instruction in all the GitHub repo are for installation with Blinka, that is with the adaptation layer to use CircuitPython library on Raspberry Pi or othe...
Here is the notes document for 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/1ADivzRhU6vQCSee7Yj0RAtvy0B4hE6tAQ8hr_N8h6sw/edit?usp=sharing
@dhalbert the tud_connected() also got piggy packed here as well. There may be side-effect with not-required DTR pr.
Is wifi necessary to produce this problem?
If I comment out the import wifi I cannot cause this to reproduce.
Before any reboots, if I uncomment out import wifi it will lock up the next Ctrl-C.
So it appears the import wifi is necessary to cause the issue to occur.
Hi Folks
I am UK based & wanting to order a QT PY from local supplier but none of them seem to stock the 2MB PS Ram ( ADA4763).
Could I susbstitute this 8MB PS ram instead ?
https://cdn.shopify.com/s/files/1/0389/1025/files/esp-psram64_esp-psram64h_datasheet_en.pdf?v=1591715849
If so will the QT Py be able to see the extrra 8MB or just 2MB?
Regards
Stay Safe
J
This looks fine. There is a small chance of changed behavior, namely that if the calling code depends on being able to do something else with the data "after" the json object, up to READ_CHUNK_SIZE-1 bytes of it will have been already consumed and it won't work.
Specifically, with the current implementation and using a file, not a socket, you can have a file with the content {}\n{} and call json.load() twice on it to get an empty object {} each time.
If this proves to be a proble...
@cunning verge Only one specific flash chip is recognized by the "qtpy_m0_haxpress" build, GD25Q16C. You could modify and build your own circuitpython to support other flash chips. I don't think that qtpy is designed for psram at all.
psram is most often used in conjunction with boards that have esp32s2, based on my experience.
It still seems like a shame to me that NVM has to take up a full sector, but it just hasn't been high priority enough to spend the time to fix, especially when external flash makes it irrelevant anyway.
LGTM! I'll have to make a note to pick one of these up for myself when I have a second.
I don't know enough to judge, but this looks okay.
(I do also see hangs during wifi connecting to 2 out of my 3 APs, but when this happens the last log messages are
W (46652776) wifi: connected
I (46652786) wifi:AP's beacon interval = 102400 us, DTIM period = 2
so I don't think this will fix my problems)
@tulip sleet are you familiar with the __init__.c stubs system? Could I ask for your debugging advice on something?
@onyx hinge Hi Many thanks for the info. Will keep looking for the correct GD25Q16 - 2MB SPI Flash chip locally then.
Shame the local QT PY suppliers don't seem to be stocking or even planning to stock this .....
If you or anyone else reading this has any suggestions for a UK based supplier or maybe an equivilent chip I would be grateful for the info.
Just ordered the QT Py - really looking forward to seeing one in the flesh at last!
Take Care
J
@ionic elk do you mean the .pyi generation? No, I am not fmailiar with what it's doing, but I have fixed errors in my doc that it detects. If you mean putting code in __init__.c that is something I do all the time.
@cunning verge https://www.mouser.co.uk/ProductDetail/GigaDevice/GD25Q16CSJGR?qs=RcG8xmE7yp0Z2V6vXv5y%2Fw%3D%3D perhaps?
@tulip sleet I have these errors:
circuitpython-stubs/socketpool/__init__.pyi:53: error: Implicit generic "Any". Use "typing.Tuple" and specify generic parameters
circuitpython-stubs/socketpool/__init__.pyi:60: error: Function is missing a type annotation for one or more arguments
circuitpython-stubs/socketpool/__init__.pyi:60: error: Implicit generic "Any". Use "typing.Tuple" and specify generic parameters
since I presume these are generated files I'm not sure exactly what to modify, I think they are issues with a tuple return I use in shared-bindings/Socket?
I don't modify Socketpool so I figure the automated process must be combining them
@cunning verge https://www.mouser.co.uk/ProductDetail/GigaDevice/GD25Q16CTIGR?qs=RcG8xmE7yp03QVrX62o%252BOA%3D%3D actually ...CTIGR seems to be the one that Adafruit stocks
@onyx hinge Hi Jeff - super speedy reply! ยฃ12 shipping is a bit high for my limited funds but really grateful for the link
I'll add that it works just fine with the Feather on 5.0.0. It does not seem to work at all on the Itsybitsy NRF52840 on 5.x despite the obvious similarities between the Feather and Itsybitsy.
@cunning verge Farnell would probably have it, if that's easier
@cunning verge other SPI flash chips may work, but at a minimum it requires a custom build of CircuitPython. You can see the ones that others have added for use on various boards in our source: https://github.com/adafruit/circuitpython/blob/main/supervisor/shared/external_flash/devices.h
well, no, bleh
@tulip sleet @onyx hinge Very grateful - will keep up my search. At least thanks to you i now know what to look for !
@ionic elk did you change documentation in the code you're working on?
it does get mashed together in the .pyi file
@cunning verge Be sure to order the "T" package which is the 150mil.