#circuitpython-dev

1 messages · Page 31 of 1

brazen hatch
#

Got the crash decoded!
From a crash like

Backtrace: 0x4002bbaa:0x3ffdf0b0 0x40032d95:0x3ffdf0d0 0x400357d2:0x3ffdf0f0 0x40034642:0x3ffdf170 0x40032e88:0x3ffdf190 0x40032e3a:0x3ffdf1d0 0x00000001:0x3f01bc10 |<-CORRUPTED

I get:

0x4002bbaa: panic_abort at /home/bill88t/git/circuitpython/ports/espressif/esp-idf/components/esp_system/panic.c:408
0x40032d95: esp_system_abort at /home/bill88t/git/circuitpython/ports/espressif/esp-idf/components/esp_system/esp_system.c:137
0x400357d2: vApplicationStackOverflowHook at /home/bill88t/git/circuitpython/ports/espressif/esp-idf/components/freertos/port/xtensa/port.c:407
0x40034642: vTaskSwitchContext at /home/bill88t/git/circuitpython/ports/espressif/esp-idf/components/freertos/tasks.c:3505
0x40032e88: _frxt_dispatch at /home/bill88t/git/circuitpython/ports/espressif/esp-idf/components/freertos/port/xtensa/portasm.S:436
0x40032e3a: _frxt_int_exit at /home/bill88t/git/circuitpython/ports/espressif/esp-idf/components/freertos/port/xtensa/portasm.S:231
0x00000001: ?? ??:0
0x00000000: ?? ??:0

Which really isn't explaining anything.

#

Since it's heap corrupted, it doesn't matter at all.

jaunty juniper
brazen hatch
#

Did another crash just in case. It's slightly different since the corruption is in heap region.

? Backtrace: 0x4002bbaa:0x3ffe29e0 0x40032d95:0x3ffe2a00 0x400357d2:0x3ffe2a20 0x40034642:0x3ffe2aa0 0x40032e88:0x3ffe2ac0 0x40032e3a:0x3f78029c |<-CORRUPTED
0x4002bbaa: panic_abort at /home/bill88t/git/circuitpython/ports/espressif/esp-idf/components/esp_system/panic.c:408
0x40032d95: esp_system_abort at /home/bill88t/git/circuitpython/ports/espressif/esp-idf/components/esp_system/esp_system.c:137
0x400357d2: vApplicationStackOverflowHook at /home/bill88t/git/circuitpython/ports/espressif/esp-idf/components/freertos/port/xtensa/port.c:407
0x40034642: vTaskSwitchContext at /home/bill88t/git/circuitpython/ports/espressif/esp-idf/components/freertos/tasks.c:3505
0x40032e88: _frxt_dispatch at /home/bill88t/git/circuitpython/ports/espressif/esp-idf/components/freertos/port/xtensa/portasm.S:436
0x40032e3a: _frxt_int_exit at /home/bill88t/git/circuitpython/ports/espressif/esp-idf/components/freertos/port/xtensa/portasm.S:231
0x00000000: ?? ??:0

In case anybody wants the elf, here.

#

Debugging heap is gonna be a pain.

#

And I have no clue what is going wrong.

#

And the crash only happens on very pystack-intensive code on anything but s3.

#

This issue is an iceberg.

#

Could it be that the pystack size needs to also be a specific multiple in size?

#

And how is this bug triggered only by big boi pystacks?

#

So many questonks.

#

So little sanity left.

#

I am doing my very best, but I don't think it will be solved by 8.1, so it will mean it will need a big warning placed on it.
It's not an issue for those who don't use big pystacks, but those who do will need to be careful.
Though realistically, I have had ljinux running on it for uptimes of 8 hours.
Unless you are doing something extremely pystack intensive it shouldn't crash on s2 or c3.
I hope in the next 10 days I will get my ebay s3 board so I can debug it there.
Perhaps since it's not a clone of anything else I will make a board port for it.

#

Perhaps it would have been faster to rewrite all the gc funcs to work with stackless.
I miss the simple days I could just use stackless.

#

This detour is gonna cost us 21 million years.

#

Yep rpi64 latest also suffers from this.

manic glacierBOT
tulip sleet
#

I will make a PR that falls back to the old way if the new way isn't available.

lone axle
#

Ah, Thank you. I saw some things that mentioned installing it that way while I was searching around. It's good to have it confirmed as a way to get it.

tulip sleet
#

what version of git do you have now? git --version

lone axle
#

git version 2.34.1

tulip sleet
#

ah well... alright, I'll figure out a way

manic glacierBOT
#

Fixes #7786.

The partial clone method of fetching submodules introduced in #7763 does not work for git older than version 2.36.0. (I had hoped it was earlier than that.)

  • Add a fallback to the older method, which does a shallow clone of depth 1 for each submodule.
  • Add a new target make remove-submodules, which cleans out the currently fetch submodules, so you can start from scratch and do make fetch-submodules again. This is useful to switch between fetch-submodule methods, an...
manic glacierBOT
#

Does placing the || between the statements cause the statements to be executed until one is successful (i.e. not False)? If so, I'm curious how the old method executes both statement 2 and statement 3 in the cases that the new method (statement 1) fails? I'm sure I don't understand how make processes the new line but I would have expected statement 1 || (statement 2 && statement 3) || echo Error Message

Also, for the last month or so I've been having to run the fetch-submodules multiple...

#

The old way was this:

# This update will fail because the commits we need aren't the latest on the
# branch. We can ignore that though because we fix it with the second command.
# (Only works for git servers that allow sha fetches.)
.PHONY: fetch-submodules
fetch-submodules:
	git submodule update --init -N --depth 1 || true
	git submodule foreach 'git fetch --tags --depth 1 origin $$sha1 && git checkout -q $$sha1'

Note that there is an expectation that the first line wil...

manic glacierBOT
#
[adafruit/circuitpython] New branch created: foamyguy\_device\_test
lone axle
#

Was trying to push to my fork, but messed it up. My apologies, it can be deleted, but I don't know the proper way and don't want to mess anything up further 😅

tulip sleet
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.1.0-beta.0-66-gcc5451ec3-dirty

Working fine in

Adafruit CircuitPython 8.0.4-1-g4517071e6-dirty

Code/REPL

any of the examples from https://github.com/adafruit/Adafruit_CircuitPython_HTTPServer

Behavior

Start Program, any program interrupt after the httpserver is started will result in a hang/crash when you try to restart code. The behavior is the same using the wifi in client or ap mode.

...

manic glacierBOT
manic glacierBOT
nimble forge
#

@tame grove Did you ever get anywhere with writing a circuit python module in Rust?

I was wondering at a high level the steps that would need. I'm guessing a Rust module, then cbindgen for the c wrapper around the lib that would go in circuit python. Would it be a shared library or a static library?

sonic gust
#

would someone help me with this code? https://collabedit.com/ht6sx right now it only will change the color when the button is held down. I want to make the button act like a toggle to switch between the 2 colors on button click.

stuck elbow
sonic gust
#

thank you ❤️

manic glacierBOT
timid bolt
brazen hatch
#

I mean, the heap region is what got corrupt?

#

It's 2 am, my brain is funky. I'm barely functional.

vagrant wind
#

I forked circuitpython and made a port for M5Stack AtomS3 Lite. It builds and it works. Now I would like to make the bootloader as well but I don't know where to start.
Should I fork and add the board to this repository: https://github.com/adafruit/tinyuf2 ?
The board has an ESP32-S3

GitHub

UF2 bootloader based on TinyUSB for embedded devices such as ESP32S2, STM32F4 and iMX RT10xx - GitHub - adafruit/tinyuf2: UF2 bootloader based on TinyUSB for embedded devices such as ESP32S2, STM32...

jaunty juniper
#

specifically .github/workflows/build_esp32.yml

#

(in addition to the board files)

vagrant wind
#

Thank you

manic glacierBOT
manic glacierBOT
#

CircuitPython version

8.0.4 on Pico/Tiny2040

Code/REPL

import usb_cdc
usb = usb_cdc.data

if usb.in_waiting:
    print(usb.readline())

Behavior

No data is received if DTR is not active.

The note in https://docs.circuitpython.org/en/latest/shared-bindings/usb_cdc/index.html#usb_cdc.Serial.connected seems to relate to the whole thing, not only on usb_cdc.Serial.connected.

Maybe you want to update the documentation.

I tried and search...

manic glacierBOT
#

The note in the doc says (https://docs.circuitpython.org/en/latest/shared-bindings/usb_cdc/index.html#usb_cdc.Serial.connected):

The host is considered to be connected if it is asserting DTR (Data Terminal Ready). Most terminal programs and pyserial assert DTR when opening a serial connection. However, the C# SerialPort API does not. You must set SerialPort.DtrEnable.

This is an idiosyncrasy of the C# API. So if your C# code does not set SerialPort.DtrEnable, .connected with not...

idle owl
#

@gilded cradle Good morning! I am wondering if you have any plans to add more boards to circuitpython.org/downloads soon? The Feather RP2040 DVI isn't up yet, which I believe was initially due to the lack of product photos, but they are up on the shop now (albeit with no topsilk, but Limor said that's fine). I will need it up for the guide, which still has at least another day on it. So I thought I would check in with you to see where that might be at.

gilded cradle
#

@idle owl, was it included in the latest CircuitPython release? Normally boards are added, but show up as unknown, but it doesn't appear to be the case for that one. Anyway, we can add. We just need to make sure the board_id and filename match what's in CircuitPython.

manic glacierBOT
idle owl
gilded cradle
idle owl
#

Understood.

gilded cradle
manic glacierBOT
idle owl
#

It's already in the shop, but "coming soon".

gilded cradle
idle owl
#

Ahhh.

#

That makes more sense.

#

As to what you meant.

gilded cradle
#

🙂

idle owl
#

@gilded cradle Is there any chance you have time to get it added? I'd have to get help/use the guide because I don't do it enough, and I'm behind on this guide. That said, if you are also busy, I will obviously do it.

manic glacierBOT
gilded cradle
#

Yeah, I should be able to. I have some tools to make adding Adafruit boards fairly quick at least.

idle owl
#

Oh nice. Ok. Let me know if it turns out you don't have the time and I'll add it to my list. Thank you so much!

gilded cradle
#

@idle owl added

idle owl
gilded cradle
#

👍

idle owl
#

@gilded cradle Any idea how long it takes to populate? e.g. Does CI following the PR rebuild it, or is it a cron in the middle of the night?

gilded cradle
idle owl
#

Oh nice ok. Thanks again!!

gilded cradle
gilded cradle
idle owl
#

Perfect!

#

Ahhhhhhh ok it is not in fact in a release.

gilded cradle
#

Right

idle owl
#

@tulip sleet I thought you've made releases since the RP2040 DVI Feather was added? Apparently it has not been included.

gilded cradle
idle owl
#

Yep! I'll use that if necessary. I prefer not to link those in a guide, but I can make a note to update as soon as it has been included.

idle owl
#

Thank you for your help!

gilded cradle
#

yw

idle owl
#

Wait! I can make the link in the guide, it links to the main page, not the specific builds. 🤦🏻‍♀️

#

We're fine. 🙄

gilded cradle
idle owl
#

It probably was, but somehow I forgot for a minute there.

gilded cradle
idle owl
#

@tulip sleet Not as urgent as I thought. But still worth mentioning.

tulip sleet
#

I'm expecting a beta.1 pretty soon, maybe in a day or two

idle owl
#

Ahhh ok.

#

For some reason I thought it had already happened. Since you've been keeping up with them.

manic glacierBOT
lone axle
#

<@&356864093652516868> Reminder the weekly meeting will occur here on Discord at 2pm Eastern (About 30 minutes from now). You can fill in your hugs and status updates ahead of time in the notes document: https://docs.google.com/document/d/1l8zP4t9RGURIoeS_foo5jcmmiRLUWkAJ8NpuB6i30cs/edit?usp=sharing

manic glacierBOT
#

This is still happening. However, the new "UART low level break" code does make it snap out of this situation.

What's different between metro m7 and other boards is that this happens after just 1 byte! on other boards it took more pending UART data (like, say, 64 bytes) so you wouldn't hit it as easily/often.

see

onyx hinge
#

@minor plume ❤️ happy to see you in the voice chat today. it's been awhile.

#

@tulip sleet do you want me to grab the "core" section?

onyx hinge
#

I have to BRB but you can start without me and i'll be back by then

lone axle
turbid radish
#

I appreciate it

idle owl
#

@midnight ember FYI: please make sure when you add your Hug Reports and Status Updates to make a note about not attending the meeting so the host knows to read your notes.

#

@midnight ember Also FYI: The RFM version of the mailbox project is in the works. It will be using an RP2040 Feather with a built-in RFM radio. It won't be quite the same as the build I have at my dad's place, unless I add an Airlift FeatherWing. But still!

midnight ember
#

oops was deep into working on an API, the world became blurred out. thank you for the ping!

onyx hinge
#

yay 3d printeding helpers

#

oh and hug report for whoever gave emojis to many of the roles, it's nice/fun

idle owl
#

@onyx hinge lol and thanks for the hug report. 😄

onyx hinge
#

get well soon, Ari

idle owl
#

Do we even have an Airlift FeatherWing? looks

#

Of course we do.

lone axle
idle owl
#

Oi, blowing up the neighborhood when someone gets mail?

#

🎉 Good to hear!

still zephyr
#

I have a M4 can feather @midnight ember. let me know

idle owl
#

@midnight ember We have a little camera we sell that has a CircuitPython lib, if I recall correctly. At least I remember taking photos with something using CircuitPython.

idle owl
#

I was talking about Jeff thanking me for listening while he lectured on MOSFETs that turned out to be irrelevant to my current build.

ornate breach
#

Hahaha

midnight ember
#

ok will give you a ping later Jose David M.

ornate breach
#

Context was lost because I wasn’t in the meeting 🤪

#

Carry on

idle owl
midnight ember
#

Yey I2S on the Metro M7!

#

22 voice polyphony! ❤️

onyx hinge
midnight ember
#

Thank you Jepler for the great work on the I2S and Tannewt for the PR push. Nothing gets me more excited recently than I2S stuff. 🙂

solar whale
#

RP2040RFM ??? Woo Hoo!

midnight ember
#

DVI, graphics, sound, flashy blinky things, low power, LORA, so many cool things happening.

idle owl
#

Thank you!

idle owl
midnight ember
#

Is the talk available to watch/listen to online?

idle owl
midnight ember
#

The bear is adorable Melissa! I love how it puts the towel up and hides. Ugh adorable.

#

Hope you get better Tammy! Good luck with the amplifier project.

onyx hinge
midnight ember
#

Arduino sticking to the 5V as revision update to some legacy Arduinos..

turbid radish
#

But who makes shields now???

midnight ember
#

Their new Arduino Giga is pretty beefy though.

turbid radish
onyx hinge
#

thank you Dan!

idle owl
#

March 27th!

crimson ferry
#

if Arduino uses NINA for the S3 co-processor, that could potentially be interesting for CP

idle owl
#

Thanks Dan! Thanks everyone who participated!

turbid radish
#

MP runs on that microcontroller

lone axle
#

Thanks Dan, have a good day everyone!

turbid radish
#

Thanks Dan!

midnight ember
#

Thank you for hosting Dan!

still zephyr
#

Thanks

onyx hinge
#

maybe for CP use you can load CircuitPython on the ESP and use the Renesas chip as the I/O coprocessor 👹

gilded cradle
#

Thanks everyone

minor plume
#

Thanks, everyone!

ember iris
#

Thank you! Have a great week all!

midnight ember
#

No cute icons in the dev channel? 🙂

tulip sleet
onyx hinge
tulip sleet
minor plume
tulip sleet
#

Here is the notes document for next 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/1JSfSMwwVf5ZbW4RB9E3h-juGrBmN0jPjo22OrInXjw8/edit?usp=sharing

still zephyr
tulip sleet
#

I guess you only get one badge; there is a priority ordering

still zephyr
#

Circuitpythonistas were not assigned one

idle owl
#

Only the Helpers, moderators and admins were.

#

It took up a lot more time than I expected or really had available. So, I stopped at that point. We can revisit other roles at a later time.

still zephyr
#

Thanks

crimson ferry
#

🃏 Master Punner

manic glacierBOT
idle owl
#

Was I supposed to run something before putting in a PR to make sure it passes, or..? I can never remember on the core.

#

Well pre-commit passed, which is what I think I was supposed to run. So that's good at least.

thorny jay
#

Is there a TR-Cowbell owner club?
I am a little bit late to the party, but I have the only overseas version and that is going to be fun to build and then program.

idle owl
#

I rely on it in the guide, heh.

tulip sleet
#

yes, won't release before it's merged

idle owl
#

It passed

tulip sleet
#

Google Docs has a new feature: Tools->Preferences->Automatically detect Markdown

idle owl
#

Oooh nice.

tulip sleet
#

however, there is not a "Download as Markdown", too bad

#

so it seems to convert the markdown to formatting stuff immediately, and loses the Markdown markup

#

has [ ] checkboxes too

idle owl
#

Ooof. That's not so great for us then.

#

Convenient for rendering Markdown to verify it from another document though.

manic glacierBOT
#

I tested this successfully on Feather ESP32-S2 TFT. I did have to merge main into this branch in order to get a build that worked (prior to merging main I got successful builds, but device bootlooped without running code.py or printing any error messages. Seems like some other commit in main fixed that.)

Current functionality looks good to me.

I think it's worth considering tweaking the name of the x/y point arguments to not have a numberin them, but beyond that this seems good to me.

manic glacierBOT
still zephyr
idle owl
still zephyr
#

Thanks

tulip sleet
#

@onyx hinge I'm testing the MQS PR. All the previous problems seem gone. One thing I notice is that if I play samples recorded at certain rates, the pitch changes. For instance a 440 Hz 11k .wav is not the same pitch as 8k,16k, or 32k, all of which are at the same pitch.

#

is this inherent in how it's implemented? Should that be documented? (Or maybe you did??)

manic glacierBOT
#

All the previous problems seem gone. One thing I notice is that if I play samples recorded at certain rates, the pitch changes. For instance a 440 Hz 11k .wav is not the same pitch as 8k,16k, or 32k, all of which are at the same pitch. Is this inherent in the way the MQS works? Should we forbid files whose sample rates are not evenly divisible into 192k, or just add a **Limitations**: warning?
sine-samples.zip

onyx hinge
tulip sleet
#

i will test pwm audio on something other board too.

#

is 192k fixed or can you increase the carrier freq?

onyx hinge
#

I saw some folks asking questions like maybe only some sample rates supposed in mqs peripheral but I didn't follow the why of it

#

I think there is maybe an integer divisor? I'd have to refresh my memory

#

I'll look at the datasheet more after dinner and figure out what the clocking options are

tulip sleet
#

i will see whether other pwm audio implementations do this too

#

i was testing with a short song snippet and notice the singer's pitch changed

onyx hinge
#

@tulip sleet I can choose oversample of x64 or x32, and an integer divider of 1 to 256 from a base clock that is currently 24.576MHz, I think; I can also potentially change that clock, right now only the SAI peripherals (there are 2 on metro M7) use it

tulip sleet
#

RP2040 does show audible pitch change.

tulip sleet
onyx hinge
#

I don't know about RP2040's carrier frequency

tulip sleet
#

I looked, it's almost 1 MHz

#

i will check nRF as well

onyx hinge
#

did you find that it (RP2040) sounded better than MQS?

#

nRF is low, it's terribly compromise-y

tulip sleet
#

RP2040 uses only 10-bit samples. nRF may not sound so great, but it chooses the carrier frequency based on the sampling frequency:

    // the desired frequency is the closest integer multiple of sample_rate not less than F_TARGET
onyx hinge
#

#define F_TARGET (62500)
62.5kHz for reasons only past-me knows

tulip sleet
#

so it chooses it dynamically

#

so even if it's lower quality, I'm not sure it would be noticeably off pitch.

onyx hinge
#

// Tested for key values (worst relative error = 0.224% = 3.84 cents)

tulip sleet
#

good work!!

onyx hinge
#

yes the max error for the common frequencies is much about half the size of what's commonly considered the just-noticible-difference, usually given as 5 cents

tulip sleet
#

so for the MQS periph, is it doing all the computational work, so you can use a high carrier freq?

onyx hinge
#

yeah it's "just" putting the data in the FIFO same as I2S

tulip sleet
#

I am ok adding a Limitations that says you should use only certain sample rates.

#

so a high carrier freq is not an issue, I think.

onyx hinge
#

right now I feel silly but I'm not even sure what the sample rate is

#

for the PWMAudioOut part

tulip sleet
#

I don't see a 128 anywhere in your code

#

all I see is

    IOMUXC_MQSConfig(IOMUXC_GPR, kIOMUXC_MqsPwmOverSampleRate64, 0u);           /* 98.304MHz/64/(0+1) = 1.536MHz
                                                                                Higher frequency PWM involves less low frequen cy harmonic.*/
#

0u is the divider argument

 * @param divider  The divider ratio control for mclk from hmclk. mclk freq = 1 /(divider + 1) * hmclk freq.
#

so it seems as if it's as high as possible

onyx hinge
#

If you scope the digital PWM signal it's 192kHz

tulip sleet
onyx hinge
#

is there a particular part of that you find clarifying?

tulip sleet
#

sample_rate =

onyx hinge
#

this diagram in the 1010RM.pdf makes it look like the SAI peripheral remains in control of how fast samples are clocked out, but the clock mode setting in the actual working code implies it's the MQS that is clocking SAI so I don't know what to believe

#

"The 44 kHz or 48 kHz input signals from SAI3 are in left_justified format."

#

(also from 1010RM)

tulip sleet
#

@onyx hinge The RT1170 has a special ASRC peripheral (Asynchronous Sample Rate Converter). Neato. Not on the 10xx chips
...
Anyway, I can add a commit that documents this limitation for now. I would rather add something that works well enough into the beta rather than wait. What do you think?

onyx hinge
#

@tulip sleet I am OK with that outcome, I just wish I knew what the effective audio sample rate was when using mqs or how to compute it, because otherwise we have to say "gee it's at some fixed frequency (we think) (we don't know which one)" which is a bit 🙄

tulip sleet
#

your scoping gave the carrier frequency. I will say that the pitch will be off unless the sampling rates divides evenly into 192Khz

#

if you feel like working on this later, something could be done, or it may be impossible

onyx hinge
#

To review what you saw in testing .. you made 440Hz wave files on your host computer, at 11kHz, 8kHz, 16kHz, and 32kHz?

tulip sleet
#

and 44.1kHz

#

they are in the attached zip in my review comment

onyx hinge
#

and 8kHz, 16kHz and 32kHz all "sounded like" a concert A when played?

#

while 11kHz and 44.1kHz sounded like other frequencies?

tulip sleet
#

I had already made (most of) these. Yes, I will test with a guitar tuner app on my phone ...

onyx hinge
#

I think document it (maybe even just release notes until we nail it down further, rather than a fresh commit)

#

and open up an 8.1.0 milestone issue to actually map out what's going on and fix or document it

tulip sleet
#

btw 44.1kHz is Bflat

onyx hinge
#

does it show in Hz?

#

my test, which I only did on i2s and not mqs, was to have one RawSample, assign it a random sample rate, and listen to it. All I confirmed was that I got various arbitrary-seeming tones. so your test is more thorough than mine. and of course I didn't repeat it on mqs. Still not sure if this is mimx audio generally or mqs only.

tulip sleet
#

I didn't test on i2S at all. I can try that

onyx hinge
#

sure if you have the time and inclination

tulip sleet
#

i only noticed because the singer sounded different when I was trying different samples. It was actually more when I was trying to set up a good low-pass filter

#

and trying different caps and resistors I had on hand

onyx hinge
#

OK I'm back to thinking that this is probably not to do with MQS but affects I2S as well. The last divider, the one that SAI_TxSetBitClockRate sets, is only an integer divider.

tulip sleet
#

I will try Metro M4 with I2S Out

jaunty juniper
#

@lone axle I'm trying to test the jquery PR, but make html spits a lot of errors at me, maybe some version mismatch or something, you didn't have any issue locally I assume ?

lone axle
jaunty juniper
#

ok, I'll see if I can understand what is going on here

#

using the artifact from the CI there are weird things because its not running on RTD but the matrix code works

tulip sleet
#

I will merge the PR, and add a release note about audio sample rates

onyx hinge
#

OK

#

@tulip sleet so yes based on adding some print statements near SAI_TxSetBitClockRate I think it is in fact integer divisors of 192kHz that give correct sample rates. and that I understand but don't want to rush to writing the code so that other frequencies like 44.1kHz operate correctly. (have to change the PLL input to the peripheral which has fractional divisors available, not rely on the integer divisor internal to the peripheral)

#

and this will change the MQS carrier frequency slightly as well, because they drive from the same PLL

tulip sleet
#

I just wrote up an issue.

manic glacierBOT
onyx hinge
#

I appreciate it!

tulip sleet
#

I will paste the above into the issue original post

manic glacierBOT
#
onyx hinge
#

OK, I'm going to call it a night. again, I'm in your debt for doing more thorough testing.

tulip sleet
#

you're welcome - I'm a bit of trouble maker , sorry 😁

onyx hinge
#

please, no need to be self-deprecating about it

tulip sleet
#

i really want that ASRC peripheral

#

8-channel PDM microphone interface, internal ASRC, x4 I2S

#

that chip looks designed for Echo Show and the like

#

or more likely something automotive

#

has ethernet

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

I looked up some older versions, and I don't understand quite where the issue comes from, but forcing sphinx to 5.1.1 removes the top versions of the entries (the ones with the box style). Looking at changelogs I don't know why, and it doesn't seem like a good solution.

<img width="339" alt="Last summer no doubles" src="https://user-images.githubusercontent.com/6160205/228216024-e1fc52d6-d578-4bed-b40f-cee3dfb376ad.png">

It looks like setting this fixes it in latest sphinx:

auto...
#

Add missing formats to msgpack unpack.

In mspack.unpack()

  • add support for unsigned ints (they were treated as signed)
  • add support for 64 bits ints (signed and unsigned)
  • fix support for 32 bit ints by not using small ints
  • add support for double precision floats (without the precision)

C python seems to always use doubles for floats, and seems to use unsigned ints for positive integers, so this should fix unpacking msgpack payloads from C python. I also discovered in tests t...

#

CircuitPython version

Adafruit CircuitPython 8.0.3 on 2023-02-23; Swan R5 with STM32L4R5ZIY6

Code/REPL

Adafruit CircuitPython 8.0.3 on 2023-02-23; Swan R5 with STM32L4R5ZIY6
>>> import time
>>> time.monotonic()
7.33317e+08
>>> int(time.monotonic())
733317120
>>> int(time.monotonic())
733317120
>>> int(time.monotonic())
733317120
>>> time.monotonic_ns()
733317128057495129
>>> time.monotonic_ns()
733317130016052252
>>> time.monotonic_ns()
73331...
tulip sleet
#

(jquery fix)

lone axle
# tulip sleet <@382939733107408897> Re <https://github.com/adafruit/circuitpython/pull/7799>, ...

Neradoc mentioned having trouble making the build locally, and checking out the artifact version I think. But nothing beyond that.

As far as I am aware that is correct, when the docs get hosted in RTD is where the issue is appearing so I think it has to make it to there in order to test for certain if it will work.

The locally built HTML seem to have a few slight differences from what ends up on RTD.

jaunty juniper
#

I managed to fix my build issue, it works but as you say, dunno if it will on RTD

lone axle
#

I did realize a bit later on last night that when I initially submitted that PR I had been using an older version of sphinx. I did end up upgrading to 6.1.3 which is what actions shows and got a successful build that way as well.

tulip sleet
jaunty juniper
#

nah it was sphinx trying to run on the venv directory

#

just my setup

manic glacierBOT
onyx hinge
#
  playing undersea.wav
div=8  source=12288750 freq=1536093

[tio 09:33:46] Disconnected
[tio 09:33:49] Connected
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
```well now I have a new problem. it seems to affect just this specific wave file.

oh no is it CIRCUITPY corruption? 
```jepler@eric:~$ md5sum /media/jepler/CIRCUITPY/undersea.wav 
md5sum: /media/jepler/CIRCUITPY/undersea.wav: Input/output error
  File size is 262952 bytes, cluster chain length is 54272 bytes.
  Truncating file to 54272 bytes.
``` yup
tulip sleet
onyx hinge
#

after fsck'ing and copying the file back it plays now that particular one now

tulip sleet
#

but sounds like there might a flash write problem

manic glacierBOT
#

This makes all the samples from Dan's collection register as 440Hz when playing on pwmio or i2sout, using https://webaudiodemos.appspot.com/pitchdetect/index.html to detect the frequency played (all should show as A 440Hz; an error of up to 20 "cents" should be treated as OK)

There's an audible carrier with PWM output and the 8kHz samples. This is probably a limitation of the peripheral which is documented as being for input signals of 44 kHz or 48 kHz; the carrier frequency is a fixed mul...

orchid basinBOT
manic glacierBOT
#

Raw HID OUT reports (to the peripheral from the host), with no report ID, were not being parsed correctly. The code assumed the first byte was the report id. However, this is not always the case.

Instead, see if there is a defined HID device with report ID 0, whose report length matches the incoming report. If so, assume the incoming report is for that device.

The long-term fix is for TinyUSB to know which reports are for which report ID's, but that requires https://github.com/hathach/t...

lone axle
#

Looks like the docs fix did work. The live page at https://docs.circuitpython.org/en/latest/README.html doesn't have console errors about not finding jquery any more. The version dropdown and searching also appear to be working now.

It looks like maybe the 8.0.x version pages are still pinned to the prior version, which does make sense, but in this case means those ones still have the missing jquery thing. So if user clicks off of latest over to 8.0.x it's a little bit difficult to get back to latest. 7.3.x doesn't have the same issue though.

jaunty juniper
#

ah so the fix would have to be added to 8.0.x too

#

(there's an error in filter.js because it's included in all pages, not just the matrix and it doesn't properly check for that, I'll PR a fix for it)

manic glacierBOT
#

The change comes from #7100 that was originally for an issue where using the serial channels too early would cause a crash, so it checks for a connection. The result is that we get a situation where there's something in the buffer, but it can't be read if nothing is connected.

I commented on that here: https://github.com/adafruit/circuitpython/issues/7456#issuecomment-1383495476
(I intended to open an issue for a discussion on that, but I wanted to do some tests first with different confi...

slender iron
tulip sleet
#

how much does it cost?

#

i mean the chip, not the EVK

slender iron
#

~$16

#

(for the lowest end)

tulip sleet
#

it certainly is a powerhouse

slender iron
#

ya, I think it could be a complement to the lower end

#

I wanted to see how different it was from the 10xx

manic glacierBOT
manic glacierBOT
jaunty juniper
#

@slender iron I'd like to reopen the STM32 time.monotonic() issue, the value of monotonic is abnormal, isn't it ? (over 23 years in seconds)

slender iron
#

It's probably based on the RTC with 2000 epoch

#

could subtract the start up time

idle owl
#

@still zephyr Apologies for steering you wrong on the cs change. @tulip sleet Thanks for your input.

#

@still zephyr We'll need to do an Adabot patch to apply that across all of the libraries so you're not doing it manually. All .pylintrc files should match across the libraries.

idle owl
#

@tulip sleet Hello. I am working on the board def for the Feather RP2040 RFM. In mpconfigboard.h, there is a line for MICROPY_HW_NEOPIXEL. Is this supposed to be the GPIO pin to which the NeoPixel is connected? Because, I copied this from the DVI Feather, and it's not right for that either.

#

Everything else looks right.

tulip sleet
idle owl
#

I'll make the change in the DVI file as well.

#

Another look would be appreciated though for sure.

#

@tulip sleet Is this pico-sdk-configboard.h file the same for all RP2040 boards? It contains this. ```// Put board-specific pico-sdk definitions here. This file must exist.

// Allow extra time for xosc to start.
#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64```

#

Another thing - Wouldn't we want RX and TX to show up first for those pins? I was unsure about that when I updated the DVI board def, but looking at it, I'm certain that is what we want. I can update both.

tulip sleet
idle owl
#

OK, thanks. Fixed both already.

tulip sleet
idle owl
#

Ok, got it

#

@tulip sleet OK, so I think I have it. I reorganised it a bit more, did the same for the DVI for consistency. Should I push to my fork and send you a link? Or should I submit the PR and start the discussion there? Probably PR.

#

pre-commit is happy.

manic glacierBOT
idle owl
#

@tulip sleet I made a PR. ^^

orchid basinBOT
timid bolt
#

@tulip sleet are there any particular issues I could work on that would accelerate the release of 8.1?

tulip sleet
timid bolt
#

Okay, I'll check out 7790.

manic glacierBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.0.4 on 2023-03-15; Adafruit Feather STM32F405 Express with STM32F405RG

Code/REPL

>>> import time
>>> import rtc
>>> r = rtc.RTC()
>>> time.monotonic()
30.029
>>> r.datetime = time.localtime(1680048046)
>>> time.monotonic()
7.33363e+08
>>> time.localtime(time.time() - int(time.monotonic()))
struct_time(tm_year=2000, tm_mon=1, tm_mday=1, tm_hour=0, tm_min=0, tm_sec=59, tm_wday=5, tm_yday=1, tm_isdst=-1)
...
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Comparing the logs of the last run and one a day ago, I see sphinx autoapi 2.1.0 has been released.
And this PR might be relevant:
https://github.com/readthedocs/sphinx-autoapi/pull/374

Sphinx 5.2.0 adds domain objects to the toctree by default. This is causing duplicate entries to appear in the table of contents when autoapi is in use, since autoapi also adds domain objects to the toctree by default (e.g. #369). It seems sensible to allow sphinx to handle the addition of domain object...

manic glacierBOT
#

I'm seeing the same bug on a ESP32-S2 Reverse TFT. It's too new to have a 7.3.3 build, so I was unable to test if it worked without crashing on 7.3.3.

I'm using adafruit_requests to make one GET every 30 seconds. I've tried upping that to 60 seconds, but it still crashes, usually crashes within about 20 minutes, but sometimes as long as 2 hours. Like anecdate, I get one of the same two errors when entering safe mode:

Usually:

You are in safe mode because:
CircuitPyt...
onyx hinge
#

In the last 2 days I've had 3 occasions where my Pico W got so corrupted it needed me to use "flash_nuke.uf2" to get it back. This is with 8.1.0 alphas while working on a guide that uses wifi & requests. It may be my imagination but it feels like it's been happening much more often when I'm in the process of re-writing settings.toml (vs writing code.py), but that could be my imagination or a not-the-real-pattern.

When I restart it, I get the 3 blinks for possibly entering safe mode but no matter whether I press the BOOT button or not, it doesn't successfully show up as a USB device.

#

I made common_hal_os_getenv_str and _int immediately return GETENV_ERR_UNEXPECTED and it boots. On a host computer, I can see that the filesystem is corrupt in a particular way:

$ cat /media/jepler/CIRCUITPY/settings.toml 
cat: /media/jepler/CIRCUITPY/settings.toml: Input/output error
#

in this state, os.getenv("WHATEVER") also hangs CP, so it's some kind of bug in the FAT implementation dealing with corrupt filesystems I'm guessing

#

[tio 09:30:53] Disconnected
tulip sleet
#

This is vaguely reminiscent of the Input/output error we were during i.MX audio testing. Recently TinyUSB was updated, and separately pico-sdk and the CYW43 driver were updated. If you preserve this corrupted filesystem and roll back to 8.0.4 does it crash the same way?

jaunty juniper
#

you don't get to safe mode by pressing the boot button

onyx hinge
#

I think the answer is yes, rolling back to 8.0.4 it still crashes.

#

@jaunty juniper how do you get safe mode on pico w?

jaunty juniper
#

reset when it blinks

#

the boot button can not be read on pico, that's an ESP thing

#

(and other boards, but I don't think we implement boot to safe mode on RP2040)

onyx hinge
#

Yes, you're right, at least with my disabling of getenv I can enter safe mode that way

#

I think I tried both ways before but I don't remember

#

I am going to approach this by trying to see if I can reproduce the behavior with a copy of the filesystem, but on host computer micropython.. since it'll be most debuggable

#
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [Errno 5] Input/output error
```even in cp trying to read the file gives I/O error, so it's a bug in getenv()'s handling of underlying errors, probably.
jaunty juniper
#

say, if I have a big int that I want to msgpack.pack, how do I test if it fits in 32 bits (signed or unsigned) so that I can choose a more compact encoding ? I know it fits in 64 bits and I know its sign.

tulip sleet
#

in C or Python?

onyx hinge
#

@jaunty juniper >>> (1111111).bit_length() 21I added the bit-length method to ints

tulip sleet
#

ooh, I thought we didn't have that

jaunty juniper
#

in C

onyx hinge
#

in gcc there are functions like __builtin_clz (count leading zeros) but they are nonstandard extensions.

jaunty juniper
#

I'm fixing msgpack.pack of ints (and gaining 80 bytes apparently by treating small ints in a more general way)

tulip sleet
#

you could shift it right 32 bits and see what's left

onyx hinge
#

but if you have a 64-bit value and just want to know if the top 32 bits are all zero, you could check if (val >> 32) == 0. for unsigned only.

jaunty juniper
#

but how do I do that to a mp_obj_t ?

tulip sleet
#

if signed, it would be 0 or -1 after >> 32

#

I think there might be something.. looking

onyx hinge
#

I'm not sure how you get a (possibly long) integer into a 64-bit C type

#

there's mp_obj_new_int_from_ull but I don't see the inverse

tulip sleet
#

STATIC mp_obj_t int_bit_length(mp_obj_t self_in) that Jeff wrote, I guess, returns an mp_obj, but you could make it non-static and call it, or break it into something that returns C ints.

jaunty juniper
#

I use mp_obj_int_to_bytes_impl to write it to a 8-bytes buffer anyway (unless I know it fits in 4), so I could do tests on the buffer and *((uint64_t*)buffer)

#

do we have something to manage endianness automatically ?

manic glacierBOT
#

Otherwise, the following would occur:

  • settings.toml is in the process of being written by host computer
  • soft-reset begins
  • web workflow tries to grab CIRCUITPY_WIFI_SSID, but loops forever because FAT filesystem is in inconsistent state and file reads error
  • settings.toml write by host computer never completes and the filesystem remains corrupt
  • restarting yields a soft-bricked device, because startup reads CIRCUITPY_WIFI_SSID again
tulip sleet
#

that might be less code in the long run

jaunty juniper
#

the msgpack code uses

    int n = 1;
    if (*(char *)&n == 1) {
        obj = __builtin_bswap32(obj);
    }
#

(obj being a uint32 here)

onyx hinge
#

int_to_bytes_impl takes an endian argument

onyx hinge
#

I bet I started seeing this regularly because my cascade.toml file was pretty big, like 4 kilobytes

orchid basinBOT
orchid basinBOT
lone sandalBOT
plucky sky
#

I am transitioning a project from ESP32 Huzzah and V2 to ESP32-S3 (Adafruit 5477). I can flash with micropython 1.19.1 and get repl but it won't let me upload files with rshell. Any suggestions?

manic glacierBOT
#

This adds big ints to msgpack.pack, which can now encode 64-bit signed ints.
And now what we can encode and decode with msgpack should be on parity with C python.

Of note:

  • Positive ints are always encoded as unsigned.
  • 32 bit ints that don't fit in a small int are encoded as 64-bit.

Differentiating big ints that could fit in 32 bits would require a bunch more code, and I don't even know how I would do that, so it's an optimization of encoding size for another day.

Fixes #6851
...

brazen hatch
#

Got a plain esp32 board to test pystack and stuff.

#

Isn't it 240MHz?

#

Did someone forget a zero?

#

And only one core is visible.

#

I know it's beta, but still asking.
If there is no open issue, they have to be opened.

#

At least the serial isn't absolutely broken like C3.

brazen hatch
solar whale
#

Not sure who to pass this along to so I'll just post it here and hopefully someone will... In the description for the new RP2040 RFM69 board, the term "LoRa" is used. We squished all the parts on our Feather RP2040 over towards the USB port to make some room on the end. This Feather RP2040 LoRa Radio uses the extra space left over to add an RFM69HCW high power 868/915 MHz radio module. I think this will cause a lot of confusion. The RFM69HCW is not LoRA. I am looking forward to getting some of these to play with!

manic glacierBOT
#

There was a bug in the previous version of pico-sdk whereby LWIP_ASSERT(message, condition) would result in asserting that message is non-zero rather than condition being non-zero. This was fixed in the current version, so pre-existing assert failures are actually failing now. This is one of them.

LWIP asserts that you can't set a tcp_err callback on a listen socket, and yet we were. I think this assert is more of a sanity check rather than something that guards against invalid behav...

tulip sleet
onyx hinge
#

(that's a funny mistake leading to uncaught errors)

tulip sleet
#

@timid bolt that fix does not fix #7790, right? Sounds like you are still researching.

idle owl
solar whale
idle owl
tulip sleet
solar whale
#

DO you know if an RFM9x version of is planned?

idle owl
solar whale
#

I'm sure it is -- 2 freq bands for each rfm69 and rfm9x

timid bolt
#

I wouldn't be surprised if there are more lwip_assert failures lurking around, but I tested that the PR fixed the repro described in the issue.

tulip sleet
#

i read the post without reading the title 🙂

#

or the branch name

#

I added a "Fixes #7790" to the OP to link the issue

#

@jaunty juniper there is an odd build failure on a couple of boards on your msgpack PR, like something isn't included

timid bolt
tulip sleet
#

GitHub recognizes "Fixes #nnnn" and some other phrases and automatically links to the nnnn issue, so that merging the PR closes the issue

#

it only works for PR's on the default (main, in our case) branch

jaunty juniper
tulip sleet
#

I can try to fix it if you are afk

#

we can turn off msgpack on those boards, and add an interlock in the .mk files

jaunty juniper
#

I'll see if I can build locally and test

tulip sleet
#

i agree it doesn't make too much sense to have msgpack without longints

manic glacierBOT
jaunty juniper
#

I could make msgpack's long ints use be conditional

tulip sleet
#

if you receive a msgpack message with a 32-bit int that's too big for a small int, what would happen?

#

(I guess the same thing that would happen for struct.unpack with such an int)

jaunty juniper
#

error like before I guess, but if you have 2 small boards that you want to communicate with each other, it's ok

#

enabling long ints on those boards compiles successfully

#

well in english that is

#

I didn't try other languages

tulip sleet
timid bolt
jaunty juniper
#

I'm annoyed that it's called LONGINT, I've been calling them big ints this all time !

onyx hinge
#

woo, did some light testing of espnow. successful communiation (unidirectional) from a magtag to a feather esp32s2 tft. packets do occasionally go missing, and the error message 'ESP-NOW error 0x306a' is not super satisfactory. But the packet rate is pretty high (hundreds per second) and the lag is low (a 1/8x slow-mo video sees the sender and receiver LEDs turning on/off in the same frame). active power consumption aside it seems like something you could try building a wireless keyboard out of.

tulip sleet
onyx hinge
#

@analog bridge ^ did some espnow testing, and it worked for me

timid bolt
#

what is the issue with msgpack and integers larger than 32-bits? There is more-or-less an mp_int api that is agnostic to the choice of LONGINT_IMPL, so in theory msgpack shouldn't care.

tulip sleet
jaunty juniper
#

ah I see

#
#if LONGINT_IMPL_NONE && CIRCUITPY_MSGPACK
#error CIRCUITPY_MSGPACK requires long int support
#endif
tulip sleet
#

#if MICROPY_LONGINT_IMPL == MICROPY_LONGINT_IMPL_NONE && ...

#

MICROPY_LONGINT_IMPL takes on various values.

solar whale
#

other wise it works fine

onyx hinge
#

from my testing I got them sporadically at the same time as my receiver saw message gaps, so I took it to be a sign of a message that was not transmitted correctly

#

my inference could of course be wrong

solar whale
#

without wifi conencted I had no dropped packets and no errors.

tulip sleet
onyx hinge
#

and now nothing's changed but my receiver is getting bunches of exceptions and gaps. hmph. I even reset-buttoned the sender and receiver.

solar whale
onyx hinge
#

yup no settings.toml file on either one, no wifi workflow

solar whale
#

hmm -- ok -- that should work.

tulip sleet
onyx hinge
#

@solar whale it does work mostly

#

or initially, maybe I should say

solar whale
jaunty juniper
onyx hinge
#

mp_obj_int_from_bytes_impl ?

jaunty juniper
#

yeah that's long ints

#

only implemented in objint_longlong and objint_mpz

onyx hinge
#

then pragmatically de-static STATIC mp_obj_t int_from_bytes ?

#

or otherwise factor it for general use

crimson ferry
#

@onyx hinge I get fairly robust espnow comms if I leave the channel at 0 (channel becomes 1), but 0x306a if I try to use a different channel

jaunty juniper
#

mp_binary_set_int can write a C int, not a mp_obj_t int

#

well my next goal was to implement signed=True in int_from_bytes so maybe then it will be possible, but yeah there is some factoring opportunities maybe

tulip sleet
onyx hinge
#

not having msgpack on boards small enough to not have long ints is probably not a tragedy

manic glacierBOT
#

I just grabbed the latest bits for Adafruit CircuitPython 8.1.0-beta.0-81-g703b8b227 on 2023-03-29; Adafruit Feather ESP32S3 4MB Flash 2MB PSRAM with ESP32S3 and setting CIRCUITPY_PYSTACK_SIZE=4000 in settings.toml does still cause a crash into safe mode on power up. Setting the value to 3500 results in a normal startup. I have tested other ESP boards as well and they tend to power up okay but crash when exercised with one of the test programs.

onyx hinge
#

btw nice to see you hanging around @solar whale !

jaunty juniper
#

if I wanted to call struct's mp_binary_set_val() I would need to know the int type I need in advance (size and signed-ness)

solar whale
brazen hatch
timid bolt
#

@jaunty juniper I like the test program in the PR. It is very clear about what is going on, what was happening and what happens now.
The thing is though that in Python the type int is always means a signed big int (where big int means a variable length integer). In your tests you've partitioned the cases into int, int64, uint, etc., but what is the significance of that. The input values are always signed big ints.

solar whale
#

@crimson ferry are you now able to use wifi and espnow concurrently?

#

or even alternating

crimson ferry
#

alternating, definitely

#

haven't tried doing much more than wifi connect with espnow and that seems to work

solar whale
#

if you have a chance, can you post an example .. no rush.

crimson ferry
#

yep

jaunty juniper
solar whale
# crimson ferry yep

Thanks -- I have to go offline now but will give it another try -- probably not until tomorrow,

crimson ferry
#

@solar whale when you get back to this (I'll post if I get past it), but I seem to be stuck on channel 1... I can do simultaneous wifi and espnow if I stick to channel 1. But if I let espnow do channel 1 by default, I have to shutdown wifi if it had connected to some other channel.

chilly jay
#

Hey, when developing a module is there a way to get like a crash log or something to see why circuitpython entered safe mode?

jaunty juniper
#

(and all values between INT64_MAX and UINT64_MAX require to be encoded as unsigned ints of course)

tulip sleet
# brazen hatch so is this an issue or am I doing something wrong?

it is a typo:

uint32_t common_hal_mcu_processor_get_frequency(void) {
    #if defined(CONFIG_IDF_TARGET_ESP32)
    return CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ * 100000;
    #elif defined(CONFIG_IDF_TARGET_ESP32C3)
    return CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ * 1000000;
    #elif defined(CONFIG_IDF_TARGET_ESP32S2)
    return CONFIG_ESP32S2_DEFAULT_CPU_FREQ_MHZ * 1000000;
    #elif defined(CONFIG_IDF_TARGET_ESP32S3)
    return CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ * 1000000;
    #else
    #error No known CONFIG_IDF_TARGET_xxx found
    #endif
}
#

there is a missing zero on the first return line

crimson ferry
solar whale
brazen hatch
chilly jay
tulip sleet
jaunty juniper
#

I can add conditional compiling in msgpack based on the availability of long ints, I just need to choose a good error message to reuse, I think some OverflowError, might even be able to get it by calling a standard check

crimson ferry
#

@chilly jay the debug console, pins 19/20

tulip sleet
jaunty juniper
#

perfect !

timid bolt
chilly jay
crimson ferry
jaunty juniper
crimson ferry
#

oops, sorry, that also goes to the debug console

#

there are ways to print to the regular serial, someone else will have to give the details

#

I find it useful to debug on devkits... all the pins and two USB connectors

chilly jay
#

Okay. If it helps in any shape or form, I probably get the crashes from playing around with FreeRTOS tasks but I still like to know at which point in my code the error is.
Sadly the serial console just shows me the very last print I do (which seems to be random) and then it dies, including the serial console itself.

timid bolt
jaunty juniper
#

I don't know, I'll have to think about it and try a test or two, I might be overthinking it

#

like I don't actually need to test for overflow when packing, since you can't even pass a long int to begin with, so I just need to #if the long int call

manic glacierBOT
timid bolt
timid bolt
#

fwiw, taking a step back, I don't think this byte saving optimization is worth the complexity it introduces.

manic glacierBOT
onyx hinge
#

TIL (but should not be surprised): CircuitPython can't handle a GPT partition table

crimson ferry
#

ESP-NOW is basically (optionally-encrypted) UDP, but implemented two layers deeper

manic glacierBOT
crimson ferry
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.0.4 on 2023-03-15; FeatherS3 with ESP32S3

Code/REPL

import board, pulseio

p = pulseio.PulseIn(board.D12) # physical pin 10
while True:
    if len(p) > 0:
        print(p[0])
        p.clear()

Behavior

No output.

Description

Connected a RC receiver outputting PWM (3.3 volt output, I checked w/ scope).

The same code does output a series of numbers on a Raspi Pico.

Also discussed here...

manic glacierBOT
#

@gamblor21 and @FoamyGuy after watching the stream, I will do some testing. As you probably know, The intention of this draw_circle is to have a shell. Vectorio, does have a circle but is by default filled. I am going to test if using bitmaptools.fill in this circle will throw an exception is the circle is not complete. aka we limit the circle to the display option. Also. I will some example code as draw_polygon. The problem with the constantly rebooting was do to a previous PR now fixed. ...

orchid basinBOT
manic glacierBOT
#
  • Fixed the boot led definition in mpconfigboard.h. The led is inverted (low active)
  • Set IR led gpio low during espressif_board_reset_pin_number to avoid power drain from the led
  • Defined the gpio pin connect to AXP192 N_VBUSSEN input
  • Update AXP192 pmu initialization:
    • Increased low battery warning 1 to 3.695V
    • Increased low battery warning 2 to 3.600V
    • Disable interrupt except:
      • Low battery warning
      • Power button short press
      • Power button long press
tall tide
#

@gilded cradle about the web-editor, thanks for merging my series of PRs yesterday
I have a bunch more lined up (12+ so far) with mostly small quality of life changes.
Do you prefer a single big PR (with small commits), or each change = one PR?

vagrant wind
#

I would like to add to the M5Stack Stick-C port a very low battery handling. This device has an internal lipo battery and when the battery voltage is too low the Circuitpython boot should wait until the battery charging reach a minimum working voltage (about 3.7V). While the battery is charging I would like to show on the display a red battery icon to let the user know what is happening (battery charging). Because this is a safe guard mechanism to protect the battery and also we don’t want the Wi-Fi and Bluetooth radio active in this situation I guess it should be implemented during the Circuitpython boot sequence.
Is the board_init function the right place to implement this behaviour? If not, where?

stuck elbow
#

see how the blinka logo is stored for the battery graphics, I suppose

manic glacierBOT
#
[adafruit/circuitpython] New branch created: adding\_circle\_bitmaptools
vagrant wind
#

@stuck elbow Can you please point me where the code for the blinka logo is stored?

stuck elbow
#

the data itself is generated by tools/gen_display_resources.py

still zephyr
#

@tulip sleet I have wrongly created again a branch in Circuitpython, not sure which one of the two delete. would be helpful if you help me with that when you have some time 🙂

tulip sleet
still zephyr
tame grove
elfin moon
#

Hi there, I get a hard crash into safe mode on 8.0.4 and 8.1.0-beta on esp32s3 and s2 feathers and qt's when I try to wrap an existing socket for ssl. I'm writing a bit to communicate SMTP with STARTTLS (gmail) so it starts out without ssl and then you upgrade to ssl during the conversation. I can communicate fine until the wrap_socket and then board hard faults. I was surprised to find this works normally as expected on a pico-w with 8.0.4 though.
It's probably the same problem as https://github.com/adafruit/circuitpython/issues/7314. If I try the fix mentioned there (new socket for the ssl, doing another connect) I get "OSError: Failed SSL handshake." I'm not sure if there's something else I can try. I have a sample program that shows the crash.

gilded cradle
tall tide
gilded cradle
strong marten
#

I'm trying to compile CircuitPython 8.0.4 for a raspberrypi pico. This is the first stage of developing a product. I've got everything installed as per the website, but the build fails saying it is missing c_nano. Where might I get this from nd how do I install it?

jaunty juniper
#

what's the full error log ?

strong marten
#

GEN build-raspberry_pi_pico/genhdr/mpversion.h
LINK build-raspberry_pi_pico/firmware.elf
/home/robert/Circuit_Python/gcc-arm-10.3-2021.07-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: cannot find -lc_nano
collect2: error: ld returned 1 exit status

#

Sorry about the delay, it's onm a different machine

#

If it's a clue I get the same error on both Ubuntu and Fedora Linux.

jaunty juniper
#

ah that's not the correct version of gcc I think, that one is for the broadcom port (Pi 4) not pico

strong marten
#

OK, thanks

jaunty juniper
#

the rp2040 is cortex-M and uses gcc 10-2020-q4

strong marten
#

Thanks very much!

jaunty juniper
#

at least that seems to be the issue since you are using the version that is indicated for cortex A in the guide

strong marten
#

Thanks. It's getting late here (UK time) so I'll try it as soon as I can.

tulip sleet
elfin moon
idle aspen
manic glacierBOT
#

Finish conversion to x and y instead of x0 and y0. Use xb and yb for Bresenham loop variables.

STATIC void draw_circle(displayio_bitmap_t *destination,
    int16_t x, int16_t y,
    int16_t radius, uint32_t value) {

    int16_t d, yb;

    mp_arg_validate_int_range(x0, SHRT_MIN, SHRT_MAX, MP_QSTR_x);
    mp_arg_validate_int_range(y0, SHRT_MIN, SHRT_MAX, MP_QSTR_y);

    x = MIN(x, destination->width);
    x = MAX(0, x);
    y = MIN(y, destination->heigh...
#
void common_hal_bitmaptools_draw_circle(displayio_bitmap_t *destination,
    int16_t x, int16_t y,
    int16_t radius,
    uint32_t value) {


    // update the dirty area
    int16_t xbb0, xbb1, ybb0, ybb1;

    xbb0 = x - radius;
    xbb1 = x + radius;
    ybb0 = y - radius;
    ybb1 = y + radius;

    displayio_area_t area = { xbb0, ybb0, xbb1, ybb1, NULL };
    displayio_area_t bitmap_area = { 0, 0, destination->width, destination->height, NULL };
    displa...
manic glacierBOT
tulip sleet
#

@onyx hinge I am going to make a beta.1 now. There are a few things in progress but we can have a beta.2 sooner rather than later.

#

anything you want to add before I publish?

onyx hinge
#

Not from me @tulip sleet -- thank you

idle owl
#

I'm kidding. I think everything I want out of it will be in it already.

tulip sleet
#

Maybe we should have pet names for the releases. 8.1.0-beta.1 ALL THINGS, beta.2 THOSE NEW THINGS, beta.3 UH, NOT THOSE THINGS

idle owl
#

Hahahaha

manic glacierBOT
#
[adafruit/circuitpython] New tag created: 8\.1\.0\-beta\.1
onyx hinge
#

yay

orchid basinBOT
onyx hinge
#

that's a hefty list, kudos to the authors!

idle owl
#

Oooh, one was me! 😊

onyx hinge
#

it's bugging me that the list isn't alphabetized

#

it must just keep the most exciting ones at the bottom automatically?

tulip sleet
#

@onyx hinge do you think the 8.0.x fix you PR'd should be an 8.0.5 release, even by itself? I

#

i'm not sure how common it might be

#

i don't have anything else for 8.0.5

#

it's not hard to do a small release

onyx hinge
#

@tulip sleet I think it could potentially bite anyone who is editing settings.toml though it's probably rare when it's just a few lines long. Mine had grown to ~4kB.

tulip sleet
#

I will start an 8.0.5 release notes

orchid basinBOT
tall tide
#

@gilded cradle FYI: I'm half-way through a snowpack-to-vite migration... so we hopefully can leave the old unmaintained cruft behind soon 😄

gilded cradle
orchid basinBOT
tall tide
manic glacierBOT
#

Test Code

import time
from adafruit_display_shapes.circle import Circle
import vectorio
import displayio
import board
import math
import bitmaptools


display = board.DISPLAY

palette = displayio.Palette(4)
palette.make_transparent(0)
palette[1] = 0xFFFFFF
palette[2] = 0x440044
bitmap = displayio.Bitmap(display.width, display.height, 3)
bg = displayio.TileGrid(bitmap, pixel_shader=palette)

group = displayio.Group()
group.append(bg)


radius = 50

for...
idle owl
#

@tulip sleet Is this still a thing? It's been almost a year.

manic glacierBOT
#

I've been trying to do SMTP with STARTTLS in which you start with a non-ssl socket and upgrade to an ssl socket during the transactions, and I think it triggers this same problem. If I wrap_socket(), the next recv will make the ESP32S3 (and S2) crash to safe mode. With 8.0.4 and 8.1.0-beta0. The code works perfectly on the pico-w though, 8.0.4.

I made a basic program that illustrates this, I think. If I try the fix mentioned above of doing a connect() after the wrap_socket() I'...

timid bolt
#

I'm trying to setup debugging on an ESP32. I followed the instructions here on how to connect JTAG, but unsurprisingly it "doesn't work". My first question is how is it supposed to work? There a no special JTAG pins; I'm just connecting the JTAG cable to regular GPIO pins. The board is running CP. Electrically, how can a debugger attach to it just by twiddling some GPIO pins externally?

manic glacierBOT
tulip sleet
manic glacierBOT
#
[adafruit/circuitpython] New tag created: 8\.0\.5
tulip sleet
orchid basinBOT
manic glacierBOT
tulip sleet
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
orchid basinBOT
#

Thanks Meliisa!

Jeremy Littler

LEAD Emerging Technologies

The Creative School

Toronto Metropolitan University

416-979-5000 ext. 552222

RCC 353

On Fri, Mar 31, 2023 at 12:00 PM Melissa LeBlanc-Williams <
@.***> wrote:

Merged #1179 https://github.com/adafruit/circuitpython-org/pull/1179
into main.


Reply to this email directly, view it on GitHub
https://github.com/adafruit/circuitpython-org/pull/1179#event-8899674434,
or unsubscribe
<https://github...

manic glacierBOT
manic glacierBOT
idle owl
tulip sleet
idle owl
manic glacierBOT
#

This if statement and the error that it raises could be replaced by mp_arg_validate_int_range() which will take up a little bit less code, and has the benefit of having it's own error messages generated which are already translated so that we don't have to introduce new strings so we can save a bit of space and translation "cycles".

The changes from this PR: https://github.com/adafruit/circuitpython/pull/7548/files use that function so you can refer to there if you want to see how to use...

manic glacierBOT
#

I'll look into that. The check for .connected is clearer, because it checks whether the interface is up. But the interface check is false when the AP is on, and there doesn't seem to be an equivalent call in the API to check that. If you know of one, let me know. I spent some time looking.

One thing I noted is that the code calls a number of esp_ routines without checking their return codes. That's something to address in the future, perhaps.

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.0.5 on 2023-03-31; Adafruit Monster M4SK with samd51j19

Code/REPL

import board
import busio
import digitalio
import displayio
from adafruit_st7789 import ST7789

displayio.release_displays()

# Left screen spi bus
left_spi = busio.SPI(board.LEFT_TFT_SCK, MOSI=board.LEFT_TFT_MOSI)
left_tft_cs = board.LEFT_TFT_CS
left_tft_dc = board.LEFT_TFT_DC
left_display_bus = displayio.FourWire(
    left_spi, com...
manic glacierBOT
#

I don't know the espressif NETIF API very well, but quick test confirms .connected is True (only) when: mode is STA or AP+STA, wifi is enabled, station is started, and station is connected (has an IP address). The event handler essentially defines connected as having an IP address for espressif, but NETIF up seems to be a good alternate / proxy.

I'm not as familiar with CYW43 / raspberrypi. Since the API is a subset, I use it in pretty basic ways and haven't done any development for it...

manic glacierBOT
manic glacierBOT
#

@jschachter - I am running this script on a Pico using pulseout to generate the signals.

import pwmio
import pulseio
import board
from time import sleep
import array

pulse = pulseio.PulseOut(board.GP27, frequency=40000, duty_cycle=2**16 - 1)
data = array.array("H",[373, 215, 285, 327, 479])
while True:
    pulse.send(data)
    sleep(1)

I did also note that breaking out of the receive loop with CTRL-C sent the ESP32S3 into safe mode. I
believe that is a separate issue, ...

manic glacierBOT
#

Tested .connected more thoroughly, looks good all around through mode and started / enabled changes.

.ap_active is now True (only) when wifi is started / enabled, and after start_ap() (mode is AP or AP+STA). It goes False if wifi is disabled or if stop_ap(). Tested various sequences, and everything tracked.

.ap_active seems to be True when there is a valid wifi.radio.ipv4_address_ap, and vice versa.

Both new properties LGTM on espressif!

I'll try to work on `...

manic glacierBOT
#

The latest changes only changed a file in port/espressif, so the CI logic only rebuilt those artifacts, to save time. You can find the previous CI runs here: https://github.com/adafruit/circuitpython/actions, and go back in time to https://github.com/adafruit/circuitpython/actions/runs/4579504313, to the last run that had a Pico W build.

There doesn't seem to be an easy way to get there from the PR, that I can find.

manic glacierBOT
#

raspberrypi .connected and .ap_active LGTM.
(Simpler scenarios with the current CYW implementation https://github.com/adafruit/circuitpython/pull/7101#pullrequestreview-1188988867)

.connected and .ipv4_address are both correct immediately after a .connect(), and again after a .stop_station().

ap_active and ipv4_address_ap are both correct immediately after a .start_ap() (APs can't currently be stopped).

lone axle
#

Is there a way to configure the ESP-IDF to specify where it should (or shouldn't ) store files that it needs to use? I noticed it put some stuff in my home directory like /home/timc/.espressif/tools/xtensa-esp32s2-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32s2-elf/bin/xtensa-esp32s2-elf-gcc

I'm attempting to rule in or out the possibility of faulty hard drive hardware by moving as many of the things used during the build as I can to a seperate physical drive. My repo and the gcc I downloaded are both on that other drive, but the esp build seems to still call back to home directory for some of it's things.

stuck elbow
#

there should be an environment variable for it

#

IDF_PATH

lone axle
#

Thank you!

stuck elbow
#

sorry

#

The scripts introduced in this step install compilation tools required by ESP-IDF inside the user home directory: $HOME/.espressif on Linux and macOS, %USERPROFILE%\.espressif on Windows. If you wish to install the tools into a different directory, set the environment variable IDF_TOOLS_PATH before running the installation scripts. Make sure that your user account has sufficient permissions to read and write this path.

#

it's IDF_TOOLS_PATH, the IDF_PATH is for the sources

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Using @DavePutz's code on a pico, and the following code on the FeatherS3 (running 8.0.4), I get the following response, which matches the first and last pulse.

[330, 483]
[330, 483]
[330, 483]
[330, 483]
[330, 483]
[330, 483]

import board, pulseio

p = pulseio.PulseIn(board.D12)
print(p.paused)
while True:
    if len(p) >0:
        x = []
        for i in range(len(p)):
            x.append(p[i])
        print(x)
        p.clear()

<img width="542" al...

#

Emulating a servo pwm output, on the pico and reading the input with the code above yields no output.

# pico
import pwmio
import board
from time import sleep

servo_center = int(1.5 / 20.0 * (2**16))
pwm1 = pwmio.PWMOut(board.GP22, duty_cycle=servo_center, frequency=50)

while True:
    sleep(0.1)
    print('hi')

<img width="377" alt="image" src="https://user-images.githubusercontent.com/19350/229324929-ade30032-105a-4f57-a828-8ea986704721.png">

Code on the ESP3...

manic glacierBOT
unique python
#

Hi! I am trying to build CP for adafruit_feather_esp32s3_nopsram from a fresh CP clone (main branch). And I am getting this error:

/bin/sh: cmake: command not found

I have nothing in the dir /circuitpython/ports/espressif/esp-idf
Is there anything I need to do?
Other ports do build.

jaunty juniper
unique python
jaunty juniper
#

hmm ports/espressif/esp-idf empty after fetch-submodules ?

unique python
#

It is 😩 Need to head out now, but I will try later today. Thanks again!

tulip sleet
#

I am testing the issue mentioned

#

I did make fetch-submodules on a fresh clone and ports/espressif/esp-idf is not empty. But my git version is 2.40.0.

#

which does partial clones. I will try it with git 2.30.0

#

ports/espressif/esp-idf is not empty with git 2.30.0 either. So try make remove-submodules or in the worst case, a fresh clone.

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Looks like the pwm not showing results is due to this line in Espressif common-hal/pulseio/PulseIn.c:
config.rx_config.idle_threshold = 30000; // 30*3=90ms idle required to register a sequence
Using a PWM frequency higher than 10 will result in an idle less than 90 ms; and so the pulsein read will never complete. The PWM example on the pico will result in pulses being seen on the ESP32S3 if frequency is 10 or less. I am not sure of the reason the pulsein idle_threshold was set to ...

ornate breach
#

is there a displayio library for the QtPy M0?

#

or is that one thing that's been phased out from usage for the QtPy M0?

blissful pollen
ornate breach
#

hmm, just wanted to test out a TFT that I want to use with a different QtPy. I only have the M0 unfortunately

crimson ferry
#

you need an rp2040 and an S2 QT Py :p

ornate breach
#

guess i'll have to purchase either one of these days.

remote fern
#

Using a Grand Central M4, can pulseio or pwmio generate an accurate single pulse in the range of 80 to 120 microseconds?

tulip sleet
remote fern
#

Thank you!

manic glacierBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.1.0-beta.1-17-gb011468251-dirty on 2023-04-03; Metro MIMXRT1011 with IMXRT1011DAE5A
Board ID:metro_m7_1011

Code/REPL

import board
from adafruit_neokey.neokey1x4 import NeoKey1x4
keys = NeoKey1x4(board.STEMMA_I2C())

while True:
    print(f"{keys.digital_read_bulk(0xff):08b}")
    time.sleep(.01)

Behavior

The code runs for awhile (prints lines like "11110000" if no keys are pressed, but eventua...

unique python
# tulip sleet if you have nothing to save in any submodule, do `make remove-submodules` (does ...

Thanks for testing, Dan!
It was tricky, but I finally was able to build. The problem was that I needed to fetch the tags from the adafruit/circuitpython repo first, since I cloned a fork.
At the beginning I was doing make fetch-submodules , then git fetch --tags, and then make remove-submodules and make fetch-submodules again. This was not working.
It only worked when I fetched the tags right after I cloned the forked repo, and do make fetch-submodules after that:

% git clone <fork url>
% cd circuitpython
% git fetch --tags --recurse-submodules=no --shallow-since="2021-07-01" https://github.com/adafruit/circuitpython HEAD
% make fetch-submodules

Finally, to build I also had to do this extra step, besides what is documented in the guide:
pip install "jinja2<3.1" "itsdangerous<2.1"

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.0.3 on 2023-02-23; Raspberry Pi Pico W with rp2040
Adafruit-Blinka 8.16.1 on Raspberry pi 2B

Code/REPL

Pi pico:
AES_KEY = "Sixteen byte key"
message = "hello world worldd"
encrypted_message = bytearray(len(message))
cipher = aesio.AES(AES_KEY, aesio.MODE_CTR, AES_KEY)
cipher.encrypt_into(bytes(message, "utf-8"), encrypted_message)


RPI 2b:
from Crypto.Cipher import AES

AES_KEY = "Sixteen byte key"...
onyx hinge
#

ahoy <@&356864093652516868> -- looking forward to catching up with you in the meeting about 75 minutes from now in the CircuitPython voice channel. Now's a great time to add your notes to the document: https://docs.google.com/document/d/1JSfSMwwVf5ZbW4RB9E3h-juGrBmN0jPjo22OrInXjw8/edit?usp=sharing

Anybody's welcome to listen in as well, no need to do anything but join the voice channel.

tulip sleet
#

for jinja, that is listed in requirements-dev.txt. Not sure about itsdangerous but I think it's a prerequisite for something

manic glacierBOT
#

Hi! I'm not sure either.

We test our AES implementation against a small number of test cases from the publication NIST Special Publication 800-38A, 2001 edition. The test itself is found in https://github.com/adafruit/circuitpython/blob/5909ceacc6975906ad23b07ecd011511146e07d1/tests/circuitpython/aes.py and is simply checked against an "expected output file" aes.py.exp.

the test does not cover incomplete blocks or encrypting more than 1 block in a single call. However, I started adding...

unique python
manic glacierBOT
#

Here's the added test

key = unhexlify("2b7e151628aed2a6abf7158809cf4f3c")
counter = unhexlify("f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff")
cyphertext = bytearray(len(plaintext))
cipher = aesio.AES(key, aesio.MODE_CTR, IV=counter)
for i in range(0, len(plaintext), 16):
    output = memoryview(cyphertext)[i : i + 16]
    cipher.encrypt_into(plaintext[i : i + 16], output)
    print(str(hexlify(output), ""))
print()

plaintext = bytearray(len(plaintext))
cipher = aesio.AES(key, aesio.MO...
tulip sleet
unique python
#

I see. I will try to reproduce again. Thanks for the support!

manic glacierBOT
manic glacierBOT
#

I guess the slow part is due to wifi setup. In principle I could agree with you except when you already have a app that connects to wifi at startup anyway. In order to guarantee that you can reach your device for maintenance upgrades (not OS), a reliable and robust web-workflow is required. There are a couple of other issues in this area I am working on. It seems the RPi variant is somewhat more solid than the ESP32. Perhaps due to the different "threading" models - callbacks vs polling.

I...

#

I tried the newer "cryptography" library (https://cryptography.io/en/latest/hazmat/primitives/symmetric-encryption/#cryptography.hazmat.primitives.ciphers.modes.CTR) and it appears to 'work' compatibly with CircuitPython.

from binascii import hexlify, unhexlify
import os

from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes

plaintext = unhexlify(
    "6bc1bee22e409f96e93d7e117393172a"
    "ae2d8a571e03ac9c9eb76fac45af8e51"
    "30c81c46a35ce411e5fbc1...
idle owl
#

<@&356864093652516868> We're finishing up an internal meeting. Be here soon!

onyx hinge
#

hi! I have to take a moment before getting the meeting started. brb!

midnight ember
#

I keep having intermittent wifi dropping issues, just FYI for the meeting.

idle owl
#

Thanks for the heads up, @midnight ember

#

Jeff can take over reading in the middle of an update if needed. We've done it before.

lone axle
#

@turbid radish I just noticed one of the headlines in the draft is slightly misworded. "MicroPython on LEGO Controllers Gaining Is Popularity"... intended to be 'is' before 'gaining' I think. I can submit a PR to change it if that is helpful.

#

Or perhaps it's meant to be 'in' instead of is, then it could fit in the same place.

errant grail
#

@midnight ember When removing header pins, I use the Collin Cunningham method: Heat the pin with the soldering iron and remove it with needlenose pliers. Add a little flux and use the solder sucker after the pin is removed.

midnight ember
#

I tried that but as soon as you put the needlenose pliers on it, they become a heatsink and makes it much harder. :/

slender iron
#

you are doing well!

lone axle
manic glacierBOT
lone axle
idle owl
# midnight ember I tried that but as soon as you put the needlenose pliers on it, they become a h...

I usually solder sucker as much as possible on all of them and pull them from the plastic bit of the header pins until I'm down to the last few, in which case I solder sucker as much solder off of them as possible, and then pull on the pin itself with the pliers. That may not be different from what you're already doing, but it works pretty well for me. Ooh, also, once the plastic is removed, I'll add the soldering iron and press down on the pin from the opposite side so it pops almost all the way out, then use pliers. I do that too.

lone axle
#

Many other interesting lego related items in the newsletter! look out for it tomorrow, or head to the github if you want a sneak peak!

midnight ember
idle owl
midnight ember
#

Specifically the header pin removal process I use will damage any board. The rest is good advice but giving advice on header pin removal that will damage a board has to go.

errant grail
midnight ember
#

@errant grail Maybe it's a difference in design between your angle cutters and mine? Mine definitely cause damage.

errant grail
midnight ember
#

Circuit Python podcast! Yes! @random junco ❤️

random junco
#

thank you @errant grail 🙂

gilded cradle
#

@midnight ember in your video, you are cutting the pins. Just using the cutter to pry the plastic part is much better and it gives you something to grab the pins with tweezers that way.

errant grail
gilded cradle
#

Exactly

errant grail
gilded cradle
#

Here's a video by @candid sun about the technique I prefer: https://www.youtube.com/watch?v=ATeRNgOUX3o

Recently I've been trying to improve my desoldering skills so I thought I'd share how I've been removing header pins.

Collin's Lab Notes video with Adafruit: https://youtu.be/LTQsP5CPmRM

Information to support AAPI communities: https://anti-asianviolenceresources.carrd.co/
Bystander Intervention Training: https://www.advancingjustice-chicago.o...

▶ Play video
midnight ember
#

Will give that a shot next time, thank you @errant grail and @wide drum

#

Oh no, hope you and family feel better soon Scott. 🤗

#

What was the difference in SD Cards? Interesting.

silver tapir
#

@onyx hinge Since camera support is recent, a good use for espnow, is to trigger one camera, and have a bunch of other cameras take the picture as well. blinka_heart

midnight ember
#

Love all the waveform stuff happening lately.

#

bitmaptools and synthesizers... super cool stuff.

#

Thank you Danh and all the developers for all the progress lately. Been a lot happening lately.

errant grail
#

Precision VCO running through some tests for AM and FM modulation (a 20Hz to 20kHz sweep).

slender iron
errant grail
#

Hugs to @midnight ember for sharing the pin removal experience and lessons-learned.

midnight ember
#

There are free MIDI DAW's available @thorny jay you don't need to invest money in a professional level DAW.

#

Ableton Live has a free version I believe.

crimson ferry
#

gist pronounced like gif? (I say jist and jif, ymmw 😉

idle owl
crimson ferry
#

no, but "gist" is a real English word, pronounced "jist"

idle owl
#

That's fair.

#

That's how I pronounce it.

midnight ember
#

Choosy mom's choose gist.

devout jolt
#

oh so I shouldn't pronounce it "geist"?

midnight ember
#

oh wow a vapor/humidity sensor for air plants whaaat. That's awesome.

solar whale
#

@idle owl Will the RFM guide cover both rfm69 and rfm9x? That is, examples for both?

midnight ember
#

Kattni's got a huge plate full of projects. Good luck!

idle owl
midnight ember
#

I have RFM stuff working so if you need someone to bounce ideas off I'm available to you np.

idle owl
#

Most of the guide will be very similar, but the pages involving examples will be a bit different.

midnight ember
#

Good luck with the move Melissa. ❤️

gilded cradle
#

Thanks

idle owl
lone axle
#

🎙️ blinka 🎉

silver tapir
#

@random junco We still have that mystery high ranking person that I introduced to you, in case you still want to take that person to the show.

#

Happy to hear that the show is back.

random junco
#

Need to work up my courage. 🙂 And thanks!

midnight ember
#

1.21 GHZ

midnight ember
#

All your work with the iMX stuff is very cutting edge. Thank you Scott.

idle owl
#

Oh there will be Sprints, alright!

devout jolt
#

0x70 is the default address

gilded cradle
#

Correct, but it sounds like the issue only occurs when the default address is not used

idle owl
#

@midnight ember This is exactly how In the Weeds works. You did great! 🙂

midnight ember
#

I have no idea if it affects the 7 segment displays, only tested with 14 segment alphanumeric backpacks.

gilded cradle
#

It probably affect both types since they share that code

silver tapir
#

@midnight ember Does this work?
display0 = segments.Seg14x4(i2c, address=(0x71))
display1 = segments.Seg14x4(i2c, address=(0x72))

slender iron
#

thanks for hosting jeff!

devout jolt
#

@midnight ember another thing to try: display = segments.Seg14x4(i2c, address=[0x71, 0x72])

idle owl
#

Thanks everyone!

midnight ember
#

I'll have to get back to you on that as it's now stuffed into a 3 part enclosure.

gilded cradle
#

Thanks everyone

still zephyr
#

Thanks

errant grail
#

Thanks!

idle owl
#

Ok, heading out. Thanks again!

ember iris
#

Thank you all! Have a great week!

devout jolt
#

I lurked!

#

maybe someday I will edit the googledoc

random junco
devout jolt
#

lol

idle owl
#

@tulip sleet I dropped you from the voice channel to avoid any surprises.

tulip sleet
#

tnx!

midnight ember
#

@silver tapir @devout jolt nope neither work

#
import time
import board
from adafruit_ht16k33 import segments
i2c = board.STEMMA_I2C()
display0 = segments.Seg14x4(i2c, address=0x72)
stuck elbow
midnight ember
#
Traceback (most recent call last):
  File "code.py", line 5, in <module>
  File "adafruit_ht16k33/segments.py", line 184, in __init__
  File "adafruit_ht16k33/ht16k33.py", line 56, in __init__
ValueError: No I2C device at address: 0x72
tulip sleet
#

I have two 7-segment boards, but I am pretending they are 14-segment boards:

dafruit CircuitPython 8.0.5 on 2023-03-31; Adafruit Feather RP2040 with rp2040
>>> import board
>>> i2c = board.I2C()
>>> import adafruit_ht16k33.segments
>>> d = adafruit_ht16k33.segments.Seg14x4(i2c, (0x71, 0x72))
#

works

#

a scan shows both

#

also works as 7-segment boards

stuck elbow
#

could it be a confusion about what file is running and what is open in the editor?

midnight ember
#

I2C addresses found: ['0xb'] with only 0x72 connected.

tulip sleet
#

do you have other I2C devices on the chain?

midnight ember
#

I only have 1 CP board connected.

#

no

#

I have tried it with temp/humidity sensors chained together with no problem

stuck elbow
#

can you show us a photo of the address jumpers on your backpack?

onyx hinge
#

Here is the notes document for next 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/1jrPUGHtdlFWcsD-IV5CoDtVFHZrot3yK-Cxt63lgvng/edit?usp=sharing

midnight ember
#

just trying with 1 for right now and can't even get that to work with stemma

#

usually they're chained together with the multiplexer

tulip sleet
#

the scan should not be 0xb, it should be [113,114]

#
import board
i2c = board.STEMMA_I2C()
i2c.try_lock()
i2c.scan()
midnight ember
#
Traceback (most recent call last):
  File "code.py", line 21, in <module>
  File "adafruit_ht16k33/segments.py", line 184, in __init__
  File "adafruit_ht16k33/ht16k33.py", line 54, in __init__
ValueError: No I2C device at address: 0x71
tulip sleet
#

your left one is not connected, it looks like

#

in the photo above. could you plug the left one into the spare connector on the right one?

midnight ember
tulip sleet
#

then do a scan like I showed above from the REPL

#

is the multiplexer plugged in?

midnight ember
#

oh derp i keep trying 71 it should be 72 for that one

#

no, i took it out of the loop for these tests

tulip sleet
#

ok, do a scan for the one, for now, then add the second one

midnight ember
#

it's esp32-s2 stemma to the backpack 0x72 directly

tulip sleet
#

i want to see that the scan says it sees 114 (0x72)

midnight ember
#

put it in the other port on 0x72 noticed there's now a squished pin

#
Press any key to enter the REPL. Use CTRL-D to reload.
soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:

Code done running.

Press any key to enter the REPL. Use CTRL-D to reload.
#

however even in the other port it doesn't scan

stuck elbow
#

run it in repl

jaunty juniper
#

squished pins bad !

stuck elbow
#

or add a print for the result of the scan

tulip sleet
#

squished pin on the socket you were using for chaining could explain why they dont' work together

midnight ember
#

it's from all the troubleshooting,

#

because it was working with the multiplexer

tulip sleet
#

yeah but they were not chained with the multiplexer, were they?