#circuitpython-dev
1 messages ยท Page 336 of 1
is the reason I considered but did not choose it as the first.
Yeah I thought that too
Ok
Pin Names it is. Thank you.
Pin Names sounds good to me, when I was learning more I am almost certain I googled that term before when I was trying to find out is A2 = D2 or something (not knowing it didn't really matter)
Thank you for the feedback! Working for someone like you is what really matters with this.
@atomic summit Are you perhaps around?
@tulip sleet I want to include a sentence explaining why the pin names changed. Can it be summed up in a sentence or is that a whole thing in itself?
Could you move this whole file to the ports/esp32s2/peripherals directory, and change the makefile correspondingly? We use that directory to organize additional driver functions and reservation systems for modules like this. You can see peripherals/rmt.c as an example.
This looks great! Just a couple minor port organization comments, if we could get this all moved into a peripherals/pcnt.c file instead of the port root that'd be good. Do you have a good test sketch I can run with this to try it out?
I would change this to "All PCNT units in use" to emphasize they have been used up, as opposed to the device not having any to start with.
This isn't a change request since I'm working on the fix in a new PR, but note that until we add in proper pin resets to Microcontroller/Pin.c, this function and the PCNT deinit might not actually release this pin from the PCNT. If you run into weird bugs after dynamically remapping pins, that's why.
the long answer is that we don't want to support our own Board Support Package on Arduino, and theirs uses the GPIO names which can't be changed. The short answer is probably that the names match the Arduino names.
I mean a few sentences would also be fine. But I don't want to head down a rabbit path.
alright
I'll go with the short answer there then.
The four people who ask for the long answer, we can just tell them.
And the use of IO instead of D? To fit with standard ESP pin naming? or?
or to say, the names match the Arduino NUMBERs. We are not using names starting with D because they would be in different possitions from the standard Metro/Arudino shaped boards, and that would be really confusing. Or you could just say that the "IO" prefix matches the ESP32-S2 standard (removing "GP" to save space)
Or because it's a different map than previous metros so we wanted it to be clear so we changed the API.
ok
Got it.
I think I can work with that.
Might still have you preview it when I'm done.
calling it the "API" is a stretch, I wouldn't use that name. It's "like" an API.
Seconding Scott here - if you can get everything in CountIO moved over to a peripherals/pcnt.c file, you can migrate all your init and reset functions over to it, and the two modules will be able to co-exist without accidentally trying to reserve each other's PCNT units. Check out rmt.c for an example - the RMT is used by PulseIn, PulseOut, and Neopixel_write, so they all share the same reservation system, init/deinit, and reset_all functions.
How often to the 6.0.x updates get merged into main?
@solar whale not on a particular schedule.
@onyx hinge Thanks!
my aspergers makes me notice the missing 'y' ever(y) time :-)
@slender iron Does the J-Link work with the ESP32-S2?
the debug plug is a JTAG port (not SWD)
oh
it doesn't work with JLink software but you can use OpenOCD with JLink hardware to connect
Alright
the debug plug is the same physically but the pins are for JTAG instead of SWD. SWD is an ARM CPU specific thing
Wait, the connectors are called SWD though. The ones that solder into that space.
oh
I see
the connector itself is just 2x5 1.27mm pitch
ya, same connector
on the left you can see the "SWD pinout" but the / show the alternative use for JTAG
ah
ok
@slender iron are you suggesting PR 3639 would fix the SSL hanging problem, or just that it needs to be tested?
sorry, not hanging failing
it should reduce the memory footprint of SSL connections
Saola 1 w/Wrover with ESP32S2
6.1.0-alpha.0-186-g872615e9d on 2020-11-03 (artifact from this PR)
Requests 1.7.4
After testing this for a couple of hours, to the point of confusion (encountering other open issues, intermittent errors, different behavior with different URLs, etc.)... some scenarios work fine, and I don't see any clear new issues. Not sure what the test case is for testing the reduced delay. I do still see intermittent espidf.MemoryError: in `File "adafruit_reque...
Why not just name the core library adafruit_busdevice as well?
:-) Thank you for the PR!
Looks good to me. I can't test the CAN changes, but since this is just a merge to main I think its OK.
@slender iron I could rename the busdevice library, but is there a way to handle the fact I2CDevice is now not in a separate file (adafruit_busdevice.i2c_device.I2CDevice where i2c_device.py existed)?
If its possible I can look into how to do it just don't want to chase the impossible by accident
The reduced delay case comes up when the response has a long header. The coin base API is an example. The long header grows the request buffer and causes a recv_into with a large buffer to get the remainder of the request. When the buffer is larger than the remaining bytes, it causes us to hit the time out.
@blissful pollen ah! take a look at microcontroller.pin. it is possible internally
@solar whale I am confused about what canonical examples I should be using on ESP32-S2 to test requests. Are you using ones that you cooked up, or are there some examples floating around? Thanks.
@slender iron same q could be addressed to you, if you have some examples. The ones in examples in the requests library are not suitable, it appears, even the "cpython" ones, because they use socket.
you can convert any esp32spi examples to the s2 pretty easily
but they are mostly using the legacy API, right?
this ahs been my usual test ```mport ipaddress
import wifi
import socketpool
import time
import adafruit_requests
import ssl
#import espidf
#import gc
#print("cp mem free", gc.mem_free())
#print("idf total mem", espidf.heap_caps_get_total_size())
#print("idf mem free", espidf.heap_caps_get_free_size())
#print("idf largest block", espidf.heap_caps_get_largest_free_block())
for network in wifi.radio.start_scanning_networks():
print(network, network.ssid, network.rssi, network.channel)
wifi.radio.stop_scanning_networks()
print(wifi.radio.connect("ssid", "password"))
print("ip", wifi.radio.ipv4_address)
ipv4 = ipaddress.ip_address("8.8.4.4")
print(ipv4)
print("ping", wifi.radio.ping(ipv4))
pool = socketpool.SocketPool(wifi.radio)
requests = adafruit_requests.Session(pool, ssl.create_default_context())
response = requests.get("http://wifitest.adafruit.com/testwifi/index.html")
print(response.status_code)
print(response.text)
response = requests.get("https://httpbin.org/get")
print(response.status_code)
print(response.json())
print()
response = requests.get("http://worldtimeapi.org/api/ip")
print(response.status_code)
print(response.json())
print()
response = requests.get("https://api.github.com/repos/adafruit/circuitpython")
print(response.status_code)
print("circuitpython open issues", response.json()["open_issues_count"])
print("circuitpython stars", response.json()["stargazers_count"])
print("done")
ya, but the new requests api isn't that different, it's just on an object
pool = socketpool.SocketPool(wifi.radio)
requests = adafruit_requests.Session(pool, ssl.create_default_context())
that's the critical bit
the last one used to take a very long time -- 60 seconds or more -- but getting much better -- just about to test PR3639
ok, thanks! I thought https was not working at all
I was , but has not been working for me lately
eg. I am getting "Failed SSL handshake"
welcome to the club
so mayb 3639 fixes that or maybe not, and I can try Scott's idea of setting the date/time to something reasonable.
somee https work -- seom don't ```ress any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 6.1.0-alpha.0-185-g7441344c6 on 2020-11-03; Metro ESP32S2 with ESP32S2
import wifi_test
<Network> Needell Airport -57 6
<Network> Needell Airport -47 1
<Network> WYZE_FBAB62DE71811B38 -68 11
<Network> central2.4 -80 8
<Network> 31A -81 8
None
ip 10.0.0.30
8.8.4.4
ping 0.055
200
This is a test of Adafruit WiFi!
If you can read this, its working :)
200
{'url': 'https://httpbin.org/get', 'headers': {'User-Agent': 'Adafruit CircuitPython', 'Host': 'httpbin.org', 'X-Amzn-Trace-Id': 'Root=1-5fa19b3e-20a0aede2bda0b7b3b22cc46'}, 'args': {}, 'origin': '73.61.89.123'}
200
{'timezone': 'America/New_York', 'utc_datetime': '2020-11-03T18:02:40.067080+00:00', 'raw_offset': -18000, 'client_ip': '73.61.89.123', 'dst_from': None, 'unixtime': 1604426560, 'utc_offset': '-05:00', 'datetime': '2020-11-03T13:02:40.067080-05:00', 'week_number': 45, 'abbreviation': 'EST', 'day_of_year': 308, 'day_of_week': 2, 'dst': False, 'dst_offset': 0, 'dst_until': None}
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "wifi_test.py", line 53, in <module>
File "adafruit_requests.py", line 555, in get
File "adafruit_requests.py", line 535, in request
File "adafruit_requests.py", line 429, in _get_socket
File "adafruit_requests.py", line 425, in _get_socket
OSError: Failed SSL handshake
failing on this one ```response = requests.get("https://api.github.com/repos/adafruit/circuitpython")
this used to work with an older requests library
So I don't think it isthe certificates.
Any low level folks have input on (erase_filesystem freezing) https://forums.adafruit.com/viewtopic.php?f=59&t=171373&p=837044#p837044
@tulip sleet can you do download counts for the new release or need me to?
I think two weeks would be fine. I also have the s3 files from rc.0 so I may not have too much to download
I will download and concat the previous months. It's nice we're on a month boundary almost
๐
This one? http://api.coindesk.com/v1/bpi/currentprice/USD.json I don't see inordinate delays with rc.0 or this PR build. Maybe 0.1s improvement in time to print the headers.
https://learn.adafruit.com/api/guides/new.json?count=5 has long headers and long response body. Times are longer and much more variable, but it's hard to isolate out variations in server and network perform...
these https requests all work with PR3639 ```TEXT_URL = "https://httpbin.org/get"
JSON_GET_URL = "https://httpbin.org/get"
JSON_POST_URL = "https://httpbin.org/post"
print("Fetching text from %s" % TEXT_URL)
response = https.get(TEXT_URL)
print("-" * 40)
print("Text Response: ", response.text)
print("-" * 40)
response.close()
print("Fetching JSON data from %s" % JSON_GET_URL)
response = https.get(JSON_GET_URL)
print("-" * 40)
print("JSON Response: ", response.json())
print("-" * 40)
response.close()
data = "31F"
print("POSTing data to {0}: {1}".format(JSON_POST_URL, data))
response = https.post(JSON_POST_URL, data=data)
print("-" * 40)
json_resp = response.json()
Parse out the 'data' key from json_resp dict.
print("Data received from server:", json_resp["data"])
print("-" * 40)
response.close()
json_data = {"Date": "July 25, 2019"}
print("POSTing data to {0}: {1}".format(JSON_POST_URL, json_data))
response = https.post(JSON_POST_URL, json=json_data)
response = https.post(JSON_POST_URL, json=json_data)
print("-" * 40)
json_resp = response.json()
Parse out the 'json' key from json_resp dict.
print("JSON Data received from server:", json_resp["json"])
print("-" * 40)
response.close()
@tannewt and reviewers I have tested this branch by pulling it in and building from source on a Metro ESP32-S2 testing on my demo code:
import gc
import ipaddress
import wifi
import adafruit_requests
import time
import ssl
import socketpool
# import adafruit_dht
from secrets import secrets
# dht = adafruit_dht.DHT11(board.D7)
print(wifi.radio.connect(secrets['ssid'], secrets['password']))
print('ip', wifi.radio.ipv4_address)
ipv4 = ipaddress.ip_address('8.8.8.8')
...
hmmm if I run this request first -- it works response = requests.get("https://api.github.com/repos/adafruit/circuitpython") print(response.status_code) print("circuitpython open issues", response.json()["open_issues_count"]) print("circuitpython stars", response.json()["stargazers_count"]) ```Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 6.1.0-alpha.0-185-g7441344c6 on 2020-11-03; Metro ESP32S2 with ESP32S2
import wifi_x
<Network> Needell Airport -58 6
<Network> Needell Airport -44 1
<Network> WYZE_FBAB62DE71811B38 -71 11
<Network> central2.4 -84 8
<Network> 31A -84 8
None
ip 10.0.0.30
8.8.4.4
ping 0.037
200
circuitpython open issues 336
circuitpython stars 1886
done
when it was third, it failed with SSL handshake error ...
Order makes a big difference -- now after some https requests succeed I get ```Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "wifi_test.py", line 47, in <module>
File "adafruit_requests.py", line 555, in get
File "adafruit_requests.py", line 535, in request
File "adafruit_requests.py", line 440, in _get_socket
espidf.MemoryError:
With this PR build, I'm seeing <0.01 seconds to retrieve the headers on http://api.coinbase.com/v2/prices/spot?currency=USD. Can't compare to baseline of rc.0 due to espidf.MemoryError: .
This is with PR 3639
Watched the deep dive last night, great overview of the NTP stuff @slender iron. When we were talking about it in the github issue, I didn't realize you were thinking about NTP being added to core vs updating the adafruit_ntp library which I had in my original description. I should have asked about that earlier. Is your UDP branch suitable for trying out with the new NTP changes, or do you have more work to go there?
@slender iron I'm pretty confused.... Now that I am getting very different behavior depending on the order in which I do https requests, should I be posting to the issue under PR 3639 or the Request Library ... or somplace else.
@idle wharf I haven't even tried to compile my udp branch. I'm hoping to hand it off and try and focus
but getting sucked into esp32spi debugging today
@solar whale the PR or a new issue
@slender iron That's what I needed to know. It failed to build for me, but if you've not gotten that far, then I should wait.
I am finding the the order in which https calls are made makes a big difference
using this code -- note the first request is commented out
import ipaddress
import wifi
import adafruit_requests
import time
import ssl
import socketpool
print(wifi.radio.connect('Needell Airport', 'browndog'))
print('ip', wifi.radio.ipv4_address)
ipv4 = ipaddress.ip_address('8.8.8.8')
print('ping', wifi.radio.ping(ipv4))
pool = socketpool.SocketPool(wifi.radio)
https = adafruit_re...
@idle owl I'm here now (6am here)
@atomic summit Oi! I had the wrong country entirely. I was wondering how you did your fancy pinouts diagram for your FeatherS2.
I make them by hand in Affinity Designer, which is a vector app for Mac and Windows.
Wow. Ok. Well done, you, then ๐
I feel less bad that I've been doing this one by hand then.
I wish there was an app for it, or an easier way, but there isn't ๐ฆ
I thought you might have some kind of automation or program that did it for you.
Nope ๐ฆ
I don't know how to do vector stuff, so I'm in photoshop. ๐
It actually doesn't look half bad, but yours is way better.
Ok. Issue with doing it as a bitmap is it wont scale/resize properly. Like if you want to go from screen DPI to print etc.
Yeah I know. I realise that.
This isn't meant to be a full diagram, it's meant to show the CircuitPython pin names.
Though Photoshop does have some basic vector tools, so try to use those for shape primitives if you can. That will help.
I started with the SVG from the Fritzing I made for it and then went from there.
So that was the size I began with. Because I also don't know how to export an SVG other than whatever size Illustrator decided it was.
This is super basic. Rectangles and text.
you can convert any esp32spi examples to the s2 pretty easily
@slender iron @tulip sleet Here is the ministry of silly creative idea... is it possible to connect an AirLift Feather Wing to a ESP32S2 Feather and alternatively use build-in Wifi or AirLift Wing Wifi to compare the behaviour? (feel free to discard)
Ok. I'm happy to do a pass over it once you have the info in place ๐
@atomic summit I'm not quite finished yet but here's what I have so far.
@thorny jay ya, you should be able to connect both
Need to add the I2C, SPI and UART singletons next to their respective pins.
That looks great! well done!
Thanks! I really appreciate that.
Downside is that screenshot is 100% the size, so no zooming. But like I said, it's not meant to be one of the giant diagrams.
Learned about linking layers though. Figured that out on my own. So I levelled up my Photoshop skills today I guess. ๐
@atomic summit Anyway, thanks. I'll ping you when it's done for another set of eyes, though Limor will give it a look as well.
@tulip sleet Are these boxes three different colors to you?
I am sure there are "filter" to check how various colorblindness see colourfull image. There is more than one kind of this.
I know. The color combos are endless and managing to compare them to all possible concepts is difficult. I usually ask Dan regardless.
Are you still using MISO and MOSI?
Yes, but when spelled out we use something like Microcontroller In/Serial Out or Sensor Out depending on the situation.
Ok
@thorny jay yes https://twitter.com/anecdat/status/1279504611792031746
I just noticed how MISO/MOSI look like a mirror when looked reverse way:
@thorny jay yes
@crimson ferry Maybe you need some of this https://www.adafruit.com/product/4254
I have a few ๐
@slender iron I know the I2C, UART, SPI "pins" in CircuitPython are singletons, but is there another less jargony name for them? Or is that simply what they are and we should be explaining it that way.
I don't know of one. the idea is that the object is created the first time you access it and then returned forever more
Ok. Thanks
@slender iron I've been crash coursing on UDP/IP this morning, but I'm still pretty new to the python end of things. If I were to try and think about how to test your UDP code, where would I start?
Do we have any examples for Socketpool yet I can try?
@idle owl I canโt see the difference between the blue and purple at all really. I am red insensitive so the addition of red in the purple doesnโt change much. More people are green insensitive
Fair enough.
@ionic elk this is the example I'd try: https://github.com/tannewt/Adafruit_CircuitPython_NTP/tree/raw_ntp
so that was all from 2019? How does that work?
I don't know what you mean.
or I guess only the UDP part is this year, sorry, I'm just trying to figure out where in the process I'm jumping in
I mean we didn't have any ESP32 in circuitpython last year so I'm confused as to when and why this was written
when what was written?
The NTP library.
it was originally done for ESP32SPI
ah
So have you already modified this code to work with native UDP on the ESP32-S2?
or does that all need to be modified in
I modified it to use UDP in CPython
ok
@jerryneedell with your example I confirmed the same results I wonder why my response = https.get("https://api.github.com/repos/adafruit/circuitpython") is working for me as that is https? It is confusing to me as your https examples are failing for me as well. This is a tricky one for sure.
I'm advertising an nrf52840 device as both a uart device, and a hid device. The name advertises correctly on the HID, but the name on the uart advertisment is None. Is this just an unsupported configuration, or is this a possible bug?
@hierophect Thanks for the review. I am using the following test sketch.
import countio
import time
import digitalio
from board import *
#Connect IO21 to IO14
led = digitalio.DigitalInOut(IO21)
led.direction = digitalio.Direction.OUTPUT
pin_counter = countio.Counter(IO14)
while True:
led.value = True
time.sleep(0.25)
led.value = False
time.sleep(0.25)
print(pin_counter.count)
def _get_socket(self, host, port, proto, *, timeout=1):
key = (host, port, proto)
if key in self._open_sockets:
sock = self._open_sockets[key]
if self._socket_free[sock]:
self._socket_free[sock] = False
return sock
if proto == "https:" and not self._ssl_context:
raise RuntimeError(
"ssl_context must be set before using adafruit_requests for https"
)
addr_info = self._socket_pool.getaddrinfo(
host, port, 0, self._socket_pool.SOCK_STREAM
)[0]
retry_count = 0
sock = None
while retry_count < 5 and sock is None:
if retry_count > 0:
if any(self._socket_free.items()):
self._free_sockets()
else:
raise RuntimeError("Out of sockets")
retry_count += 1
try:
sock = self._socket_pool.socket(addr_info[0], addr_info[1], addr_info[2])
except OSError:
continue
connect_host = addr_info[-1][0]
if proto == "https:":
sock = self._ssl_context.wrap_socket(sock, server_hostname=host)
connect_host = host
sock.settimeout(timeout) # socket read timeout
try:
if not sock.connect((connect_host, port)):
sock = None
except MemoryError:
sock = None
self._open_sockets[key] = sock
self._socket_free[sock] = False
return sock
@bronze shadow you should be able to do a single combined advertisement
I'll see if that works in my codebase, but I was unaware. Thanks!
I've stopped advertising HID and am only using UART. Example code is
self._ble.name = 'test'
for adv in self._ble.start_scan(ProvideServicesAdvertisement, timeout=20):
print('Scanning')
if UARTService in adv.services and adv.rssi > -70:
print(adv.__dict__)
That print is returning {'data_dict': {6: b'\x9e\xca\xdc$\x0e\xe5\xa9\xe0\x93\xf3\xa3\xb5\x01\x00@n', 1: b'\x06'}, '_rssi': -58, 'connectable': True, 'mutable': False, 'address': <Address REDACTED>, 'flags': <AdvertisingFlags object at 20027300>, 'scan_response': False, 'adv_service_lists': {2: <BoundServiceList object at 20027900>}}
Advertising side looks like this
self._ble.name = 'test'
self._uart = UARTService()
advertisement = ProvideServicesAdvertisement(self._uart)
self._ble.start_advertising(advertisement)
Devices do connect, but I don't see a name in the __dict__ and it returns None as you would expect.
I don't have a solid reason for not using return but there are some scenarios where the current implementation would be more clear.
@onyx hinge Jeff, I have just realised that for the circuitpython checks on github, we would have to set the NUMPY_COMPATIBILITY constant to 0. Is it OK, if I modify the workflow file? https://github.com/v923z/micropython-ulab/blob/ecd24e9702801f53244627362800a6318fdfde46/code/ulab.h#L30
@hierophect I would love to collaborate with you on implementing proper pin resets.
@idle owl I can help you with the pinout diagram for the metro... would like to point you to the pinout diagram that I created for my microS2.
@analog bridge I just finished doing up the one I was doing ๐ That does look lovely though. How did you do it?
I managed to scale it properly so now it's at least huge and zoomable.
I am using Inkscape and Adobe Illustrator
@atomic summit @tulip sleet If you could give this a look for accuracy, I would appreciate it. LMK if you need a bigger version.
@analog bridge I am completely lost when it comes to Illustrator. I can edit things fairly well, but creating new things is a massive struggle for me.
Are you working with svg ?
The board image was an SVG, I exported it as a PNG so I could use it in Photoshop.
So this all started in Illustrator. It did not continue there. ๐
alright, changed as circuitpython standard.
{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA07) },
It's the SVG used for the Fritzing object.
For what it's worth, this will work for our current needs. I wouldn't want to do a full pinouts diagram like this though. This was simply to show the CircuitPython pin naming scheme we chose.
@analog bridge I am completely lost when it comes to Illustrator. I can edit things fairly well, but creating new things is a massive struggle for me.
@idle owl I feel it.
I think I made mine too huge... would be reducing dpi used for png export.
This is also massive now that I figured out scaling the original SVG. Will need to bring it down for export as well.
Otherwise I imagine the Learn system might choke on it. ๐
Got lucky enough to grab a couple QT-Py's. One needed a code reload - the neopixel was cycling, and I could get the BOOT directory, but the CIRCUITPY directory would not come up, nor would it connect with Mu (even though logs say Mu saw it). So I went to download the latest .uf2 and 6.0.0 Beta was the only one listed on the QT-Py page. That went fine, but I lost the demo code that comes with it. Anyone know if that demo code is available somewhere?
@topaz schooner it's a bug that only beta is on the download page. I'll check on that, sorry.
you can get it from https://adafruit-circuit-python.s3.amazonaws.com/index.html?prefix=bin/qtpy_m0/
hi. is it okay to make and sell end-user products with circuitpython ?
@lapis hemlock I think we'd like the CI steps to be the most like building ulab inside circuitpython as possible
@topaz schooner I am seeing 6.0.0-rc.1 on the download page: https://circuitpython.org/board/qtpy_m0/
@faint delta are you selling a development board, or a purpose-built thing (like a thermostat or something)? It's open-source software, liberally licensed, so you can do what you want with it. We have some requests about how you'd use the nam CircuitPython if you were make that name visible.
@lapis hemlock I think we'd like the CI steps to be the most like building ulab inside circuitpython as possible
@onyx hinge That's OK, but we still have to set theNUMPY_COMPATIBILITYflag. If you'd like, we can have a separateulab.hheader file forcircuitpython. That is a clean solution.
By the way, sorry for hijacking the "In the weeds" section yesterday. I didn't realise how long it went.
@lapis hemlock why not do it the way we do for many other things, #if !defined(SYMBOL) #define SYMBOL (DEFAULT_VALUE) #endif so that we can add our preferences as -DSYMBOL=OUR_VALUE in CFLAGS?
@tulip sleet it's for the next version of a product that's already out on the market. my dad is asking me to build it. his previous version didn't have a microcontroller. he's adding one and asking me to write the code, so i am trying to make sure it's alright. couldn't find a FAQ or anything about this, but i get this feeling like it can't be this easy ?
well, if you expose CIRCUITPY, then someone could mess with the code you're writing, etc. Depends on the product, but it might be too easy to break. Or, if it's user-servicible, then maybe making it easily accessible is good.
@tulip sleet @slender iron I finished the CircuitPython Pin names diagram so the documentation Limor expected to accompany our decision is thorough and completed ๐
@lapis hemlock why not do it the way we do for many other things,
#if !defined(SYMBOL) #define SYMBOL (DEFAULT_VALUE) #endifso that we can add our preferences as-DSYMBOL=OUR_VALUEin CFLAGS?
@onyx hinge we could do this. But won't it get long? I mean, if you want to define all your symbols on the command line, then it might become a nightmare...
apparently our CFLAGS are about 3.5kB, for some atmel-samd board
that's what im thinking, @tulip sleet , the latter (user serviceable). i want the users to have as much freedom as possible, which circuitpython gives me, even over Arduino IDE approach (which suffers the same "gut feeling" i mentioned). I think as long as I can deliver working solution without risking security, and the customer (my dad in this case) is ok with the ability for competitors to look at the code, then there is no problem. would this be correct?
Yes, it's fine. You could use a custom build of CircuitPython that doesn't expose CIRCUITPY (and doesn't act as an HID keyboard, etc.), but leave the bootloader there, with a reset button. If your code needs to be updated, someone could load a regular version of CircuitPython via UF2, expose CIRCUITPY, put in the new code, and then put back the non-CIRCUITPY version
@onyx hinge I really don't want to convince you, but we could just include a separate header, if CIRCUITPY is defined. Either way is fine with me.
or if it's not meant to plug into USB most of the time, then it doesn't matter
@tulip sleet i love that idea. yes it's not meant to even be plugged into USB, but curious users can tap into a usb port inside (not sure 100% on new hardware, but you get the idea) with simple instructions and play around. i appreciate the answer!
If you only need to prevent modification to the code, and not hide the code, you could also use boot.py to mount it as read only (so the device itself can write to disk) but the host OS couldn't.
@lapis hemlock a #if CIRCUITPY section is fine for us too
if we ever decide we DO want to vary some things on a per-board basis, though, we'd need to be able to do it via CFLAGS. We can deal with that when the need arises.
if we ever decide we DO want to vary some things on a per-board basis, though, we'd need to be able to do it via CFLAGS.
@onyx hinge This is actually a good point.
interesting, circuitpython sounds so flexible. so we're okay to ship products with it. what an amazing future if our devices could just be plugged in and there's the code, in python ๐
"The right to repair (or hack)"
If/when you do come out with something, let us know and we'll put it in the newsletter, etc.
will do, he's in a hurry, so will be soon. i wish the NFC feature was implemented on the itsybitsy nrf52840
but ill find another way to pair a pair of those securely i guess
i figured if i can get this authorization, the USB access to the code.py is indeed an out of band place to share a secret ๐
(updated my previous comment, forgot when I instrumented that headers were not fetched separately like content/text/json)
This PR adds the ESP-IDF gpio_reset_pin function to the Microcontroller/Pin module's reset_pin_number and reset_all_pins. This should resolve issues where pins would remain connected to previously used peripherals even after soft reboots or de-inits, since the IDF does not alter the pin matrix for most peripheral de-init functions.
Tested on the Saola 1 Wrover with Neopixel and I2C. Any help testing additional applications for unforeseen problems would be appreciated.
@analog bridge paused from my other work and gave gpio_reset_pin a spin on a couple of basic tests. Would welcome any testing help if you're interested.
@tulip sleet have you built nina recently?
when I run make firmware it's prompting me to set a bunch of configuration
@slender iron I built it to build the 1.7.1 release. I had various issues like that when the env was not set up perfectly, I think.
the two IDF variables seem right
i have a python2 virtualenv set up, and before I do a build, I source this script for myself:
export IDF_PATH=$HOME/bin/esp/esp-idf
export PATH=$HOME/bin/esp/xtensa-esp32-elf/bin:$PATH
source ~/bin/py2/bin/activate
PS1="(esp) $PS1"
ah, my python was 3.8
the esp-idf is 3.3.1. Both this and the ESP32-S2 build put stuff in ~/.espressif
not sure if they conflict
~/bin/py2 is my virtualenv for python2
sounds like you may have it. This was a big headache to get right
I set up the virtualenv, then I ran the install script in esp-idf to pip stuff into that py2 virtualenv
@tulip sleet ok, trying it again with a python2 venv but still getting the config thing
i start with make clean, let me try that. Might have to do make menuconfig, for no good reason.
@slender iron If I rename the busdevice to match the existing library should I change all the filenames, etc. to be "adafruit_bus_device" too?
(I think I have to but still not 100% sure how all this QSTR stuff works yet!)
@slender iron it worked for me after I sourced my script above and did a make clean
@blissful pollen yes please. it'll work without but it's clearer if they match
@tulip sleet looks like it's going after a make menuconfig
๐คท I find it bizarre
yah, I submitted a PR for that
kk
miniesptool, right?
yup
also I put the md5sum in the release notes
gonna use it now
why don't we just calculate the md5sum in miniesptool? There's hashlib
we could calculate it on the fly
hashlib is batteries included; doesn't need to be installed
I"ll open an issue for that
oh, sorry, I didn't realize that
i thought it was a substitute for esptool.py, not the passthrough
well, i created the branch without making a PR. Just made a PR
@ionic elk I can start tests on interrupt and touch based modules.
Wanted to follow this up with tests on Mac and Windows. Same results. Success reported when writing the file, safely ejected the disk. File corruption detected when running code as there were errors on the code that was read back on the nice_nano itself. Rebooting the microcontroller (hard reset), the corruption could be seen in that file on the computer.
I would like to use two separate Oleds on I2C, is there any way to do this...is there any build that has a higher Display limit that I could try?
Maybe @darianbjohnson could share his build?
@SwannSchilling the MONSTER M4SK device has two displays built in. But they use SPI busses I believe instead of I2C. You can see an example of the build flag that allows mulitple displays in that devices port directory here: https://github.com/adafruit/circuitpython/blob/main/ports/atmel-samd/boards/monster_m4sk/mpconfigboard.h
I don't have experience using multi-ple screens on any other devices, but perhaps looking over the configuration of this one can get you started on what you need to...
I added a french layout for Adafruit_CircuitPython_HID with an example
https://github.com/usini/Adafruit_CircuitPython_HID/tree/fr
Test : https://twitter.com/m4dnerd/status/1323997253007278081
USB Human Interface Device drivers. Contribute to usini/Adafruit_CircuitPython_HID development by creating an account on GitHub.
{o_o} : Hรฉ salut, je suis un clone de SAMD21 Mini programmรฉ avec @circuitpython!
Je peux รฉcrire avec des caractรจres accentuรฉs
grace ร รงa --> https://t.co/fmEWsMuLCN ( ยฐ_ยฐ )
@silent cove neat! I hope you'll make a pull request for it
Close! It's a minor change, but please change pcnt_handler to pcnt.c to match the naming conventions we use for peripherals/ source files.
@prime flower will there be updated adafruit_io_mqtt and adafruit_io_simpletest.py with examples to work with the esp32-s2 rather than just the adafruit_esp32spi? Thanks in advance.
@hierophect A file named pcnt.c already exists in the esp-idf.
I added a french layout for Adafruit_CircuitPython_HID with an example
https://github.com/usini/Adafruit_CircuitPython_HID/tree/fr
Hey @tulip sleet after the German keyboard, you now have a France-French keyboard that want to get into HID. You even have a PR for that. I believe it is time to open the gate or find the proper way to accept such internationalisation. It should be easy for me to do a Belgian-French keyboard (yes there is such a thing) https://github.com/adafruit/Adafruit_CircuitPython_HID/issues/53 (Merci beaucoup monsieur @silent cove)
USB Human Interface Device drivers. Contribute to usini/Adafruit_CircuitPython_HID development by creating an account on GitHub.
hello here. I'm studying the best way to animate shapes. say a mix between display_shapes and led_animation. So I read the source code and I see a way, but I need advice on the viability of the solution. If I make a subclass of Rect with all the _pixbuffer methods (and internal maths to translate that to the palette and bitmap of the shape), and then pass it to any led_animation object, will it work ? is there any other more obvious way to do something like that ?
@FoamyGuy thanks a lot for the Quick Response, and your suggestion! I realized that the MONSTER M4SK has two screens attached, actually I would want to use my to Oleds for kind of the same thing...
They are meant to be for robots eyes!
I just don't know how to compile Circuit Python for the ItsyBitsy M4, I could give it a try...but it might turn out to be frustrating.
I thought maybe I could use the one @darianbjohnson already compiled! Since he said, it took him a while to get the build...
@balmy stirrup There should be, I may put time aside today or tomorrow to test with an ESP32-S2 Metro
(I'd love the outline of a rect to be animated like a circular RGB strip...)
@prime flower sounds great if you get some working code and would like me to test I can help.
I have my Metro ESP32-S2 ready to go.
Does this cause a problem? In CircuitPython, for instance, there are many files named __init__.c and it's okay.
After some bus problems, canio sends packets multiple times instead of just once.
Using the "ack" demo from https://github.com/adafruit/Adafruit_Learning_System_Guides/pull/1293/ start the listener and then the sender and see that everything is in a steady state.
Pull out one of the bus wires and then plug it back in after a second or two.
Notice that now the receiver seems to get each packet 3 times and the receiver seems to get each ACK packet 3 times.
This is likely to be specific to stm32f405 implementation, and appears to be a problem on the sending side but that's just a guess. 3 also happens to be the number of transmit buffers.
No problem as such. My aim is to avoid confusion.
@SwannSchilling There are some great resources to help you along if you do end up wanting to give it a try. This guide covers the process very well: https://learn.adafruit.com/building-circuitpython/build-circuitpython. Also there are plenty of helpful folks in the Adafruit Discord, linked in the readme of this repository, who are willing to help you through issues that come up.
I do understand though it can seem a bit daunting if you've never done it. And like with many things that are th...
@jerryneedell do you think this change makes it worse? Otherwise we can fix the ordering issue in a follow up PR.
I'm not sure we want to use gpio_pin_reset because 1) it enables pull up and 2) attaches GPIO to the output. (Source) The pull up behavior doesn't match other ports and we may want to switch back to the default pin function such as JTAG.
We definitely should refine this code though. We do want to reset individual pins.
Thank you! Build failure is unrelated board.
I'm not sure we want to use gpio_pin_reset because 1) it enables pull up and 2) attaches GPIO to the output. (Source) The pull up behavior doesn't match other ports and we may want to switch back to the default pin function such as JTAG.
We definitely should refine this code though. We do want to reset individual pins.
We could store a table of default pin setting information, the way we do for the i...
@gilded cradle is this the json bug you fixed yesterday? https://forums.adafruit.com/viewtopic.php?f=60&t=171427
Let me check what's on 378
@slender iron It's a different error that I fixed yesterday
haha, great!
@slender iron is there an issue with having peripherals files have the same name as a HAL source file? when including the .h it requires using the peripherals/src.h name. But on other ports, HAL files tend to have a prefix (hdl_adc.h, nrfx_adc.c, stm32fxxxxxx_adc.c), so this is a new case
I named the peripherals/rmt file rmt.c and it didn't impact compilation. Is there a best practice here?
My first impression would be to avoid giving peripherals files a prefix so that the naming is in line with the other ports, but the ESP-IDF is somewhat unique among HALs in that it doesn't have a prefix on its own source files (as compared to hdl_adc.h, nrfx_adc.c, stm32fxxxxxx_adc.c). Either way is fine with me as long as we're consistent.
@ionic elk I think the rmt.c style is fine
Chatted with @tannewt briefly on discord, let's keep the "pcnt.c" style for simplicity and consistency. The makefile enforces more extended include paths to avoid this kind of confusion anyway.
@slender iron What's the UF2 for the ESP32-S2 on circuitpython.org?
@slender iron, I just ran into this on absolute latest for CircuitPython:
You are in safe mode: something unanticipated happened.
CircuitPython core code crashed hard. Whoops!
MicroPython NLR jump failed. Likely memory corruption.
Is that a known issue?
That's on a Feather M4 Express.
I don't know, nothing seems corrupt, so maybe nothing to worry about. I think it came about because I2C wasn't being reset on reload and I think I recall an open issue for that.
Following up that this still is an issue.
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
main.py output:
Traceback (most recent call last):
File "main.py", line 8, in <module>
File "0ฤฐ4|.df2๏ฟฝ3๏ฟฝ๏ฟฝ22๏ฟฝ3๏ฟฝ๏ฟฝ22[_init_coord_mappingkmk/kmk_keyboard.pyany
extensionsany
co", line 4, in <module>
RuntimeError: Corrupt .mpy file
Clean formatting storage with storage.erase_filesystem seems to help for a while. Eventually I have to run that or all fi...
@FoamyGuy thank you so much!! This is great!! I will give it a try later tonight!! You just made my day!! :)
@slender iron What's the UF2 for the ESP32-S2 on circuitpython.org?
@idle owl We don't have a single file for that yet. It's on my TODO list for this week
Fair enough.
@slender iron, I just ran into this on absolute latest for CircuitPython:
You are in safe mode: something unanticipated happened. CircuitPython core code crashed hard. Whoops! MicroPython NLR jump failed. Likely memory corruption.Is that a known issue?
@gilded cradle I've seen reports of this with dual exceptions happening
@idle owl I've been sucked into ESP32SPI/Requests issues
@tannewt It seems to be behaving about the same
I would vote for adding this PR, and then opening a new issue describing the ordering problem.
@lone axle Do you have a Feather Sense?
I do
Actually it doesn't matter. @lone axle Are you up for updating another lib folder screenshot for me? it's lsm6ds again.
Yep for sure.
https://learn.adafruit.com/adafruit-feather-sense/feather-sense-circuitpython-libraries The final screenshot and info isn't up to date.
I think we made you an editor so you can edit all guides, yes?
Yep that is true. Just double checked as well and it does let me get to the editor. I can update that tonight with a new screenshot and info
Great! Thank you so much!
@tulip sleet you around?
@slender iron I am here but am just about to eat dinner. I'll be back in 15 minutes or so
k, np
@slender iron all done
I was going to ask you to build a new nina for me but I think I have a workaround
the ssl connections don't close automatically on failed write
write has no similar check
so the new requests leaks memory
is that a bug? or are you allowed to retry? does a non-ssl connection do anything similar?
interesting comment here: https://github.com/arduino/nina-fw/issues/30#issuecomment-665712900 (not ssl)
given the low number of issues in the repo, maybe people are just doing very simple things, and are not recovering on error
ya, that's my guess too
you are not using WifiSSLCLient.cpp, is that right? So this is a behavior difference between SSL and non-SSL in the firmware? Should we be filing a bug on esp-idf??
I'm debugging ESP32SPI so I am using it
ah ok, I thought this was the ESP32S2 requests library issue. So does our Python library need to do the same thing?
it is possible our native code has the same issue
but I can only debug so much at once ๐
why would be getting write errors in the typical case, though? (and why did you see it?)
they happen when we try to reuse an old socket
reusing sockets is new in requests 1.7
got it
the old version would just close right away
i also don't understand why you are having build troubles. maybe at some point we can exchange local repo trees and compare
I did manage to build but it didn't seem to work correctly
@slender iron Did you mean you had a comment on https://github.com/adafruit/circuitpython/pull/3624 about how I'm checking for USB? I couldn't find a comment, but I must be looking in the wrong place.
ah, it's pending
@slender iron missed your msg above. Too tired to talk sleep ๐ ๐ค but will catch you tomw
How does the PyPortal Pynt build get made? it's listed on the downloads page but seems to be missing from ports/atmel-samd/boards/
@lone axle it is just an alias for the PyPortal build. The UF2's are identical.
Ah, thank you
@FoamyGuy thank you so very much...you saved me!! Everything is working out great! I really like displayio, and was a little bummed out, that it did not let me use two displays, but now it all works like a charm!! :)
One thing I noticed, it seems like the allowed memory size of a bitmap is reduced?
Also I can see quiet a bit of performance drop... those screens are I2C at the moment, I will give it a try using SPI later!
Is there any way to reuse the group/sprite on the second screen...
Nice. I'm glad that it worked out for you.
I'm not sure about the allowed memory size of a bitmap. But you do probably have less memory to play with overall for your project since you'll need to keep 2 of some objects instead of 1.
On the Monster M4sk I played with it for a bit and figured out that you can use the same Bitmap object, but I think you need different TileGrids and different Groups for each screen.
I didn't find a way within CircuitPython user code to only generate ...
Matrix portal
I tested using I2C. There were no errors, it just didn't display anything. It does work with the absolute latest, however when it does an autoreload it does not run until you unplug and replug in the board. It seems like the I2C port is not being reset.
I just noticed RC.1 is available and will try it with that.
Oops, just realized I had originally noticed the issue in rc.1.
This PR is not very elegant. But, in its defense, the following fixes were tried without success:
- I tried to find a way to interrupt or terminate vTaskDelayUntil(). However, nothing I found was able to do that. Trying to
do anything about the sleep state during another interrupt handler (such as ticks or usb) generally resulted in either a
complete hang or did nothing. - The esp32s2 light sleep state was investigated. However, any light sleep past about 1 second resulted in th...
@ionic elk hihi
What version did this go into?
I just noticed control-c on 5.3.1 on CPX gets ignored if an input() statement is being executed and waiting for text. It's deferred so when the user hits return a KeyboardInterrupt interrupt does occur and program terminates.
What version did this go into?
This should be in 6.0.0-rc.1, and previous 6.0.0-something releases after August 25.
@gilded cradle you around today and want to test my requests/esp32spi changes?
for esp32spi
thanks, I'll give it a try as soon as I finish up the guide I'm working on.
k, thanks! I've got email to do before I get to it too
so ... I managed to have a rect as argument for a led_animation blink()... it's very rough, but my new class make a rect behave (enough) like a neopixel stripe ๐
no question here (for now), just a public hurray before I test the other animations. ๐
I think you could invert the API you need from FreeRTOS. Instead of using a time delay API, use one that is blocked on inter-task flag with a time out. xEventGroupWaitBits is what you'd need I think. https://www.freertos.org/xEventGroupWaitBits.html Then, share a group of event bits with TinyUSB callbacks that can indicate a ctrl-c. Then wait on the event bit while timing out with the sleep time.
Please post your test code and also note what board you are using. Does it work on other ports?
Why is the current implementation clearer? I'd prefer a return and you can use a value < 0 to indicate an error instead of raising an exception from inside the function. Generally, peripherals code shouldn't include any MicroPython structures including exceptions so that the code can be used outside the VM.
I'd prefer a return instead of filling out a field in an input struct.
@dhalbert Please approve then. :-)
@jerryneedell We'll keep poking at it. I have some tweaks to Requests we'll want to test with too.
Good idea being parsimonious with RAM.
@hierophect I don't think you need that. The ESP32-S2 IOMUX can be set back to digital function 0 which is the default. The GPIO mux can be set back to its default as well.
@meager fog Hi, what's up?
D:
I've been waiting to use that GIF for a long time
lol
I'm sure she just has another grand quest for you
๐
(lucky! ๐ )
hehe...
Discord is tough for me because I have lots of non-work friend message traffic on it, so I don't want to enable it on my phone, but I also miss work messages sometimes which is no good
it's too bad you can't mute those conversations and have notifications for specific people available
well, it's also just the temptation. I keep pretty strict device hygiene.
You should try my off-work project lol. It's a box that makes you check out your distraction devices and screeches at you if you don't return them on time
hahaha, sounds like something my whole house needs
does autoreload on save call module specific deinit functions ?
@analog bridge typically no, just module-wide reset_all
Almost no functionality I've encountered calls a de-init, I've only ever seen it in user code
They aren't required for soft reboots because the entire heap is reset
(unless they have a never_reset, of course. You'd have to poke Scott or Dan about the details, I'm a little fuzzy)
I'm using a Feather M4 Express and my test code is at https://github.com/adafruit/Adafruit_CircuitPython_SSD1327/blob/master/examples/ssd1327_simpletest.py
What do you mean ports? Like different pins or do you mean a different board?
Since the libraries and tools don't show up here, thought I'd mention that the combo of PRs for Circup #40 & #41 look good to go.
I wanted to ask about something else circup related.
I was playing around on my brand new MetroS2 and which did not have a /Volumes/CIRCUITPY/lib folder. Without that folder, circup install fails... we could fix that in circup, but I wonder if CP builds should create an empty lib folder since the general guidance is to put libraries in that place.
I was looking at this with the perspective of limiting the visibility setting unit to pcnt.c only... using return now.
That sounds like a better fix than a clumsy loop. I will investigate and
see what I can do with the suggestion.
On Thu, Nov 5, 2020 at 1:01 PM Scott Shawcroft notifications@github.com
wrote:
I think you could invert the API you need from FreeRTOS. Instead of using
a time delay API, use one that is blocked on inter-task flag with a time
out. xEventGroupWaitBits is what you'd need I think.
https://www.freertos.org/xEventGroupWaitBits.html Then, share a group of
event bits with Tin...
@idle wharf I think the lib folder should be auto-created. there is a bit of weirdness with the flash though that is also causing some folks to see NO NAME
my guess is that they're related issues
I noticed that my Metro ESP32-S2 shows up with the storage space as it's name
as opposed to
It's not shown on all linux file explorers. If you check with command line tools, they are still correct on Linux as a heads p.
I see CIRCUITPY on my mac... with the MetroS2
I'll do a PR to circup so install won't fail if people delete /lib
@dhalbert This is still desirable! It's used for boards with co-processors as well.
@onyx hinge was it you who wrote sdcardio?
@gilded cradle yup, what's up?
I'm trying to use it on PyPortal, but am getting spi in use (probably due to the display). Do you know a workaround?
you mean with the pyportal lib?
Um, no. I was trying to use it outside of it. Perhaps I'm doing it wrong?
oh right because the board constructs the display automatically
what code would you write to use the adafruit_sdcard?
I was just trying to mount it.
import sdcardio
import storage
sdcard = sdcardio.SDCard(board.SPI(), board.SD_CS)
vfs = storage.VfsFat(sdcard)
storage.mount(vfs, "/sd")
is the error when you call board.SPI() ?
maybe separate it out to 2 lines for clarity
Ok, I think it's because PyPortal is already mounting it. I think you pointed me in the right direction.
Thanks
https://github.com/adafruit/Adafruit_CircuitPython_PyPortal/blob/4ffb7bfe11c1e514d25177b1752da4e429e64d99/adafruit_pyportal.py#L70 looks lke current pyportal version is using sdcardio if available, adafruit_sdcard otherwise
Yeah, I see the code now. I just missed it in the huge amount of code. Thanks
Probably should have searched first
you're un-stuck? good!
yeah, I believe so
I'm just going to use it through the library.
Yeah, totally unstuck
weirdly another friend of mine just asked me a pyportal question. I really wish I could get them to join this discord and get help in #help-with-circuitpython !
but you know how it is when you're someone's personal support ๐
Could someone file a new issue about the remaining problem, since this issue got closed by the PR? Thanks.
Also, I did some looking at esp-idf bugs, and found this possibly related one:
Inconsistent TLS negotiation failure with (AP+STA) and max power save mode (IDFGH-4142)
@idle owl For the images of file system trees for libraries in the guides, has there been any discussion on generating those with some javascript magic? That would make it easier and quicker to update them - it could generate both Mac and Windows look
@dhalbert I'll retest the "order" issue and if still present open a new issue. I won't get to it until tomorrow. If anyone else wants to do it first, please do.
I might have also been confused, and saved the bitmap in a bigger version...it does not matter too much anyways, I will figure out which size is good for quality vs performance tradeoff! ๐ธ
I actually did all of the above, I loaded in one bitmap using the adafruit_imageload and one TileGrid/Group for each screen. Also I reduced the bitmap size and scaled the group!
I am kind of thinking the performance drop is rather due to the limitations of I2C speed than bitmap size...but lets see!
...
I'm seeing weirdness on my metro esp32s2 ... it doesn't actually import an import, and then it reboots itself. ```
Adafruit CircuitPython 6.0.0-rc.1 on 2020-11-03; Metro ESP32S2 with ESP32S2
import adafruit_ahtx0
adafrui_ahtx0
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'adafrui_ahtx0' is not defined
import adafruit_ahtx0
[tio 16:03:16] Disconnected
and now it's made my host computer's usb lock up
the NameError was a typo on that run but even if I get the name "right" it's a NameError
adafruit_ahtx0.mpy is from the latest 6.x bundle, as is adafruit_busdevice. I didn't copy adafruit_register so maybe an importerror is occurring but is being obscured?
@onyx hinge maybe try erasing the filesystem and recopying, in case there is some corruption (people are not seeing CIRCUITPY but some unnmaed drive).
@slender iron we could discuss deep sleep sometime in the next few hours if you're available
@tulip sleet how about in 15 minutes? Just wrapping a late lunch
no change with a fresh filesystem (storage.erase_filesystem()) and if I make sure adafruit_register is copied (not sure if important). ```Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 6.0.0-rc.1 on 2020-11-03; Metro ESP32S2 with ESP32S2
import adafruit_ahtx0
adafruit_ahtx0
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'adafruit_ahtx0' is not defined
import adafruit_ahtx0
[tio 16:15:59] Disconnected
[tio 16:16:01] Connected
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.
it's not entering safe mode either, it's rebooting in normal mode
@slender iron sure, ping me. I am going to get a 3d print started
Kk
- Load 6.0.0-rc1 via esptool
storage.erase_filesystem()- Copy adafruit_ahtx0.mpy and adafruit_bus_device to CIRCUITPY/lib -- I used adafruit-circuitpython-bundle-6.x-mpy-20201105.zip the latest at time of writing.
- At the repl, try to import/use it. Somehow the import appears to succeed, but the imported module still doesn't exist. Trying to import it a second time does a reset that bypasses safe mode.
Note: Repeating these steps also tends to trigger the Linux USB...
just reading the relevant issues
@simple pulsar do you mean creating "fake" ones that look like file browsers but are actually HTML / CSS rendered pages?
Or something more like seeing the real list of files but inside of a web browser or and then screenshot it?
I'm thinking must be the former the more I think about it. That is a nifty idea. It could parse a JSON list and generate the folder / file icon automatically based on whether that item has .mpy at the end.
Is there any functional difference (or preference within our code style) between importing things with uppercase letters on the module?
from adafruit_lsm6ds.LSM6DSOX import LSM6DSOX
vs.
from adafruit_lsm6ds.lsm6dsox import LSM6DSOX
I would have expected only the latter to work since the name of the file is lsm6dsox.py but it seems that both do work correctly.
Support for an interactive repl debugger like breakpoint() or `import pdb; pdb.set_trace()' would be nice, but I can get away with print statements in my case for now :)
@lone axle FAT filesystem is case insensitive, but you should try to use the way the filename appears on GitHub or on a host computer
Everything is working ... I'm quite proud XD
you draw a rect and use it like a neopixel strip.
I plan to make the whole kit of shapes, with lines also.
and I hope it can be integrated to the matrixportal object, like the scrolling text label to animate everything smoothly
This looks awesome! thank you for sharing it. I am going to play around with it here in a little bit.
there is a lot of work left to do, but the PoC is here ๐
there is a lot of work left to do, but the PoC is here ๐
@cursive condor I still need to study your code to understand that, but this seems great. I am interested in using palette to do something similar. Basically you draw an image, but you use each palette index as a neopixel and change it's color.
I am using that to make a number of big square each with individual addressable color: https://github.com/dglaude/CircuitPython_ContactScanner/blob/main/not_as_scanner_clue_wip.py
yes I use the palette, because my shape is an indexed BMP, after all. my goal was to be able to animate the ball or the goal of my maze game for matrixportal, so the object used must be a tilegrid I can add to a displayio group
long story short, here you have animated shapes (anisha), any help is welcome ๐
and I must say a lot of the code is copied from various libs from adafruit. I just made the links between 2 of them
@cursive condor do you know what could be causing the "No more color available" error?
I get that from comet, rainbow_sparkle, and chase. Not with blink though that one is working.
you can set the colors argument when you initialize the Arect object
with 128 colors it's ok for all the animations of the full example
I am trying to run it through my PyGameDisplay for Blinka_Displayio (admittedly outside the scope of what you've built it to run on ๐) I am getting that error even with color=128
there must be something different about how Blinka_Displayio is handling the colors or something
try 256
of course
I notice the all of the prints except index 0 and 1 are the same. They are all:
106 : {'transparent': False, 'rgb888': 0, 'rgba': (0, 0, 0, 255)}
0 and 1 are like this:
0 : {'transparent': True, 'rgb888': 0, 'rgba': (0, 0, 0, 0)}
1 : {'transparent': False, 'rgb888': 16384, 'rgba': (0, 64, 0, 255)}
strange ... so the problem is that self._palette_index() does not find the color when it search the palette
but it can find it when it's not initialised (return 0 == 0x000000 == BLACK)
Could be a difference in python possibly as well. I am running with CPython 3.8.5 I'll poke around the _palette_index() and see if I can figure out why it's not finding the colors.
if the palette object behave differently, perhaps is there a method to get the index from color directly ?
Is this how the its supposed to look?
not exactly ๐ฆ
I'm thinking something in my matrix configuration may have gotten out of whack or something.
it should be full unbroken rectangle right?
how a Rect (without the A) is showing with the same dimensions ?
yes it should be a square, 30x30 stroke=2
Alright now it's okay
my matrix portal had gotten slightly unplugged. The 2x8 was not as snug as it should be.
This is really cool!
yeah, but I dont like the corners when stroke > 1
I'm sure I can do better (reminds me of the turtle lib, on several sides)
some of these would make really great "frames" to use around the edge of the display with other information inside.
oooh nice
I see also "loading bars" or "waiting animations"
Thank you for creating this and sharing it ๐
among an infinity of possibilities
๐
did you see you can use the whole rect as a "line" of pixels, (with animation_mode args to horizontal or vertical) instead of being circular ?
not tested yet, but I don't see why this would not work
punching off, good night ! TY @lone axle for the test ๐
see ya. and you bet, thanks again for sharing!
@tulip sleet https://lowpowerlab.com/guide/currentranger/
Reworked the PR to use RTOS task notification instead of a loop.
Hello @dhalbert,
I trying to flash Arduino ble 33 in order to install circuitpython on it. Can I use serial converter cable for it? Thanks.
Does the feather_m0_basic ship with a UF2 bootloader?
I have some that shipped with the bossa bootloader, but they are old
in fact, I bricked one trying to switch the bootloader to uf2
That is my concern -- trying to respond to a Forum question
This may be a good 'in the weeds' topic. A lot of new folks who are new to displayio are getting some of their earliest experiences with a Matrix Portal now instead of PyPortal, PyGamer etc.. devices with more traditional screens.
Many of the existing examples for displayio in guides and library repos use board.DISPLAY which won't work on the Matrix Portal.
Are there any thoughts on whether we want to include extra examples tweaked to work with Matrix Portal, or keep them in the same file with comment/uncomment chunks? Or is there some other generalized technical approach that could allow examples to work on both without the end user having to worry about it if they don't want to?
the guide talks about built-in vs. external displays, but that's separate from the examples
maybe look at updating the guide to better explain that? add boiler plate for RGB matrix?
using the Matrix Portal library, it's pretty easy
from adafruit_matrixportal.matrix import Matrix
matrix = Matrix( stuff )
display = matrix.display
I have a week off next week, in second wave confinement... and I was checking if I could revive my work on PM25. I would like a review of https://github.com/adafruit/Adafruit_CircuitPython_PM25/pull/8 and know if something is expected from me in this PR.
I am a bit lost on what is the status.
@slender iron a master's thesis, in Flemish, on power meters: https://www.kuleuven.be/campussen/campus-brugge/bestanden/masterproeven/ict/mp-b3175v-u0080670-0674157-declerck-stijn-55365593.pdf
btw, Monsoon meter is discontinued
Flemish. I am Belgian, I might be able to partially understand that!
Google Translate is my friend :). I have been translating select pieces
The most interesting thing about it at the moment is the list above, which is more comprehensive than anything else I've seen
the Nordic device is quite nice for the price, but unfortunately the first three devices only go to < 100ma, and the ESP32S2 can draw much more than that, especially when transmitting wifi
So I have my shape animated. now I'm testing the group animations, turn out I can manage 4 shapes, with around 10 animations for each. more animations give a memory error. And the rainbow* ones requires the most memory...
but they are not sync, as I only supported "direct write" to the shapes, and I wonder how I can mimic the write() behaviour...
double buffering seems wasting a lot of memory...
@lone axle are the examples being used the ones shown in the displayio guide? or from somewhere else?
@tidal kiln in this case it was an issue filed referencing an example in the display_text library: https://github.com/adafruit/Adafruit_CircuitPython_Display_Text/issues/95
there are similar examples in display_shapes, adafruit_imageload, adafruit_progressbar and perhaps some others.
mmmmm progressbar ? I missed that
i think it would be good to update the displayio guide
for the examples, it's tricky. a trade off of keeping the example clean vs. a bunch of commented out stubs for all possible scenarios
similar issue with sensors that can be I2C / SPI and hardware/software versions of each
probably should at least add code comments to those examples though
# example for use with board with built in display
or some such
Yeah, I think I like seperate files for them instead of the comment chunks.
I have a week off next week, in second wave confinement... and I was checking if I could revive my work on PM25.
@thorny jay Thank you to @lone axle that found one more learn guide that depend on PM25.
I can work on adding comments to the existing ones and making matrix portal versions of the ones that make sense on that size screen.
ok. i'll take a look at updating the displayio guide.
could maybe have a new dedicated page that discusses display setup for various hardware configs
I wonder if it's worth making up a single page that covers generally "how to convert code from built-in display to matrix portal"
it could be more general
like how to create the display instance
then the rest of the code should (hopefully) just work
Yeah, I think it will help out if we can try to consistently use a display variable in examples. It can be set to board.DISPLAY for devices with built-in.
yah, that could help also
isntead of referencing board.DISPLAY directly throughout the example. I am definitely guilty of this. But with a variable it will make it much easier to swap back and forth.
yep. and easier to understand.
display =
the right hand side needs to be whatever for your setup (guide would cover that)
@slender iron let me know when you're back online and we can work on testing/debugging requests and esp32spi.
but then can just use display in same general way in rest of code
# use built in display
# see guide (url maybe?) for setting up external displays
display = board.DISPLAY
yep. Nice! I like the idea of linking it there in the examples.
or even more informative?
# use built in display (PyPortal, PyGamer, PyBadge, CLUE, etc.)
# see guide for setting up external displays (TFT / OLED breakouts, RGB matrices, etc.)
want to bring this up at the next in-the-weeds? suggest above. see if there is general consensus, etc.
With the below code on the CIRCUITPY drive, you can put the board in to a bad state where the disk won't mount and the tty device doesn't show up, even with the board unplugged from the matrix. Tested with adafruit-circuitpython-matrixportal_m4-en_US-6.0.0-rc.1.uf2
import board
import displayio
import framebufferio
import rgbmatrix
displayio.release_displays()
matrix = rgbmatrix.RGBMatrix(
width=64, bit_depth=0,
rgb_pins=[
board.MTX_R1,
board...
@tidal kiln yep will do. I'll add it to the notes doc in a moment.
@gilded cradle I'm at my desk now
Cool, me too @slender iron ๐
@gilded cradle do we want esp32spi to work on its own?
the OSError 23 will cause a retry with the newest requests
Do you know if there are any instances where it doesn't use requests?
Yeah, possibly. It would be nice if the esp32spi still worked with requests 1.6.0 until we have a solid fix in place.
I haven't tested it out, so it may work at the moment.
it may be the change of RuntimeError("No sockets available") to OSError(23)
if the calling code only tests for RuntimeError
Yeah, that was my concern with backwards compatibility.
Like can we have newer versions of requests set a flag that causes it to return an OSError and just return a RuntimeError otherwise? Then when we have a solid fix in place, we can remove the flag.
ya, I suppose we could
I see a new pr you just submitted. I'll give that a try.
those are the requests changes
yeah
I want to see how well these work together. If they seem to be reliable then we probably don't need to worry about the flag option.
Ok, it's getting hung up on a content length missing error (for images). I'm thinking something was fixed and the error is in the pyportal library. Let me see if I can figure out a workaround, but this is looking promising.
@slender iron are the headers getting cleared between calls?
Cause it's returning a json header for the image url.
it should be separate response objects
want to screen share with me? I don't have a ton of context about what you are testing with
Using this test program on a metro_esp32s2 with freshly built main and freshly downloaded adafruit_requests
import ipaddress
import wifi
import adafruit_requests
import time
import ssl
import socketpool
print(wifi.radio.connect('', '))
print('ip', wifi.radio.ipv4_address)
ipv4 = ipaddress.ip_address('8.8.8.8')
print('ping', wifi.radio.ping(ipv4))
pool = socketpool.SocketPool(wifi.radio)
https = adafruit_requests.Session(pool, ssl.create_default_context())
...
Sure, just a sec... as soon as I figure out how.
another example that always produces an SSL handshake erro is:
import ipaddress
import wifi
import socketpool
import time
import adafruit_requests
import ssl
import espidf
import gc
print("cp mem free", gc.mem_free())
print("idf total mem", espidf.heap_caps_get_total_size())
print("idf mem free", espidf.heap_caps_get_free_size())
print("idf largest block", espidf.heap_caps_get_largest_free_block())
for network in wifi.radio.start_scanning_networks():
print(netwo...
@WarriorOfWire perfect, thanks :)
Why not just name the core library
adafruit_busdeviceas well?
Do you mean adafruit_bus_device? That will allow existing libs to 'just work' which would make me happy :)
Why not just name the core library
adafruit_busdeviceas well?Do you mean
adafruit_bus_device? That will allow existing libs to 'just work' which would make me happy :)
Yes I do. The last commits I made were to rename everything so it should "just work". But have only tested it with one library (BME280) so far.
@dhalbert Apologies if I missed it, but is there a similar ticket for mass storage? It's pretty much expected that when I start using my computer in the morning, if I had a board (Feather M4 for sure, Metro M4 likely, nRF possibly as well) plugged in and running the night before it will run and have CDC working (in the same terminal window but I won't have a CIRCUITPY drive until I reset the board.
@siddacious I don't think there is a similar ticket. You can go ahead and open one. It might depend on the host OS.
My particular application is as follows - every 8 ms, the master device initiates a transaction and begins shifting bytes of data over to the peripheral. The peripheral is expected to have staged a return packet as well, which it sends in return. Then the CS is returned to high and the peripheral is expected to gather all the information it needs for the next packet, which in this case is acquiring and staging hardware inputs, handling errors, and loading everything into the output buffer, al...
Note that this module has been requested before, in #2131 and #2225, but it wasn't specified exactly what the desired application was.
I tested this successfully with Feather Sense using some of the on-board sensors:
accel_gyro = LSM6DS(board.I2C())
mag = LIS3MDL(board.I2C())
I took adafruit_bus_device out of lib folder. Confirmed that it crashes on 6.0.0-rc.1 due to missing the library.
Installed the uf2 built from this PR and it's working properly to read values from both sensors. :tada: This is awesome! Thank you for working on it @gamblor21
One failing check due to network issues. All is good.
I mean a different board with a different chip. (Not just another SAMD51)
@tidal kiln @ionic elk hihi either of you here?
@meager fog here now
@meager fog you still on?
I was able to reproduce this on a Kaluga with a release and a debug build.
I (630108) gpio: GPIO[45]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x4008d4de PS : 0x00060430 A0 : 0x8008eb0f A1 : 0x3ffdbb40
A2 : 0x00000006 A3 : 0x72666164 A4 : 0x3ffdba00 A5 : 0x3f00bc94
A6 : 0x00000000 A7 ...
"Thanks for the note! We are not currently offering "As seen on show and Tell" Stickers." ๐ฆ
Why is the MagTag (4800) logo (and all the picture from the product) Black and white if that is Grey Scale eInk screen??? The FeatherWing (4777) has an Adabot logo that is grey scale and this is clear in all the picture!
HI Richard,
If you haven't gotten this working here is a link to my various board files for what I believe is the same board. I also tested the board with some CircuitPython code to drive the display. I'll have to search around and see if I can find that, I probably just used the driver Scott mentioned above
https://github.com/skieast/circuitpython/tree/main-copy/ports/esp32s2/boards/lilygo_ttgo_t8_s2
https://gist.github.com/skieast/8c00274f557113cad4d5d377cfd57a9d
I have a board Esp32s2 saola wrover that connected to a display(st7789). It works perfect. I want to show the REPL on the screen like board Clue.
Also tested this successfully with MONSTER M4SK build. Deleted adafruit_bus_device from lib folder and I am still able to use the onboard seesaw and the lis3dh accelerometer. Everything is working well.
I tested it successfully with STM32F405 and an MPU-6050 as well. No bus_device in lib folder, am still able to successfully read values from the sensor.
@SwannSchilling I'm glad @FoamyGuy was able to help you out. I've been heads down on "day job" stuff, and am just coming up for air. Can't wait to see what you build!
Hi @jerryneedell,
I've tried this now for a number of hours and my adafruit_requests.py looks like a collection of print() statements. :D
I tried the same URL, but I have a different result:
RuntimeError: Sending request failed
The same code runs just fine for https://httpbin.org/get fails with the above for https://api.thingspeak.com/channels/1417/feeds.json?results=1
Are you on Adafruit_CircuitPython_Requests 1.7.5?
I noticed that DNS resolution gives two IPs for api.things...
Tried to figure out what is wrong and now came here to find my own message. ๐ Great! ๐
Working on the AdaBox 016 Weather display output ... Had problems with that 'Failed to send' ... Watched Deep Dive yesterday & saw the Request code update ... Loaded fix to my Display & viola, ran all night & still running ... Thanks Scott ... Actually beginning to follow what y'all R talking about in the chat ... (Last coding I did was back n the '80's ... Stopped coding B4 C & follow-ons ... Circuit Python has got me interested again but this Septuagenerian brain is struggling 2 keep up with you young 'whipper-snappers' ! ... lol)
I updated to 1.7.5 -- was on 1.7.4 and the ordering issue appears to have need resolved.
Now like you, I get
RuntimError: Sending request failed on the "thingspeak" request
Now there is a waiting list on Tindie.
Sorry to hear that you now have the same issue, @jerryneedell, but I think I figured out what is going wrong.
I got lured into believing it is a socket issue, but it is not.

It simply has to do with what the ESP32S2 or CircuitPython believes is a valid TLS certificate. I used my server, that I can reach internally via a different FQDN than external and t...
@askpatrickw I see that your build includes 135 certificates, which is the archive from 2019 that was updated a number of times since 2019. You can see this e.g. here https://curl.haxx.se/docs/caextract.html where also a version from 14.10.2020 is available. I don't yet have a build setup, otherwise I would give it a try to update this.
Hey CP team! Wanted to let you know your hard work is appreciated and does make a difference โค๏ธ At least FOUR spacecraft ๐ฐ๏ธ running CircuitPython (5.4.1) via "PyCubed" boards are launching next month! ๐ ๐
All hardware AND software repos will be public as soon as I get NASA's blessing. In the meantime, here's a teaser pic I put together
I am looking to be able to hotplug an I2C device into my board. The normal method of scanning the entire I2C address space takes a bit too long for my liking and there does not seem to be a simple method to check for the presence of a single device. To get around this, I wrote a function to just scan for something at a specific address:
def I2C_checkDev(i2c, *args):
for addr in args:
if isinstance(addr, int) and (0 <= addr <= 0x7F):
try:
i2c...
Thanks for all the help, I will do some further testing and keep you guys posted...
Just about to set up the animations for those Oleds! ๐
I set up a CPY build environment on Win10 WSL and, after a long night of disappointments, I could compile featherS2 UF2 builds this morning (actually noon + coffee). Unfortunately, even two different attempts of setting different certificate bundle options in menuconfig didn't lead to success. https to api.github.com & httpbin.org is OK; https to api.thingspeak.com & io.adafruit.com is NOK.

- Upload "adafruit_binascii.py" to your featherS2 (I chose to put it to the root directory directly)
- Go to REPL and "import adafruit_binascii"
- Try to adafruit_binascii.<TAB> or "print(dir(adafruit_binascii))"
- Note that it doesn't work, if you try now t...
This example code illustrates the issue:
import board
import terminalio
import displayio
import time
from adafruit_display_text import label
from adafruit_display_shapes.circle import Circle
display = board.DISPLAY
main_group = displayio.Group()
circle = Circle(100, 100, 20, fill=0x00FF00, outline=0xFF00FF)
main_group.append(circle)
text = "Hello world"
text_area = label.Label(terminalio.FONT, text=text)
text_area.x = 10
text_area.y = 10
main_group.append(tex...
Is it possible to add print statements in C code in the core and see them get printed out in the serial console?
yeah, see mp_printf()
Thank you
How do I get the value of variables to print? I have code like this:
mp_printf(&mp_plat_print, "setting hidden %s - %s\n", i, hidden);
but print statements turn out like this:
setting hidden ร ร - ร ร
setting hidden ร - ร ร
ah, I see %d fixes the i one I probably need something for booleans on the last one.
iirc booleans are ints
Ah nice, yeah that prints the boolean values for me. Thank you.
I noticed it's much faster to make a build if I don't delete the old build-pyportal (or whatever device) folder. And it does seem that the new UF2s are containing my changes. Is there any reason that I should be deleting that and starting fresh each time? or is it okay to leave it around to cut the build time down
as a long time gentoo user, so compiling a lot, keeping the old build / cache data indeed speeds up the next compilation, and I only know some versions of PHP that were a pain in the *** with make clean mandatory if you change something in the config. so I would say : keep it unless unexpected results occur.
Looking into this a bit I added some print statements inside of common_hal_displayio_group_set_hidden and displayio_group_set_hidden_by_parent These are the changes: adding_prints.patch.txt
The printouts look the same every time. But now the first circle and the label do become visible about half the time if I restart several times in a row with ctrl-C and ctrl-D.
Perhaps there is a race condition so...
If the object position is updated after being un-hidden it will become visible correctly. i.e. from the example above if you modify the end of it like this:
circle = Circle(200, 100, 20, fill=0x0000FF, outline=0xFF00FF)
main_group.append(circle)
circle.x = circle.x + 1
while True:
pass
then the original (green) circle will be visible at the end of the program every time. With the code like this the label still remains invisible about half of the time.
I was checking out issue 3336 when I discovered this behaviour.
Adafruit CircuitPython 6.0.0-rc.1 on 2020-11-03; FeatherS2 with ESP32S2
>>> import adafruit_bitbangio
>>> import adafruit_bitbangio
Traceback (senaste anrop):
Fil "<stdin>", rad 1
SyntaxError: ogiltig syntax
>>> import adafruit_bitbangio
[Disconnected]
[Connected]```
Second attempt to import something already imported gives a nonsense error message, and the third attempt crashes CircuitPython.
One more thing that I am trying to figure out is...do I have to put the whole animation sequence into the initial sprite_sheet, or is it possible to use adafruit_imageload to load another bitmap? It would be nice to have a bit higher resolution and to be flexible!
@idle owl, @slender iron, or @onyx hinge I just realized that I accidentally created and pushed to a branch in the adafruit/circuitpython repo insteado f my own. Very sorry. To the best of my knowledge I did not touch anything in any important branches.
This seems to resolve #3657
Tested on:
Adafruit CircuitPython 6.0.0-alpha.3-885-g9adb77a2d on 2020-11-08; Adafruit PyPortal with samd51j20
@lone axle no worries! We have branch protections enabled for the ones we care about (main and *.x)
Support for msgpack (https://msgpack.org/) encoding/decoding. Like json, but binary encoding.
Example:
import msgpack
from io import StringIO
objs = [
( True, False, None, 0, 1, -1, 'abc' ),
{ 'a': 1, 'b': (2, 3) },
123,
'abc',
1.2345,
( 1, 'abc', 5.3 ),
{
"a tuple": (1, 42, 3.141, 1337, "help"),
"a string": "bla",
"another dict": {"foo": "bar", "key": "value", "the answer": 42}
},
tuple(range(50)),
]
f...
I try to Add new board from espressif_saola_1_wrover .Inorder to build the display module for the board, i modify the board.c and pins.c file. It builds and flashes successfully. But the circuitpython is not run. There is no CIRCUITPY appears.
espressif_saola_1_wrover.zip
I've managed to come up with a way to consistently get corruption. I've frozen in as many modules as I could to fill up the primary storage. My custom circuitpython image is at 1.1MB. Adding only a few small files onto the CIRCUITPY drive and I consistently see corruption very often. Hopefully this will help you reproduce this more quickly to see what is causing the issue. I can send over the U2F for the nice_nano as well that I used to trigger this as well if it is at all helpful.
Hope this is a correct place to ask: does Sparkfun's Artemis board have CircuitPython support yet, I seem can't find it over circuitpython.org? If not yet, are there plans or anyone working on it? Thank you.
If you can't find a download, it likely isn't. I don't believe that any ARM M4F boards can run Circuitpython, though porting is of coruse possible.
Do you see this even if you don't run any code, or do you have to run code and eventually it happens?
Is the code you're running using microcontroller.nvm or doing BLE pairing?
My custom circuitpython image is at 1.1MB.
There is only 1MB of flash on the nRF52840! So I'm not sure why it's not catching that your image is too big.
@hoary hill The Artemis does not have USB host support, so CircuitPython will not be available for it. (I'm bummed too)
@lone axle do you need one of us to delete that branch for you?
I think I can delete it but didn't want to touch anything else until I was sure that is what should be done
Yep, got it deleted with no issue.
Sorry forgive me I haven't been following the UF2 stuff (been tied up in board design), will that bootloader enable CP and Arduino (or C - RTOS) to be booted into from the same Flash on ESP32-S2 ports?
If you can't find a download, it likely isn't. I don't believe that any ARM M4F boards can run Circuitpython, though porting is of coruse possible.
@bronze shadow The SAMD51 and nRF52840 and other chips we support are ARM M4F.
yes you can use that firmware for now, the name will be updated
@tannewt hihi since there will be other versions (4.2", 5.65", tricolor etc) could we name this one "MagTag 2.9 inch grayscale" or somethin?
If you see JTAG errors (โฆall ones/โฆall zeroes) please check your connections, whether no other signals are connected to JTAG besides ESP32-S2โs pins, and see if everything is powered on.
This is exactly what's I'm seeing. I've got a Kaluga and the only pins connected are 19/20 for native USB. Both built in USB ports are connected (power and usb) and the device works normally (circuitpython on native USB) Any advice?
Open On-Chip Debugger v0.10.0-esp32-20200709 (2020-07-09-08:54)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 20000 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
if you just want to scan for a single address, try to create an I2CDevice with that address, if it succeeds, it means it found it ๐
https://github.com/adafruit/Adafruit_CircuitPython_AHTx0/blob/master/adafruit_ahtx0.py#L66
https://github.com/adafruit/Adafruit_CircuitPython_BusDevice/blob/master/adafruit_bus_device/i2c_device.py#L163
I also retargeted this at 6.0.x, we'll want to merge up into main at some point
Hello all, wondering if you could help a NOOB here get started. I don't seem able to get past square 1! I have a Circuit Playground Bluefruit attached now to a TFT Gizmo from Adafruit. Copying in their code from a tutorial and loading, I get absolutely nothing. CIRCUITPY mounts into when connected, but using "Mu" for the code and even when I click on "Serial" to access the REPL, it says cannot find an attached device.
@sacred moth can try and help, but let's move to #help-with-circuitpython channel
@simple pulsar There has been no discussion to that end. I personally have no idea how to do it. I haven't done anything with javascript. It wouldn't even need to have both Windows and Mac, it simply needs to look like a file explorer - we don't put both in when we create them, we put in the OS of whomever generated the screenshot. If this is something you could put together as a proof of concept, I'd be willing to look into it. It would have to be simple enough for folks who aren't programmers first to be able to do it. Many of our more crafty folks put together guides with those images in them. So if it involves a crazy environment setup or something, it's kind of out.
Is the code you're running using microcontroller.nvm or doing BLE pairing?
The code does run bluetooth pairing, but no microcontroller.nvm usage.
There is only 1MB of flash on the nRF52840! So I'm not sure why it's not catching that your image is too big. Even before this experiment of adding additional frozen modules, did you have some frozen modules?
I was referring the UF2 size, my apologizes. This issues was opened using only stock Circuitpython, downloaded from the official site.
Thank you ladyada, that is a nice solution. Testing by device creation instead of a byte-read attempt makes sense. In either case the user simply has to catch the exception if the device is not connected. Additionally, calling I2CDevice(i2c, addr) certainly makes for more readable code than calling i2c._i2c._i2c_bus.read_byte(addr). My testing indicates I2CDevice() is also quite fast, so no problem there. I have much to learn.
.. a feature not actually present slipped in
Hi <@&356864093652516868> -- the weekly meeting is coming up in a bit. Please add your notes to the doc if possible. We'll be with you shortly!
The fragment only shows up in two places overall. I did try to refactor it into a routine and it saves 4 bytes. Not sure if it is worth it or not? But I did test it out so can easily commit it.
Good afternoon all you wonderful folks -- happily lurking. Notes doc updated accordingly. Lapsang Souchong tea also updated accordingly.
lurking
@sterile shuttle -- I think you are new here -- Do you want to be able to speak during the meeting?
Yes
lurking (notes up to date)
lurking (but may decloak for in the weeds)
Lurkin'
๐
morning?
Meeting times are also available in iCal format using the following link: https://raw.githubusercontent.com/adafruit/adafruit-circuitpython-weekly-meeting/master/meeting.ical for use with standard calendar applications or in your browser: https://open-web-calendar.herokuapp.com/calendar.html?url=https://raw.githubusercontent.com/adafruit/adafruit-circuitpython-weekly-meeting/master/meeting.ical
Adafruit parts also make great gifts
Lurking
@gilded cradle I quickly read that as "Adafruit parts also make great gifs", and I was nodding in agreement.... "Yep, she's right about that."
๐
Thanks @lone axle ๐
" CircuitPython library for the TI TMP117 Temperature sensor "
Yay 60 boards!! Yay @gilded cradle
@cobalt grail Feel free to join the meeting, but please mute your mic. ๐
Sorry, didn't find the button. ๐
No worries, it's always something.
discord UI has a few surprises no matter how long you've used it
Yep!
I am thinking about a CP project will write the timestamp acting as a keyboard... Maybe one button to reset to 00:00 and one buton to send the timestamp + space. Could be the Clue to have button and screen.
@thorny jay yeah it could be useful!
.. maybe all libs should be packages even if it doesn't seem like they need to be.
(what a lot of work that would be)
and extra space taken up?
true
Bus device to the core! sounds like an 80's exclamation.
Like a sci fi movie
@idle owl lol! now I'll be thinking of that the whole time I finish it ๐
@blissful pollen Then I have done what I came to do.
I don't see it in the community bundle, maybe someone can reach out to Arudinne -- @thorny jay ?
I think you're not the only one who would like that -- I think Erin St. Blaine wanted to switch between slideshow and other mode.
ssssecrets 
credentials.json
How about usr_secrets.py
I think it only works with the built in font type
I think/thought all loaded fonts all use one bitmap per glyph
Nice!
โค๏ธ auto bed leveling
I just picked up a low-end XVICO X3S 3D Printer. It had a bunch of features that even my Prusa Mk2s doesn't have, and the pricing was right for an impulse purchase. Plus -- 10 minute build time vs 6-12hr build time for a Prusa.
@idle owl that includes non esp boards?
@idle owl we basically have something like that on circuitpython.org
That's true ๐
Neat
Something Ladyada has asked for
I don't see it in the community bundle, maybe someone can reach out to Arudinne -- @thorny jay ?
@onyx hinge I wanted to write the support for the Unicorn HD... then hopefully I searched the internet first! I am not 100% satisfied with the code as it make 256 3 bytes SPI write. I can try contacting the author.
cool!
Sounds like a great resource. We definitely see folks in the #help-with-circuitpython that could get use out of that.
Go go Mag Tag!
@lone axle Exactly
@idle owl would love to help contribute some of the pros/cons of STM32/i.MX boards
@ionic elk I would love to have help ๐
I'll let you know when I get to a page that includes them.
@idle owl I think I proposed something like that in the weed some time ago. It could be just a table with feature: Wifi, BLE, Screen, Formfactor, ...
@thorny jay Data matrices are extremely difficult to maintain. There are entirely too many products for us to have a reasonable matrix. We discussed it. We don't have software to do it automatically yet, so it's not something we're going to do.
@gilded cradle Is that the return code errors?
@inland tusk You mean for Requests/ESP32SPI?
@idle owl Not maintained anymore, only my board, but I made this: https://gist.github.com/dglaude/61e5922a6023b8c784083581d31a7cd0
ill let @lone axle talk
Requests (ie 404 )
# use built in display (PyPortal, PyGamer, PyBadge, CLUE, etc.)
# see guide for setting up external displays (TFT / OLED breakouts, RGB matrices, etc.)
display = board.DISPLAY
There were a variety of issues. The latest one we were working on was Failed to send 3 bytes (sent 0)
The PyPortal HTTP error handling was more like 404
Okay Low level
yeah
understood
It had to do with the connection being closed and the ESP32SPI not handling it correctly.
Right now, a lot of example are with alternate wiring commented out, like all the AirLift example.
@lone axle i'll take care of guide update (displayio guide) if you want to deal with libraries?
is31fl3731 is also like that with a lot of comment.
Hi
I would like to be able to add this new BastBLE card from electronic cats to your repository.
I await your feedback and response.
I thank you in advance.
Best regards
MatrixPortal is the new board that requires 6.0.0. MagTag is kind of early, and we expect more versions that will fix ESP32S2 issues.
ah, if pasted a \t maybe it would try to use it for completion
This is the issue I had on nRF: https://github.com/adafruit/circuitpython/issues/3152 -- random characters in the middle of a paste were dropped unpredictably
QT-Py is also 6.0.0
I modified my terminal program to "fix" it
unrelated to this issue, but curious if anyone knows while folks are around. Are there different requirements needed in order to build esp32s2 ports?
Yes.
@lone axle yes, there are steps for setting up the esp-idf
it installs a bunch o'stuff
@lone axle I wrote a big 'ol readme in the port
it's quite complicated, depends on which python versions are installed
MagTag is grey scale too...
@tulip sleet it shouldn't be too bad?
Oh nice, gotta get used to scrolling on those repo pages.
My MagTag is due for wednesday.
or did you mean something else
My MagTag is due for wednesday.
@cobalt grail Thursday for me.
it's not bad, but it's complicated. (You need a python, so you need python-is-python3 etc.
@thorny jay Whoohooo! ๐
most of the stuff should be done by the IDF itself though
Ooh, I have no python2 currently I'm sure I can get it figured out though
can set up a venv if needed.
Ah, I misread that
IDF should do everything else, once you set the environmental variables, which should also be pretty easy if you follow the readme
I have python on my system but it does run python3 Found this page now. Thanks for writing this up!
Don't install the IDF elsewhere either, that's kind of confusing if you go 100% off the IDF docs - when you have a local version like the one in Circuitpython you don't need a global install in your user folder
Thanks all ๐
IDF actually makes its own virtual environment which it uses privately, so you can't use your own
or the two will conflict and it'll explode
Thanks! ๐
@atomic summit Just broke out my Feather S2 to test esptool for a guide. Came right up as CIRCUITPY and played perfectly well with esptool. Great experience!
Thanks
thanks all!
I'll work on the CLUE board timestamp encoder. ๐
It's really helpful for podcasts
Snakes. Why does it have to be snakes....
ha -- never knew that was there...
life on the cutting edge
@lone axle Did you get a chance to go through the MONSTERM4SK repo to find the references to MonsterM4sk?
Have a good week ๐
@idle owl I did. I think I got them all fixed in in a PR that is open on it.
I didn't know that either -- thanks ๐
@lone axle Ah! ok, will check
Kattni's Pro-Tip of the Week ๐
whoops I left myself in the audio channel. hope I didn't miss something.
We discussed the "ultimate question of life, the universe, and everything" -- and bootloaders on the ESP32-S2. And by "we", I mean I listened in like a fly on the wall while others discussed it ๐
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/1NB-7IQR3F-1zPFHavBUUrmbg8uErFVLULn5Z59d6tPo/edit?usp=sharing
Has anyone looked at watchdog support for the esp32s2 port? Seems like it's not too awful with esp-idf, I just don't have a feel for how the TaskHandles jives in with everything else yet. This is the first time I've been in this section of the esp-idf programming guide though so maybe it's not too bad, but I didn't want to start messing with it if someone has already found dead ends here
On the FeatherS2, if code.py has wifi.radio.stop_scanning_networks() with no scan first, it causes the device to hang, stops showing up as CIRCUITPY, and there is no way to get the REPL. This is with MacOS and CircuitPython 6.0.0-rc.1. The board was purchased from Adafruit Nov 6, 2020.
See attached code:
Restoring the S2 requires the following (must have esptool.py 3.0+ for this to work):
...
I think we could omit this from 6.0.0 if rc.1 is going to be promoted to final, so I'm not going to merge this yet (and it needs make translate again on 6.0.x, due to the different branch).
@olive abyss I haven't heard of anyone looking at it. We do have an existing watchdog API
@slender iron yeah I was perusing that one, I saw the NRF boards had it exposed. I'll probably take a look at it soon, would be nice to have to clean up after wifi/radio fails or other stuff. found myself wanting it for a RFM69 hangup this morning
๐
@mental nexus did you see rpi 400? could be one of the first self contained cp board
Thanks for looking into this! It's definitely tricky. I thought having previous area's xs equal would be enough to signal when something is hidden.
Did you try setting self->full_change = true;? moved will cause two rectangles to be added potentially.
Are you adding a new board definition for a new board? Could you post a picture of your setup?
@gamblor21 Want to mark this as ready?
Please follow up when the CI fails. Thanks! I don't see any other potential issues.
I've rephrased brick -> hang.
I believe safe mode can also help recover. You can enter it manually by pressing the boot button while circuitpython is starting. The RGB LED should be yellow during that period.
I'd be ok including this in 6.0.0 without an RC. It's extremely low risk.
It may be trickier on FeatherS2 with the Dotstar, but looks like BruceS is on the case [#help-with-circuitpython message](#help-with-circuitpython message)
Looks great! Thank you!
I wonder if this is another case of a flag (self->scanning) being in an inapplicable state like in #3580? By calling stop_scanning_networks() you end up here
void wifi_scannednetworks_deinit(wifi_scannednetworks_obj_t* self) {
// if a scan is active, make sure and clean up the idf's buffer of results.
if (self->scanning) {
esp_wifi_scan_stop();
if (wifi_scannednetworks_wait_for_scan(self)) {
// Ignore the number of records since w...
Alphabetical into the list please. (That way it's easy to find)
Thank you for the PR! I've left a few suggestions. Let me know if you have any questions.
CIRCUITPY_MSGPACK ?= $(CIRCUITPY_FULL_BUILD)
Please move all of the actual parsing into shared-module/msgpack/__init__.c. shared-bindings should only include docs via python stub after //| and argument parsing code. All of the actual logic should go into shared-module. This leads to a clear Python API and C API.
return common_hal_msgpack_unpack(stream_obj);
(The CI error is due to missing documentation in shared-bindings' __init__.c. Take a look at time or struct for module-only examples.)
Question 1: Should I make all the M0 small builds exclude this? (Basically all the ones that are failing)
Question 2: not 100% sure if I should be running "RUN_BACKGROUND_TASKS and mp_handle_pending" during the I2C enter loop. When I did try it once it was very slow. Not sure why. I could experiment some more too.
full_change is working well. Thank you!
What's timeframe on the 6.0 GA release?
@brazen cedar we talked about it in the meeting today. basically we have one issue with an OLED I need to test
if it's minor we'll make rc.1 the stable release this week
nice! sorry I should have checked the meeting notes first I guess?
@slender iron I'll need to give up for today. I see log outputs now on console, but can't even get to CPY any more.
@hearty tapir thanks for the help! what timezone are you in?
It will probably best for me to start over fresh tomorrow (actually later today)
I'll have more time to dig into it tomorrow
๐ thanks!
@slender iron do you know if there's a way to provide a string to import in CircuitPython? Looks like there's a couple ways in Python, but none of them worked with CP for me.
@gilded cradle not that I know of
Ok thanks, I'll just make a big if block
what are you doing?
Thanks @DavePutz! A couple questions and a variable rename suggestion to better separate FreeRTOS APIs from our own.
I suspect we'll need to use this for auto-reload during sleep as well.
Why do these need to be outside the function?
sleeping_circuitpython_task = NULL;
Could this go in ports/esp32s2/supervisor/port.h?
extern TaskHandle_t sleeping_circuitpython_task;
Question 1: Should I make all the M0 small builds exclude this? (Basically all the ones that are failing)
Yes, for most of them. Just keep an eye out for the ones that freeze the python version in (like CPX). In those, you should be able to remove the frozen version in favor of the native one.
Question 2: not 100% sure if I should be running "RUN_BACKGROUND_TASKS and mp_handle_pending" during the I2C enter loop. When I did try it once it was very slow. Not sure why. I could expe...
bool success = common_hal_busio_i2c_try_lock(self->i2c);
while (!success && !mp_hal_is_interrupted()) {
RUN_BACKGROUND_TASKS;
success = common_hal_busio_i2c_try_lock(self->i2c);
}
@hierophect Interesting! I think that makes a lot of sense. I don't think it should be called SPIPeripheral though. Is there a name for this specific technique? We should keep this new class specific to this style of use. That way we can add a second class later for different approaches.
This works for me on 6.0.0-rc.1 on the Feather M4 Express and the latest SSD1327 library (1.2.0). I just commented out the display_text bits to reduce my dependencies.
@jwcooper Mind polishing this up before committing? It may need a few more words and new images. Thanks!
Thanks for all your comments. I made all changes.
- Not sure if
WriteableBufferis the correct type here:def pack(obj: Any, buffer: WriteableBuffer) -> None: - The test still fails, apparently due to missing translations.
- I don't know how to implement logic tests.
I'm currently working on my first circuitpython project, a 'busy light' that I'm hanging in front of my office. I'm using the resources from the latest Adafruit box which is a MatrixPortal and supporting hardware (like a 64x32 led matrix).
I wanted to give the system control via adafruit.io to turn the display on and off remotely. The closet solution I could find was to turn the brightness to 0. However my issues is that the font renders incorrectly once I turn the brightness back to 1. I ...
Hi @olive abyss I am working on watchdog implementation for the esp32s2. I would love to collaborate with you on this. ๐
I don't know who will take the timestamp of next weekly meeting. And I don't want to ping if it is still early in USA. So here is my code for CLUE to send to keyboard by clicking the B button. To reset the timer, user the A button: https://gist.github.com/dglaude/75b90856b7fbab4632788a63f2694f82
I seems to be loosing click, I have tried another approach but it is not perfect yet. But if you Click not too fast, that is working OK.
Also, it is for US keybard... ๐
@tannewt and I discussed this a few days ago, and I've been working on a further refinement of the API.
I will use the terminology "fired" to indicate an alarm "triggering" or "going off". "Going off" is a bit confusing, since it could sound like "turning off".
I would like to avoid talking about "deep sleep" and "light sleep" in the API, since there are circumstances when the implementation might not actually want to sleep, such as when connected to USB and enumerated. Instead, there a...
Hi and thank you for your report. The only extra piece of info that would have been nice was the specific CircuitPython version you were using.
This was a bug in the underlying library that enables RGBMatrix to work. They've fixed the bug, but unfortunately we haven't upgraded to the fixed version and it looks like we will miss doing this before the release of 6.0.0 stable.
For now, you can create an empty Group object and show() it when you want to blank the screen, then show() your ...
Among other things this fixes a problem with blanking the display and Closes #3664.
What's the closest equivalent of breaking on HardFault_Handler in esp32s2?
Thread 1 received signal SIGTRAP, Trace/breakpoint trap.
0x4008dab4 in mp_unary_op (op=MP_UNARY_OP_HASH, arg=0x72666164)
at ../../py/obj.h:171
171 { return ((((mp_int_t)(o)) & 3) == 0); }
``` oh maybe it just did it automatically
#2 0x4008eca0 in mp_map_rehash (map=0x3ffd0afc <mp_state_ctx+108>) at ../../py/map.c:136
136 mp_map_lookup(map, old_table[i].key, MP_MAP_LOOKUP_ADD_IF_NOT_FOUND)->value = old_table[i].value;
(gdb) x/24c old_table
0x3fd8bc10: 105 'i' 109 'm' 112 'p' 111 'o' 114 'r' 116 't' 32 ' ' 97 'a'
0x3fd8bc18: 100 'd' 97 'a' 102 'f' 114 'r' 117 'u' 105 'i' 116 't' 95 '_'
0x3fd8bc20: 97 'a' 104 'h' 116 't' 120 'x' 48 '0' 0 '\000' -40 '\330' 63 '?'
``` well that's not a very good "old table" is it
@onyx hinge Do you feel the protomatter update is worth an rc.2?
@tulip sleet again, there are workarounds that are totally fine (display an empty group)
i am just worried about having to put these workarounds in Learn Guides, etc.
Perhaps more appropriately, we can release 6.0.0 and then follow up with 6.0.x's with various fixes
yeah
I'm chagrined, I thought we had taken the fix for this in CircuitPython but I dropped the ball after PRing it in protomatter
don't worry about it; maybe wait for Scott to get up so we can have a final consult about this
(gdb) c
Continuing.
esp32s2: Target halted, PC=0x40084A60, debug_reason=00000002
Thread 1 received signal SIGTRAP, Trace/breakpoint trap.
vstr_ins_char (vstr=0x3ffdbea0, char_pos=0, chr=97) at ../../py/vstr.c:212
212 *s = chr;
(gdb) p s
$32 = 0x3fd8bc10 "~\001"
(gdb) p &mp_state_ctx.thread.dict_globals.map.table[0].key
$33 = (mp_obj_t *) 0x3fd8bc10
(gdb) where
#0 vstr_ins_char (vstr=0x3ffdbea0, char_pos=0, chr=97) at ../../py/vstr.c:212
#1 0x400a80ec in readline_process_char (c=97) at ../../lib/mp-readline/readline.c:242
#2 0x400a84df in readline (line=0x3ffdbea0, prompt=0x3f013138 "81\001?") at ../../lib/mp-readline/readline.c:482
#3 0x400ab982 in pyexec_friendly_repl () at ../../lib/utils/pyexec.c:455
#4 0x4009e60f in run_repl () at ../../main.c:443
#5 0x4009e687 in main () at ../../main.c:510
``` readline_process_char is somehow reading the line into the globals table, but no guarantee that this is the first thing that went wrong
$36 = 0x3fd8bc10 "~\001"
(gdb) p mp_state_ctx.thread.dict_globals.map.table
$37 = (mp_map_elem_t *) 0x3fd8bc10
>>> adafruit_bus_device
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'adafruit_bus_devada' is not defined
``` is it imports at the repl vs in a program?
@analog bridge just saw your message and the new PR; I'm excited to try it out, I'll try to find some time today to do a test build!
๐
Hi All,
Can we somehow collaborate on it ?
Double checking - Are we speaking about these:
LILYGOยฎ TTGO T8 ESP32-S2 V1.1
http://www.lilygo.cn/prod_view.aspx?TypeId=50033&Id=1300&FId=t3:50033:3
LILYGOยฎ TTGO T8 ESP32-S2 V1.1 ST77789 1.14 Inch LCD Display
http://www.lilygo.cn/prod_view.aspx?TypeId=50033&Id=1321&FId=t3:50033:3
These modules has USB-C functionality selectable by 4 dip switches (Serial or chip USB), so does circuitpython need both functionality at once ?
Ideal ...
This seems to have to do with the repl. Debugging shows that the memory used by rl.line.buf (readline) and mp_state_ctx.thread.dict_globals.map.table can end up overlapping (which shouldn't happen)
(gdb) c
Continuing.
esp32s2: Target halted, PC=0x40084A60, debug_reason=00000002
Thread 1 received signal SIGTRAP, Trace/breakpoint trap.
vstr_ins_char (vstr=0x3ffdbea0, char_pos=0, chr=97) at ../.....
components/esp_common/include/esp_task.h:#define ESP_TASK_MAIN_STACK (CONFIG_ESP_MAIN_TASK_STACK_SIZE + TASK_EXTRA_STACK_SIZE)
@jepler Thanks for the feedback, I'll try that solution. I was using CircuitPython 6.0.0-rc.1 for reference. Sounds like I should see that bug fixed in a release after 6.0 stable?
The main stack is bigger than CONFIG_ESP_MAIN_TASK_STACK_SIZE -- an "extra" size is added to it (TASK_EXTRA_STACK_SIZE). This total size is available as ESP_TASK_MAIN_STACK. Presumably TASK_EXTRA_STACK_SIZE is additional stack that can be used by the esp-idf runtime. But what's important for us is that some very outermost stack frames, such as pyexec_friendly_repl, could lie inside the "extra" area and be invisible to the garbage collector.
Closes #3649
