#circuitpython-dev
1 messages Β· Page 343 of 1
I can remove this. It came from microcontroller.nvm.
Pasting helpful discussion from discord with @igrr about using RTC memory:
igrr Yesterday at 1:31 PM
That's risky, i think. I would suggest defining a static array of the size you need, and giving it RTC_DATA_ATTR. It will be automatically placed by the linker, and in case there is some other stuff placed into RTC_SLOW, the linker will check if everything fits.
οΏΌ
danh Yesterday at 1:32 PM
so then we should turn off CONFIG_ESP32S2_RTCDATA_IN_FAST_MEM
[1:32 PM]
i guess
οΏΌ
igrr Yesterd...
Based on my discord conversations with @igrr (see transcription below in comment), it sounds better to allocate a fixed chunk of slow or fast RTC mem with RTC_DATA_ATTR and have the linker handle mapping the chunk. There is other functionality (ULP, and IDF heap) that wants to use fast or slow RTC memory, and it uses the same linker map mechanism, As I mentioned, the power required for keeping the memory persistent is minimal. Given that we can have ULP alarms too and ULP also needs to use ...
Hi there,
Today I did some tests with the DAC.
This is the software I use making the tests
import audiocore
import audioio
from analogio import AnalogOut
import board
import time
import digitalio
import array
# Trigger signal for oscilloscope
Trigger = digitalio.DigitalInOut(board.D4)
Trigger.direction = digitalio.Direction.OUTPUT
dac = audioio.AudioOut(board.A0)
def play_sequence(sequence):
data2send = audiocore.RawSample(sequence, sample_rate = 1000)
...
This has occurred a few times with a Feather nRF52840 Express running CircuitPython 6.0.0 with minimal output across serial. It happens to be plugged into a Pimoroni Enviro+ FeatherWing with a PMS5003.
has anyone else noticed issues with copying files over to a device with CircuitPython 6 & macOs?
every board I've programmed since 6 will sometimes just outright lock up my system for a bit when copying files over.
after a few tries I can get it, but it is definitely annoying.
On Linux I haven't noticed any difference between copying files to 5.3 or 6 versions of circuitpython
@onyx hinge I know it is weekend, but I just felt like celebrating that I finally wrapped my head around the code structure and managed to add another element to the Wi-Fi environment. The Country Code may not be that spectacular, but served as my first attempt. My question would just be, if there are any contraints if I'd add more elements or if the memory is "that challenged" that we may want to save the space?
Please note that an explicit call to esp_sleep_pd_config(.., ESP_PD_OPTION_ON) is not required:
If some variables in the program are placed into RTC slow memory (for example, using RTC_DATA_ATTR attribute), RTC slow memory will be kept powered on by default. This can be overridden using esp_sleep_pd_config() function, if desired.
(whether an...
@igrr Thanks, I was wondering putting something in that section would trigger making sure the power was on.
v5 of the BHB board has:
- GD25Q64C instead of the GD25Q16C.
- Pin PB10 tied to ground for board revision detection.
just to check - does it create the right filesystem size if it finds the larger chip?
radiskull, we haven't tried that ourselves so good to hear
Not sure why you want to name this pin. Is it so on earlier versions you can write code that sets its .value to False?
There has been a fix for the SHTC3 not coping with a soft reset: https://github.com/adafruit/Adafruit_CircuitPython_SHTC3/pull/3. But this problem persists on the ESP32-S2 (I'm using a FeatherS2). The code below works fine on a Feather M0 Express.
My code:
import busio
import time
import adafruit_shtc3
i2c = busio.I2C(board.SCL, board.SDA)
sht = adafruit_shtc3.SHTC3(i2c)
while True:
print(sht.temperature)
time.sleep(1)
Running on this Feather:
``...
Basically there will be a little check like this:
v5_pin = digitalio.DigitalInOut(board.V5)
v5_pin.pull = digitalio.Pull.UP
if not v5_pin.value:
# v5 or later
else:
# v4 or earlier
v5 has a different front-end for the analog input that has a wider range (it's -5v to +5v instead of -2v to +2v), so I need to detect this in code so I can configure the ADC correctly.
We could install directly from source in our requirements.txt:
git+https://github.com/readthedocs/recommonmark.git@e821106#egg=recommonmark
I'm happy to send a PR to do this if y'all want.
@onyx hinge hmm. I'll try on my Windows machine next time.
@ivory yew I've noticed Finder locking up during transfers, can't quite correlate if it's 6.x or Big Sur when I noticed it
Looks like an unrelated CI job failed (an xtensa board's build)- I'm not sure how to kick the CI to retry it.
Looks like an unrelated CI job failed (an xtensa board's build)- I'm not sure how to kick the CI to retry it.
This looks like a transient failure of something that's supposed to be cached, so we can skip a retyr.
.. and another build is stuck for different reasons
Hi, saw your comments on my PR, so just dropping in my 2 cents.
Does it behave differently with another I2C device?
When I was testing originally on SAMD21 I through I noticed different behaviour between busio.I2C and board.I2C - not properly closing/opening the I2C bus after soft reset. Could this be similar?
I don't have an S2 to test with unfortunately :(
@slender iron ULP functionality is not complete in idf@v4.2... idf@bd2d70 is needed for it to work.
I've seen some pretty fat things in my day. ```Mode LastWriteTime Length Name
-a---- 12/9/2019 5:05 PM 112465 Arial-ItalicMT-23.bdf```
I smashed my phone, now trying to recover all of my account re-install on a backup phone. Somehow, I recovered I @timber mango but not @half sedge that might be attach to my work email (but it is me and both are in CircuitPythonistas so it should be OK for the voice meeting).
The fight for recovering 2 factors authentication will be less fun... but I'll give it a try.
Yes, it is also my horror scenario. Good luck David and strong nerves through the process.
Apparently, I am going to receive an ESP32-C3 dev board... just because I sended an email to someone from Expressif (following a tweet that they were doing that give away). So I really hope Adafruit key people such as @slender iron will get one too (that is the feeling I got by watching his deep dive), and work on a port of CircuitPython on that board... π
doesn't it lack native USB ? (it just has an integrated USB-serial and jtag)
hopefully we'll have CPY over bluetooth next year though
Tested a DS18B20 temperature sensor (with the appropriate resistor) on a Feather S2 and other boards (like Feather M0 express) and the device is not found on the S2. I think I correctly checked it's connected to the right pin (it throws an error otherwise).
Feather S2:
import board
from adafruit_onewire.bus import OneWireBus
ow_bus = OneWireBus(board.IO17)
devices = ow_bus.scan()
print("Devices:",devices)
code.py output:
Devices: []
Feather M0 Express
`...
Dunno, all I know from the board is from the deep dive, and I felt asleep or missed the start the two last time.
Yeah, maybe this is underpowered...
The fight to disable 2FA is over! The two me are working!
It looks like the C3 is a single core ESP32 with the Crypto peripherals of the S2 but not the USB of the S2. https://www.espressif.com/en/products/socs
Espressif offers integrated, reliable and energy-efficient wireless SoCs, including ESP8266, ESP32 and ESP32-S series. The SoCs, integrating Wi-Fi, Bluetooth and AI functions, can can bring to life a wide variety of application scenarios.
A kind of modern ESP8266... that could be my first Risk-V (fpga excluded).
It is pin-compatible, so no new PCBs necessary if you come from ESP8266 - but the SW still needs to be rewritten. I guess the HW-pin-compatibility is the reason why they didn't want to give up the pins for the native USB.
And since Adafruit stopped the support for ESP8266 because of lack of native USB... except for the long term BLE console and code upload, there might be no hipe like there is for the ESP32-S2. π¦
Time does march on.
Itβs not as if Adafruit has infinitely deep pockets and infinite resources to apply to sustaining prior products
it's more that native USB is required by CPY to give every board the same user experience, since the objective is learning and beginners
lol ... I think I precisely stumbled upon an ESP-IDF bug with my attempt to add the country code to CPY Wi-Fi module. It works fine during scan and later on the corresponding element is empty after esp_wifi_sta_get_ap_info() should have returned it.
We should be fine space wise on the ESP32-S2. It's the SAMD21 modules that are tough to add to
Ya, I emailed to get one. I would like us to expand to a BLE-only workflow but am not sure what the timing will be. That'll enable micro:bit v2 too
I ordered micro:bit v2 from Digikey. I didnβt know this will be a thing for CPY. Cool π
Hi. That's a really good point, I haven't tried another I2C device on it yet. I'll give it a go and get back to you!
Please file an issue. We can ask Thach to take a look. 6 has new TinyUSB so that may be the issue
@hearty tapir I would like to get there. I don't think there is that much work on the BLE workflow side
I'd rather get us to a more stable branch. Is that the only commit needed? Maybe we can convince espressif to merge it into 4.2
Iβll try a plain esp-idf with the sta-ap-info function in c code tomorrow and file an issue with espressif if it is indeed the idf.
https://github.com/adafruit/Adafruit_CircuitPython_Display_Text/blob/master/adafruit_display_text/label.py#L257 hey pal who says a font has to have an "M"
The "Expressive Pixels" stuff from @prime flower does not work on my Matrix Portal + 32*64. The device is not visible as a serial port when flashed. So I wanted to test my hardware... and went looking for the "Sand Demo". I don't know if this is Circuit Python or some UF2 that just need to be drop in MATRIXBOOT, but I cannot find that in any learn guide. I find the Handle, I find a Raspberry Pi version, but the basic demo that was supposedly on the board when shipped from Adafruit is "Not Found". If anybody know where to find or if there is some seach trick in the learn system...
https://marknelson.us/posts/2014/10/19/data-compression-with-arithmetic-coding.html I wonder if the code size of an arithmetic or range-based decoder would be small enough that it gives smaller FW than our huffman based version
that sounds like the UF2 bootloader; does the MATRIXBOOT drive contain a file named INFO_UF2.TXT?
Yes, I know it's the BOOT. I can either put back CircuitPython or the Expressive Pixels, or if I find it, the Sand demo (if it is a UF2).
@thorny jay I've copied the UF2 file before overwriting it. enjoy !
(I should have renamed the file, it's pixel show UF2 for the matrixportal + 64x32 matrix #adabox016 )
Smartmove! Thank you.
When I got mine, I did only have a 64x64 and I overwrote directly not knowing about the demo.
you're welcome π
Adafruit Learn: CircuitPython Basics: Digital Inputs & Outputs: Digital Inputs mentions digitalio.Pull.NONE. I put some feedback in as that does not exist and I'm not sure it ever has, doesn't appear in CP 2 docs.
@igrr If we used RTC_FAST_MEM, is this also still automatic? The ESP32S2 doc does not mention keeping the RTC_FAST_MEM powered up (the link above is for ESP32). Thanks.
Having looked at the code, it seems that RTC_FAST is simply powered on by default. It used to be so because on ESP32 revision 0 we would always need to enable deep sleep wake stub, to work around a hardware bug. Then we didn't change this for the ESP32-S2 in v4.2 to reduce chance of breaking someone's code.
I think we might need to wait until the next major release (v5.0) before we can start automatically powering down RTC_FAST memory if nothing is placed there.
Adafruit Learn: CircuitPython Basics: Digital Inputs & Outputs: Digital Inputs mentions
digitalio.Pull.NONE. I put some feedback in as that does not exist and I'm not sure it ever has, it doesn't appear in CP 2 docs.
Fixed in the guide. Thanks for spotting this.
Finally received my new SPI flash to test out some new additions for Circuitpython π
?serverinfo
e0afa32:
- Use
RTC_DATA_ATTRforsleep_memoryarray. Right now it's in RTC slow mem, could be changed to fast mem later with config optionCONFIG_ESP32S2_RTCDATA_IN_FAST_MEM, but not necessary now. - Remove superfluous
bool()operator. - Rely on ESP-IDF to do power control (per conversation with @ igrr).
- Normalize argument order for set_bytes and get_bytes.
If I don't make it for the meeting, just put me lurking. I took a few notes over the week, likely complete.
@idle owl I'll be missing the meeting this week. Nothing to report, again...Have a great week!
@solar whale Have a lovely week yourself! I hope you're well!
All well here -- just still tied up with work... The end is in sight π
@solar whale That's good at least π
<@&356864093652516868> We'll have our weekly meeting in the voice channel in about 1 hour from now. It's a great time to add your notes to the document, https://docs.google.com/document/d/1e1miP8rVwwTqvVSJ2tgXj8NzGZ4FctSDwVKyfVV27aM/edit -- or at least add your name as a placeholder if you're planning to speak in the meeting. See you there!
CircuitPython Weekly for 14 December 2020 Welcome to the CircuitPython Weekly meeting notes! Feel free to add your Hug Reports and Status Updates early. During the meeting, we go through them as a round robin sorted by username. If you canβt make the meeting and would still like to participate,...
#CP #MagTag question - sometimes it seems like my MagTag must be manually reset to get the USB to allow directory listings of its drive. ( I quickly pressed reset and got the drive to come up so I could install MagTag_Christmas_Countdown/code.py to it.
( didn't see an issue listed, but trying to learn what data to collect next time it happens )
@tulip sleet If I use the base QT Py firmware on a soldered up QT Py Haxpress, it will act like a base QT Py for testing purposes, yes?
yes
Excellent thank you.
I can relate to that. Does it occurred while sleeping? With the USB plug or unplug
I was in "Pretending to deep sleep until alarm, any key or file write." mode, but I recall that windows update triggered a reboot also since last connecting to the #MagTag
When in doubt I reset... but maybe I should worry.
I seem to reboot at least once a week, but I had left my USB cable connected the whole time
Is it faster to flash the ESP32-S2 with UF2? I feel like the UART upload with make flash is pretty slow
@slender iron is https://github.com/adafruit/circuitpython/issues/1717 obsoleted by sdcardio / sdioio ?
@ladyada says this code is solid: https://github.com/greiman/SdFat
ya, I think so
We improved SD card performance when we added the sdioio & sdcardio modules in 6.0.
I wouldn't think it would be faster, unless there are significant delays put into esptool.py
we're running late - will be here in a few minutes
yes
@solar whale glad your'e okay, hope to see you back in the meeting soon
Lurking
If you're planning to speak in the meeting, but haven't put it in the document please let me know and I'll add you. We'll be getting started shortly! https://docs.google.com/document/d/1e1miP8rVwwTqvVSJ2tgXj8NzGZ4FctSDwVKyfVV27aM/edit If you're new, please request to be added to the "Circuitpythonistas" role so you can speak in the voice channel.
CircuitPython Weekly for 14 December 2020 Welcome to the CircuitPython Weekly meeting notes! Feel free to add your Hug Reports and Status Updates early. During the meeting, we go through them as a round robin sorted by username. If you canβt make the meeting and would still like to participate,...
** lurking **
add calendar to your calendar app: https://raw.githubusercontent.com/adafruit/adafruit-circuitpython-weekly-meeting/master/meeting.ical
Python has become one of the most popular programming languages in the world, meaning that along with this growth the Python community has c...
This is Piunora. A carrier for the @Raspberry_Pi CM4 in an @adafruit Metro/@arduino form-factor.
It features full-size HDMI, USB-C (data+power), USB-A, M.2 (PCI-E), RGB LEDs, 6xADC, Button, camera connector and a Qwiic/Stemma QT.
Check the thread for more pictures and info
#OSHW
109
525
To contribute your own news or project, edit next week's draft on GitHub and submit a pull request with the changes. You may also tag @anne_engineer on Twitter, or email anneb AT adafruit.com.
I think I understood from Tannewt in our internal meeting that these statistics are from 1 day ago instead of from today, so some names may be omitted or some may be mentioned from last week's activity.
On the contributing page, you'll also find info on how to help translate error and control messages in the CircuitPython core into a language you speak/write.
Wait, this is even better... this is the Adabox firmware. I was more seaching for the Adafruit Sand demo as seen in this learn guide: https://learn.adafruit.com/matrix-portal-sand
You can use cookie-cutter for your own libraries too, though there are settings that have to be changed. Highly encouraged if you want to contribute your library to the Community Bundle.
Indeed it is encouraged!
Looks good to me! Thank you!
She had such a cool project too
Error 500: https://learn.adafruit.com/products/4745/guides (that is supposed to be the list of guide for the Matrix Portal as linked from https://www.adafruit.com/product/4745) and that was working yesterday.
no spoilers π
@thorny jay where did you find the guide list link?
For Matrix Portal? It's from the product page.
Oh gotcha. It's the See All Guides link. thanks
Used to work, or at least it worked a few days ago.
Seems to be broken for other products as well
@thorny jay I just sent an email to the correct people.
Improving on the MagTag Advent Calendar from Liz by giving a bit of "color" to the #eInk balls. I made a small Pull Request with my @CircuitPython code: https://t.co/vNGzNUs78T
Check the learn guide: https://t.co/DexfbhrSGE https://t.co/7Q7MRxeA8E
that looks really good
I like the improvement
The PR seems accepted, but that change is not visible in the guide. I wanted to use transparency for white, and have collored ball behind the digit so that revealed balls are also "multi-color" but I had a hard time setting one colour as transparent, and finding the right one, and stacking the right image on top of each other... so I gave up a bit.
Github doesn't count any of my contributions because Circuitpython is a fork π¦
@onyx hinge how did you find those contribution numbers?
@slender iron this is based on https://github.com/jepler/ -- I am not sure what someone else sees but I have an activity overview graph, and I can click on the adafruit organization to narrow the view to that organization
π
Now "Expressive Pixels" works for me! The only thing I did is to flash the Adabox 16 demo, and then re-flashing the "Expressive Pixels" UF2. The only thing I changed is maybe the USB-C cable, but the previous one was known to work. I have no idea what changed.
I've been doing this for awhile
I haven't been using github quite as long π
Trinket M0 has Dotstar
My contributions table is almost totally blank, since literally none of my commits exist according to Github π¬ Core work aint great for my git resume
No worries @ionic elk. It's not a competition. π
huh
You can fake contribution and write message or graphics in the green thing from GitHub.
Thanks everyone!
Thanks.
Thanks
Thanks everyone. See you next year @slender iron!
@crimson ferry Yes, Trinket uses DotStar, but I think pypixelbuf is needed for both. That began with _pixelbuf
@ionic elk
Your profile contributions graph is a record of contributions you've made to GitHub repositories. Contributions are timestamped according to Coordinated Universal Time (UTC) rather than your local time zone. Contributions are only counted if they meet certain criteria. In some cases, we may need to rebuild your graph in order for contributions t...
Commits made in a fork will not count toward your contributions. To make them count, you must do one of the following:
Open a pull request to have your changes merged into the parent repository. To detach the fork and turn it into a standalone repository on GitHub, contact GitHub Support or GitHub Premium Support. If the fork has forks of its own, let GitHub Support know if the forks should move with your repository into a new network or remain in the current network. For more information, see "About forks."
I know personally the Belgian person on top of the GitHub contribution (from Belgian). Well, it seems he is second this year... or someone cheated: https://commits.top/belgium.html
A list of most active GitHub users in Belgium.
http://git-awards.com/ is one way to search for big contributor.
Discover your ranking on Github! Find out what is your rank by language, in your city and in your country
mmm custard C modules
@thorny jay the guides link should now be working
You have my attention.
Sorry hit enter too soon
the guides link should now be working
I'm gonna drop off now
@tannewt I've changed the pin function to 0 in the pin reset process with PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[pin_number], 0);. In testing, this seems to work ok - I'm not sure exactly what you meant by "Not the DAC because it's analog." but in practice the DAC does not seem to hold analog values on a pin past a reset, and it can't be restarted on other pins. For the SPI pins, I think they're mostly the ones used for Flash, and I don't see weird behavior on 26 with my existing tests. So I thin...
@slender iron want to chat about displayio?
This is related to issue #3782 for adding support for the AT25DF641A 8MiB SPI Flash.
I've included a commented out section in the addition for the other SPI Flash referenced in my comment on the issue. I'm still awaiting the chip and will do another PR to add support once I can verify.
I tested the AT25DF641A on the Qt Py (A little tight soldering this chonky chip) and I was able to verify expanded storage and functionality with the chip.
Passes local pre-commit as well, so there _s...
@slender iron Learn feed just updated. So it worked. I'll still bring it up with PT on Monday.
ugh I broke something. Time to do git magic
@tidal kiln yup, just give me 2 minutes
ok
yah. one sec. mic works in settings but not in channel.
we can do whereby
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/1s3bS3z-5WW_0D5NdlRlKpDB-n_aP6eMbeFvtknM59nA/edit?usp=sharing
CircuitPython Weekly for December 21st, 2020 Welcome to the CircuitPython Weekly meeting notes! Feel free to add your Hug Reports and Status Updates early. During the meeting, we go through them as a round robin sorted by username. If you canβt make the meeting and would still like to particip...
@slender iron can you help to understand if I face a bug or if I'm the bug?
I'm around
I've a commit here: https://github.com/BennyE/circuitpython/commit/210c0ec89c88b50089067f74c2f0893fdd8613b4 I wonder if "const char* cstr = (const char*) self->record.country.cc;" this is valid, as it works during the scan function (that uses the same object, also coming from wifi_ap_record_t country -> ap_country_t). During scan this returns DE just fine, but later on when I'm connected the object country (for which I use country.cc) is empty.
I have the feeling that the esp_wifi_sta_get_ap_info() function doesn't give the full wifi_ap_record_t, so that the country is missing.
To rule out that this has to do with my CPY understanding, I tried to put it together directly in one of the ESP-IDF examples and flashed this to a featherS2 directly. Same result, although I have to use (char *)&apinfo.country.cc while for all other entries I use just apinfo.rssi and apinfo.primary
I'm ready to open an issue in the espressif github, but wanted to make sure I don't make a beginner mistake (which I am) - not to Wi-Fi by any means, but to C/C++ π
git is so much fun
It is also empty when I use (char *)apinfo.country.cc
(so this doesn't appear to make a difference, sorry if this added to the confusion :D)
@hearty tapir sounds like it could be a bug
You know, I chose the country object - because I thought "hey, let's use the simple one as a starter" .. yet another rabbit hole π
next up is authtype
As I have the same result in plain ESP-IDF, I either re-implemented the same bug I did for the CPY commit above or it is really a bug. I'll just open an issue with them and see what happens.
This is related to issue #3782 for adding support for the AT25DF641A 8MiB SPI Flash.
I've included a commented out section in the addition for the other SPI Flash referenced in my comment on the issue. I'm still awaiting the chip and will do another PR to add support once I can verify.
I tested the AT25DF641A on the Qt Py (A little tight soldering this chonky chip) and I was able to verify expanded storage and functionality with the chip.
Passes local pre-commit as well, so there sho...
Thank you, I feel more confident now π
real bugs exist π
took me long enough but I got it right.
I always assume it's me as well. Keep having to step back and remember that it isn't.
@slender iron I noticed yesterday that the ESP-IDF fork on the adafruit repo is missing the /components/hal folder
Ok, I guess I can't do anything else but wait. I've tried some stuff, but probably it was too late at night then.
@slender iron got a sec? I have a few questions about Netconn vs Mbed TLS
sure, have a good lunch
thx
Was this SPI Flash added? If not I can added it to my open PR for adding the AT25DF641A SPI Flash.
The SAMD51 builds I think that use -O2 are all much too large now, so I think they will need to be rolled back to -Os. There is some improvement on at least some of the -Os builds. For example qtpy_m0 de_DE had 196 bytes free and now has 692.
@ionic elk ok, I'm back. still want to chat?
Sure - I can probably describe by text but we could also just talk
either way works for me
Ok I'm in amelia. Gist is whether I should add Netconn objects to our Socket struct or do I need to implement MbedTLS for Bind/Accept/Listen
you can have your pr marked as draft and leave it open
Was this SPI Flash added? If not I can added it to my open PR for adding the AT25DF641A SPI Flash. #3824 See this PR for the issue #3782.
Havenβt submitted a PR for this. Please go ahead and add it!
@slender iron Follow up to my comments last week's deep dive: I got my Propeller 2 today and discovered that the micropython port already supports loading binaries into the other cores and passing a shared array.
@kind river interesting! what is the api?
@tulip sleet damien expects 1.14 to be released in the next few weeks. seems like we could target it
core=machine.Cpu()
core.start(code, data)
with code being a bytearray and data being an array
On the other hand, I tried adding the code in the _bleio/Adapter.c file within 'ble_stack_enable' function (right after the section where 'opt.common_opt' is used for 'conn_evt_ext'), compiled without any errors and it works!
Nice!
Question 1: Any idea on the reason why the same code is not working when executed within 'board_init' function? How can I make sure that this function is actually executed during startup?
It might need to be run after the BLE subsystem is initialized.
...
@kind river neat! I like how simple that is
Ok, thanks @BennyE. I'll close. We can always reopen if we see it again.
Ramping up and down the DAC output to a static value does not make a sence to me. It will always jump from the initial level to the first in the array. I would recommend to init the DAC quiescent_value to the first value of the array. After the array is played, keep the last value.
I'd be ok with this change. That sounds reasonable.
How can I debug the C code during runtime? In CircuitPython I can use print().
In C you can do mp_printf(&mp_plat_print, <format>, <variables>);. I...
Is Weblate rebasing and merging? That could cause this weird commit history.
OneWire is bit banged so it might be digitalio or timing related.
I converted this to a draft while you sort out the CI. Undraft once it's happy and I'll review.
Why? Errors are harder to document than return values. Are there multiple values you could raise?
I'm not a fan of OTA because it doesn't mean anything to newcomers overtheair would be clearer. I think dualbank is best because it could be used more broadly. @dhalbert What do you think?
Thank you for the additional comments! Just a couple other comments.
I don't think auto-increment is a good idea. If it's chunks, then it's easy enough to track the offset yourself. It's idempotent then too.
Looks good to me! Thank you!
Thanks @slender iron
Found a time bug on the Wio Terminal. After releasing the display, time.sleep() doesn't work as expected.
Adafruit CircuitPython 6.0.0 on 2020-11-16; Seeeduino Wio Terminal with samd51p19
>>> import time
>>> time.sleep(0.1) # works as expected
>>> time.sleep(0.5) # works as expected
>>> time.sleep(1) # works as expected
>>> import displayio
>>> displayio.release_displays()
>>> time.sleep(0.1) # fail: keeps sleeping until KeyboardInterrupt
>>> time.sleep(0.5) # fail: keeps sleeping until KeyboardInterrupt
soft reboot
>>> import time
>>> time.sleep(0.5) # fail: keeps sleeping until KeyboardInterrupt
>>> time.localtime() # shows an incrementing time
hard reboot (unplug it)
>>> import time
>>> time.sleep(0.1) # works as expected
OTA to me implies there is some wireless update capability, but the wireless part is not actually in this API. In fact, it could done over USB, for instance. dualbank describes a particular technique, though it's also some technical jargon. How about 'live_update`? That is the functional description: an update can be done while the current firmware is running.
Yes, I would make this idempotent.
The use of both a long and short lifetime heap is different from MicroPython and probably worth mentioning in your docs, for example at
https://circuitpython.readthedocs.io/en/6.0.x/README.html#differences-from-micropython
- It's an opportunity to brag about a performance optimization :-)
- It's a pretty significant change behind the scenes, and it might catch people doing VM extensions by surprise
Things that don't move around in MicroPython between compile-time and execution...
Somebody please add a Documentation label to this - thanks!
hey, I am new in circuit python, anyone please help regarding this query "how to implement deep sleep stuff in Adafruit ItsyBitsy nRF52840 using circuit python".
auto-increment is for continuous chunks... the offset property is only required when flashing in discontinuous chunks.
so many name ideas π... let me add one more use case of this module... that being dual-boot functionality.
This module can be used to switch between:
- different versions of circuitpython
- different platforms like arduino, circuitpython, idf etc.
There is no harm in calling this multiple times after ota partition is completely written.
I want users to not call this each time they flash a small chunk of the firmware.
The finish() function was not present in the initial api and was a part of flash().
Reason for factoring it out is because flash() is called multiple times when flashing small chunks and I don't have a way to figure out if the firmware is completely written.
@kind river @slender iron this is kinda similar to what I am doing with ulp risc-v core of the esp32s2...
so esp32s2 has a ulp FSM and the risc-v core... I think I should useFSM for sleep... can we have a separate api for for risc-v core?
This isn't a simple task. Why don't you open an issue for it and we can give pointers there. discord will make it hard to find
why have two apis?
risc-v is just another core and doesn't need to be related to sleep...
while FSM is a sleep only thing
I think risc-v is more interesting and where things are going
can you fix the ULP stuff in the 4.2 branch or are there too many changes needed?
the functionality in the idf current master is still very broken...
its better to just delay ulp for now until idf is stable
kk, hopefully it'll be better in 4.3
espressif has already responded to my esp_wifi_sta_get_ap_info-related issue at https://github.com/espressif/esp-idf/issues/6267 they have a fix under internal reviewing.
Hi @kbanks-krobotics , if you navigate through the latest builds and choose d076296 or d6ee17c from "Absolute Newest" on Amazon S3 - you can validate the above merged fix. :)
The board looks cool, @analog bridge π
thanks...! π
At this time, weblate is configured to merge origin/main into its pull requests whenever main is updated. Several months ago you requested that I change it to merging instead, so that the history of Github Actions on the PR could be more clearly seen. However (and I don't know if there's something specific to how weblate is operating here), github is displaying the result confusingly, and in particularly it shows lots of commits that occurred on the main branch as though they are part of ...
[no testing performed, but checked that Dan's earlier requested change was incorporated]
Looks like this needs manual attention due to translation changes on the main branch.
[CI failure was a network problem]
Looks good! Yes, just do a merge from upstream, try make check-translate and if that complains , a make translate.
I think issue #3750 can be closed now...
https://github.com/adafruit/circuitpython/issues/3750
good morning!
Hey @tannewt This is on hold at the moment... I am waiting for i2c bugs to be ironed out. Also, I need to implement the ACK part.
@onyx hinge G'morning!
Good morning
@ornate breach I still haven't had the chance to try out that qtpy battery board I picked up a couple weeks ago. I had to choose between putting a qtpy haxpress and an itsybitsy m4 in a project, and chose the itsybitsy
I've got plenty of those
Hehe
Let me know if you have any issues when you get around to using them π
Once I run out of boards (including unbuilt boards) rev b will be coming
Smaller footprint, reverse voltage protection for 5V when battery and usb are connected
nice
random thought, though I don't know how "full" the board is. You could include a voltage divider and a cuttable solder jumper to one of the qtpy's analog inputs for rudimentary battery monitoring
or if you have the space but are component count conscious, put unpopulated smd resistor positions
Not a bad idea
[should have been an image, not a link]
Iβll put it on the bottom
@fiery silo following up on @idle owl @tulip sleet - @fiery silo you might be losing internet connection which could be causing this error. I would try to add a big try and except and a pass around the program to see if you get anywhere first. This is just a first guess.
As of gcc 10: -finline-functions is now enabled at -O2 (https://gcc.gnu.org/gcc-10/changes.html). This may explain the large growth of -O2 compiles.
I really want there to be a 3-pin STEMMA to STEMMA QT/QWIIC connector adapter. I realise you'd have to use SCL or SDA as the signal pin, and that might mean limitations, but still. How convenient that would be. Plug a NeoPixel strip or servo directly into a QT Py.
Iβm going to start using 6 pin SH connectors for SPI
@idle owl I was actually thinking of doing a project like that. Kinda sad to know that connector doesn't exist
I made myself a stemma QT to female JST PH 3 pins to connect a QT PY and a 30 LED strip (product id 3919) and that works, but with max brightness the internal temperature of the M0 goes to 55Β°C and I wonder if using the stemma QT connector for powering that many neopixels is wise
Yeah, limitations.
NeoPixels need external power at higher levels and brightnesses
And really a servo needs 5V as well.
So like I said, it's not really practical. It's simply something I keep thinking must exist and it doesn't.
@blissful pollen It wouldn't be too hard to create. But there are limitations.
a product I would love to see is one of those controllers you find on LED stips with brightness and mode buttons, but inside it's piloted by an M0 with circuitpython and it has a JST for the LEDs
Hmm. Anyone have a QT Py and a continuous servo?
I need a super simple piece of code tested. Do you have a few minutes?
Yeah I do, just have to find a breadboard to hook them too
Needs to be a base QT Py as well - not Haxpress.
Which is to say you can put the base firmware on the Haxpress if it is a haxpress.
And it will be a base QT Py for testing.
It is, haven't soldered my memory chip on yet π
Ok perfect π
Here's the code: https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/master/CircuitPython_Essentials/CircuitPython_Continuous_Servo.py
@idle owl it works, though in stop my servo still barely spins (didn't play with the PWM settings to stop that)
no problem, you're welcome
Adding the QT Py to the CircuitPython Essentials guide and I don't think I have a continuous servo here. So that would have been a bit blocking.
I put one in a project I gave to my brother and thought I'd bought two, luckily i hadn't cleaned my desk off yet π
Worked out well for me!
@tulip sleet did you want to switch to -Os, rather than to -O2 -fno-inline-functions?
I see you've been doing some work on my pr branch, did you get to fixing these problems about 'uuid[0]' yet? I was looking at it and have a potential change to address it but I'm not sure if it's sensible
i only found out about the inline thing this morning, so I will try that later. RIght now I'm trying to figure out the uuid[0] thing, which does not fail on atmel-samd builds but does on stm. It's some warning difference. The code is the same.
in addition it works using a stemma QT connector to the motor and SDA as data pin π
do you want me to turn this into my own PR?
@tulip sleet https://gist.github.com/47f72501055a25b87043e1424df358e6 is what I was looking at as a solution
but I'm not sure (all of this is playing at the boundaries of how I understand C to work) and don't know if I have the HW to test (needs airlift with ble right?)
that is a good fix - you are further along than I am. But the UUIDs can potentially be 128 bits or 16 bits, which is why I think it was declared as a flex array
maybe not in this case
but in general
yeah but in these specific cases it's dealing with 2-byte uuids
it only ever writes to uuid[0] and uuid[1]
right, I am just worried about changing the struct def to [2] in case it's used in a 16-byte case in later code
if you look at the context more, you'll see that this is a structure declaration that is local to those functions
it doesn't even have a name, just one instance of the struct called req, allocated on the stack for att_read_type_req
there is some compiler flag in the stm build that is catching this but not in the atmel-samd build
I looked but I couldn't figure out which one it was (neither explicitly has -Werror=array-bounds)
i know, it's weird, i would like to find it
@onyx hinge the usual way I allocate these on the stack is a little different: I allocate a block the right size and then cast it. I will work that up.
OK, I'll let you take care of that then. Thanks for working on this PR!
docs say -Wall implies -Warray-bounds=1 only with -O2 but we started with samd at -O2
yes, I just saw that too, mentioned in passing in a gcc bug report, so that's the issue. I will try -O2 -fno-inline-functions. Please do keep looking at this; two is better than one on this
happy to, I'm waiting on copying to sd cards for my "real" project this morning
@onyx hinge maybe we should turn on -Warray-bounds=1 for all builds, it looks like we might need -ftree-vrp also
This allows the optimizers to remove unnecessary range checks like array bound checks and null pointer checks
This might be beneficial
though I think I tested that recently (on 9) and it must not have given a savings because I didn't note it on my list of potential flash-size-savings flags
it says -O2 turns on -ftree-vrp, which then catches these bugs. without that, it's not smart enough
definitely a real bug
yeah I agree that the code that got the diagnostic is a real bug
I'll start looking at the spresense build failure
if you didn't
no, not yet. I just added -fno-inline-functions to its OPTIMIZATION_FLAGS
but not pushed yet
-O2 -fno-inline-functions makes simmel fit
I think all the other failures are the ble / array-bounds stuff
hmm simmel may be over-full in other languages though
i want to add -ftree-vrp to all the non-O2 builds. I started adding it to all mentions of -Os but that's a lot. Maybe better just to add it as CFLAGS += -ftree-vrp somewhere in each Makefile? Or do you think that's dangerous?
There are odd mentions of -Os in the FATFS make targets...
I think it should be safe
but that's just a gut feeling .. it shouldn't change much in terms of the output code
(because I think it didn't change binary size, or not by much)
i am only adding it to enable better checking on the -Os builds
I was wondering about the fatfs -Os too
hmm... I am of two minds, since I am already doing -O2 -fno-inline-functions everywhere. But that's a real optimization difference...
well -ftree-vrp is both optimization and almost-accidental diagnostics improvement
ok, I will add it one place, since I could imagine doing -O2 without -fno-inline-functions, but not -Os without -ftree-vrp
I fixed simmel not fitting by deactivating gamepad and sdcardio
@onyx hinge idiomatic way I am constructing those structs with flex arrays at the end:
typedef struct __packed {
struct bt_att_hdr h;
struct bt_att_read_group_req r;
} req_t;
uint8_t req_bytes[sizeof(req_t) + sizeof(uuid)];
req_t *req = (req_t *) req_bytes;
req->h.code = BT_ATT_OP_READ_GROUP_REQ;
req->r.start_handle = start_handle;
req->r.end_handle = end_handle;
req->r.uuid[0] = uuid & 0xff;
req->r.uuid[1] = uuid >> 8;
make an array of the actual right size, then cast it to the local struct
you found two places where I had neglected to do that. I would like to use struct initialization with a flex array, like .uuid = { foo, bar}, but C doesn't do that.
@onyx hinge i pulled your latest gcc changes and pushed mine; I'll cancel all the runs but the latest
thanks!
I'll check the results later
I checked a simplified variant of your idiom in godbolt and it IS able to detect access past the end of uuid[] even through the cast! that's nice. https://godbolt.org/z/a4848j
What harm is done by calling it after each chunk? I agree it might not be ideal but it should be ok.
Right, and I don't think it should auto-increment. Doing so creates some hidden state. When flashing chunks, always require an offset.
I'd say dualbank is a better name if you want to support dual boot.
I think this should be switch_boot_bank() and it should raise an exception if the firmware image in the other bank is invalid or the set fails. Make sure to raise a different exception for these two cases. I'm not sure the current code does. It appears to only log different messages.
Ok, mind if we close this for now?
@kbanks-krobotics Want to make a PR with the addition?
Thanks for looking again. I'm aware I wanted the switch. I'll need to look into why github is doing this.
I think merge is still best because we can then see CI history. With rebase we lose access to previous CI runs.
I have been using a Feather Sense in a project and noticed that about once a day it would go into safe mode. After some testing I have narrowed it down to specific values for the timeout of start_scan(). Large values (for example 0.1) seem fine and the code runs for several days. Very small values (for example 0.01) are simply ignored so that start_scan() never times out. Values in between (for example 0.05) run fine for a few hours or sometimes even a day but eventually cause the Feather...
[do not merge; testing behavior of github only]
@slender iron I raised an issue with weblate, maybe they have a suggestion or know something I don't. https://github.com/WeblateOrg/weblate/issues/5051
thanks @onyx hinge
it might be due to our repo. I know I have trouble doing comparisons sometimes when doing release notes
I think I sounded grumpy about it in our PR, sorry about that. It doesn't hurt to discuss it again.
@gilded cradle The light sensor isn't in the MagTag library? I don't see it where I expected it to be, so I wanted to verify.
Someone on the forums is looking for code to use the light sensor.
Oh yeah, I kinda forgot about it. I could add it. Want to open an issue? I think it would be relatively quick.
Sure. It should definitely be quick to add.
I didn't assign you, but you can assign yourself if you like https://github.com/adafruit/Adafruit_CircuitPython_MagTag/issues/40
Thanks @idle owl
So I did up some simple code to use the light sensor, and it's not working. The light value is not updating. Everything I'm looking at says I did this right. Weirder, the code runs for a bit and then serial disconnects. Pretty consistently.
Could you paste up your code?
Yes. There's a bunch of NeoPixel stuff commented out in an attempt to make it as simple as possible.
I'll delete it for simplicity.
ok
@gilded cradle ```python
import time
import board
import analogio
light = analogio.AnalogIn(board.LIGHT)
while True:
print(light.value)
time.sleep(0.01)
I get 556 and that's it.
Ok, I'll try it out
Tried using my mobile phone flashlight and no change.
This is now working on all builds. @tannewt and @jepler I am OK with going to gcc 10 for main now, if you are. Thanks Jeff for the joint work on all the issues this brought up.
Yeah, I get 556 too. I'll take a closer look
@gilded cradle Ok, good to know it's not me.
π
Maybe the MagTag can be used to verify if the light in the fridge really turn off when you close the door...
Still doesn't explain the serial disconnect.
@thorny jay you could use a cell phone camera for that π
FridgePhone β’οΈ
The coolest piece of tech
@gilded cradle Well played.
π
@idle owl That's a known crash in AnalogIO, relating to a memory leak. My fix for https://github.com/adafruit/circuitpython/pull/3810 isn't in yet, I forgot to fix translations again this morning
@ionic elk Oh good! To all of that.
Oh good.
@ionic elk Would that affect the light sensor data as well?
Was it Snowden suggesting to put cell phone in the fridge when visiting him?
if you are using light = analogio.AnalogIn(board.LIGHT) and running light.value1 many times as your code implies, then yes
It was an issue with code carried over from Espressif's examples. @crimson ferry discovered that Nina/ESPSPI also shares this issue
@ionic elk Huh ok. Would you possibly be able to send me a MagTag build of your fix to test? I'm not set up to build ESP32-S2 yet.
@hierophect Take note too. This will not affect the ESP32-S2 builds, since they have their own toolchain, but the STM builds would change.
Kinda weird that the battery voltage check works
@gilded cradle @idle owl it's a memory leak, so it has to be run hundreds to thousands of times to show up. Each read eats a little bit of memory and doesn't free it
Ok, so probably unrelated. I get 556 for the value even running it a single time.
^ the bin of the tag of mag
Yeah that's what I am getting.
Oh hmmm I thought the 556 was the number of iterations, I wasn't reading well enough
Ah... heh no
so you're getting bad values, and then it crashes?
It's the light sensor value.
I get one value, that's it. Then it crashes.
One value repeated.
Mine reads a bunch of times then crashes
Ok, so it prints it many times
That's what I meant. Yes. Apologies for not being clearer π
It even soft reloads a couple of times successfully in my experience, and then crashes.
That's ok! Just aligning it to the work we already did on the bug - I would guess the crash is the same thing because that's definitely an active issue
but the bad values I'm not totally sure of. We've had mixed issues with the ADC - it doesn't go all the way to 0 and has some weird performance around the edges of its range
Hmm
556 is on the output of .value, where you're expecting a range of up to 65536?
Yes.
On face value, that implies that the input is very low, maybe grounded
have you checked the actual output of the light sensor? Is it exposed so you could poke it with a multimeter?
Right now we seem to get a range of 556-556
I have not checked it. It's SMT on the front, so I think I could multimeter it?
The fact that it isn't literally zero might be just a hiccup of the pin or ADC
if it has some exposed metal, maybe? I can also check this out to confirm
Would need 3 hands though, so need to wait until Roy is done with his meetings.
Yes, it appears to have exposed pads
I'd like to get a better handle on what's up with the magtag ADC, you're not the first one to have issues
Two hands for probes, one for a flash light.
I'll try it two handed. Might be able to chopsticks the probes.
It should vary even without a flashlight
I did (at least I think I did now) have the light sensor working on Arduino on the MagTag. But since flashed it to CP
like just use your shadow
@blissful pollen Beautiful! I was going to say we need to test it in Arduino. Which I had no idea how to do.
Can you verify that again if you have the time and energy?
@idle owl I have a meeting I'm about to get into I will try in hour or so
@blissful pollen Perfect.
So the light sensor is just this little A3 guy, right?
Yes
Yes
Ok checking it out now.
So I'm still a multimeter noob. What setting should I be using?
i will approve and merge the adc fix PR when it finishes building
DC voltage
Thank you!
:+1: Can merge if builds are fine.
Looks like the resistance setting works better. Yes, it is changing the resistance of the light sensor for me.
I can confirm that light = analogio.AnalogIn(board.BUTTON_A) works fine on my magtag, but the light sensor is not
My feeling is that something is not being pulled up or down
Hmm.
I assume this light sensor requires power
of some kind
lemme take a look at the schematic
Also, I tested the image you uploaded @ionic elk and it's not crashing anymore.
Nice. I didn't end up loading it when we determined the light issue was unrelated.
Right, still 556
@gilded cradle great, so it was that issue. That's good. That should be merged momentarily, since I got on the Translations. Just waiting for CI to pass
As for this light thing, schematic seems pretty standard, so maybe there's an unintended pullup pulldown on that pin or something
pulldown I mean
Let me see if I can get it doing something in arduino
Resistance is changing for me as well
(once I figured out which setting that was on the multimeter π )
hmm. ADC should be turning off the pulldown, it's in the code
Hmph.
@ionic elk @gilded cradle I think I sent us on a useless chase. To use the light sensor you must also set pin 21 to be an output and LOW to turn on the power supply to it and the NeoPixels. If not using the light sensor or NeoPixels, keep pin 21 as an input or HIGH output - that will remove the quiescent power usage of the NeoPixels and light sensor so you can have lower power in sleep mode.
haha
That's from the guide. It never even occurred to me to check for something there.
Deepest apologies.
I actually was literally about to post something about that.
I was looking at the schematic and was like, "wait, what's this V+ business?? that's not 3.3V"
@blissful pollen You can skip testing it in Arduino. It's a PEBCAK issue. We figured it out.
And I wasn't seeing any voltage on either end of the sensor too which was suspect
@idle owl I had never heard the term PEBCAK before, I dig it
@ionic elk π Happy to enlighten you.
Oi, now I need to reset my brain back to what I was working on before. Sorry again for wasting everyone's time.
@dhalbert noted. What steps in particular are required? I assume I'll want to go back into my notes to reinstall the toolchain, and are all the makefiles changing as well? A list of upgrade steps might be beneficial to all.
@idle owl you're fine! happy to help - and you would have run into that crash anyway so it's good you came on and asked
True.
otherwise you'd still be stuck with a gross unexplainable issue
Yeah, that one would have perplexed me.
Plus I now know a bit of Magtag esoterics that I might have tripped on later
Fair enough. Alright, apology retracted.
sorry not sorry
Exactly. π
Thanks @idle owl, just saw. That makes sense because we turn on neopixels and audio
I guess it was worth it to find out that's needed because you'll need it to add it to the MagTag library.
FYI -- for the Raspberry Pi aficionados, I am compiling a toolchain for the Raspberry Pi -- takes about 8 hours -- it's 4 hours not it ... if it succeed,, I'll make it available as I have in the past. Hopefully soon after it is merged into main and I have a change to test it.
Ah hmm.
Yeah, so it's the neopixel_disable setting in peripherals, which is enabled by default, so not much to do.
That's convenient.
@idle owl I opened a PR. Here's what I used to test:
import time
from adafruit_magtag.magtag import MagTag
magtag = MagTag()
while True:
print(magtag.peripherals.light)
time.sleep(0.01)
Nice! I see the PR.
π
@gilded cradle Suggested adding the example to the docstring, included the format for the example code. Just edited my comment to fix something that would have made it render improperly.
Sphinx just looooooooves rendering weirdly with improper whitespace.
@idle owl Glad you figured it out! Funny enough I started on the Arduino and made the same mistake making sample code to test with when I knew it worked before. So you're not alone
@blissful pollen Thanks π
I saw that, I look forward to seeing what you come up with. I feel like this would be really handy for adding custom real time code without having to modify and rebuild circuitpython.
I just realised that in updating this guide, the translations will also require updating. Would be nice if there was a way to compare edits, like git diff on two commits, in Learn. Where you specify two dates, and it shows you what changed. So internally, it would be easier to update translations. There's already a history, so I feel like it wouldn't be that far fetched, but I have no idea what the Learn code looks like, so I'm talking out of ignorance here.
How clean is python wifi.radio.enabled = False wifi.radio.enabled = True to reset the wi-fi on an ESP32-S2? Is there any wi-fi-related state that survives this?
Good evening folks!
I have the stupid question of the day. I received my QT Py today! (thanks Adafruit Staff), as well as the SPI storage chip to solder to it. Is there a way for me to verify my solder job is working properly? I installed the haxxed version of circuitpython.
Check the disk size. What OS are you using?
Windows, and it is 1.97Mb
Then it's working π
Fantasitcal π
Congrats!
Thanks
I am getting better at smd soldering with an iron, sodering the ECC608 to the metro airlift was...work π
Soldering the flash to a QT Py was my first SMD attempt. Turned out really well. Not sure I could replicate it π
@gilded cradle Blergh... there needs to be whitespace between the docstring content and the .. codeblock:: python line. Otherwise it doesn't render properly. So... above this line: https://github.com/adafruit/Adafruit_CircuitPython_MagTag/blob/d2930808ff05ef7c1594aa6f11de05d8f8a903d3/adafruit_magtag/peripherals.py#L155
I'll fix it
Oh nice! Thank you MakerMelissa btw. You helped me with a pitft plus issue a week or two ago!
Well actually a braincraft hat issue
but yeah, it all works now
fine to go in once CI passes
Yay! Great to hear @cursive kindle
Yeah, you wound up having to revert...something...
Ah right, the display driver.
It seems to be acting up again, on the latest version, so I'm going to take a look at it again in just a bit.
They have done a major release of raspberry pi os...for December...I imagine the kernel changes might be at issue
Yep, that's what I'm investigating π
@gilded cradle That did it. Thanks!
Excellent
I replied to the forum post that started this whole thing to let them know it was added.
Indeed.
Probably. we do some init on import as well
Thanks, I'll try to check a little deeper. It would be nice to have something akin to esp.reset that re-establishes a clean slate of the network stack, short of microcontroller.reset, but I don't know if that's really feasible on the S2.
ya, I'm not convinced the idf can do that
Found an issue with time.sleep() when testing the latest CircuitPython on Wio Terminal.
After calling displayio.release_displays() all calls to time.sleep() run indefinitely until you trigger a KeyboardInterrupt.
A soft reset isn't enough to fix it, but a hard reset is.
Board:
Adafruit CircuitPython 6.0.0 on 2020-11-16; Seeeduino Wio Terminal with samd51p19
Steps to replicate:
>>> import time
>>> time.sleep(0.1) # works as expected
>>> time.sleep(0.5) ...
^ 1st cpy git issue YEET!
@idle owl can you publish next week meeting document please?
Scott already did.
I see your pinned message from the 7 with the document for the 14.
Found, can you pin it?
Please ping Scott, I'm getting dinner ready.
Can you pin this message (and unpin the previous meeting document)?
done
I'm having an issue with the magtag. I'm running the latest from s3 20201215-a2d2d69.uf2. When I call magtag.set_background(0xFFFFFF) and then call magtag.refresh() the magtag hangs and won't execute any more lines of code. Is this a known issue?
Insufficient time this evening, but something LIKE:
The CircuitPython VM uses the heap differently than MicroPython, treating the single physical heap as two logical heaps - one for short-lived items, the other for long-lived items. This helps reduce fragmentation, but does mean objects might get relocated between compilation and execution.
I guess I know why I don't see voltage levels on the microcontroller.cpu...
float common_hal_mcu_processor_get_voltage(void) {
return NAN;
}
π
Before I look too far into that, is this where one can usually check the level of the battery ?
I think it's the (3.3v) processor power voltage
oh, thought this was fixed https://github.com/adafruit/circuitpython/pull/3052```Adafruit CircuitPython 6.1.0-beta.2 on 2020-12-03; Adafruit PyPortal with samd51j20
import microcontroller
microcontroller.cpu.voltage
{...forever dreaming of long-lived heaps...}
I knew it was the Voltage seen by the processor, I was just wondering if that was the "without more ICs" way to check the battery.
That fix would be for the atmel-samd port only. I'm on the esp32s2. I poked around the IDF a bit and didn't see an obvious way to get at that, but I see in the SAMD one, they are using the ADC... I didn't know you'd get it from there... I'll look again. Thanks @crimson ferry !
@idle wharf I figured you were looking at esp32-s2, but I hadn't tried it on SAMD for a long time, and wanted to see what kind of value came back. Other than internal brownout detect at power-up, I didn't find anything either for S2.
This mostly works but I have a crash happening when exiting deep sleep off of USB and reading the wake up object. The object has an incorrect type even though I'm setting it. If I log where I set it, the problem goes away. The last commit is the debug logs for it.
I also noticed that GPIO is disabled during time-based light sleep. I wonder if other peripherals are also disabled. The docs only discuss the RTC domains. @igrr can you explain what peripherals are preserved during light sleep?
I'm not sure there's a lot of value to .voltage other than perhaps if the external regulator isn't keeping up with whatever loads people have thrown onto it
Yeah... I'm not seeing anything obvious in the IDF ADC that shouts "This is the system's input voltage"
Not a big deal... I am just playing around using a temp sensor to monitor some areas of my house and thought it'd be cool to check the battery level too... The Sourdough needs to be kept happy. π
Ha... there's a Stemma for that... https://www.adafruit.com/product/4712
As there always is... π Such a great system !
Well I finally tried to follow the directions in https://learn.adafruit.com/adafruit-magtag/install-uf2-bootloader to add the UF2 bootloader to my #magtag
I was getting esptool fatal timeouts like mentioned here https://github.com/espressif/esptool/issues/581
but worked around them by adding the suggested --no-compress command line option
( Till now - I was just using esptool to successfully program .bin files )
Has anyone else seen this - it seems pretty repeatable.
Not sure if I should ask here or in the help-with-circuitpython
I was wondering what the minimum time for sleep was that might be that would have a positive impact on power saving.
I'm pretty sure that the main loops that use adafruit_led_animation most likely can't use deep sleep, but if a function like
animations.animate()
could return the time till the next event (instead of just False), a main "while True:" loop might be able to spend some time in low power mode if it wasn't too costly to get into and out of.
I guess if the leds that are being animated are powered up, then they might be using a good portion of the power....
Has this been discussed before?
Perhaps the #magtag enter_light_sleep() function would need to be different, if we wanted to have a light sleep with the LEDs on ??
see https://circuitpython.readthedocs.io/en/6.0.x/shared-bindings/support_matrix.html
One would expect that the MagTag would in this list, but it is not present today
shouldn't the #magtag be listed in the support matrix in https://circuitpython.readthedocs.io/en/6.0.x/shared-bindings/support_matrix.html
Does the MagTag only officially exist in 6.1.x?
6.0.x does not support the MagTag: you have to use 6.1.x. The circuitpython.org downloads page for MagTag does not list 6.0.x.
You can find the MagTag listed here: https://circuitpython.readthedocs.io/en/latest/shared-bindings/support_matrix.html.
However, there is a bug that it's listed just as "MagTag", and not as "Adafruit MagTag". We need to fix that.
So weird thing with Big Sur if you store your documents and whatnot on icloud
it makes duplicate folders and duplicate items. But it's not consistent
some directories and files are unaffected, but others it appears to do it to everything in a directory.
Are you still having issues with this?
No, it auto solved and I don't know how. I flashed multiple time without success, it only appeared once for a few second as serial.
I've since updated the firmware on the site
....weird, ladyada was also having a similar issue
My fix was to flash the sand demo, then reflash the pixel thing.
Now it works and the only problem I have are the Windows software that sometime freeze.
Yeah, it's beta software. I noticed it freezes up when you "preview" long animations, you can turn that off from the device settings
hmm..any idea why that worked?
No, I also changed USB cable, but both are data, it is just that it was another day.
Now, if I re-downloaded and it was another version, it could have been the difference two.
I tested a few time, even before the guide arrived, as soon as on the Github.
Dunno what happened then - asking b/c I am debugging it today and re-generating the uf2s for 32x32 and 16x32 matrix sizes
Going to try flashing the sand demo first though. thanks for the tip.
I only have 32x64 (and 64x64 somewhere and my E address connection is flacky on the Matrix Portal). But if I need to retry, don't hesitate to msg me.
Sure! That'd be helpful, thanks!
wow that was such a pain to get cleaned up
Included #3794 on this PR. There was issues with build CI tests with the comments on the devices.h file. I included the 64MiB MX SPI Flash, it's good to go after it passed CI I believe.
Should alarm. return the triggering alarm in the REPL?```>>> alarm.light_sleep_until_alarms(alarm.time.TimeAlarm(monotonic_time=time.monotonic() + 15))
alarm.wake_alarm
it should but it was broken
I think we have a bug where light sleep turns the GPIO off. I asked for details about light sleep on my PR yesterday
Not that I've heard. Please file an issue
that was a slightly older version. latest S3 does return <TimeAlarm> from the light_sleep... function but not from the alarm.wake_alarm
ya, dan fixed it. I don't think we corrected wake_alarm after light sleep
interesting community health analysis for gnome: https://hpjansson.org/blag/2020/12/16/on-the-graying-of-gnome/
do we want len(alarm.sleep_memory) to work, like it does for len(microcontroller.nvm)? (I assume sleep_memory can be used independently of any alarms if desired)
@crimson ferry ya, it should
@tulip sleet Bluetooth question you'll either know or not, and if you don't, don't bother looking into it: can you "network" two RasPis together using Bluetooth? Or is that not how it works.
User is trying to avoid WiFi for some reason I haven't asked about. Figured if you knew the answer, I could pass it on. If you don't, I won't bother saying anything.
Thanks -
is there a link to the latest docs anywhere?
(e.g. https://circuitpython.readthedocs.io/en/latest/shared-bindings/support_matrix.html )
When I started at https://circuitpython.readthedocs.io/ I only got to the 6.0.x docs,
Note that the link from https://learn.adafruit.com/adafruit-magtag?view=all goes to
https://circuitpython.readthedocs.io/
which is loading the 6.0.x docs, not the 'latest'
( I guess the view all as one page end up bringing in...
https://aws.amazon.com/blogs/aws/new-freertos-long-term-support-to-provide-years-of-feature-stability/ [we now use a freertos fork via esp-idf, if I understand correctly]
Today, Iβm particularly happy to announce FreeRTOS Long Term Support (LTS). FreeRTOS is an open source, real-time operating system for microcontrollers that makes small, low-power edge devices easy to program, deploy, secure, connect, and manage. LTS releases offer a more stable foundation than standard releases as manufacturers deploy and later...
@idle owl we don't support two RPi's, one as central and one as peripheral in blinka bleio, because blinka bleio can only act a as a central. There are other SW libraries that could do it. Could also do it just via advertising, but this is all a little painful https://github.com/adafruit/Adafruit_CircuitPython_BLE_BroadcastNet
Ok so it's possible, but not through our stuff. This was a question outside of Adafruit. So not specific to what we have available.
@idle wharf fwiw, esp32-s2 still starts up as AP despite our initializations, so I think it must be deep in IDF/FreeRTOS (background: https://github.com/adafruit/circuitpython/issues/3321)
@hearty tapir I just loaded the latest S3 on FeatherS2 and I'm still seeing it start up as AP (beacon frame detected). I suspect it's happening prior to our initializations. (re: PR#3698)
@tulip sleet In this example, what's supposed to be happening with the LED? Because I've got ..... nevermind. It was weirdness with how I had the jumper wires. Answered my own question.
Hmm. Anyone have a Adafruit Analog Thumb Joystick Breakout Board and a QT Py?
And a few minutes to test a mouse HID example...
@idle owl i do have both, but I have to leave in 10 minutes for dr appt; can do in a couple of hours
@tulip sleet Alright. That works. I connected a potentiometer and tested each axis separately, but I'd be happier if it was tested with the actual hardware.
will ping you when i return
Thank you!
this ,right?
Yes.
Wired like this with this code: https://learn.adafruit.com/circuitpython-essentials/circuitpython-hid-keyboard-and-mouse#circuitpython-mouse-emulator-2985273-7
@idle owl got it wired up and tested in 8 minutes; it works!
Oh excellent! Thank you so much @tulip sleet I really appreciate it.
π π
fwiw - i have that hw combo also and can test if need more
@tidal kiln It worked with my hacky workaround and Dan got it going, so I'm confident it's fine. Thanks for the offer!
np. i'm heads down elsewhere. ping me if something comes up though.
@tidal kiln Will do, much appreciated!
@slender iron added: https://github.com/adafruit/Adafruit_CircuitPython_MagTag/issues/45
The magtag is stuck on the Digi-Key screen from the factory. Using the latest: adafruit-circuitpython-adafruit_magtag_2.9_grayscale-en_US-20201216-f2204d7.uf2 from S3, using https://github.com/adaf...
@tidal kiln Actually I could use another set of eyes. Can you grab a single jumper wire, and then wire up a QT Py to an LED like so: https://cdn-learn.adafruit.com/assets/assets/000/097/845/original/circuitpython_QT_Py_Essentials_PWM_fixed_freq_bb.jpg?1608045764
π
I'm trying to do the Storage example, which uses a grounded pin to do the storage.remount() thing, and it's not doing what it's supposed to. I'm suspect of the boot.py pull being wrong for QT Py or wrong because the LED is on ground as well, or something.... but I have no idea how to troubleshoot this.
sure. give me a bit. just realized i haven't even soldered headers on my qt yet.
only used stemma conn so far.
Ah ok!
I have multiples so I have one soldered up already.
Sadly it's the first Haxpress I did.... so I can't even see my handiwork very easily.
Mh, I thought I didnβt see this happen any more. I couldnβt see it reporting on debug console anything that led to conclusions that it is an AP
I am testing this PR with My Raspberry Pi build -- I noticed the when I switch to this PR there are some changes made to the underlying repo
port/esp32s2/certificates/nisn-fw is attempted to be deleted
frozen/Adafruit_CircuitPython_Requests
and
lib/tinyusb
are modified
Are any of those concerns?
I was able to build the atmel-samd/matrixportal_m4 with my newly compiled gcc-10 so I think the compiler is OK
@onyx hinge I have what I believe to be a working version of the gcc-10 toolchain for the Raspberry Pi. Last time you put it in an accessible place -- would you like to do that again. I can send you a link to it if you want it.
@idle owl wired. what's the test?
Ok, please try to make this work: https://learn.adafruit.com/circuitpython-essentials/circuitpython-storage
and ground D2 (A2 on the QT Py)
reboot it
What is your code.py please?
and see if CIRCUITPY has a temperature.txt file on it and you can't write to it
Because I did all the steps and it's not logging anything on mine
anything special CP version? or just use latest?
I used the beta, but... hmm. That shouldn't matter. But try it with the beta.
6.1.0-beta.2 ?
Wi-Fi setup code is here: https://gist.github.com/anecdata/cc68a0917ca2c7895a216d0fbaff185c
@idle owl hmm. not working. added print to exception handler.
[Errno 30] Read-only filesystem
checked the pin in REPL and it's reporting as expected
Ok
Thank you! Your code looks similar to what I do.
got this in boot_out.txt:
Adafruit CircuitPython 6.1.0-beta.2 on 2020-12-03; Adafruit QT Py M0 with samd21e18
boot.py output:
Traceback (most recent call last):
File "boot.py", line 18, in <module>
RuntimeError: Cannot remount '/' when USB is active.
Interesting.
So..... the example doesn't work like it used to.
Grabbing a USB battery
@tidal kiln I have that same message. I thought maybe connecting it to a USB battery would make it work. I don't have a logged temp file though.
Hey folks, a neopixel-circuitpython on raspberry pi question. I am trying to use a large number of pixels (3,800) but something in the driver is breaking past pixel 2720 or so, I do not think the pi is running out of memory. Is the large pixel count overflowing something in the library?
@idle owl maybe try with a trinket m0 and see if you get same behavior?
with qt py, 6.x is all that's available
but with a trinket, can try 6.x and fall back to....the beginning of time.x
also true.
i'm gonna go back to other thing. ping me again if you figure something out.
@tidal kiln Will do. thanks again.
Trinket does the same thing on 6.1. 6.0, it works successfully. So change is in the beta. Now to find out if it was done on purpose.
I made a mistake in my WIPS/WIDS configuration .. I stopped the background scanning for my production AP group and not for the lab ones ..
I fixed that .. should see results sometimes soon.
@solar whale sure -- I think I just put it on my personal website. you can DM me with the URL if you want.
@tulip sleet do you know why we don't use the "stub" in "make flash" in circuitpython?
I'll send it via e-mail of that is OK
that works too
No idea. I have never used those targets myself
OK, it must have been Scott who I talked about with it. I removed --no-stub once in a PR and was requested to put it back. but I don't remember why.
@solar whale Got it -- the raspberry pi version of the gcc10 toolchain with sha256sum 94915fe4e657e3ea983a0ac00262e7b55f6c5e2906fb2201bce7fe62fc9e7c25 is now available to download from https://media.unpythonic.net/gcc-arm-none-eabi-10-2020-q4-major-armv7l-linux.tar.bz2 -- the download link can be shared freely.
thanks @onyx hinge
just don't make downloading it 100 times a part of your CI procedure
When working through this CircuitPython storage example on QT Py M0, running 6.1.0-beta.2, it fails to work properly - the temperature logging file is never created and the filesystem never switches to read-only. Checking boot_out.txt, I find the following traceback:
Traceback (most recent call last):
File "boot.py", line 18, in
RuntimeError: Cannot remount '/' when USB is active.
I tried attaching...
@crimson ferry I've resetted (via button) my featherS2 a number of time now and it scans & connects to my SSID without issue and my WIDS/WIPS doesn't pick up an SSID coming from the esp32s2. The statistics are updated every 15 minutes, so I'll wait for 20:30 (my time) and then go into REPL and try to invoke scan/stop. If I see the SSID then, it must be related to the scanning.stop() function and would be a separate issue compared to the one that I fixed.
I checked on the Feather M4 Express to see if maybe it was affected too running the same code you did, I don't have anything else to check on but at least it isn't affecting it on the latest CP build for it.
@hearty tapir I'm trying to reproduce it also, though I'm not able to exhaustively catch all beacon frames on every channel simultaneously. I suspect it's a very fleeting thing, possibly during IDF setup before our code really kicks in. I doubt it's related to the issue you fixed.
lol .. I should have pulled my own fix first π
(for the panic on stop without scan)
Ok, for me it is not reproducible unfortunately. Is it possible in your router to clear the list of Interfering APs / Rogue APs or does it carry a timestamp so that you may be able to pinpoint when it happens?
I'm not using my router for this, I caught the beacon frame on a Raspberry Pi running tcpdump, right after starting up the FeatherS2 with the new firmware
The transparent_color field was never initialized. I think this means its value was always set to 0, or the blackest of blacks. Instead, initialize it to the sentinel value, newly given the name NO_TRANSPARENT_COLOR.
This exposed a second problem: The test for whether there was an existing transparent color was wrong (backwards). I am guessing that this was not found due to the first bug; since the converter had a transparent color, the correct test would have led to always getting th...
my code.py did run with the new firmware, but I've been trying repeated resets, reloads, scans, ...haven't caught another (yet?). This isn't a big issue (for me), I just prefer to have that level of control, and not have devices appear until the code instructs.
I don't doubt that you saw that beacon. I just dislike that I don't know why π
I think it would be helpful to capture such a beacon. If you could run tcpdump the next time with "-s 0 and -w capture.pcapng" that would give us (me) to figure out what is in the beacon (to maybe better pinpoint where it comes from). I believe that tcpdump doesn't do any output to the shell any more (apart from "N packets captured")
I capture full detail on every packet, it's just a minimal beacon frame, BSSID==SA=="7C:RE:DA:CT:ED" π , DA=="FF:FF:FF:FF:FF:FF". The SSID is the station MAC + 1, as expected by Espressif's scheme for SoftAP: https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-reference/system/system.html?highlight=mac address
Co-sign: "I just dislike that I don't know why"
I was about to ask if it looks like this:
essentially, but Beacon frame, not Probe Request
Thanks for the confirmation. After your above message, I was already sure that I don't need to ask π
Let me capture in CH1/6/11 if the boards goes into SoftAP in UF2 "flash me" mode.
ah, interesting scenario
I am testing this PR with My Raspberry Pi build -- I noticed the when I switch to this PR there are some changes made to the underlying repo
This PR was started quite a while ago, so working at that commit does not include a bunch of changes. The PR test merge commits are more interesting.
on esp32s2 is the filesystem a potentially ota-updatable region? but I guess this region doesn't have a "spare" like the firmware does?
just trying to wrap my head around, how do you update CIRCUITPY in the OTA mindset
interesting question, primary use case is probably self-contained embedded app. Maybe a Wi-Fi drop box within the core??
I found no beacons for 1, 6, 11 and reflashed firmware each time.
@dhalbert OK -- I don't think there is any problem - just want to be sure I understood. My new compiler seem OK on the Pi and Jeff has made it available to anyone who wants it. Ready when this gets merged.
@onyx hinge I see otadata, ota_0 (OTA app), ota_1 (OTA app) in the partition table (if this is what you wanted to know/see)
I also saw nothing in "download mode" where the esp32s2 waits for firmware upload via e.g. esptool
@hearty tapir I think I don't even know enough to ask the right question yet.
I've started up my Wi-Fi Explorer and went through the possible steps again.
Unfortunately, there is nothing. The devices are in close proximity, so any RSSI Thresholds shouldn't trigger (suppress data) - unless the tx power would be severely reduced in that state.
Has anyone received a OSError: [Errno 9] EBADF when attempting to read from a previously read from socket?
I'll read up on what may trigger an OTA app to be launched. Maybe I'll find something like this.
I've only seen that error thrown when the socket is closed then attempted to read from again, but I'm not closing the socket...It's timing out and shouldn't close
Interesting discovery while messing with adding parallelism to the build of circuitpython: I tried building BOARD=board1 and BOARD=board2 in parallel in a single port. When doing this, you can get an error about the file "firmware.elf.lto.o" (no path). It turns out, if your targets are build-board1/firmware.elf and build-board2/firmware.elf, gcc will create/access/delete the file "firmware.elf.lto.o" (no path)! So .. don't do that. Not sure what the alternatives are, if you wanted to locally build multiple boards simultaneously, though.
Thanks for digging in with me. I'll keep trying and report back if I get anything useful. I'm not surprised that it wouldn't get picked up, it's very hard to catch every packet.
@crimson ferry I dug a little further and found the socket closes if it reads zero from a server (https://github.com/adafruit/circuitpython/blob/main/ports/esp32s2/common-hal/socketpool/Socket.c#L134), the EBADF error is correctly thrown by socketpool if it sees a closed socket
@prime flower thanks, though I don't seem to be able to (or know how to) recover from that other than reload
I assume the socketpool is exhausted over time. I meant to go back to Python level but was caught in too many rabbit holes ππ In menuconfig I saw a maximum number of sockets if I remember well, not sure what is set through sdkconfig
I think it was originally 10, but now at 4
Iβm in bed and will read on some OTA APIs before sleep, before deep sleep. Talk to you tomorrow
that might be the case for that issue. I'm using one socket though :\
I noticed circup hasn't been released since Aug, but there are fixes merged since then. Can someone with super-admin kick a release? Or is there some additional steps I can help with ?
What are some valid use cases for boot.py in CP 6.x ?
Just for "fun" I made a simple boot.py that just did a
print("boot.py")
this caused my CP to loop ( eg auto reboot )
( assuming it did this because there was a write to the file system.
I didn't take any of the steps mentioned in
https://learn.adafruit.com/circuitpython-essentials/circuitpython-storage
but the text I printed in boot.py did get appended to boot_out.txt
--
on a similar question - does boot.py affect the REPL. I recall reading that the repl is 'separate state' now - invalidating https://forum.micropython.org/viewtopic.php?f=18&t=5831 perhaps?
I'm curious to hear the answer... but I concur that it was always my understanding REPL is a clean CP instance
@idle wharf Would you be interested in being added as a reviewer? Is that something you'd like to be involved in? I ask because that would also provide you access to release circup. π I'd need to look into it on my end, because it involves an extra step, but if you're interested in becoming a reviewer, I'm happy to look into it. You'd be able to review PRs, merge them, and do releases, on all the CircuitPython libraries.
I'd be up for it... I'm not always going to be the best person to review something but I also won't say something is good if I don't understand it.
Well here's the thing. It's possible to be positive when providing criticism. That's really all we ask. Remain positive and supportive. Under no circumstances are you expected to approve something you don't understand or that you feel needs changes - that's entirely what the review process is for.
I strive for positive !
If you don't understand, ask more questions. If you see things that need changing, request changes.
Excellent π
I'll look into it then. I'll let you know. What's your GitHub username?
the same as here, askpatrickw
Great!
@hierophect I was asked to tag you on this issue. I am not assigning you as I don't want to make assumptions.
This has been seen on both the MagTag and the Metro ESP32-S2. On the MagTag, I was running 6.1.0-beta.2.
The "glitch" is that while an animation or text is displayed on the LEDs, e.g. they are being lit up, intermittently, a portion of the LEDs will flash a different color.
I am able to consistently reproduce it using the code [here](https://github.com/adafruit/Adafruit_Learn...
@crimson ferry I am seeing the same bytearray split issue as you mentioned in https://github.com/adafruit/Adafruit_CircuitPython_Requests/pull/53
@idle owl The PyPi release failed. I'll look at that.
Ah blergh. Ok.
Any code outside of USB should work in boot.py. Prints should go to boot_out.txt
Thanks - I interpret that cleanup_after_vm() isolates boot.py from code.py - if we did want to pass information between the two scripts it would need to be external from CP, right?
( e.g. files system or external devices )
Can anything be passed through the low power memory, now that that is available?
what about regular microcontroller.nvm ?
nvm is also durable but it's in flash
it'll survive losing power
but flash has a limited life (that I've never heard someone hit with circuitpython)
@idle owl The defined release action is identical to Blinka so I don' t think its anything to do with the definition of the steps. But Circup has not been released since August and its not happening automatically... could the username\password in Github secrets be incorrect? The error is 400 File already exists.
Yes! It probably is.
I won't have time today to look into it, so I'll add it to my Monday list.
No worries... thank you !
Opened https://github.com/adafruit/circup/issues/44 to track
Capturing this issue... HTTPError: 400 Bad Request from https://upload.pypi.org/legacy/ NOTE: Try --verbose to see response content. File already exists. See https://pypi.org/help/#file-name-reuse ...
If no data is received on a socket, and the socket has timed out, a socket will close. Subsequent reads raise OSError: [Errno 9] EBADF.
I dug deeper, this behavior is expected (https://github.com/adafruit/circuitpython/blob/main/ports/esp32s2/common-hal/socketpool/Socket.c#L123) on the esp32-s2.
However, closing the socket immediately makes it difficult to poll a socket to check if data is available.
For example, polling a socket for a response, like in MiniMQTT (https://github.co...
@idle wharf Invite sent to join our review team!
Aww thanks π
And I know the problem is... the version has to be bumped manually.
The PyPI version info is determined by the value of version in circup.py. If this isn't updated in a PR prior to a release on GitHub, the PyPI deployment will simply overwrite the annot...
I'll look into how to fix it so its automated. I'm curious and I'm sure its something I can lookup pretty easily.
@hollow gazelle looks like serial isn't fully init'd until after boot.py, and autoreload is turned on before boot.py https://github.com/adafruit/circuitpython/blob/f2204d7d88b505155cd25b38b71ae3c35b86d438/main.c#L577 ...oh, looks like you found that already
@idle wharf Even better!
@idle wharf As a side note, you'll be able to merge your own PRs now as well.... Avoid doing that π
Totally...
@idle owl Have time to review https://github.com/adafruit/circup/pull/45
Still looking into automation, but it appears to actually be more complicated than I had assumed.
@idle wharf Merged! Will you do the new release?
@crimson ferry What's your GitHub username?
I'm guessing it's the same as here, but I wanted to verify.
Added this in PR #3824, can be closed when PR is merged.
@crimson ferry Research indicates you are anecdata on GitHub. Invite to join our review team is sent!
@idle owl yes, "@crimson ferry", cool thanks!
You're entirely welcome! Thank you for joining the review team!
@idle owl Circup 0.3.1 is released
@idle wharf I saw that! Excellent, thank you.
Hey @idle owl with adding SPI Flash for a specific board that people are requesting, should it just be the devices.h that we update or should we update the Haxpress makefile to reflect the support?
I only added to the devices.h under supervisor/shared/external_flash
@ornate breach I'm going to tag @slender iron on that one. He'd know better! ^^
Gotcha! Figured you might know since you were on right now π¬
No worries! Scott's around too. We're in an internal meeting.
Scott is reviewing the PR I believe π
you can add it to your board but we don't want them all in the qtpy haxpress
ππ»
I figured, which was why I didnβt explicitly add it to any specific bird build
But wanted to make sure that was what was to be expected
Either way, three SPI flash will get added support with that PR so thatβs pretty exciting to me π₯³
I'm ok with this! Thanks for doing the final switch.
@kbanks-krobotics how are you hitting this? Are you adding a native module?
Iβm excited to start digging deeper into CPπͺπ»
Thank you @makermelissa .
On Read the Docs you can click the bottom left box to switch versions. It has latest and all of the previous major versions.
Hmm, probably more RMT troubles. I'll check it out.
@slender iron do you have any idea how to enable the LWIP debug logs? I can't seem to google a suitable solution.
@PaintYourDragon Test the artifacts from this build for the transparency/full black problem. The "testpattern4.bmp" file DOES still seem to crash, and I'll address it in a separate commit (probably a separate PR)
@ionic elk Thanks for picking up that issue.
@slender iron Ok, I have bind, listen and accept working ok. However, we need to pick some way of determining between TLS and non-TLS sockets. If you create a socket of type SOCK_STREAM, by default it goes into tls mode, uses the mbed APIs, and doesn't even create a LWIP socket instance. So we've got a number of functions that don't cooperate nicely with each other because they're using different APIs under the hood depending on the socket type
@idle owl no prob
I won't be around until Monday, so if you need more from me, expect that's when I'll get back to you.
I probably just need to poke at the RMT and see what's making it angry this time
Fair enough.
that's the module on the ESP, it's been a little finicky so far
Ah, got it.
It seemed like spurious signal of some kind. But I had no idea what was instigating it.
I haven't rigged it up yet but is it always pure white pixels in places they shouldn't be?
No.
Sometimes they're more cyan, and if the animation was cyan, they were sometimes another color.
At least with the cheerlights code. I know with Noe and Pedro's project, it's blue a lot.
hmm
But it's all kinds of colors really.
that is kind of wonky. White means that the timing goes wrong for the whole signal. But other colors imply that there's actually other colors being sent
Hmm
I see what you mean about white
Maybe it's white but part of the signal dies out sooner than the rest so it looks cyan for a bit?
Like white is a good error color, it means something is borked with the signal timing
I'm making something up here.
with the neopixels, every part of the message is represented by a pulse, even the turned off parts
huh. Interesting.
So things like a signal cutting off don't tend to impact the color, they either make it not work or they make it all white
Ahhh ok.
but other weird things can happen! I will investigate. It's a good job for a logic analyzer
Indeed! I hadn't thought of that. Wish I had π
Anyway, thanks again. I'm off for now. Later!
π Thanks for reporting it!
hrm, we probably need to wait until connect for the esp_tls stuff then
you can get a socket number from it I think
What do you mean by wait until connect?
the core issue is that when you create a socket in SOCK_STREAM mode, it doesn't actually make a LWIP object at all. So you can't use LWIP functions like bind, listen and accept on that socket
the socket number doesn't have a corresponding object inside LWIP
Ok I'm off for the night. I'll research it and ping you tomorrow if it seems like we should have a discussion.
I believe there is a bug in @split ocean MagTag live show reminder. It did not tell me about SHOW&TELL. Maybe because in CET it is Thursday and the show is on Wednesday...
Not time to fix as there is Ask an Engineer... But I will have a look at the code.
Retested with 6.1.0 beta 2. Same lockup on the Wio Terminal.
Adafruit CircuitPython 6.1.0-beta.2 on 2020-12-03; Seeeduino Wio Terminal with samd51p19
Yes, I was porting over some features from a customized build of MicroPython (on STM32) to CircuitPython (on ESP32S2).
The features are part of a proprietary product line for now, but someday we hope to backport them into their ancestral codebases.
I agree "application-level" programmers are unlikely to be affected by this, but "system-level" programmers...
At the end of the project I will try to do a documentation PR with what I've learned (so far the "fancier heap" is the only architec...
The Wi-Fi Radio module could perhaps react to more disconnection reasons to make the message more specific in connect.
The event handler is aware of certain common [reasons](https://github.com/adafruit/circuitpython/blob/68dd4b2...
For now, if you haven't already tried these things:
β’ reboot the router and MagTag when the issue is occurring and see if it improves
β’ see if you can re-position the MagTag so there's a better path from its antenna to the router
β’ add ConnectionError to your try/except
interference could be a complicating factor, depending on 2.4MHz device density at your location
I think the next step is to do some smoke tests with gcc10 firmware buildsand see that they work on some sample programs. Then we can notify @ circuitpythonistas, and also I will update the Building CircuitPython guide.
I'm not sure if this really belongs as an issue (there are a couple related already), but I wonder if we need to handle more reasons for disconnection with auto-reconnect, meaningful exception message, or other handling.
I'm...
@slender iron if you are available... can we talk ota update here.. the pr reviews are taking a lot of time
@analog bridge yup, I'm around
nice! lets start with the following question.
What does
deinitmean? Why can't we call it multiple times?
void common_hal_ota_finish(void) {
if (ota_inited) {
esp_err_t err;
err = esp_ota_end(update_handle);
if (err != ESP_OK) {
if (err == ESP_ERR_OTA_VALIDATE_FAILED) {
ESP_LOGE(TAG, "Image validation failed, image is corrupted");
}
ESP_LOGE(TAG, "esp_ota_end failed (%s)!", esp_err_to_name(err));
task_fatal_error();
}
ota_reset();
}
}
esp_ota_end() de-initializes the update and raises error if image written is invalid...
when flashing in chunks calling finish() after each chunk is flashed will certainly raise an error
so it should only be called after flash partition is completely written
I don't think auto-increment is a good idea. If it's chunks, then it's easy enough to track the offset yourself. It's idempotent then too.
should I makeoffseta required parameter?
I am unable to find a method to know whether ota partition is completely written... I did dig into the multiple .bin file but wasn't able to find a consistent ending across them.
I am finding the wording in docs a little vague. Following change should clear things.
Correct capacity value for the MX25R1635F from 0x18 to 0x15 (tested and working)
refer to
https://github.com/adafruit/circuitpython/issues/3558
I made offset a required parameter.
removed white space from pins.c
Thanks, I added ConnectionError to my try/except and it still didn't catch the connection error and proceeded to crash with a Connection error.
I guess I'll try using the wifi Radio module. I think that might solve my display problems too.
@slender iron any update regarding an Adafruit PCB with ESP32-S2? I havenβt seen any release date yet
I downloaded adafruit-circuitpython-fomu-en_US-6.0.0.dfu from https://circuitpython.org/board/fomu/ and installed it on Fomu with dfu-util 0.9.
The RGB LED gives a nice pinkish breathe/blink, but no tty device shows up in /dev, neither ttyUSB nor ttyACM.
I've tried with foboot v2.0.3 and v2.0.3-55-ge928b8, two different Fomus, with the same results.
dmesg just shows USB disconnect, device number xxx.
adafruit-circuitpython-fomu-en_US-5.3.1.dfu works correctly on the ...
added stackrduino_m0_bro to build.yml
@tannewt All peripherals are clock-gated during light sleep. RTC_IO, RTC_CNTL, Touch, and the ULP are the only ones which can keep working.
Ok, it is normal, the JSON file must be encoded with local time information, there is not timezone computation it seems... so I need to adapt the JSON file for CET, or modify the code to deal with timezone.
From the shop: (1) MagTag (2) Adafruit Metro ESP32-S2 (3) Feather-S2 that is arguably not from Adafruit, but available from their shop.
changed CFLAGS_INLINE_LIMIT = 55
reduced to CFLAGS_INLINE_LIMIT = 35 for tranaslations
hey:) i asked this in help, but maybe it's better suited for you.
i'm just looking at this PR (it enables the micropython .native and .viper decorators) https://github.com/adafruit/circuitpython/pull/2271/files and wondering if there is a process for getting this enabled for a particular board?
<@&356864093652516868> As of PR 3752, just merged, we are now using the latest gcc ARM toolchain (https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads), which is gcc10: 10-2020-q4-major. If you are doing 6.0 builds, you can't use this release, because it will throw build errors: you need to continue to use the last gcc 9 release. But for the main branch, this new release is recommended.
you just need to add CIRCUITPY_ENABLE_MPY_NATIVE = 1 to the mpconfigboard.mk file for the board you are building, as was done for the board in the files link you gave.
@tulip sleet oh yes! sorry, i meant a process for getting it enabled by default!
which board do you want it enabled by default for
in general we have not been doing this, because it's for advanced use, and if you want to use it, you would be able to make a custom build
ah, that makes sense
i'm currently awaiting a couple of m4 boards (metro, feather, itsybitsy) and i was wanting to make sure i'd have the option to optimize any DSP code if it turns out i need to
and i was wondering if there's a process for getting it enabled, so if i wanted to be able to provide the code as part of a package for other people to use, that i wouldn't need to tell them to also set up the build system
@tidal kiln I just did that
@tulip sleet You may want to put a note on the MACOS page as well since brew still uses gcc9
This PR has been updated with a fix for the 4-bit bitmap.
Microsoft documentation says:
If biCompression equals BI_RGB and the bitmap uses 8 bpp or less, the bitmap has a color table immediatelly following the BITMAPINFOHEADER structure. The color table consists of an array of RGBQUAD values. The size of the array is given by the biClrUsed member. If biClrUsed is zero, the array contains the ...
Sorry I forgot to reply! I think offset should default to 0, then if folks need to write in chunks they override it.
np... π
this is what the current api is doing.
kk. I haven't looked at the changes you made overnight
havn't updated the PR yet... getting into weird backtraces at the moment
abort() was called at PC 0x400dbac3 on core 0
Backtrace:0x4002fede:0x3ffdc890 0x40030485:0x3ffdc8b0 0x400380ca:0x3ffdc8d0 0x400dbac3:0x3ffdc940 0x400b4cdf:0x3ffdc960 0x400afe6d:0x3ffdcc90 0x40091e39:0x3ffdccd0 0x4008d7b5:0x3ffdcd00 0x4008d8a5:0x3ffdcd20 0x4009b4f2:0x3ffdcd40 0x40091e9b:0x3ffdcde0 0x4008d7b5:0x3ffdce10 0x4008d7e2:0x3ffdce30 0x400ac17d:0x3ffdce50 0x400ac45e:0x3ffdcf00 0x4009e953:0x3ffdcf20 0x4009eb72:0x3ffdcf50 0x4009ed94:0x3ffdcfa0 0x4009effb:0x3ffdcfc0 0x40030494:0x3ffdcfe0
ELF file SHA256: c880d9d7f3ed2f8a
CPU halted.
kk. I'm out tomorrow so you could have someone else review
