#circuitpython-dev
1 messages · Page 335 of 1
i'm having a bit of out of ram issues, need to freeze the ble module in but i can see the device and connect to it in nrf connect 🙂
@indigo wedge fantastic! I just did a demo on Show and Tell that talks to the Matrix Portal (which has an ESP32) over BLE UART. Glad it's working on the i.MX!
yep after freezeing in the ble lib i can do advertising and uart 🙂
@idle owl testing out the monster mask mpy file from the bundle I do think something is amiss actually. The mpy file that comes out of the bundle seems to be on an older revision of the lib from before the buttons property existed. Poking around a little bit I think the issue may be related to to main vs. master branch. My account is set to create repos with main as the default. I noticed that the repo does now have a master branch though and in that branch the buttons property does not exist yet. So I am thinking that the master branch code is ending up in the bundle.
I can PR to bring it in-line, but I think the default branch will need to get changed or else it may have to be for every change?
will still work (other than the battery monitor) with rev B (beta) and will have light sensor on rev C!
@slender iron should I PR the matrixportal pin fix to 6.0.x instead of main?
yup! then we'll merge it over into main
@lone axle PR it, file an issue, tag me and I'll look into it next time I'm working. Should work with main. We'll sort it.
@idle owl Ah, actually I figured it out I think. The branches were a red herring. It just hasn't had a release made that includes the most recent PRs. I can take care of that and I bet tomorrow's bundle will be all good.
@tulip sleet Woah the bluetooth with circuitpython is great thank you 🙂
yw! the ESP32 port is only peripheral mode for now, but that's enough for good communication
So cool!
rtctime produces error; undefined name 'rtctime' should be 'time.struct_time' not 'rtctime.struct_time'
@indigo wedge fantastic! I just did a demo on Show and Tell that talks to the Matrix Portal (which has an ESP32) over BLE UART. Glad it's working on the i.MX!
@tulip sleet Great. What is much needed is a BLE version of the score board. That could be usefull for competition.
@idle owl just confirmed the monster_m3sk.py file in todays bundle is good to go. Sorry for the false alarm. I had gotten the timeline on this mixed up in my mind, for some reason I was thinking I had gotten everything in before the first release. But there were actually a couple PRs that got merged after and needed to have a new release made.
I'm having a funny issue with SPI on the Feather M4 express - I find that it seems to be pulling down the MISO line to the point that the slave/peripheral can't actually send data. I don't see any pulldowns on MISO on either feather schematic, but I know it's on the M4 Express end because when I unplug the wire from that feather but still monitor it with a Saleae, the MISO line works fine...
Is there some step that I'm missing?
This PR adds SPI Peripheral/Slave APIs to shared-bindings, and implements a SPI Peripheral implementation in the STM32 port. Most of the setup and objects in the common-hal implementation are borrowed from the SPI class, since the two implementations are extremely close.
The primary means of accessing SPI Peripheral is wait_for_transaction(), which will wait in an interrupt-able state until CS is brought low, and then begin a non-blocking SPI transaction. Users can check whether the tra...
I'm looking to speed up a game of life implementation but I ran into a problem trying to represent a row as an integer.
print(random.randint(0, 2**30))
819270885
print(random.randint(0, 2**31))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: overflow converting long int to machine word
Is there a way to represent a big number in circuitpython where I'd still be able to do bitwise operations? I don't even need that much bigger - 2**32 would work.
Hello,
So I'm using a trinket m0 and a MLX90614 with a breakout.
SDA from sensor connected to SDA trinket m0
SCL from sensor connected to SCL trinket m0
GND from sensor connected to GND trinket m0
VIN from sensor connected to 3v trinket m0
The sensor works sometimes ,but then after a couple minutes it gives this error that SDA or SCL needs a pull up. what is that?
That error happens when your sensor is not connected, so I suspect loose wires or otherwise bad connection.
That error happens when your sensor is not connected, so I suspect loose wires or otherwise bad connection.
I soldered to it, should I resolder?
@gabetav this sort of question is best posted in the adafruit support forums, as this is not a bug report in core circuitpython
@gilded cradle any luck?
Yes, I seem to be past the RuntimeError: Expected 01 but got 00 but am working on various things to get past the RuntimeError: Failed to send 3 bytes (sent 0) error
what is the backtrace for that error? is it with io as well?
yeah, same url.
Traceback (most recent call last):
File "code.py", line 48, in <module>
File "/lib/adafruit_pyportal.py", line 1078, in fetch
File "/lib/adafruit_pyportal.py", line 1075, in fetch
File "/lib/adafruit_pyportal.py", line 1049, in fetch
File "/lib/adafruit_pyportal.py", line 758, in wget
File "/lib/adafruit_requests.py", line 639, in get
File "/lib/adafruit_requests.py", line 541, in request
File "/lib/adafruit_requests.py", line 538, in request
File "/lib/adafruit_requests.py", line 459, in _send_request
File "/lib/adafruit_requests.py", line 450, in _send
File "/lib/adafruit_esp32spi/adafruit_esp32spi_socket.py", line 82, in send
File "/lib/adafruit_esp32spi/adafruit_esp32spi.py", line 711, in socket_write
RuntimeError: Failed to send 3 bytes (sent 0)
@lone axle Yeah releases will get you. I almost asked about the release, but made a bad assumption. I should have asked. Now you'll know for next time where to start 🙂
@gilded cradle is it trying to send to an io socket that was already used once?
that would be my guess
Just got a new error:
Traceback (most recent call last):
File "code.py", line 32, in <module>
File "/lib/adafruit_pyportal.py", line 347, in __init__
File "/lib/adafruit_esp32spi/adafruit_esp32spi.py", line 489, in ip_address
File "/lib/adafruit_esp32spi/adafruit_esp32spi.py", line 482, in network_data
File "/lib/adafruit_esp32spi/adafruit_esp32spi.py", line 324, in _send_command_get_response
File "/lib/adafruit_esp32spi/adafruit_esp32spi.py", line 307, in _wait_response_cmd
File "/lib/adafruit_esp32spi/adafruit_esp32spi.py", line 290, in _wait_response_cmd
File "/lib/adafruit_esp32spi/adafruit_esp32spi.py", line 269, in _wait_spi_char
RuntimeError: Timed out waiting for SPI char
that can happen when nina gets in a funny state
ah, normal error handling would probably deal with that
ya, I think so
Also @slender iron for first error, raising a memory error was causing issues, so I just have it returning False/True and setting the ok variable to that, which seemed to do the trick.
weird! I'd expect the memory error to work. maybe a nesting issue
It just is not being caught when it is dealt with. Maybe it's something simple.
By caught, I mean removed from the raised exceptions
I'm not sure what you mean. the bool should be ok as long as the memory error will work too
When I raise the memory error, it goes into the except code but then raises it anyways for some reason
hrm
The true changes are only in locale/. Ever since we changed weblate to merge instead of rebase, the github UI has confusingly listed changes on the main branch subsequent to the initial creation of the PR as being a part of the PR. I verify locally that the changes are correct:
jepler@babs:~/src/circuitpython$ git fetch origin refs/pull/3613/head:pr3613 main:main
From https://github.com/adafruit/circuitpython
* [new ref] refs/pull/3613/head -> pr3613
c5d8c12e3.....
This diff is weird. Are we sure it's right?
hmmm....is this a bug?
Adafruit CircuitPython 5.3.1 on 2020-07-13; Adafruit ItsyBitsy M4 Express with samd51g19
>>> import random
>>> random.randrange(2**30)
772083067
>>> random.randrange(2**31)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: overflow converting long int to machine word
>>> random.randint(0, 2**31)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: overflow converting long int to machine word
>>> random.randint(0, 2**30)
457351761
>>>
I didn't think to check before, but just calculating the big numbers works fine: that is, 2**40 is 1099511627776. so it's when it is passed as an argument we run into trourble
2**31 is outside the range of a platform signed integer (mp_int_t), which is the type that randrange uses in the core implementation.
thanks
so it's a feature?
I wonder if there's a timing hit to bitwise operations on numbers larger than that, that python is having to store with a different integer implementation. I guess I'll find out 🙂
>>> import math
>>> math.sqrt(2**31)
46340.9
>>> foo = range(2**31)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: overflow converting long int to machine word
>>>
can I get an esptool on raspberry pi that knows esp32s2? the one from pip3 install doesn't seem to 😦
esptool.py v2.8 - ESP8266 ROM Bootloader Utility
I use the 3.0-dev from here https://github.com/espressif/esptool but haven't tried it on RPi
to close the above loop, I did a loop of 10000ish bitwise operations on an integer < 2^31 and an integer > 2^31. The smaller one was slightly faster in this very unscientific comparison. 1.87 seconds vs 2.15 seconds. Interestingly, only .24 seconds for an integer < 2*15. So somewhere in there they may be switching representations.
this seems to have worked: pip3 install --user https://github.com/espressif/esptool/archive/master.zip
surprisingly(?) you can get bigger random numbers this way: ```>>> random.getrandbits(32)
4195846815
though you can't go past 32 apparently
same limitation I guess, just without having to sign it
nice to know, though, thanks
7039520916339603446423152741381928262896557240251842323767347022576617894942816980969072111013198643271283066694447011165886866920040375966788009562238255
``` this variation lets you get truly unreasonable sized integers
haha
in this case, 8*64 = 512 bits
fwiw I am also experiencing the regular REPL disconnects on my esp32s2 😦 I don't know if an issue has been filed about this.
@onyx hinge How often does it disconnect? Do you have be doing something for it to disconnect?
it disconnected a few times while I was playing with random numbers earlier
looks like it's been happening every few minutes while idle for the last hour
39 times in the last hour based on looking in dmesg, while idle at the repl (I think) with a terminal (tio) open. no intentional disk access.
host is a pi zero
hmmm -- not seeing anything like that on Linux box.
using screen , not tio
I have one of your pizero/USB configurations -- I'll dust it off and give it a try
Does anyone know what adabot command I should run to replicate what https://circuitpython.org/contributing/library-infrastructure-issues gets? I have reason to believe it's not updating correctly and wanted to try running it locally
I suppose it could be the pi, except I swear someone else reported it as well
@onyx hinge Yeah, I also remember someone reporting having those issues with the esp32s2, although I can't remember where it was they reported it
adabot/update_cp_org_libraries.py: "repo_infrastructure_errors": sorted_repos_by_error,
``` these grep matches could help answer your question @trim elm but I'm not 100% sure
Thanks. I'll give that a go
Is this an error related to the secrets.py file?
ValueError: Error connection to Adafruit IO. The response was: {"error":"request failed - failed to generate strftime with given format"}
@karmic notch could be, or something else simple, please ask in #help-with-circuitpython
hmm -- right now I can't get the pi ZeroW to even see the esp32s2 --- it works on my Pi 4 but not on the Zero ....
@solar whale did you ever learn anything new about linux USB lockups? i think i saw you doing some additional sleuthing maybe?
No-- they seemed to go away for awhile, but I'be had several recently with esp32s2 and with a metro_m4 -- just causes my Linux box to reboot. The frequency is much less that it was awhile ago. Only happens on RESET or disconnect of the MCU board.
yep. same here. except i get hardlock, not a reset.
thanks. guess will just continue to live with it.
ah -- Linux -- what flavor?
ubuntu 18
Mine is 20.04
hmm. i have another box i upgraded. maybe i'll try that.
saw some quirks with 20, so was holding off for a bit on this box
ui quirks etc., nothing related to this issue
quirks on Linux?? Never...
@onyx hinge I must have done something to my USB proxy system -- It does not see anything on the USB ports right now.....
ah -- helps to power it from the correct port -- got it mounted
I have both a umfeather32s2 and a saola_wrover connected to the PiZero -- will let them run awhile and see if there are any disconnects.
cool. this is an esp32s2 metro
@cwalther Do you consider that this bug is now fixed by #3498? Thanks.
no -- my metro s2 will be here on Saturday...
No disconnects after 20 + minmutes
I'll let it run -- have to go AFK --- probably for the evening -- I'll let you know how they do.
@tulip sleet I really appreciate your BLE learn guide. It is educative, especialy the "don't do 'sudo pip3' " with reference. I tested all the example I could with my Pi4 = when I have the hardware (heartbeat and UART) and I seems to be able to crash the code when turning off the device my Pi is connecting to. Not sure where to report (for what library). Here is my various crash dump: https://gist.github.com/dglaude/abe66e8156bc0853a2877793eafacb8f
@thorny jay Thanks for the report. I saw similar, but chalked it up to not-so-great error handling. Could you turn that gist into an issue on https://github.com/adafruit/Adafruit_Blinka_bleio ?
I believe these crashes may not occur or Windows and/or MacOS.
Yes, but 6.0.x hasn’t been merged into main yet, I assume that’s why it hasn’t been automatically closed yet.
@onyx hinge 75 minutes -- no disconnects
@thorny jay Could you turn that gist into an issue on https://github.com/adafruit/Adafruit_Blinka_bleio ?
I believe these crashes may not occur or Windows and/or MacOS.
@tulip sleet Done.
I must just be special then
Most certainly -- you are special...
Er, wait. It’s not fixed by #3498 but by #3603. Possible confusion?
Er, wait. It’s not fixed by #3498 but by #3603. Possible confusion?
Oops, yes, sloppy reading, sorry.
This cleanup is part of #2041 - cleaning up warnings from make stubs and make check-stubs. Adding more detailed type information and fixing a few types.
I worked on this as part of #hacktoberfest (https://hacktoberfest.digitalocean.com/), so if the PR looks OK would you mind adding the label hacktoberfest-accepted?
Note that several of the warnings/errors are coming from the ulab package, so I'll try and make a PR there as well.
One question and type correction. Thank you!
I think this should be an ipaddress.IPv4Address.
Why are these needed? I'm new to typing.
@onyx hinge 5 Hours -- no disconnects.
esp32-s2 recv fix: https://github.com/tannewt/circuitpython/tree/fix_recv
if anyone wants to test it
still needs a bit of cleanup
will it go in 6.0.0?
I don’t have any experience with circuitpython...what’s the easiest thing I can start with on the adabox016?
Quotes around custom types are helpful when the type definitions haven't yet been defined (in this case because the type definitions come later in the same file). This doesn't bother mypy but pylint complains about this.
Pylint error: "Using variable 'FourWire' before assignment"
...
More Info: https://www.python.org/dev/peps/pep-0484/#forward-references
@brittle hornet have you looked at the guide -- there are several projects. https://learn.adafruit.com/adabox016
@onyx hinge final update -- I ran the two boards overnight with no disconnects. Sorry I was not able to reproduce the issue. Both running the same build Adafruit CircuitPython 6.1.0-alpha.0-141-g05d663b18 on 2020-10-29; Saola 1 w/Wrover with ESP32S2 Adafruit CircuitPython 6.1.0-alpha.0-141-g05d663b18 on 2020-10-29; FeatherS2 with ESP32S2
@slender iron I have your fix_recv build on a soala_wrover Adafruit CircuitPython 6.0.0-rc.0-19-gd4e5e9320 on 2020-10-30; Saola 1 w/Wrover with ESP32S2-- it seems to be working fine but I was not really sure how to "stress" test it. Is there a specific thing to try? FYI, It returns this request much more quickly than before (now takes 5-7 seconds) ```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"])
hello. I'm discovering microcontroler.nvm and I was wondering what are the limitations of that ? how much can I store there ? where is it stored physically ?
@cursive condor If I recall correctly, the size is board dependent - you can check the size ```Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 6.0.0-rc.0-99-g3f529855d on 2020-10-26; Adafruit Feather M4 Express with samd51j19
import microcontroller
len(microcontroller.nvm)
8192
the size varies between boards
ok. Thanks a lot !
and it never get writed over or moved ? in case of CP upgrading for example ?
installing arduino would likely erase it. I don't know if updating CP would, I don't think so though. If upgrading CP wipes it, we really should note it in the docs.
ok thats great. I'll test that further someday
Oddly this PR has not been closed even though its linked issue was merged.
@cwalther noted in another issue that also was not closed automatically that this was probably because the PR was against 6.0.x, not against main.
@gilded cradle @slender iron I just happened to notice this in adafruit_requests: sent = socket.send(data[total_sent:]) if sent is None: sent = len(data) https://github.com/adafruit/Adafruit_CircuitPython_Requests/blob/master/adafruit_requests.py#L451 Ithink the length calculation is wrong, though possibly in an an insignificant way, because it can only make total_sent be greater than len(data) which will terminate the loop. sent = len(data) - total_sent
@onyx hinge are you using the latest requests and esp32spi that got released last night?
I wasn't using anything, just looking at the source from current master of adafruit_circuitpython_requests for no real reason
I think my concern is probably a big nothingburger though, sorry to bother you
I am able to reproduce this problem, without waiting a long time, by putting the host computer into sleep mode.
Simple test program:
# Prints elapsed number of seconds, every 10 seconds.
import time
while True:
print (int(time.monotonic()))
time.sleep(10)
Example with 6.0.0-rc.0:
$ repl # an alias I have to use picocom
82
92
102
[--here, I put the host computer to sleep, and then waited a bit to wake it up]
172
[--typed ctrl-c here]
Traceback (mo...
@onyx hinge I think that's for the esp32spi socket impl that doesn't return how much was sent
and it's not like it'll return 16 once and then return None
everything's fine, I'm jumping at shadows
right, the esp32spi version would return None always I think
@solar whale it should be faster because it no longer waits for a timeout
definitely improved.
great!
@onyx hinge could I talk to you about https://github.com/adafruit/circuitpython/pull/3437. I have to fix something about it, but I'm not sure I won't reintroduce a problem.
@tulip sleet OK, let me refresh my memory a bit
this is causing the UART to get lost? or that's the working theory?
my testing was done using a cable with a switch to turn on/off the data lines, I didn't think of testing a laptop suspend mode.
yes, _serial_connected is still false after the host computer wakes up from sleep. the tud_cdc_line_state_cb() is not called when it wakes up from sleep
I could set _serial_connected = true in tud_resume_cb(), but that makes some assumptions that CDC is back in shape when it might not be, I think.
tud_cdc_connected() seems to be true if it was ever connected, right? That's what you're trying to overcome and make more accurate.
tud suspend/resume refer to the whole USB connection too
Maybe this is more of a TinyUSB issue
USB could be connected but if the terminal program isn't open we want to say we're not "connected"
i wonder if it's not possible to know if the terminal program is open or not. There has to be a dynamic check in TinyUSB for CDC actually operational
maybe we have to track two things
the first being the DTR state, the second being the suspend/resume state of usb
I could do _serial_connected = tud_cdc_connected() in tud_resume_cb(), but I'm not sure that will give accurate info: either tud_cdc_connected() is optimistic,, or it's too soon.
But I think the issue is that it's optimstic. I can test calling tud_cdc_connected() with the terminal program running or not
maybe I can test the dtr state manually in the resume callback
return _cdc_dtr && !_usb_suspended;
}
``` and track _cdc_dtr in tud_cdc_line_state_cb and _usb_suspended in tud_resume_cb and tud_suspend_cb
since the line_state callback is never called
ah, I see, so if the terminal program is shut down when not sleeping _cdc_dtr will go false
this depends on the terminal software setting the dtr flag but yes
there is no _usb_suspended, right now, right, that is your proposal to flip that in the supend/resume callbacks? Maybe there's just a call for that, as well
i'll look at tinyusb api
yeah _usb_suspended was a hypothetical new variable in circuitpython
ok, good, thanks, you spend a lot more time on this than I did, so good to know your thinking. Either it's fixable or we'll revert to the old behavior for now to avoid the regression while we figure out a better solution, but I think we can be more precise as you proposed.
reverting is fine as a fallback
I can do testing if that would be helpful to you, but it sounds like you can trigger it easly
if you have one of those charge/data switch cables that's how I tested
yes, the sleep mode is easy; I just have it connected to a second computer and am doing debugging on the first, and I have that kind of cable too
ok, off to test and code. thank you!
board is USB to a Windows box, and I have the J-Link connected on my Linux box
does linux work for demonstrating the suspend problem? it's about all I have, without inconvenience.
@gabetav Please post here: https://forums.adafruit.com/viewforum.php?f=60 and include a picture of your setup.
yes, it doesn't matter the OS. I just have two spare windows boxes on my desk for windows debugging + my Linux box. The windows boxes are the Dell micro format size, and I connect to them with RDP on the Linux box, so it's really convenient to use multiple machines. I even connect to my Mac laptop with Nomachine (which is like RDP) so I don't have to switch monitors or keyboards.
@grjohn14 Please make a pull request to fix this! On GitHub you can edit the file in the browser and propose the PR.
there are a bazillion computers in this house 🙂
Thank you! Is there a mypy check you could add to our CI in a follow up PR?
I think you want these definitions: https://github.com/espressif/esp-idf/blob/8bc19ba893e5544d571a753d82b44a84799b94b1/components/soc/soc/esp32s2/include/soc/gpio_struct.h
They should match the register names in the technical reference manual for the -S2.
Update this for yourself.
This looks really good! Were you able to test it or do you need me to?
Want to make this and rotaryio select units that aren't in use? That way we can multiple of each.
Code looks great! The PCNT looks really useful. I think you'll want to sort out sharing it's units.
Please add comments to the pyi stubs in shared-bindings about how the functions are used.
Is it possible to read a command and change the response within a single transaction? That's a common way for SPI devices to work.
we are having an issue where we have multiple same devices and app code running...sporadically...after several hours of heavy use and unclear how to reproduce an event occurs where the internal flash erases completely. we wipe and install the circuit python
and application code and it works again. the flash is fairly full but not completely full (saw some mention of this being and issue in CP4). The internal memory is also close to being full, but we poweron reset the device after each use (2-3 minutes). Another symptom is that over time, power on reset seems to stop working reliably and we have to do a manual reset to get the boards working. this is nrf52 feather express. any suggestions on how to test / reproduce and what the issue may be would be greatly appreciated.
@spare prawn what version of CPy are you using?
adafruit-circuitpython-feather_nrf52840_express-en_US-5.3.0.uf2
have you tested with 6.0.0-rc.0?
no, i am supporting folks doing a lot of experiments in time constrained manner so swap out is hard
but i can in a day or two
I would recommend that; we did fix various bugs, though having the internal flash erased completely is not something I have seen. There might have been some issues when the internal flash was used partly as a filesystem. Are you using microcontroller.nvm, or are you doing BLE bonding?
those are the only two things that would write to internal flash
BLE
so you're doing pairing/bonding, as opposed to just simple connection?
no, simple connection using ble.uart
that would not write bonding data into flash
when you say "internal flash erase completely", you mean the chip flash, not CIRCUITPY?
the end state is the CIRCUITPY folder apps and the lib folder are empty.
ok, I would not call that internal flash, but external flash (CIRCUITPY is on the separate flash chip).
there were some bugs fixed related to that, I think. I'd need to look it up
is the host computer writing to CIRCUITPY during this testing?
ok, that clears up one of my questions about the flash on board the feather. apologies. files remaining, boot_out.txt, code.py, empty lib folder.
What are the host computers, are they Windows, MacOS, or Linux?
the disk does look in a different state after this happens...invisible files gone, no trashes etc
yes its battery power
but not the li po seperate 9v downregulated to 5v...legacy thingg
and it could be possible this happens on power on...i have not really looked closely at what its doing...this could be messy and could also be part of the power on reset issue.
so, what might be happening is that there's a power dip, and when the board comes back up, the external flash chip (used for CIRCUITPY) appears to be unformatted (because it's not ready due to low voltage), and so CircuitPython will reformat it, which wipes anything that's there. The voltages involved should not be an issue: the external flash chip should operate down to 2.6 or so, but this sounds like a similar problem we've seen on other boards where the battery gets too low and either the microcontroller chip or the external flash are not working well at too low a voltage
or if there's a lot of voltage jitter on power-up, could be similar
ok, thats a great clue.
I have seen instances of a CLUE running on battery power format itself similarly when the battery power gets too low. as an extra data point perhaps
thanks!
The nRF52 will do brownout detection at 2.7V and will turn off at that voltage and then restart. So if the battery is marginal then it might be running at below 2.7V, the chip cuts off, and then the battery recovers slightly enough for it to come back, but then the increased drain drags the battery down again and the external flash chip can't function.
Yes, this sounds like a battery voltage issue. I'm not sure if the brownout voltage can be raised above a fixed value or not (say to 3V)
ok, i will profile on the bench, thank you for that feedback. super helpful
sure, glad to help ... looks like the nRF52 only does a fixed-level brownout detection, not changeable.
good luck!
@spare prawn I am wrong, hard brown-out detct is 1.6V. That's way below the operating range of the external flash chip
but we are checking for soft brownout at 2.7v. at that point we do a brownout reset and CircuitPython would restart, but if there's sag after that, could affect the CIRCUITPY chip
ok, great thank you.
Was there a github blackout two weeks ago? Here is a screenshot of the insights tab in ulab:
It is a bit hard to believe the straight zeros at the beginning of the curve...
github has plenty of funny little outages, I wouldn't read too much into it.
@tannewt so by that you mean the peripheral device takes incoming data, performs operations based on it, and adds to the ongoing TX buffer all during a single transaction? I hadn't considered that use case, that might require a DMA stream, I'd have to check. Can you provide an example of a device that does that so I could check out the protocol?
@slender iron wrapped up the Arduino Neopixel thing today so I'm ready for whatever project you'd like next on the priority queue.
will probably try and fix up the F1 port in the meantime
github has plenty of funny little outages, I wouldn't read too much into it.
@onyx hinge I didn't. I was just a bit surprised.
@dhalbert I don't know if this is useful, but I just did a manual bisect on S3 builds using your protocol (with a 30 second sleep time). The build that seems to have broken is:
The build just before is:
@onyx hinge @slender iron @tulip sleet I have just released 1.0.0 of ulab What a relief! 😌
@lapis hemlock nice! Since 6.0 is branched from main, I think it will be no problem to pull request ulab 1.0 into circuitpython's main branch
I think it might be a bit more complicated, because first we would have to figure out, which features you want to have, how many dimensions and so on. I also have an idea as to how Scott's requirement of "circuitpython experience" could be reconciled with scalable ulab features. I can outline everything on Monday night.
I don't know what kinds of devices you were hoping to implement/emulate, but for instance when you have a RAM-like device on the SPI bus a transaction looks like this (from the datasheet of https://learn.adafruit.com/adafruit-spi-fram-breakout/downloads)

this can be tough or impossible for a microcontroller to implement, since there's no clock stretching in SPI.
@onyx hinge @slender iron Please, let me know, if you disagree with the credits: https://micropython-ulab.readthedocs.io/_/downloads/en/latest/pdf/
- Fixing a few remaining mypy complaints so that
make check-stubsnow passes - Calling
make check-stubsinstead ofmake stubsin CI actions.make check-stubsbuilds the stubs + runs mypy against them (returning a non-zero error code if errors pop up)
This is a follow-on PR from: #3621
I worked on this as part of #hacktoberfest (https://hacktoberfest.digitalocean.com/), so if the PR looks OK would you mind adding the label hacktoberfest-accepted?
@slender iron wrapped up the Arduino Neopixel thing today so I'm ready for whatever project you'd like next on the priority queue.
@ionic elk how about the countio and rotaryio reviews for microdev. you can pick up UDP for me too. that'd be awesome
@ionic elk here is my branch you can start with: https://github.com/tannewt/circuitpython/tree/esp32s2_udp it doesn't compile so it's just a start
My github account is broken, is here an ok place to report a bug?
sure
One question but good otherwise!
Is there no way for this to include these defaults? They are helpful to have in docs.
using the 6.0.0-rc.0 for the unexpected maker board featherS2 board it appears that wifi.radio.ping("192.168.1.1") raises "ValueError: Only IPv4 addresses supported", and running it passing it ipaddress.IPv4Address("192.168.1.1") takes out the serial port at the very least.
@lapis hemlock Félicitations!
Is the code that exposes the CIRCUITPY drive less stable on NRF devices than the M4? I'm getting corrupt files on large writes to disk on all of my NRF devices, but absolutely perfect on my M4 chips.
@bronze shadow some bugs were fixed a while ago; have you tried the 6.0.0-rc.0 release candidate to see if it's better?
I've tested on rc-0 as well as testing with pulling and building the latest from git as well.
Could you file an issue then, with an example? Thanks. We are very interested in reproducible test cases for this. Include info about your host OS.
Can do, though it's been tested on several OS's with the same result. Thanks. Glad to hear that I'm not alone.
On large disk writes, filesystem corruption seems to be an issue on the disk. It reports as working properly to the host OS, even after a reboot of the controller. This has been tested on several devices, but is most problematic on the nice_nano, which has almost identical specs to the itsybitsyNRF, and Particle Xenon also has shown this issue as well. Tested using several Cpy versions including 6 rc.0. Steps to reproduce
https://github.com/KMKfw/kmk_firmware
- copy KMK folder to the roo...
The nice_nano does not have an external QSPI flash chip, and uses the nRF52840's internal flash for a filesystem. On the Particle Xenon, CIRCUITPY is on the external flash chip.
Do you see any difference between boards that use use the internal flash and external flash when you see this problem?
I remembered incorrectly. Sorry for that mistake, the Xenon works perfectly.
Fixes #3588.
Check for DTR by querying tud_cdc_get_line_state(), and check for tud_usb_ready(). One doesn't need to save state in callbacks this way.
Tested two ways:
- By putting the host computer to sleep, and then waking it up. When sleeping,
supervisor.runtime.serial_availablebecomes falase. After wakeup, the serial connection is restored, andsupervisor.runtime.serial_availableisTrue. Interrupting the running program with ctrl-c works properly, and one can get to the ...
OK, so this is probably internal filesystem only. Thanks! That's very helpful. We have seen this in the past, and I have a vague memory of trying to fix it, but clearly it needs more investigation.
I went back and forth on this - they aren't currently defined in the python class. I made it match the socket constructor:
//| class socket:
//|
//| def __init__(self, family: int, type: int, proto: int) -> None:
//| """Create a new socket
I'll update both of these to define them in the python class
Some previous issues with similar problems that we though we fixed:
#2318
#2338
#1654
Let me know when you think you have a fix, let me know the branch and I'll give it a shot on my devices as well and report back. I don't have nearly a deep enough understanding of circuitpython to contribute farther.
Anyone know what the semicolon here is for? https://github.com/adafruit/Adafruit_CircuitPython_Requests/blob/0106c75b0eeb2bf9ed27bc24c5671f929911736b/adafruit_requests.py#L215
Take a look now and let me know what you think - I added class attributes for the enum/define values
I think I have a fix: see PR #3624. Build artifacts are available here https://github.com/adafruit/circuitpython/runs/1334933429?check_suite_focus=true if you want to test.
Watching delayed Deep Dive... on the issue of adjusting RTC, what's the reason not to allow setting time back? Might execute some event twice? Setting forward risks losing an event. Why not leave it to the user?
BTW, don't know about ESP32-S2, but M4 RTC calibration often does not have the range to effectively calibrate, the drifts on some chips are way outside the range (e.g., my PyPortal is off by about one second every minute).
@dhalbert #3624 has been working great for me so far!
Are the readthedocs pages for libraries (like: https://circuitpython.readthedocs.io/projects/display_text/en/latest/api.html) built entirely automatically just by pushing the correct things into the repo? or is there some outside / manual step needed to set those up?
sphinx builds the pages from files in the repo, but I mean actually getting those built pages into readthedocs.
Ah, I see this is covered in https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#readthedocs-3043400-6 actually.
Thank you -- this looks great, much better than what I had come up with! No testing performed.
@crimson ferry https://tools.ietf.org/html/rfc7230#section-4.1.1 it appears to be related to a "chunk extension" however it's not clear to me whether the handling is complete.
Nice, thanks Jeff. A semicolon is a really hard thing to web search for.
I think a chunk extension line would look like 6;foo=something;bar=somethingelse\r\n but the code would only read up to the ";" and so the foo=something would be erroneously treated as content
Doesn't that line of code look for the semicolon then read to the \r\n ?
my method of finding the answer was to find the right part of the RFC from wikipedia, then it was right in front of me 🙂
I think _readto reads to the first of two delimiters, when both are given
and it cuts off the delimeter (I think) so you can't check which you got
and generally I assume we'd just ignore chunk extensions (not supported)
honestly I get pretty baffled reading that code, but trying to get a clue why chunked is having issues, also not sure if it drains the end of the last chunk or whether it matters
If you have an example of a chunked http request with extensions it would be a good test case to add
I haven't encountered one in the wild afaik
same, cool idea though
https://github.com/nodejs/http-parser/blob/master/test.c#L385 possible candidate for a testcase
"Transfer-Encoding: chunked\r\n"
"\r\n"
"5; ilovew3;whattheluck=aretheseparametersfor\r\nhello\r\n"
"6; blahblah; blah\r\n world\r\n"
"0\r\n"
"\r\n"```
though I guess that's the request side not the response
The new lightsleep feature might be causing issues with delays of a variety of types. Today was helping to debug a user's issue when he presented the following.
USER at 3:59 AM
I've noticed that using play_tone() with the Circuit Playground Express (see example below), CircuitPython 6.0.0_rc.0 adds a significant pause after each note compared to 5.3.1. Has anyone else experienced this?
from adafruit_circuitplayground.express import cpx
scale = [587, 659, 740, 880, 987, 1174]
whil...
what it says on the tin
Is it deliberate that AF_INET is defined twice with different numeric values?
🎉 
not tested. only CI failure is due to a disconnection so gonna approve & merge!
Thanks! Approved pending build success.
The following code has similar results even not using the internal timing for notes:
import time
from adafruit_circuitplayground.express import cpx
scale = [587, 659, 740, 880, 987, 1174]
while True:
for note in scale:
cpx.start_tone(note)
start_time = time.monotonic()
while time.monotonic() - start_time < .2:
pass
cpx.stop_tone()
@onyx hinge The latest merge to main failed due to this line in build.yml:
zip -9 circuitpython-stubs.CP_VERSION }}.zip stubs
looks like an editing typo, the ${{ part is missing
weird that it wasn't caught on the original PR
it's affecting main only?
yes, it only happened when I merged your 6.0.x fixes-into-main PR, and then I got an email that the build failed
+ zip -9 circuitpython-stubs.${{ env.CP_VERSION }}.zip stubs
``` ?
where is that diff from?
is what I'm proposing
https://github.com/adafruit/circuitpython/actions/runs/338205880 ok yeah it did first fail with the merge of that PR of mine to main
change looks good to me
these things that can't be tested before they're actually merged are frustrating. sorry about this.
np, that was weird
I will approve and merge when it's done, and then we'll see what happens on the PR merge
thank you
I think this should not include the version: the version is added when it's uploaded.
zip -9 circuitpython-stubs.zip stubs
Is this a possible or likely fix for #2686 too?
This seems to have to do with audio playing. The basic sleep delays are still accurate in 5.3.1 or 6.0.0-rc.2. But the audio play intervals on the SAMD21 are wildly off, and need further investigation.
Test program:
from adafruit_circuitplayground import cp
import time
for test in ("sleep", "tone"):
for length in (0.05, 0.1, 0.25, 0.5, 1):
start = time.monotonic()
if test == "sleep":
time.sleep(length)
else:
cp.play_...
Is this a possible or likely fix for #2686 too?
If the host computer went to sleep during the long interval mentioned in #2686, then yes, this should fix that too.
Is this a possible or likely fix for #2686 too?
If the host computer went to sleep during the long interval mentioned in #2686, then yes, this should fix that too.
I take that back. #2686 talks about loss of output. In the test above, output is not lost. When the sleeping computer wakes up, output continues to the terminal program. The issue was that CircuitPython didn't realize that the computer reconnected, so it did not go back to the REPL after a ctrl-C.
The stubs directory is called circuitpython-stubs, not stubs.
@tulip sleet I just received a metro esp32s2 and updated it to main -- When it boots the Drive shows ups a "983 kB Volume" not CIRCUITPY.... is that expected? THis is on Linux (it was the same with the as delivered version of CP .
on MacOs it comes up as NO NAME
mine shows as CIRCUITPY, but I am trying rc.0 on it. haven't tried main yhet
Ah -- I did a storage.erase_filesystem() and it now comes up as CIRCUITPY
also before that, it did not generate the lib folder or code.py. Now all are there..
odd -- I just updated to hte latest adafruit_requests and now the same test I have been running on esp32s2s is failing ```Adafruit CircuitPython 6.1.0-alpha.0-175-gaca53cf41 on 2020-10-31; Metro ESP32S2 with ESP32S2
import wifi_test
cp mem free 2034288
idf total mem 165384
idf mem free 51348
idf largest block 47012
<Network> Needell Airport -43 1
<Network> WYZE_FBAB62DE71811B38 -64 11
<Network> central2.4 -78 8
<Network> 31A -79 8
<Network> Expelliarmus2 -85 10
None
ip 10.0.0.30
8.8.4.4
ping 0.038
200
This is a test of Adafruit WiFi!
If you can read this, its working :)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "wifi_test.py", line 39, 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
this si the request that failsresponse = requests.get("https://httpbin.org/get")
print(response.status_code)
print(response.json())
if I revert back to teh adafruit_requests from the 20201016 bundle , it works....
Opened an issue on the library repo.
Change in IDF memory behavior from Requests 1.7.2 to 1.7.3/1.7.4...
This is maybe better as a Requests issue, perhaps related to https://github.com/adafruit/Adafruit_CircuitPython_Requests/issues/47
But perhaps also an indication that we are near the edge on IDF memory.
Saola 1 w/Wrover with ESP32S2
6.0.0-rc.0 on 2020-10-16
adafruit-circuitpython-bundle-6.x-mpy-20201031
Requests 1.7.4 or Requests 1.7.3 (Re...
is it a known behavior that printing a dict that contains itself does not use the {...} syntax but instead prints recursively?
ugh it's still wrong. Needs the zip -r flag or something?
adding: circuitpython-stubs/ (stored 0%)
Finally looks like a correct stubs file has been uploaded to s3:
https://adafruit-circuit-python.s3.amazonaws.com/bin/stubs/circuitpython-stubs-6.1.0-alpha.0-177-g3845db4bb.zip
turns out that when the branch is made in adafruit/circuitpython instead of jepler/circuitpython the upload steps can be tested. Nice, I didn't realize that.
Finally looks like a correct stubs file has been uploaded to s3:
https://adafruit-circuit-python.s3.amazonaws.com/bin/stubs/circuitpython-stubs-6.1.0-alpha.0-177-g3845db4bb.zip
turns out that when the branch is made in adafruit/circuitpython instead of jepler/circuitpython the upload steps can be tested. Nice, I didn't realize that.
That was completely unintentional on my part, but good to know!
That is a good question - I matched what's in the C code, so the bigger question is does it make sense for the C header values to be the same?
network/__init__.h
#define MOD_NETWORK_AF_INET (2)
#define MOD_NETWORK_AF_INET6 (10)
#define MOD_NETWORK_SOCK_STREAM (1)
#define MOD_NETWORK_SOCK_DGRAM (2)
#define MOD_NETWORK_SOCK_RAW (3)
socketpool/SocketPool.h
typedef enum {
SOCKETPOOL_SOCK_STREAM,
SOCKETPOOL_SOCK_DGRAM,
SOCKETPOOL_SOCK_RAW
} socke...
analogio now fits in these builds
Yes... I was already working on multiple unit implementation and I think I have got it figured out.
@tannewt Thanks for the review. I tested this with my microS2 & two different types of encoder.
Adding a user to the dialout group has been documented for a while now in:
https://learn.adafruit.com/welcome-to-circuitpython/kattni-connecting-to-the-serial-console#setting-permissions-on-linux-3027345-8
and
https://learn.adafruit.com/welcome-to-circuitpython/advanced-serial-console-on-mac-and-linux
This is more straightfoward than using udev rules.
Closing - please comment if think this should remain open.
Closing for now, since we don't have consensus on this.
Superseded by #3234, but seeing how MicroPython does is worth looking at.
Issue #1268 also brought this up, taking inspiration from MicroPython machine.mem (which may only exist on the micro:bit port, I'm not sure).
Fixed by #1573 (a long time ago).
I think is is unnecessary.
Closing due to age of versions that showed an error.
black formatting is now enforced on libraries.
How do the PyPi version packages get their versions? I found use_scm_version=True, in setup.py. When I build the tar.gz I see that the version is getting generated from a vew values concatenated together like [library]-0.1.dev16+g73b291d but when I try to upload this to PyPi with twine I get an error: 400 '0.1.dev16+g73b291d' is an invalid value for Version. Error: Can't use PEP 440 local versions.
@lone axle the pypi uploads happen (by GitHub Action) when we make a new release in GitHub, which involves specifying a version tag.
we don't upload non-tagged libraries
I there a resource somewhere that would show me how to set this up on one my own libraries?
I created one and have shared it in the community bundle. Working on getting it uploaded to PyPi, but not sure how to get it up to there correctly.
I used cookiecutter to create it, so much of the actions config stuff is already in place. I'm guessing I just need to fill in some of my account info somewhere maybe?
from cookie-cutter, here's a template release.yml: https://github.com/adafruit/cookiecutter-adafruit-circuitpython/blob/master/{{ cookiecutter.library_name }}/.github/workflows/release.yml
the username and password are specified as env vars in the github action setup
there are "secrets" that github actions keeps
Ah, I think I found how to add them in the project settings. Thank you!
Fixes #2022 .
binascii was present in the nRF and ESP32S2 builds, but not other builds. Now that we have offboard wifi, should be available wherever can be.
@brentru This is still desirable, is that right?
Among other things, I had to add a PYPI_TOKEN to the secrets page of my github repo
I also had this change in actions ``` env:
-
TWINE_USERNAME: ${{ secrets.pypi_username }} -
TWINE_PASSWORD: ${{ secrets.pypi_password }}
-
TWINE_USERNAME: __token__ -
TWINE_PASSWORD: ${{ secrets.pypi_token }}
Ah, I will have to look into upgrading to a token. I ended up with username and pass and I did get it working. This was my first time publishing a library to PyPi and getting readthedocs set up for it 🎉
cool!
cookiecutter could clearly use some tweaks for independent or community-bundle-targeted packages
Ooh that would be neat if it had an "adafruit mode" and "community mode" or similar
I think there's an issue that says as much
I will say though finding and changing all of the things required has taught me a ton about the Actions and CI infrastructure.
for sure
Added LED, BOOST_EN and VEXT_SELECT pins.
@slender iron @onyx hinge I did draft release notes for 6.0.0-rc.1. Barring anything else we could release tomorrow.
Hello!
busio.SPI only supports 8bit words. I only need 40 bit words. Could I just change all the unt8 to unt40 in the spi.h and spi.c, then create a new uf2 of cpy to flash on my express board?
Please assign this issue to me.I want to work on this.
@utkarsh147-del Thank you for offering! I have assigned this to you, but I think that it may already have been resolved by #3554. If so, I hope you'll consider working on another issue.
Hi and thanks for your question. The circuitpython issue tracker is not the best place for questions, please consider using our forums or discord chat for asking questions.
If you need to send a 40-bit message on the SPI bus, the way to do it is to prepare a 5-byte piece of data to send. Assuming that you are using a board with "long int" support (most boards except those with M0 microcontrollers), you can make such an array of...
Update pad assignments for better resource allocations and ensure that the default I2C is is present on a high-speed capable pair of pads to be fully compliant with I2C spec. Ensure all Dx pins are on TCCx within the same IOSET and non-overlapping so all can be used simultaneously. Ensure all intended SERCOM peripherals are on the same IOSET. Remove second clock source pins for I2S since we can't get them all on the same IOSET and still maintain QSPI - defer to QSPI over the second clock sour...
Good morning <@&356864093652516868> -- please double check the time for today's meeting in your local time zone! In the USA we are now observing winter ("standard") time so the meeting is at 2PM EST in UTC-5. https://open-web-calendar.herokuapp.com/calendar.html?url=https%3A%2F%2Fraw.githubusercontent.com%2Fadafruit%2Fadafruit-circuitpython-weekly-meeting%2Fmaster%2Fmeeting.ical&title=CicuitPython Weekly Meeting Schedule&tab=agenda&tabs=month&tabs=agenda
If you plan to speak in the meeting, please take a moment to add your name in alphabetical order to hug reports and status updates. Adding your notes at the same time is super helpful! If you have notes but won't be speaking during the meeting for whatever reason, just say (no mic), (missing meeting) etc and we'll read them off during the meeting for you. https://docs.google.com/document/d/1P6H-XeIR68ckTJ6Qh26_rQR-8jjx2X4vtz4-OaripvY/edit
Great to have this confirmed. FWIW, it may not be obvious from the numbers, but this issue has significant audio impact on sound effects using play_tone(), start_tone() and 'stop_tone()` on the CPX.
on the metro_esp32s2 I am seeing a File system of approx 1Mbyte and for memory ```
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 6.1.0-alpha.0-181-gb468bb6b9 on 2020-11-02; Metro ESP32S2 with ESP32S2
import gc
gc.mem_free()
2048784
It is the same as the Saola_wrover so I guess that makes sense
teh unexpectedmaker feathers2 has 16Mbyts of flash (MByte Files system) but it also has an 8Mbyte PSRAM and shows ```Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 6.1.0-alpha.0-141-g05d663b18 on 2020-10-29; FeatherS2 with ESP32S2
import gc
gc.mem_free()
8196176
ah -Wrover only has 2Mbyte PSRAM
I’ll be submitting a PR eventually for my CP Sapling to be added 🥳 probably late this week or early next
I think there is a typo on circuitpython .org page for the metro_esp32s2
Just have to fix some things, test, and whatnot
@tulip sleet I think there is typo on the page https://circuitpython.org/board/adafruit_metro_esp32s2/ regarding the PSRAM size -- the WROVER module has a 2Mbyt PSRAM (it says 8 here) Should I go ahead and change it?
@solar whale makes sense to me, but I am a novice at these modules
I'll make the change since it is a Wrover Module.
correct PSRAM size - Wrover Module has 2Mbyte PSRAM -- was listed as 8.
@WarriorOfWire Thanks! This is great to see. I'm excited to start using it :)
That said, any pointers on reading material on how to use it would be appreciated as while I'm somewhat familiar with the concepts, I'm not quite sure where to start.
Images automagically compressed by Calibre's image-actions ✨
Compression reduced images by <strong>66.6%</strong>, saving <strong>13.01 MB</strong>.
| Filename | Before | After | Improvement | Visual comparison |
|---|---|---|---|---|
| <code>assets/images/boards/large/adafruit_metro_esp32s2.jpg</code> | 372.64 KB | 101.79 KB | -72.7% | [View diff](/adafruit/circuitpyt... |
Where'd you get the size info? The description came from https://www.adafruit.com/product/4775, so maybe the product page needs to be updated too?
its 2 MB of PSRAM, 4 MB of flash - just checked espressif site
Where'd you get the size info? The description came from https://www.adafruit.com/product/4775, so maybe the product page needs to be updated too?
https://www.adafruit.com/product/4693
and
https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/hw-reference/esp32s2/user-guide-saola-1-v1.2.html
Hi, I was wondering if I could get some clarification on what portions of the flash are used by the Adafruit nRF52 Bootloader? https://github.com/adafruit/Adafruit_nRF52_Bootloader
I know with softdevice 6 on the 52840 up to 0x26000 is reserved, but what else is reserved? I'm currently running into some troubles neat the end of the flash range. It would be nice to have this documented.
@odd warren see the linker map: https://github.com/adafruit/Adafruit_nRF52_Bootloader/blob/master/linker/nrf52840.ld
the bootloader is placed in high flash, and there's also a config region there
this is because the SD comes first, and then the user program
/** Flash start address for the bootloader. This setting will also be stored in UICR to allow the
* MBR to init the bootloader when starting the system. This value must correspond to
* BOOTLOADER_REGION_START found in dfu_types.h. The system is prevented from starting up if
* those values do not match. The check is performed in main.c, see
* APP_ERROR_CHECK_BOOL(*((uint32_t *)NRF_UICR_BOOT_START_ADDRESS) == BOOTLOADER_REGION_START);
*/
FLASH (rx) : ORIGIN = 0xF4000, LENGTH = 0xFE000-0xF4000-2048 /* 38 KB */
BOOTLOADER_CONFIG (r): ORIGIN = 0xFE000 - 2048, LENGTH = 2048
/** Location of mbr params page in flash. */
MBR_PARAMS_PAGE (rw) : ORIGIN = 0xFE000, LENGTH = 0x1000
/** Location of bootloader setting in flash. */
BOOTLOADER_SETTINGS (rw) : ORIGIN = 0xFF000, LENGTH = 0x1000
Thanks very much @tulip sleet. Also I was curious if there were plans for another release anytime soon? It's been quite a while since the last with many changes.
So to summarize this. On the nrf52840, 0xF4000 and onward is for the bootloader?
yes
Thanks for the quick response and explanation. Much appreciated.
feel free to ask about another release in an issue; however we're working on a cross-platform UF2 bootloader based on tinyusb, and that may be taking precedence.
Is there a public repo for that I could follow?
i am not sure where that is right now, can't find it in any obvious places
BelgiumOk, I am one hour too early... I knew that, I just forgot.
@idle owl I was wondering if there was a skeleton for a standard LEARN guide?
@inland tusk How do you mean?
Something that I could just fill in the various sections until I felt that the guide was complete (EI. cookie cutter for creating the initial library skelleton).
BTW is the meeting on for today.
@inland tusk We are meeting today, yes.
@odd warren I see the branch here https://github.com/adafruit/uf2-esp32s/tree/generalize-bootloader but no nrf support yet.
Thanks!
@inland tusk There's not a cookiecutter per se, but we sort of follow a way of doing them. Are you talking about a project type guide or a product type guide?
@idle owl Project type
We don't start with a form. Creating the guide involves titling, description, guide image and categories. Then we are provided a blank slate. We always start with an Overview page, and from there it's basically up to the author how to lay it out. Often there's Wiring, Software Setup, and then Code usage, and sometimes Hardware usage depending on how complicated it is to use.
@inland tusk So I think the answer to your question is no. We're kind of taught how to get it going and then we do what makes the most sense the more often we do it.
@odd warren The repo is here: https://github.com/adafruit/uf2-esp32s. It started as esp32s2 specific, but is being generalized. Still under very active development.
@idle owl Thanks for the info
@inland tusk Anytime!
@tulip sleet that's great. Is nrf52 planned to be a part of that? I see stm, esp, and iMXRT so far.
Could anyone invite me to the circuitpythonistas, please?
not sure about nrf, but i'll ask (developer is asleep right now)
@opal crystal Done!
appreciate it.
Was in the process of asking if you wanted it 😄
Thanks!
Good afternoon all you wonderful folks -- happily lurking today, notes guide updated as such.
@modern wing Thank you!
lurking
@tulip sleet Side note - let me know if you have questions about deprecating the lib and Limor's not around - I've done a bunch of them.
We just finished up our internal meeting, I'm getting a glass of water and then we'll get the meeting started! Thanks for everyone's patience.
sure -thanks
@tulip sleet Which lib
old host bluefruit python library, replaced by adafruit-blinka-bleio
Oh okay
lurking
Just listening today.
@errant grail Please mute
Sorry.
Timex Sinclair 1000 😉
Learn about the extensive refresh process an electrophoretic display goes through before drawing a new image.
Visit the Adafruit shop online - http://www.adafruit.com
LIVE CHAT IS HERE! http://adafru.it/...
Me and Phina (4) collaborated on this to scare the wife yesterday. @adafruit Hallowing M4, some photos, bit of sound manipulation and a bit of mucking about in #circuitpython and we came up with something ‘well creepy’! https://t.co/kd2VTdisST
@grim dagger @analog bridge lurking?
Yup!
Lurking
thanks
Looking over the build process, it looks like the certificates are being updated as part of the build process
so I'm to sure this is the actual cause of the SSL handshake errors
If you look in the board build folder after completing a build, this is a file named x509_crt_bundle.S generated and I think this contain the certificate updates from the process noted above. It is run for every build.
100% this
link?
Visit the Adafruit shop online - http://www.adafruit.com
LIVE CHAT IS HERE! http://adafru.it/discord
Adafruit on Instagram: https://www.instagram.com/adafruit
Subscribe to Adafruit on YouTube: http://adafru.it/subscribe
New tutoria...
@lone axle Thanks!
🐱
😺
👍
Tried it Saturday, but still had delay issues. I'll try the latest.
7.1.4 if I recall. Didn't hang on to the folder.
kk
Yeah, that's it.
Yes, because I had already trimmed out the direct plotting function. Didn't try recreating the memory conflict.
^ just slower
kk. were you doing json parsing?
No json parsing in this implementation. Just using PyPortal feed push_to_io() and localtime update.
Belgium
kk, thanks @errant grail
DisplayIO on the Pi ? Wait, that is actually great! cc: @lone axle (I saw the PR, but did not understand that it was that).
@lone axle I just figured out why the MONSTERM4SK library is still on the "Not in the bundle" list on circuitpython.org. I only renamed the repo. There are references to it in setup.py and possibly other places that are still referencing the original case name. Can you go through the repo and fix those references?
Yep, will do.
@lone axle Thank you!
@thorny jay yep! It turned out to be fairly straightforward to "hook up" what Blinka_Displayio was already doing into a PyGame window instead of a hardware display.
@lone axle was it cool to have displayio on HDMI? I still want to do bare metal CP on rpi
definitely! I'm excited about being able to test displayio widgets on my PC during development. But I think there are many other great uses for showing data on large format screens
Gameduino 3X Dazzler will be fun...
np.__version__
>>> 1.2.0-2D-cpy
add a number specifying the rank in the feature hierarchy
np.__version__
>>> 1.2.0-2D-cpy-11
then
if(int(np.__version__.split('-')[-1])) > 10:
print('OK')
else:
raise ImportError('sorry, you are toast')
from ulab import fft or if "fft" in dir(ulab):
import ulab as np
a = np.array([1, 2, 3])
b = np.array([4, 5, 6])
try:
print(a ** b)
except Exception as e:
print('operator is not supported: ', e)```
Are there already a few learn guide that use ulab, those will be the function used more.
FFT for the sound analyse on CLUE was one thing.
What would you do with ulab on an M0?
The support matrix would need to have a way to see if this is ulab Full or ulab partial.
breaking up for me as well.
Are you thinking of a specific NP application or did I miss that? Why NP in particular? Are there other options if not NP or is this for a future ML app? Sorry if you discussed that already.
Yeah version number will be confusing.
Would a bytearray work as well?
@lone axle was it cool to have displayio on HDMI? I still want to do bare metal CP on rpi
@slender iron Still interested in VGA output this way:
Thank you!
@tulip sleet I wanted to add a summary of translations to the release notes. Something like:
CircuitPython 6.0's error and control messages are translated into various languages. Besides English, ten other languages' translations are at least 50% complete:
locale/pt_BR.po : 100% translated locale/es.po : 99% translated locale/sv.po : 99% translated locale/zh_Latn_pinyin.po : 99% translated locale/nl.po : 93% translated locale/fr.po : 91% translated locale/de_DE.po : 84% translated locale/pl.po : 71% translated locale/ja.po : 70% translated locale/fil.po : 51% translated
(those numbers are accurate, I think)
@onyx hinge The Hacktoberfest numbers are indeed inaccurate. The label's not on the repos anymore, so not sure why the results are borked. The important thing is that the label was removed, so shrug I suppose.
@onyx hinge Sure, you can edit the draft release notes and add a table or just "locale/pt_BR.po: 100%" (don't have to make it look incredibly pretty. ... Or, can you just provide a link to the weblate translation table? That's more interesting to someone who wants to add translations, since the percentages are going to become stale.
@tulip sleet want to update the build guide for this? https://forums.adafruit.com/viewtopic.php?f=60&t=171201#p836484
@slender iron I would actually like to change the makefiles so they don't use python, but always use python3. I ran into exactly the same problem myself over the weekend when I trying to get the esp32-s2 build setup right
kk
checked schem to verify! ok to merge so we get it in the release :)
@tulip sleet shall I write the newsletter blurb as though rc1 will be out?
@onyx hinge Jeff, do you happen to know, which version of isort you need in extract_pyi.py? I end up with an AttributeError: module 'isort' has no attribute 'code' error in 4.3.21.
@lapis hemlock it looks like I have isort 5.4.2.
@onyx hinge Thanks! I have updated the library, and it works now.
@lapis hemlock often it's useful to find out what happens in the actions on github ... Collecting isort Downloading isort-5.6.4-py3-none-any.whl (98 kB) in a random recent actions build of circuitpython
so I'm behind the times now too but it's good enough
Nifty trick!
@onyx hinge 👍 Yes, I'll do it after merging the Feather CAN pin changes
I literally ran into the isort thing yesterday so can confirm version 4 does not work and version 5 does
@slender iron Does this apply to the ESP on the Metro ESP32-S2? I'm not sure on specifics. https://www.espressif.com/sites/default/files/documentation/esp32-s2_datasheet_en.pdf
yup
Thanks
there is a technical reference as well
oh hmm. ok.
Yes please
kk, looking now
I found something but what you have is more accurate.
Thank you
Ahhh ok. Thank you
np
I'll put all three in the guide.
@idle owl I was confused when setting up my MetroS2 (maybe in part b/c I've never had that form factor before and so was ignorant of the pin norms), but the silk doesn't match pins.c, so maybe we need more (even redundant) pin defs?
What doesn't match?
I guess a better question might be, is this a known issue or is this the first time it's been mentioned?
well, the numbered pins... some are D*, some are ESP32-S2 GPIO numbers, so it's inconsistent
Hmm.
usually, you can look at a board and know what to call the pins in CircuitPython board.
Right. Ok. And that's not the case?
Apologies for simple questions, I'm making sure I'm on the same page.
no, like pins with silk 14, 15, 16
I haven't tested, but I think maybe those are GPIO numbers
Ahh ok. I see.
actually, I don't think they are... GPIO15 is D10 (presumably silk="10", so then what's silk="15"?
Hold on I have the schematic open now.
pins.c allows many-to-one, so we can overload microcontroller numbers
ah, totes, didn't think to look there o_O
Which pins.c, I'm not seeing it. Can you send me a link please?
@crimson ferry Yeah I often forget the schematic.
Oh, I keep looking at master and getting confused. Thank you for the link.
That's not right.
At least if I'm reading the schematic properly, which is dubious, the pin def doesn't match.
oh, duh, just went to the product page to get to the schematic, but there's no learn guide :p
oh, so theyre D14 etc, OK
@tulip sleet This doesn't look right. Has it not been updated or something? https://github.com/adafruit/circuitpython/blob/main/ports/esp32s2/boards/adafruit_metro_esp32s2/pins.c
but those aren't in pins, so you'd have to use microcontroller.pin.
@crimson ferry I'll look into it now since I'm working on the guide. May be that it was changed and not updated or something. I'm not certain.
Because you are correct. There are, if nothing else, things missing.
also, silk says 21 and 42, those I'm pretty sure are ESP32-S2 GPIO numbers
42 is LED, which is D13
the pin names are all the QSTR_xx names. The the GPIOxx names are the internal names, not seen in circuitpython
Fairly certain the LED got pulled off of D13 for this board. Maybe I'm misremembering.
@tulip sleet But not all the board.Dx pins are in there...
At least it doesn't look like it, am I missing something?
15/16 for example?
i think the silk is "wrong", not consistent with other Metros. Should be D0, D1, etc, not 5, 6,7
Hmm. Ok.
i'd ask limor about the silk being not typical\
Ok. I'll do that.
just verified in REPL: D13 == microcontroller.pin.GPIO42 == Red LED
Ok good to know.
@crimson ferry I'm going to be updating the pin def and submitting a PR. Thank you for bringing this to our attention.
just fyi, I use this to programmatically verify microcontroller-to-board mappings https://gist.github.com/anecdata/1c345cb2d137776d76b97a5d5678dc97
same as pins.c basically, but sometimes easier to visually parse
@tulip sleet Ok, so I have a circuitpython dev environment set up. I did a fetch/merge on main. Create a branch, change the pin.c, then I'll need to build to test it, yes? Is that where the submodule updates come in? Or do I need to do that first? or not at all?
@crimson ferry Nice thanks.
git submodule sync --quiet --recursive && git submodule update --init
before you build
ah ok
That's what I needed to know. Thank you.
Have you dealt with the Metro ESP32-S2 yet? I figure it makes more sense for someone else to test my build than for me to learn how to install it yet.
BUT, the regular dev environment doesn't build this, it's much more painful to set up. Maybe just pass me the pins.c and I'll build it for you
what is the issue?
I was thinking the primary name for a pin would be IO## and the backup would be D#
the IO## would match the silkscreen and ESP numbering
but the D# would match other metros
Limor asked me to update it to match the silk.
so that the D#s match?
the silk could show both numbers
I like that, maybe bring it up with her. It would make much more sense for wiring/shields, etc
That was my understanding, but I will clarify?
seems like it's limited by arduino
did you see the discussion in slack?
ya, just caught up on it
What are your thoughts now, then?
not nice things about arduino 😛
where does the D come from in arduino
@idle owl that's what I did for the feather s2
is have both D and IO names
@slender iron Alright, then I can do that. They match the silk.
and the D names will work for code that uses those
should i hold rc.1 for this?
or is esp32s2 too alpha to worry about it?
right, anything -s2 I'd just do in 6.1
and we should release a 6.1 pre-release once 6.0.0 is stable
excellent point
there are other fixes in 6.1 for s2 already I think
@slender iron @idle owl should i propose this compromise over in slack?
IO/D names.
I think it's fine. More options isn't a bad thing.
IO5 == D0, etc.
with different numbers right?
FeatherS2 pins.c is really nice, includes A*, D*, GPIO#, any named pins, e.g., microcontroller.pin.GPIO13 == board.A2 board.D16 board.IO13 board.LED
You'd be better to pose it than me. I tried typing it out and realised I was out of my element.
the problem is that arduino will call it D5
Arduino calls it 5, not D5
ah
I think
¯_(ツ)_/¯
I think the silk should be revised to have both numbers
Ah.
it is a BETA board
Ask Limor about that one obviously.
the silk just has numbers for most pins
otherwise there's terrible code incompatibility
so the question is what prefix do you use
right, I'm saying it has to be redrawn. I'd use no prefix for Arduino numbers, and D for CircuitPython
IO should be available as well, I agree with that.
I like the IO prefix for the esp numbering
otherwise it's a support nightmare to write guides with interchangeable code
I'm saying they will. FOr instance the corner pin will be labeled "D0 - 5"
the current silk is not sacred
@slender iron TX and RX are listed as D0 and D1 in the pin def, but they're not separate from the debug pins in the schematic. Am I missing something or are the debug pins both UART and UART debugging?
that I don't know, I"ll look at the schematic
Schematic only shows them once as TXD0 and RXD0.
what is pin IO 5?
D5
is it RX
I thought the pins on the inside headers were different from the TX and RX broken out
@tulip sleet No.
@slender iron is there a reason that we don't currently use gpio_reset_pin in the Microcontroller Pin reset functions for ESP32S2? Thinking about adding that in there, since the RMT not releasing pins automatically makes me suspect most other peripherals probably don't either.
I figured that much
whose on first?
right?
the schematic says D0, but I think all the "D"s in the schematic could be chnaged to "IO"
This is not D0 in terms of CP.
ok, then it's se[arate
@ionic elk I'm not sure what the reason is. maybe check the history just to see if I didn't switch away from it?
ok, should i write this up in slack?
This PR adds a pin reconfiguration step at the end of Neopixel write, which should solve the issue where any previously declared Neopixel pins would receive the same pulse outputs as newly declared ones. An alternative to setting the pin to GPIO output could be using a full gpio_reset_pin() here instead.
(I'm glad I'm not the only one who was confused about the pins 😉 )
You are certainly not.
at some point we'll stop caring what the microcontrollers number is
@atomic summit why is IO5 in the feather S2 pins.c also labeled D19?
where does the 19 come from?
after 18 and before 20? 😉
if you look at my point I have D14, D15... D18 next to each other, and the next pin is IO5, so I made it D19
there is no arduino mapping, is that right?
Every other pin has a Dx assignment, so why not IO5 ?
The question is why 19, not why does it have a Dx assignment. e.g. Why doesn't it match the IO#. I believe you have answered that.
all of the numbers on the feather s2 silkscreen are the gpio number from the esp chip right?
ok, and the D#s I'd expect to match other feather pinouts
This is coming out of a discussion regarding the Metro, for some context @atomic summit
You did the original Dx assignments @slender iron
@idle owl Ahh, ok... context helps.
I think I snagged them from the schematic
Not the Dx assignments.. they were "made up" from what i can tell, from you.
They never matched the IO or cpu pin numbers
(we're also trying to rectify arduinos numbering from cps)
sorry, made up is not right..
I'd expect them to match this feather: https://www.adafruit.com/product/3857
I mean, they were assigned based on whatever you matched them to.
i think we may have the first arduino-shaped ESP32S2 board, is that right? We could not do our own BSP, too much to support
I think the crux of the problem is that in ESP land the gpio numbers are usually used on all boards
The whole D/A assignments in the Arduino ecosystem really sucks btw 😉 Very "not ESP32 like" 😉
and in other platforms you have a level of indirection between micro numbering and arduino A/D numbering
but adding D19 for IO5 is easy enough in pins_arduino.c
but I honestly, only chose 19 because it wasn't used and has nice numbering flow for the pins around it
it was sequentially the next Dx number
@idle owl I think the way to document the Dx pins (if we have them) is to annotate a board photo with the Dx pin numbers right next to the silk numbers (on the inside or outside)
But you want them to match the previous Metro layout? So not match the silk?
I would NOT have a D0 that's in a different place than all the other Metro D0's. I would have IO5, and maybe also have D0 as an alias for it.
I've honestly never bothered with Dx and Ax numbering on my boards for Arduino before. From my experience (very possibly a different target market to Adafruit) most ESp32 users use GPIO numbers, not Dx and Ax.
Not matching the silk seems like a terrible idea, tbh. I'd rather ditch the Dx pins altogether and document that than to not match the silk.
People won't read the guide.
They'll wire something up instead.
and get it wrong.
And create a support nightmare where, yes, we documented it, but Carter's stuck pointing folks to the page on a regular basis.
that would be fine. But if anyone wanted to adapt an existing program to an existing shield (like say a motor driver), then we would just let them figure it out?
the only reason to have D# in pins.c is so you move code from another metro
exacto
looks at the feather m4 guide
I'm obviously on board with cross compatibility but folks won't read the guide.
Folks never read instructions 😉
do you agree that IOxx is better than Dx that are in different places?
I think we should have them in pins.c but not document them in the guide
I know it's not normally something you do, but I get around all of this by providing pinout sheets with each board. Then they have a pin reference on hand.
@slender iron And have them match the previous Metro pinout for the Dx pins?
No need to hunt down a guide or read anything
We kind of do have to document it, because how do we explain why the code from the other Metros works?
"Use board.IO5 but hey, this other code works without editing it."
the problem is if someone gets a Metro ESP32S2, with no doc, and then tries to toggle D5 (instead of IO5)
Yes.
right
so i think having both D0 and IO5 makes for potential disaster
this is why it's stupid to number on the board based on the micro's numbering
the board pinout is an api
so it could be D5 is the corner pin (which makes for confusion in the software, not the board), or IO5 is the corner pin, which makes the the software nonstandard but safer
If the pins are IOxx only, no Dx, then no chance for error, assuming they have the board in hand,
Correct.
it's all varying degress of bad
Agreed.
But using IO only would mean we're creating a new API in a sense, for a new chip.
So I guess what's better - other Metro code just working, or pins matching the silk for all future use.
We already have code where it's got multiple boards in it
and code for each board.
That's not new.
yah, whole new kind of pins. Limor thinks the silk is ground truth
so go with that
there are some non-Adafuirt CPY boards with pin names like GPIOxx or Pxx or other non-typical prefix
There's already three warnings in the CircuitPython Writing Code page about the LED being o a different pin. None of this breakage is new. Just not on this level yet.
I'd definitely do them as IO#
Alright, we're agreed. IO only. Document it. New API.
i think that's the safest, at the expense of incompatible code
Avoid the A0-A5 as well then?
no, those are fine, because they're on the silk
the silk is ground truth
Ah right they are labeled as such.
the only reason for "IO" is that pins can't be integers
Adding the IO for those too though.
Actually it doesn't match.
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO18) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO1) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO2) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO3) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO4) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) },```
Is what I have right now.
I'm not sure you need those, it doesn't add value to CircuitPython
Scott mentioned ESP folks use them. Wasn't sure if it was worth being consistent on that then.
i don't know if certain GPIOx are special, or whether they're largely interchangeable
yeah, but they use that when they're writing Arduino or straight C code
Arduino
@atomic summit are certain GPIOxx pins special in some way, or is there a crossbar?
GPIO is the way folks work with ESP32. Only folks that don't are maybe newbies to the ESP32 that are used to using Dx/Ax.
@tulip sleet both. Some are strapping pins
which trips new folks up
most IO can be used via the crossbar - but not all peripherals can be re-assigned, but most can.
IO0 is the only pin on my FeatherS2 that is an exposed strapping pin.
@tulip sleet Would you include the IOx pins for SDA/SCL/SCK/MOSI/MISO?
@idle owl yeah I guess so, so maybe for A0-A5 too. in case someone is translating an existing C program to CircuitPython.
Is IO45 exposed on the MetroESP32S2? That's a problem pin is exposed.
I think if we stay away from the Dx, that's the main thing
OK. I need to head out for a bit to pick up brakes for my car. I'll continue when I return.
as it decides the flash voltage, and can cause havok.
oy, well, I'll look at our schematic
it used as an output
IO46 is input only, but not on an ADC and no Touch, so generally not a useful pin anyway
IO45 is connected to the NeoPixel
That's ok. I use that for my APA102 as well.
IO45 and IO0 are free to use once the device has booted
@atomic summit whats the core question you've got regarding the ESP32S2 metro?
we were just trying to decide whether to expose the IO names for A0-A5 and for SCL/SDA< etc.
@meager fog Oh, Dan asked if there were any problem IO, and I just pointed the 3 strapping pins out and asked if IO45 was used by the MetroESP32S2
@tulip sleet yes expose the IO names for those pins
lurking and taking notes
@tulip sleet since kattni is out, scott is thinking about it - lets table til tomorrow?
we decided not to expose any Dx names for now: too confusing; just IO
okee dokee, Kattni will do an edit and I'll build for her to test in real life
gah - it's all about other people's standards (so many standards to choose from)
🙂
I'll finish it up tomorrow and send you the file @tulip sleet
standardises everything by adding an extra standard
It's mostly done. Once tested I'll put in the PR and tag Limor.
@atomic summit I feel like I'm pushing ESP32 arduino to match samd arduino
@slender iron but you can in the pins_arduino.h by just adding them in the board variant... or am I missing something?
Or are you asking Espressif about a standardised default pin mapping?
you cannot remap pin IO '0' to '5' unless i am seriously missing something
Oh, no, you can't remap an IO, but you can make "aliases" for them.
in .h you have to use variables like D5
thats not how it works in other bsp's like samd or nrf where pin 0 can be 'any pin' you like, there's a reindexing array
But isn't that done in the "bootloader" level for the MCU? not at the higher Arduino level ?
?? no
Ok, I never knew that was possible - very cool!
wait, isn't that just assigning what the IO is (peripheral wise)? not what number it is?
Or does the initialisation order change the numbering?
I think the number is the index in that array
Ok, yeah, that's very cool 🙂
@meager fog is there a way to have an empty entry?
Nothing like that is available for ESP32 that I have ever seen.
k, that's what I filed an issue for
I'd much prefer to have it for all the boards I expect to see
my head already exploded having it different on the metro
You might want to add the link to that example to the issue so it's clear what you are after.
@fathom raptor https://github.com/adafruit/ArduinoCore-samd/blob/master/variants/zero_radio/variant.cpp#L193
thank you
For an onboard LED we usually just name it LED. I'd suggest switching to match other boards.
Yup, this has been done already. Sorry for the issue being open!
Fixed everywhere I called common_hal
Removed all the "status" variables where not required.
@jerryneedell How does the list of root certs compare to those in nina-fw? The connection issues might actually be due to the clock not being set. Checking the debug logging may provide more insight.
merging, only CI failure was a connection issue on unrelated board
Single build failure is a glitch.
Done and thanks for the tip my editor now catches all these automatically.
The small M0 builds are not building with bus device included. I can mark them to exclude it like is done for other libraries?
I did try these two calls within the loop and it slowed the I2C calls down significantly. I'm not familiar enough with them to know why yet. Two thoughts are call them every X tries of the lock, or fail the lock after X tries with an exception.
I suspect we may want specific styles of SPI peripherals that aren't timing sensitive. A simple example is shared memory where the native code implements two standard commands, read and write, and the python code can just read and write that memory. This would work for simple sensors where the python code just updates a value that can be read over SPI.
I have a question about the import equivalency of moving this to the core (I2CDevice and SPIDevice are equivalent to their python originals).
In the python library a user may use:
import adafruit_bus_device.spi_device as spi_device self._spi = spi_device.SPIDevice(spi, cs, baudrate=baudrate)
To call it now they would use:
import busdevice self._spi = busdevice.SPIDevice(spi, cs, baudrate=baudrate)
As the spi_device (and i2c_device) .py files no longer exist is there any pro...
@anecdata If you have code that assumes monotonic clock math and does an unsigned subtract you'll end up with a very large, incorrect positive difference that could effectively hang everything.
I'm open to more precise timing down the road. I don't know a ton about it.
Can we define them as AF_INET = ...? That way the implementation of the number stays an implementation detail.
Looks good to me! I think @brentru will be back on Wednesday.
This looks site-specific, so I think cert-related. I had never encountered the SSL handshake issue with my own server, but I can replicate with the link above. Doesn't matter if the RTC is 2000 or 2020.
Saola 1 w/Wrover with ESP32S2
6.0.0-rc.0 on 2020-10-16
adafruit-circuitpython-bundle-6.x-mpy-20201101
Requests 1.7.2
@dhalbert isn't this a bug? I'd expect the bug label and either the 6.x.x milestone if we're going to debug soon or Long Term if we aren't.
Just a couple minor things! Looks good overall.
How about returning the unit number? I think that'd be clearer: self->unit = pcnt_handler_init(&pcnt_config)
Put this in peripherals. That is where we usually put helper code that isn't directly tied to the micropython bits.
Don't forget to change the copyright. Let's wait for #3615 to be merged and then update this PR for the pcnt sharing code. Thanks!
Now it will return the available bytes instead of waiting for the time out before doing so.
Also, tweak IDF settings to reduce memory footprint.
It is a bug that I marked it with the wrong milestone :)
@siddacious yeah, if you just want to write async/await code you should take a look at tasko https://github.com/WarriorOfWire/tasko
If you want to implement your own event loop from scratch then grab a coffee and follow along with David Beazley https://youtu.be/Y4Gt3Xjd7G8
In fact, watching that video might be the best recommendation on the topic I have in general.
spi = busio.SPI(board.SCL, board.SDA)
Really? https://github.com/adafruit/Adafruit_CircuitPython_SSD1327 I guess the docs say it works with I2C or SPI, but ...
Automated website update for release 6.0.0-rc.1 by Blinka.
The pins look good, and this fits with the results of our conversation.
It's not obvious which pins are the default board.UART(). GPIO5 is RX and GPIO6 is TX. Even though they're not labeled, shall we add TX and RX as aliases to IO5 and IO6?
Having issues w/ the Matrix Portal and the internet demos. The only internet demo that works is the Quote board matrix display.
It takes a very long time (~30seconds-1minute) to get a wifi connection and grab quotes even with this. Serial shows these types of errors while connecting -
Socket missing recv_into. Using more memory to be compatible
An error occurred, retrying! 1 - Failed to send 3 bytes (sent 0)
Again, the quotes demo is the only one that worked. Getting errors in both ...
Failed check is a GitHub Actions issue.
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/16su5imU6eg-sZaXiISO-vXuzjJSQpimzePCc5NDfD-E/edit?usp=sharing
@slender iron Can we delete master on circuitpython? At least twice in as many weeks, I've ended up on master and been confused about things missing.
i agree
@tulip sleet You up for another discussion? I imagine this one will be much faster than yesterday's. 😄
sure
I need assistance naming the page in the guide where I document yesterday's decision.
I have "CircuitPython Pins" right now.
Eh?
Doesn't seem quite descriptive enough but it also shouldn't be a super long title.
CircuitPython Pin Names ?