#circuitpython-dev

1 messages Β· Page 343 of 1

onyx hinge
#

(I'm not sure including "all" timezones is feasible given storage constraints)

manic glacierBOT
#

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)
    ...
manic glacierBOT
ivory yew
#

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.

onyx hinge
#

On Linux I haven't noticed any difference between copying files to 5.3 or 6 versions of circuitpython

hearty tapir
#

@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?

manic glacierBOT
#

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.

ivory yew
#

@onyx hinge hmm. I'll try on my Windows machine next time.

crimson ferry
#

@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

ivory yew
#

yeah that's what's happening here

#

I'm not on big sur yet

manic glacierBOT
analog bridge
#

@slender iron ULP functionality is not complete in idf@v4.2... idf@bd2d70 is needed for it to work.

lament sentinel
half sedge
#

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.

hearty tapir
#

Yes, it is also my horror scenario. Good luck David and strong nerves through the process.

thorny jay
#

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... πŸ™‚

jaunty juniper
#

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

manic glacierBOT
#

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
`...

thorny jay
#

Yeah, maybe this is underpowered...

thorny jay
idle wharf
# thorny jay Dunno, all I know from the board is from the deep dive, and I felt asleep or mis...

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

thorny jay
#

A kind of modern ESP8266... that could be my first Risk-V (fpga excluded).

hearty tapir
#

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.

thorny jay
#

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. 😦

hoary moat
#

Time does march on.

#

It’s not as if Adafruit has infinitely deep pockets and infinite resources to apply to sustaining prior products

jaunty juniper
#

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

hearty tapir
#

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.

slender iron
slender iron
hearty tapir
#

I ordered micro:bit v2 from Digikey. I didn’t know this will be a thing for CPY. Cool πŸ™‚

manic glacierBOT
slender iron
#

@hearty tapir I would like to get there. I don't think there is that much work on the BLE workflow side

slender iron
hearty tapir
#

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.

lament sentinel
lone sandalBOT
thorny jay
#

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...

onyx hinge
strange pike
thorny jay
cursive condor
#

(I should have renamed the file, it's pixel show UF2 for the matrixportal + 64x32 matrix #adabox016 )

thorny jay
cursive condor
#

you're welcome πŸ˜‰

manic glacierBOT
manic glacierBOT
#

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.

manic glacierBOT
ornate breach
#

Finally received my new SPI flash to test out some new additions for Circuitpython πŸ™‚

turbid radish
#

?serverinfo

digital shoreBOT
#
adafruit
Owner

adafruit#3230

Region

us-west

Channel Categories

8

Text Channels

56

Voice Channels

6

Members

26166

Roles

34

manic glacierBOT
thorny jay
#

If I don't make it for the meeting, just put me lurking. I took a few notes over the week, likely complete.

solar whale
#

@idle owl I'll be missing the meeting this week. Nothing to report, again...Have a great week!

idle owl
#

@solar whale Have a lovely week yourself! I hope you're well!

solar whale
#

All well here -- just still tied up with work... The end is in sight πŸ˜€

idle owl
#

@solar whale That's good at least πŸ™‚

onyx hinge
#

<@&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!

hollow gazelle
#

#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 )

idle owl
#

@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?

tulip sleet
#

yes

idle owl
#

Excellent thank you.

thorny jay
hollow gazelle
thorny jay
#

When in doubt I reset... but maybe I should worry.

hollow gazelle
ionic elk
#

Is it faster to flash the ESP32-S2 with UF2? I feel like the UART upload with make flash is pretty slow

onyx hinge
slender iron
#

ya, I think so

tulip sleet
#

we're running late - will be here in a few minutes

thorny jay
#

Can someone speak for testing?

#

perfect

balmy stirrup
#

yes

inland tusk
#

@solar whale glad your'e okay, hope to see you back in the meeting soon

old smelt
#

Lurking

onyx hinge
#

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.

tidal kiln
#

** lurking **

lone axle
#

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

Retweets

109

Likes

525

onyx hinge
#

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.

thorny jay
onyx hinge
#

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.

idle owl
#

Indeed it is encouraged!

blissful pollen
#

She had such a cool project too

thorny jay
onyx hinge
#

no spoilers πŸ™‚

gilded cradle
#

@thorny jay where did you find the guide list link?

thorny jay
#

For Matrix Portal? It's from the product page.

gilded cradle
#

Oh gotcha. It's the See All Guides link. thanks

thorny jay
#

Used to work, or at least it worked a few days ago.

gilded cradle
#

Seems to be broken for other products as well

#

@thorny jay I just sent an email to the correct people.

onyx hinge
#

that looks really good

gilded cradle
#

I like the improvement

idle owl
#

Yes, more Adabot automation!

#

Yes Carter has one.

tidal kiln
#

in work

#

should be out this week

thorny jay
# gilded cradle 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.

ionic elk
#

Github doesn't count any of my contributions because Circuitpython is a fork 😦

slender iron
#

@onyx hinge how did you find those contribution numbers?

onyx hinge
#

@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

slender iron
#

πŸ‘

onyx hinge
gilded cradle
thorny jay
#

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.

onyx hinge
gilded cradle
#

I haven't been using github quite as long πŸ™‚

crimson ferry
#

Trinket M0 has Dotstar

ionic elk
#

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

gilded cradle
#

No worries @ionic elk. It's not a competition. πŸ™‚

ionic elk
#

i feel so cheated tho

#

lol

onyx hinge
#

huh

thorny jay
#

You can fake contribution and write message or graphics in the green thing from GitHub.

balmy stirrup
#

Thanks everyone!

thorny jay
#

Thanks.

gilded cradle
#

Thanks

errant grail
#

Thanks everyone. See you next year @slender iron!

idle owl
#

@crimson ferry Yes, Trinket uses DotStar, but I think pypixelbuf is needed for both. That began with _pixelbuf

tulip sleet
onyx hinge
#
#

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."
thorny jay
onyx hinge
#

mmm custard C modules

gilded cradle
#

@thorny jay the guides link should now be working

thorny jay
gilded cradle
#

Sorry hit enter too soon

#

the guides link should now be working

#

I'm gonna drop off now

manic glacierBOT
#

@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...

ornate breach
#

Pretty funny that the date is December 31, 1969

tidal kiln
#

@slender iron want to chat about displayio?

manic glacierBOT
#

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...

idle owl
#

@slender iron Learn feed just updated. So it worked. I'll still bring it up with PT on Monday.

ornate breach
#

ugh I broke something. Time to do git magic

slender iron
#

@tidal kiln yup, just give me 2 minutes

tidal kiln
#

ok

slender iron
#

kk

#

I'm in the circuitpython voice channel again

tidal kiln
#

yah. one sec. mic works in settings but not in channel.

slender iron
#

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

manic glacierBOT
hearty tapir
#

@slender iron can you help to understand if I face a bug or if I'm the bug?

slender iron
#

I'm around

hearty tapir
#

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++ πŸ˜„

ornate breach
#

git is so much fun

hearty tapir
#

(so this doesn't appear to make a difference, sorry if this added to the confusion :D)

slender iron
#

@hearty tapir sounds like it could be a bug

hearty tapir
#

You know, I chose the country object - because I thought "hey, let's use the simple one as a starter" .. yet another rabbit hole πŸ˜„

slender iron
#

πŸ˜„

#

I'm trying to remember who added they other details. they may know

hearty tapir
#

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.

manic glacierBOT
#

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...

hearty tapir
#

Thank you, I feel more confident now πŸ™‚

slender iron
#

real bugs exist πŸ™‚

ornate breach
#

took me long enough but I got it right.

idle owl
#

I always assume it's me as well. Keep having to step back and remember that it isn't.

hearty tapir
#

@slender iron I noticed yesterday that the ESP-IDF fork on the adafruit repo is missing the /components/hal folder

slender iron
#

that's because it's the release/4.2 branch

#

and they moved things around after that

hearty tapir
#

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
#

πŸ™‚

#

the idf stuff will shift with my pin alarm PR

ionic elk
#

@slender iron got a sec? I have a few questions about Netconn vs Mbed TLS

slender iron
#

nope, I'm gonna go grab lunch

#

I can ping you when I'm back

ionic elk
#

sure, have a good lunch

slender iron
#

thx

manic glacierBOT
manic glacierBOT
slender iron
#

@ionic elk ok, I'm back. still want to chat?

ionic elk
#

Sure - I can probably describe by text but we could also just talk

slender iron
#

either way works for me

ionic elk
#

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

slender iron
ornate breach
#

Hmm.. board builds keeps failing

#

I’ll address this later this evening

slender iron
#

you can have your pr marked as draft and leave it open

manic glacierBOT
kind river
#

@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.

slender iron
#

@kind river interesting! what is the api?

slender iron
#

@tulip sleet damien expects 1.14 to be released in the next few weeks. seems like we could target it

kind river
manic glacierBOT
#

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.
...

slender iron
#

@kind river neat! I like how simple that is

manic glacierBOT
#

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...

ornate breach
#

Thanks @slender iron

fluid moss
#

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
manic glacierBOT
#

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

  1. It's an opportunity to brag about a performance optimization :-)
  2. 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...

maiden kettle
#

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".

manic glacierBOT
#

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.

analog bridge
#

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?

slender iron
analog bridge
#

risc-v is just another core and doesn't need to be related to sleep...

#

while FSM is a sleep only thing

slender iron
#

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?

analog bridge
#

its better to just delay ulp for now until idf is stable

slender iron
#

kk, hopefully it'll be better in 4.3

hearty tapir
manic glacierBOT
hearty tapir
#

The board looks cool, @analog bridge πŸ™‚

analog bridge
manic glacierBOT
#

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 ...

analog bridge
onyx hinge
#

good morning!

manic glacierBOT
idle owl
#

@onyx hinge G'morning!

ornate breach
#

Good morning

onyx hinge
#

@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

ornate breach
#

I recall πŸ™‚

#

Doesn’t hurt to have parts for future projects πŸ˜‰

onyx hinge
#

I've got plenty of those

ornate breach
#

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

onyx hinge
#

nice

onyx hinge
#

or if you have the space but are component count conscious, put unpopulated smd resistor positions

ornate breach
#

Not a bad idea

onyx hinge
ornate breach
#

I’ll put it on the bottom

balmy stirrup
#

@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.

manic glacierBOT
idle owl
#

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.

ornate breach
#

I’m going to start using 6 pin SH connectors for SPI

blissful pollen
#

@idle owl I was actually thinking of doing a project like that. Kinda sad to know that connector doesn't exist

jaunty juniper
#

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

idle owl
#

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.

jaunty juniper
#

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

idle owl
#

Hmm. Anyone have a QT Py and a continuous servo?

blissful pollen
#

Ah I think I have the servo around still

#

@idle owl Yup found it

idle owl
#

I need a super simple piece of code tested. Do you have a few minutes?

blissful pollen
#

Yeah I do, just have to find a breadboard to hook them too

idle owl
#

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.

blissful pollen
#

It is, haven't soldered my memory chip on yet πŸ™‚

idle owl
#

Ok perfect πŸ™‚

blissful pollen
#

@idle owl it works, though in stop my servo still barely spins (didn't play with the PWM settings to stop that)

idle owl
#

That's probably fine for now.

#

Thank you!

#

Really appreciate it.

blissful pollen
#

no problem, you're welcome

idle owl
#

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.

blissful pollen
#

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 πŸ™‚

idle owl
#

Worked out well for me!

onyx hinge
#

@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

tulip sleet
#

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.

jaunty juniper
#

in addition it works using a stemma QT connector to the motor and SDA as data pin πŸ˜‰

tulip sleet
#

do you want me to turn this into my own PR?

onyx hinge
#

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?)

tulip sleet
#

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

onyx hinge
#

yeah but in these specific cases it's dealing with 2-byte uuids

#

it only ever writes to uuid[0] and uuid[1]

tulip sleet
#

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

onyx hinge
#

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

tulip sleet
#

there is some compiler flag in the stm build that is catching this but not in the atmel-samd build

onyx hinge
#

I looked but I couldn't figure out which one it was (neither explicitly has -Werror=array-bounds)

tulip sleet
#

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.

onyx hinge
#

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

tulip sleet
#

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

onyx hinge
#

happy to, I'm waiting on copying to sd cards for my "real" project this morning

tulip sleet
#

@onyx hinge maybe we should turn on -Warray-bounds=1 for all builds, it looks like we might need -ftree-vrp also

onyx hinge
#

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

tulip sleet
#

it says -O2 turns on -ftree-vrp, which then catches these bugs. without that, it's not smart enough

#

definitely a real bug

onyx hinge
#

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

tulip sleet
#

no, not yet. I just added -fno-inline-functions to its OPTIMIZATION_FLAGS

#

but not pushed yet

onyx hinge
#

-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

tulip sleet
#

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...

onyx hinge
#

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)

tulip sleet
#

i am only adding it to enable better checking on the -Os builds

onyx hinge
#

I was wondering about the fatfs -Os too

tulip sleet
#

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

onyx hinge
#

I fixed simmel not fitting by deactivating gamepad and sdcardio

tulip sleet
#

@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

onyx hinge
#

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

manic glacierBOT
manic glacierBOT
#

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...

onyx hinge
slender iron
#

thanks @onyx hinge

#

it might be due to our repo. I know I have trouble doing comparisons sometimes when doing release notes

onyx hinge
#

I think I sounded grumpy about it in our PR, sorry about that. It doesn't hurt to discuss it again.

idle owl
#

@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.

gilded cradle
#

Oh yeah, I kinda forgot about it. I could add it. Want to open an issue? I think it would be relatively quick.

idle owl
#

Sure. It should definitely be quick to add.

gilded cradle
#

Thanks @idle owl

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.

gilded cradle
#

Could you paste up your code?

idle owl
#

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.

gilded cradle
#

ok

idle owl
#

@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.

gilded cradle
#

Ok, I'll try it out

idle owl
#

Tried using my mobile phone flashlight and no change.

manic glacierBOT
gilded cradle
#

Yeah, I get 556 too. I'll take a closer look

idle owl
#

@gilded cradle Ok, good to know it's not me.

gilded cradle
#

πŸ™‚

thorny jay
idle owl
#

Still doesn't explain the serial disconnect.

gilded cradle
#

@thorny jay you could use a cell phone camera for that πŸ˜‰

idle owl
#

FridgePhone ℒ️

gilded cradle
#

The coolest piece of tech

idle owl
#

@gilded cradle Well played.

gilded cradle
#

πŸ˜„

ionic elk
idle owl
#

@ionic elk Oh good! To all of that.

gilded cradle
#

Oh good.

idle owl
#

@ionic elk Would that affect the light sensor data as well?

thorny jay
#

Was it Snowden suggesting to put cell phone in the fridge when visiting him?

ionic elk
#

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

idle owl
#

@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.

manic glacierBOT
gilded cradle
#

Kinda weird that the battery voltage check works

ionic elk
#

@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

gilded cradle
#

Ok, so probably unrelated. I get 556 for the value even running it a single time.

ionic elk
#

^ the bin of the tag of mag

idle owl
#

Yeah that's what I am getting.

ionic elk
#

Oh hmmm I thought the 556 was the number of iterations, I wasn't reading well enough

idle owl
#

Ah... heh no

ionic elk
#

so you're getting bad values, and then it crashes?

idle owl
#

It's the light sensor value.

#

I get one value, that's it. Then it crashes.

#

One value repeated.

gilded cradle
#

Mine reads a bunch of times then crashes

ionic elk
#

Ok, so it prints it many times

idle owl
#

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.

ionic elk
#

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

idle owl
#

Hmm

ionic elk
#

556 is on the output of .value, where you're expecting a range of up to 65536?

idle owl
#

Yes.

ionic elk
#

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?

gilded cradle
#

Right now we seem to get a range of 556-556

idle owl
#

I have not checked it. It's SMT on the front, so I think I could multimeter it?

ionic elk
#

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

idle owl
#

Would need 3 hands though, so need to wait until Roy is done with his meetings.

gilded cradle
#

Yes, it appears to have exposed pads

ionic elk
#

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

idle owl
#

Two hands for probes, one for a flash light.

#

I'll try it two handed. Might be able to chopsticks the probes.

gilded cradle
#

It should vary even without a flashlight

blissful pollen
#

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

gilded cradle
#

like just use your shadow

idle owl
#

@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?

blissful pollen
#

@idle owl I have a meeting I'm about to get into I will try in hour or so

idle owl
#

@blissful pollen Perfect.

ionic elk
#

So the light sensor is just this little A3 guy, right?

gilded cradle
#

Yes

idle owl
#

Yes

ionic elk
#

Ok checking it out now.

idle owl
#

So I'm still a multimeter noob. What setting should I be using?

tulip sleet
#

i will approve and merge the adc fix PR when it finishes building

gilded cradle
#

DC voltage

idle owl
#

Thank you!

gilded cradle
#

Or resistance

#

either should work

manic glacierBOT
gilded cradle
#

Looks like the resistance setting works better. Yes, it is changing the resistance of the light sensor for me.

ionic elk
#

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

idle owl
#

Hmm.

ionic elk
#

I assume this light sensor requires power

#

of some kind

#

lemme take a look at the schematic

idle owl
#

Except it may have been working on Arduino.

#

So...

gilded cradle
#

Also, I tested the image you uploaded @ionic elk and it's not crashing anymore.

idle owl
#

Nice. I didn't end up loading it when we determined the light issue was unrelated.

gilded cradle
#

Right, still 556

ionic elk
#

@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

gilded cradle
#

Let me see if I can get it doing something in arduino

idle owl
#

Resistance is changing for me as well

#

(once I figured out which setting that was on the multimeter πŸ™„ )

ionic elk
#

hmm. ADC should be turning off the pulldown, it's in the code

idle owl
#

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.

ionic elk
#

haha

idle owl
#

That's from the guide. It never even occurred to me to check for something there.

#

Deepest apologies.

ionic elk
#

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"

idle owl
#

@blissful pollen You can skip testing it in Arduino. It's a PEBCAK issue. We figured it out.

ionic elk
#

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

idle owl
#

@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.

manic glacierBOT
ionic elk
#

@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

idle owl
#

True.

ionic elk
#

otherwise you'd still be stuck with a gross unexplainable issue

idle owl
#

Yeah, that one would have perplexed me.

ionic elk
#

Plus I now know a bit of Magtag esoterics that I might have tripped on later

idle owl
#

Fair enough. Alright, apology retracted.

ionic elk
#

sorry not sorry

idle owl
#

Exactly. πŸ˜„

gilded cradle
#

Thanks @idle owl, just saw. That makes sense because we turn on neopixels and audio

idle owl
#

I guess it was worth it to find out that's needed because you'll need it to add it to the MagTag library.

manic glacierBOT
gilded cradle
#

Right

#

Ok, looks like Pin 21 is NEOPIXEL_POWER

idle owl
#

Ah hmm.

gilded cradle
#

Yeah, so it's the neopixel_disable setting in peripherals, which is enabled by default, so not much to do.

idle owl
#

That's convenient.

gilded cradle
#

@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)
idle owl
#

Nice! I see the PR.

gilded cradle
#

πŸ™‚

idle owl
#

@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.

blissful pollen
#

@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

idle owl
#

@blissful pollen Thanks πŸ˜„

kind river
idle owl
#

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.

crimson ferry
#

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?

cursive kindle
#

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.

idle owl
#

Check the disk size. What OS are you using?

cursive kindle
#

Windows, and it is 1.97Mb

idle owl
#

Then it's working πŸ™‚

cursive kindle
#

Fantasitcal πŸ™‚

idle owl
#

Congrats!

cursive kindle
#

Thanks

#

I am getting better at smd soldering with an iron, sodering the ECC608 to the metro airlift was...work πŸ˜›

idle owl
#

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

gilded cradle
#

I'll fix it

idle owl
#

Thanks! Apologies for not catching it in review.

#

Tag me as a reviewer.

cursive kindle
#

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

manic glacierBOT
gilded cradle
#

Yay! Great to hear @cursive kindle

cursive kindle
#

Yeah, you wound up having to revert...something...

gilded cradle
#

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.

cursive kindle
#

They have done a major release of raspberry pi os...for December...I imagine the kernel changes might be at issue

gilded cradle
#

Yep, that's what I'm investigating πŸ™‚

idle owl
gilded cradle
#

Excellent

idle owl
#

I replied to the forum post that started this whole thing to let them know it was added.

gilded cradle
#

Thanks

#

It was a good feature to add in

idle owl
#

Indeed.

slender iron
crimson ferry
#

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.

slender iron
#

ya, I'm not convinced the idf can do that

manic glacierBOT
#

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)   ...
fluid moss
#

^ 1st cpy git issue YEET!

thorny jay
#

@idle owl can you publish next week meeting document please?

idle owl
#

Scott already did.

thorny jay
#

I see your pinned message from the 7 with the document for the 14.

#

Found, can you pin it?

idle owl
#

Please ping Scott, I'm getting dinner ready.

thorny jay
rigid birch
#

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?

manic glacierBOT
idle wharf
#

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 ?

crimson ferry
#

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...}

idle wharf
#

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 !

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.

manic glacierBOT
#

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?

crimson ferry
#

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

idle wharf
#

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. πŸ˜‰

#

As there always is... πŸ’š Such a great system !

hollow gazelle
#

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.

Adafruit Learning System

An IoT eInk display on magnets!

hollow gazelle
#

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 ??

manic glacierBOT
hollow gazelle
thorny jay
manic glacierBOT
ornate breach
#

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.

prime flower
thorny jay
prime flower
#

I've since updated the firmware on the site

#

....weird, ladyada was also having a similar issue

thorny jay
#

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.

prime flower
#

Yeah, it's beta software. I noticed it freezes up when you "preview" long animations, you can turn that off from the device settings

prime flower
thorny jay
#

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.

prime flower
#

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.

thorny jay
#

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.

prime flower
#

Sure! That'd be helpful, thanks!

ornate breach
#

wow that was such a pain to get cleaned up

manic glacierBOT
crimson ferry
#

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

slender iron
#

it should but it was broken

slender iron
slender iron
crimson ferry
#

that was a slightly older version. latest S3 does return <TimeAlarm> from the light_sleep... function but not from the alarm.wake_alarm

slender iron
#

ya, dan fixed it. I don't think we corrected wake_alarm after light sleep

crimson ferry
#

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)

manic glacierBOT
slender iron
#

@crimson ferry ya, it should

idle owl
#

@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.

manic glacierBOT
#

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...

onyx hinge
#

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]

Amazon Web Services

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...

tulip sleet
idle owl
#

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.

crimson ferry
#

@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)

idle owl
#

@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...

tulip sleet
#

@idle owl i do have both, but I have to leave in 10 minutes for dr appt; can do in a couple of hours

idle owl
#

@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.

tulip sleet
#

will ping you when i return

idle owl
#

Thank you!

tulip sleet
#

this ,right?

idle owl
#

Yes.

tulip sleet
#

@idle owl got it wired up and tested in 8 minutes; it works!

idle owl
#

Oh excellent! Thank you so much @tulip sleet I really appreciate it.

tulip sleet
#

πŸ‘ πŸ‘

tidal kiln
#

fwiw - i have that hw combo also and can test if need more

idle owl
#

@tidal kiln It worked with my hacky workaround and Dan got it going, so I'm confident it's fine. Thanks for the offer!

tidal kiln
#

np. i'm heads down elsewhere. ping me if something comes up though.

idle owl
#

@tidal kiln Will do, much appreciated!

rigid birch
idle owl
tidal kiln
#

πŸ‘€

idle owl
#

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.

tidal kiln
#

sure. give me a bit. just realized i haven't even soldered headers on my qt yet.

#

only used stemma conn so far.

idle owl
#

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.

hearty tapir
manic glacierBOT
#

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

solar whale
#

@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.

tidal kiln
#

@idle owl wired. what's the test?

idle owl
#

and ground D2 (A2 on the QT Py)

#

reboot it

idle owl
#

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

tidal kiln
#

anything special CP version? or just use latest?

idle owl
#

I used the beta, but... hmm. That shouldn't matter. But try it with the beta.

tidal kiln
#

6.1.0-beta.2 ?

idle owl
#

Yep!

#

oh wait

tidal kiln
#

@idle owl hmm. not working. added print to exception handler.
[Errno 30] Read-only filesystem

idle owl
#

hmm.

#

Ok so it's not me.

tidal kiln
#

checked the pin in REPL and it's reporting as expected

idle owl
#

Ok

hearty tapir
tidal kiln
#

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.
idle owl
#

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.

ruby lake
#

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?

tidal kiln
#

@idle owl maybe try with a trinket m0 and see if you get same behavior?

idle owl
#

Yeah my thoughts exactly.

#

Grabbing another board.

tidal kiln
#

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

idle owl
#

also true.

tidal kiln
#

i'm gonna go back to other thing. ping me again if you figure something out.

idle owl
#

@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.

hearty tapir
#

I fixed that .. should see results sometimes soon.

ornate breach
#

I think I need to poke the CI on my PR

#

or not

onyx hinge
#

@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?

solar whale
#

I'll send it via e-mail of that is OK

onyx hinge
#

that works too

tulip sleet
#

No idea. I have never used those targets myself

onyx hinge
#

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
#

thanks @onyx hinge

onyx hinge
#

just don't make downloading it 100 times a part of your CI procedure

manic glacierBOT
#

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...

hearty tapir
#

@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.

manic glacierBOT
crimson ferry
#

@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.

hearty tapir
#

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?

crimson ferry
#

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

hearty tapir
#

interesting ... maybe a side effect when running without code.py .. let me try this.

manic glacierBOT
#

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...

crimson ferry
#

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.

hearty tapir
#

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")

crimson ferry
#

Co-sign: "I just dislike that I don't know why"

hearty tapir
crimson ferry
#

essentially, but Beacon frame, not Probe Request

hearty tapir
#

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.

crimson ferry
#

ah, interesting scenario

manic glacierBOT
onyx hinge
#

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

crimson ferry
#

interesting question, primary use case is probably self-contained embedded app. Maybe a Wi-Fi drop box within the core??

hearty tapir
#

I found no beacons for 1, 6, 11 and reflashed firmware each time.

manic glacierBOT
hearty tapir
#

@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

onyx hinge
#

@hearty tapir I think I don't even know enough to ask the right question yet.

hearty tapir
#

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.

prime flower
#

Has anyone received a OSError: [Errno 9] EBADF when attempting to read from a previously read from socket?

hearty tapir
#

I'll read up on what may trigger an OTA app to be launched. Maybe I'll find something like this.

prime flower
#

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

onyx hinge
#

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.

crimson ferry
prime flower
crimson ferry
#

@prime flower thanks, though I don't seem to be able to (or know how to) recover from that other than reload

hearty tapir
crimson ferry
#

I think it was originally 10, but now at 4

hearty tapir
#

Iβ€˜m in bed and will read on some OTA APIs before sleep, before deep sleep. Talk to you tomorrow

lone sandalBOT
prime flower
idle wharf
#

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 ?

hollow gazelle
#

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?

Adafruit Learning System

The next step in learning CircuitPython.

idle wharf
#

I'm curious to hear the answer... but I concur that it was always my understanding REPL is a clean CP instance

idle owl
#

@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.

idle wharf
#

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.

idle owl
#

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.

idle wharf
#

I strive for positive !

idle owl
#

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?

idle wharf
#

the same as here, askpatrickw

idle owl
#

Great!

manic glacierBOT
#

@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...

idle wharf
crimson ferry
#

@hollow gazelle My understanding is that boot.py only runs on reset, code.py should run clean on every reload. Many use cases for boot.py... today I put a time.sleep in there just to give me a chance to control-C in case my code.py gets into an infinite reset loop on startup

idle owl
idle wharf
#

@idle owl The PyPi release failed. I'll look at that.

idle owl
#

Ah blergh. Ok.

slender iron
hollow gazelle
slender iron
#

yup, low power memory won't be cleared

#

and you can use it for whatever you like

jaunty juniper
#

what about regular microcontroller.nvm ?

slender iron
#

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 wharf
#

@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.

idle owl
#

Yes! It probably is.

#

I won't have time today to look into it, so I'll add it to my Monday list.

idle wharf
#

No worries... thank you !

manic glacierBOT
#

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 owl
#

@idle wharf Invite sent to join our review team!

idle wharf
#

Aww thanks πŸ˜‰

And I know the problem is... the version has to be bumped manually.

idle owl
#

@idle wharf Manually how?

#

Ohhhhh.

#

Can you put in a PR?

idle wharf
#

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.

crimson ferry
idle owl
#

@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 πŸ˜„

idle wharf
#

Totally...

idle wharf
idle owl
#

@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.

manic glacierBOT
idle owl
#

@crimson ferry Research indicates you are anecdata on GitHub. Invite to join our review team is sent!

crimson ferry
#

@idle owl yes, "@crimson ferry", cool thanks!

idle owl
#

You're entirely welcome! Thank you for joining the review team!

idle wharf
#

@idle owl Circup 0.3.1 is released

idle owl
#

@idle wharf I saw that! Excellent, thank you.

ornate breach
#

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

idle owl
#

@ornate breach I'm going to tag @slender iron on that one. He'd know better! ^^

ornate breach
#

Gotcha! Figured you might know since you were on right now 😬

idle owl
#

No worries! Scott's around too. We're in an internal meeting.

ornate breach
#

Scott is reviewing the PR I believe πŸ™‚

slender iron
#

you can add it to your board but we don't want them all in the qtpy haxpress

ornate breach
#

πŸ‘πŸ»

slender iron
#

each definition takes up flash space

#

and we want to horde it for the future

ornate breach
#

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 πŸ₯³

ornate breach
#

I’m excited to start digging deeper into CPπŸ’ͺ🏻

orchid basinBOT
manic glacierBOT
ionic elk
#

@slender iron do you have any idea how to enable the LWIP debug logs? I can't seem to google a suitable solution.

manic glacierBOT
idle owl
#

@ionic elk Thanks for picking up that issue.

ionic elk
#

@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

idle owl
#

I won't be around until Monday, so if you need more from me, expect that's when I'll get back to you.

ionic elk
#

I probably just need to poke at the RMT and see what's making it angry this time

idle owl
#

Fair enough.

ionic elk
#

that's the module on the ESP, it's been a little finicky so far

idle owl
#

Ah, got it.

#

It seemed like spurious signal of some kind. But I had no idea what was instigating it.

ionic elk
#

I haven't rigged it up yet but is it always pure white pixels in places they shouldn't be?

idle owl
#

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.

ionic elk
#

hmm

idle owl
#

But it's all kinds of colors really.

ionic elk
#

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

idle owl
#

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?

ionic elk
#

Like white is a good error color, it means something is borked with the signal timing

idle owl
#

I'm making something up here.

ionic elk
#

with the neopixels, every part of the message is represented by a pulse, even the turned off parts

idle owl
#

huh. Interesting.

ionic elk
#

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

idle owl
#

Ahhh ok.

ionic elk
#

but other weird things can happen! I will investigate. It's a good job for a logic analyzer

idle owl
#

Indeed! I hadn't thought of that. Wish I had πŸ˜„

#

Anyway, thanks again. I'm off for now. Later!

ionic elk
#

πŸ‘‹ Thanks for reporting it!

slender iron
#

you can get a socket number from it I think

ionic elk
#

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.

thorny jay
#

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.

manic glacierBOT
#

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...

manic glacierBOT
manic glacierBOT
manic glacierBOT
lone sandalBOT
analog bridge
#

@slender iron if you are available... can we talk ota update here.. the pr reviews are taking a lot of time

slender iron
#

@analog bridge yup, I'm around

analog bridge
#

nice! lets start with the following question.

What does deinit mean? 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 make offset a 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.

manic glacierBOT
manic glacierBOT
manic glacierBOT
vivid temple
#

@slender iron any update regarding an Adafruit PCB with ESP32-S2? I haven’t seen any release date yet

manic glacierBOT
#

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 ...

manic glacierBOT
thorny jay
thorny jay
manic glacierBOT
manic glacierBOT
minor glade
#

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?

tulip sleet
tulip sleet
minor glade
#

@tulip sleet oh yes! sorry, i meant a process for getting it enabled by default!

tulip sleet
#

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

minor glade
#

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
#

@tulip sleet good info. should it get added to build guide?

#

(gcc version update)

tulip sleet
#

@tidal kiln I just did that

tidal kiln
#

excellent. thanks!

#

i totally rely on that guide since i only build CP rarely

solar whale
#

@tulip sleet You may want to put a note on the MACOS page as well since brew still uses gcc9

manic glacierBOT
#

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 ...

slender iron
analog bridge
#

np... πŸ™‚

analog bridge
slender iron
#

kk. I haven't looked at the changes you made overnight

analog bridge
#

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.

slender iron
#

kk. I'm out tomorrow so you could have someone else review