#circuitpython-dev

1 messages · Page 331 of 1

onyx hinge
#

woohoo got to the end of my self test program for STM32 CAN for the first time! That tests sending, receiving, and filtering in a loopback setting.

ionic elk
#

@grim dagger no L series support as of yet, sorry. I'm not certain how difficult it could be - every new ST family we've added has come with unique challenges. Our most mature family for ST is the F4 so a F401, F411 or F405 Nucleo or Discovery board would be a good bet.

#

You can also buy an STLink V2 for only $2, and it will work with any dev board that breaks out SWDIO and SWCLK as pins, which should be most 3rd party boards. The feather doesn't (no room) but it does expose an SWD header on the back which can also be connected to an STLink if you have the right breakout.

grim dagger
#

@ionic elk Thanks. I'll look into adding the SWD wires to the Feather. Probably add an F Nucleo to my next order as well.

manic glacierBOT
ionic elk
#

@grim dagger I'd actually recommend you grab these three things!

#

This'll also make it easy to connect to debuggers like a JLink or Black Magic probe

grim dagger
#

I saw test pads for SWDIO and SWCLK but I thought the SMT pinout was for a flash device... I'll look closer

ionic elk
#

It's for the SWD connector I linked above - I have them on all my feathers for debugging

#

a little annoying to solder but it beats magnet wire

manic glacierBOT
ionic elk
onyx hinge
#

https://gist.github.com/ffc169a73954e02ab9f18f9c53fa4618 -- program works on both adafruit_mcp2515 and canio on stm32f405 though it's a bit fiddly to get it started because if you don't start them close to the same time each one concludes the CAN bus is not functioning properly.

Gist

GitHub Gist: instantly share code, notes, and snippets.

#

Yeah I have a setup much like @ionic elk's though I've also got a feather quadrupler involved just to make it bulkier and less convenient 😜 once it is set up it is very quick to open a debugging session

ionic elk
#

A feather quadrupler? What is that?

manic glacierBOT
onyx hinge
manic glacierBOT
thorny jay
#

Hi, making progress on my Covid Tracing App detector that now run on CPB. But I was wondering if there was any board with nRF52840 and a way to plug a directional Bluetooth antenna... Here is my current playgound: https://twitter.com/DavidGlaude/status/1311791062445371398?s=20

Displaying the number of nearby phone running @CoronalertBe (or other Contact Tracing application using Bluetooth Specification).

Very portable with @adafruit Circuit Playground Bluefruit in a nice enclosure and a LiPo.

@CircuitPython source code:
https://t.co/BxqW104JAk ht...

▶ Play video
manic glacierBOT
lone sandalBOT
#

Thanks – really appreciate it,
Rick

From: Anne Barela
Sent: Thursday, October 1, 2020 6:08 PM
To: adafruit/awesome-circuitpython
Cc: Rick Leander ; Author
Subject: Re: [adafruit/awesome-circuitpython] added books - Make Music and Ten Games for the Circuit Playground Exp… (#23)

Merged #23 into master.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

manic glacierBOT
slender iron
#

@timber mango did you sort it out?

#

your issue might be that we don't tick unless we need to

orchid basinBOT
#

I added the following board:

  • adafruit_metro_esp32s2
  • unexpectedmaker_feathers2_prerelease

I couldn't find any differences between Feather S2 Prerelease and the regular Feather S2, so I hid the older one. We can always unhide if Unexpected Maker has a good reason for both to appear.

There are so many boards with STEMMA QT that I added it as a feature. I cleaned up other features where a 1-character difference made 2 appear like Feather-compatible and Feather-Compatible. I also che...

manic glacierBOT
manic glacierBOT
supple gale
#

Hi, making progress on my Covid Tracing App detector that now run on CPB. But I was wondering if there was any board with nRF52840 and a way to plug a directional Bluetooth antenna... Here is my current playgound: https://twitter.com/DavidGlaude/status/1311791062445371398?s=20
@thorny jay I see a u.fl connector on this board https://wiki.makerdiary.com/nrf52840-mdk/#pinout-diagram

Displaying the number of nearby phone running @CoronalertBe (or other Contact Tracing application using Bluetooth Specification).

Very portable with @adafruit Circuit Playground Bluefruit in a nice enclosure and a LiPo.

@CircuitPython source code:
https://t.co/BxqW104JAk ht...

▶ Play video
#

Also the nordic nrf52840-dk dev kit has a connector as well as the pcb trace antenna. not sure if its useful

orchid basinBOT
manic glacierBOT
onyx hinge
#

^^ @slender iron I've got a bit of time left today, I'm going to look into this. Starting with a bisect to find out where it was introduced.

#
commit e114b5ab54e3c7f4a36a03dae2913cb76804efa3
Author: FoamyGuy <foamyguy@gmail.com>
Date:   Fri Sep 11 21:37:00 2020 -0500

    fixes showing OnDiskBitmap with adafruit_sdcard
``` gives me something to look at, at any rate.
manic glacierBOT
#

An RGBMatrix has no bus and no bus_free method. It is always possible to refresh the display.

This was not a problem before, but the fix I suggested (#3449) added a call to core_bus_free when a FramebufferDisplay was being refreshed. This was not caught during testing.

This is a band-aid fix and it brings to light a second problem in which a SharpDisplay + FrameBuffer will not have a 'bus' object, and yet does operate using a shared SPI bus. This kind of display will need a "bus-free"...

orchid basinBOT
manic glacierBOT
#

#3507 papers over a problem where we called self->bus_free(self->bus); when bus_free was a NULL function pointer. In the case of RGBMatrix, this is fine. In the case of SharpDisplay, however, there is the possibility that the underlying SPI bus will be locked and we need to deal with it.

This could be done by

  • adding a new Framebuffer protocol to check for bus free (default/NULL function indicates bus is always free)
    • and implementing it for SharpDisplay, checking that the...
onyx hinge
#

@slender iron I went ahead and made the matrixportal bug a part of the 6.0.0 milestone and the other more hypothetical problem a 6.x.x. bugfix. I'd like to get to the latter; the former would be a terrible bug to progress to RC without fixing.

#

and with that it's the weekend. see y'all around!

#

also, somebody really should test e-ink displays with beta1 and/or with this proposed fix. I do not have a setup here.

slender iron
#

thanks @onyx hinge! now is the time to find issues

manic glacierBOT
#

Found a small improvement for allocate_memory(): When there is some free space in the middle, but not enough, but there is a matching hole on the other side of it, use the hole instead of giving up.

This is unlikely to matter in current usage, as the only thing that is ever allocated on the high side is the stack, but my current work-in-progress might need it.

(Plus rebased the first two commits, unmodified.)

orchid basinBOT
manic glacierBOT
#

Does the supervisor allocation containing the USB descriptor have to live forever (until poweroff/hard reset), or can it be freed after TinyUSB initialization (i.e. before the first code.py run)?

I think it needs to live forever because the host could ask for it at any time.

How many bytes roughly is a typical USB descriptor?
If I had to guess it's 500 - 1000.

What happens when the Python functions that set up the USB descriptor in boot.py are called in code.py? Can that happe...

#

It's an interrupt driven by the GCLK0 timer, the timer setup is here: https://github.com/adafruit/circuitpython/blob/main/ports/atmel-samd/common-hal/_pew/PewPew.c#L97-L115 and the interrupt code is here: https://github.com/adafruit/circuitpython/blob/main/ports/atmel-samd/common-hal/_pew/__init__.c#L36

The interrupt should be quite fast, all it does is changing values of 10 outputs GPIOs and checking the value of one GPIO.

orchid basinBOT
orchid basinBOT
pastel panther
#

hey @gilded cradle have you seen any crashes into the hard fault handler with the Matrix Portal lib?

gilded cradle
#

I saw somebody posted an issue with beta 1

pastel panther
#

ya, I'm seeing the same with latest and beta 1

gilded cradle
#

I didn't try Beta 1 because I saw that

pastel panther
#

ah; ok, looks like jepler is on it

gilded cradle
#

yah

pastel panther
#

thanks

manic glacierBOT
atomic summit
#

Does anyone know if there's a way to tell specific IO to be in a certain state during the bootup of CircuitPython? Not in boot.py or code.py, but to influence them at an earlier, lower level?

#

Like something we could add in pins.c or in the boardconfig?

#

For instance, to set an IO to be an input, pulled low as soon as possible, at the earliest " bring up" time.

slender iron
#

@atomic summit board_init

atomic summit
#

@slender iron Thanks! So I can put something like this... // Led init gpio_set_pin_direction(LED_PIN, GPIO_DIRECTION_OUT); gpio_set_pin_level(LED_PIN, 0); in my boards.c ?

#

but for whatever IO I want?

slender iron
#

yup, and you'll want to never_reset it if you don't want it to change

atomic summit
#

"dont want it to change" meaning, no longer changeable by the user?

slender iron
#

correct

#

it's trickier to hand off an object to the user and back

atomic summit
#

Basically I'm wanting to make the APA data and clock pins input, pulled low as soon as possible, prevent them from occasionally flicking on boot due to floating

#

so I don't want to lock them like that, just set their starting state

slender iron
#

you could set it once then

atomic summit
#

ok, great!

slender iron
#

is it setup as the status pixel?

#

that would drive it explicitly

atomic summit
#

Do you mean this? // #define MICROPY_HW_APA102_MOSI (&pin_GPIO40) // #define MICROPY_HW_APA102_SCK (&pin_GPIO45)

#

I commented them about for my shipping version as they made the APA flicker like crazy during boot.

#

But not had a chance to look into what those specific settings do yet.

slender iron
#

yup, that would do it

#

it should show yellow and then green

atomic summit
#

if it was yellow and green, was flickering and like 10% brightness. Looked broken. .Also I'm not using uf2, but no APA in uf2 yet right, so I didn't know non-uf2 used the LED?

slender iron
#

circuitpython should use it as well

#

uf2 and circuitpython are different things

atomic summit
#

yeah I know. I just didn't know CP used it... I do now!

#

But it looked very wrong.

slender iron
#

that's weird because it should just work

#

it's not timing sensitive like neopixel

atomic summit
#

hmm, what do I need to include to use gpio_set_pin_direction etc ? I tried #include "hal/include/hal_gpio.h" but that's not it.

slender iron
#

look in digitalio. it'll change with lucien's change

atomic summit
#

I can experiment with it again once I'm done with this, but it def didn't work right... I had it commented out on beta0, but then uncommented in beta1 and started seeing the flickering.

#

So re-commented it out

slender iron
#

k

atomic summit
#

wow, I just saw RMT's been implemented for NeoPixel !

atomic summit
#

ok, none of this type of syntax gpio_set_pin_direction etc works in ESP32 land. Seems it's specific to SAMD?

#

Seems I need to go lower and use the IDF stuff more directly like digitalinout.c does?

#

I might skip this for now.. lol

slender iron
#

ya, could be if you snagget if from the samd port

atomic summit
#

brains a bit too mushy

slender iron
#

you can look in DigitalInOut.c for the esp version

atomic summit
#

Ok, cool. Yeah, can I just import digitalInOut.c into board.c and use that?

#

rather than re-implementing what's in there just to set some IO states?

slender iron
#

if you make temp objects then yes

#

may be simpler just to copy just what you need

atomic summit
#

ok

manic glacierBOT
#

In other news, taking a closer look at supervisor_move_memory(), I see that what it does with terminal_tilegrid_tiles is of the same sort (saving stuff from the GC heap in supervisor allocations) and should be handled by the same mechanism. It could potentially be too large to fit on the stack though. Maybe what it does with the rgbmatrix and sharpdisplay buffers too, although those don’t need their contents copied. A revised system that can deal with those cases is taking shape in my hea...

#

I’m not so sure about that anymore – on closer examination, the rgb display needs 4 allocations and can occur CIRCUITPY_DISPLAY_LIMIT times, the sharp display too, so I get

rgbmatrix     4*2
sharpdisplay  1*2
usbmidi       1
terminal      1
flash cache   1
stack         1
heap          1
              =15

Although maybe no board has all these features enabled at the same time (the only one with CIRCUITPY_DISPLAY_LIMIT = 2 I can see is monster_m4sk).

Let’s not worry a...

hazy plover
#

The QT Py has lands to solder a flash on the bottom. Are there any limits to the maximum amount of flash that will work with CP? For example: Winbond 25q128?

thorny jay
#

@thorny jay I see a u.fl connector on this board https://wiki.makerdiary.com/nrf52840-mdk/#pinout-diagram
Thank you @supple gale , I'll put the "gun" project on pause for the moment while I concentrate on the CPB detector. I have a friend that was doing WiFi wardriving so he may have adapter from U.FL to SMA and maybe some yagi or home made antenna.

stuck elbow
#

@hazy plover there is a list of flash chips that are supported

hazy plover
#

@stuck elbow Do you have link? Google led me to SD cards which really isn't what I was looking for although the implication was there wan not a limit.
Thanks in Advance

stuck elbow
#

also, if you want one more chip to be supported, that's where you add it

hazy plover
#

@stuck elbow Excellent. The exact chip I was looking at is supported. Bookmarked for future use.

lone sandalBOT
slender iron
#

@hazy plover also make sure that you account for if the package is wide or not. the footprint is the narrow one

hazy plover
#

10-4

manic glacierBOT
#

This brings in the following, and updates us to the 1.0.4 release tag:

Submodule lib/protomatter 2a1ba8fa4..5f07ec618:

Bumping version for release
Merge pull request #21 from makermelissa/master
Merge pull request #20 from makermelissa/master
Merge pull request #18 from jepler/fix-cpy-3184
Merge pull request #14 from hierophect/cpy-timer-allocator

We previously had the changes of jepler/fix-cpy-3184 and
hierophect/cpy-timer-allocator but not their merge commi...

onyx hinge
#

@hazy plover specifically the qtpy_m0_haxpress build supports one flash chip: EXTERNAL_FLASH_DEVICES = GD25Q16C

#

a pull request would be needed to list additional flash devices there, an example of a device which supports more than one particular flash chip model is datalore_ip_m4, you can check out its mpconfigboard.mk file: ```EXTERNAL_FLASH_DEVICE_COUNT = 3
EXTERNAL_FLASH_DEVICES = "GD25Q16C, W25Q16JV_IQ, W25Q16JV_IM"

#

we usually build in just a single definition, as the board is shipped with the correct flash fitted. However, it may make sense to enable a (short) list with the qtpy_m0_haxpress depending on community needs. The chip added so far is the one in the adafruit store.

hazy plover
#

@onyx hinge
The larger parts a dirt cheap, so I'd vote for supporting more chips as larger ones will fit and are readily available.

onyx hinge
#

you can vote with a pull request 🙂 feel free to ask here if you need help

hazy plover
#

@onyx hinge I added a pull request to the github devices.h mentioned above.

lone sandalBOT
timid wind
#

Hi everyone, is this the correct way to update a display in circuitpython? Eventually l will be some dynamic text.

import board
import displayio
import time
import terminalio
from adafruit_display_text.label import Label

disp = board.DISPLAY

while True:
    l = Label(terminalio.FONT, text="ABC123", color=0xFFFFFF)
    l.x = 100
    l.y = 80
    disp.show(l)
    disp.refresh()
onyx hinge
#

@timid wind Generally calling "refresh" explicitly is not needed; a display is configured by default ot "auto_refresh", so it will redraw "shortly after" any change is made to what is displayed. You can ask more questions in #help-with-circuitpython !

manic glacierBOT
#

I did some testing, and it looks like this error is happening due to some real inconsistencies in the return values from HAL_GetTick(). Instrumenting I2C_WaitOnBTFFlagUntilTimeout() in st_driver/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2c.c I see times when the the value from HAL_GetTick() is less than the starting ticks (and it's not due to overflow, as it is a 32-bit int and the values were far below the max). Other times I got values roughly 10,000 ticks larger than the start; but calling H...

manic glacierBOT
balmy stirrup
#

Anyone have any idea on what might be failing here? I have the esp32s2 tools installed and no issue with install.sh or export.sh everything echoed back properly.

me@DESKTOP:~/circuitpython/ports/esp32s2$ make BOARD=espressif_saola_1_wrover
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
make: *** No rule to make target 'lib/tinyusb/src/portable/espressif/esp32s2/dcd_esp32s2.c', needed by 'build-espressif_saola_1_wrover/genhdr/qstr.i.last'.  Stop.
atomic summit
#

@balmy stirrup is it a clean build?

balmy stirrup
#

@atomic summit yes.

dire spruce
#

Anyone know when makecode support for circuit python is coming out?

stuck elbow
#

the what?

dire spruce
#

Right not it only does JavaScript which sucks

#

Makecode announced that they were going to support circuit python

stuck elbow
#

you can already use circuitpython on the makecode boards

atomic summit
#

@balmy stirrup try a submodule update?

dire spruce
#

Use with the board sure

stuck elbow
#

how would you use it otherwise?

dire spruce
#

But I want it to convert my makecode to circuit python

stuck elbow
#

I don't think that's possible

dire spruce
#

It is and it’s about to come out’

#

Right now it only supports JavaScript

stuck elbow
#

automatically converting between different programming languages is extremely hard

dire spruce
#

I can’t tell you how hard it is but I can tell you it was announced

#

I was just hoping to find someone with a timeframe

stuck elbow
#

I guess you would need to ask at Microsoft

balmy stirrup
#

@atomic summit no effect

stuck elbow
#

because I don't think it was announced by Adafruit?

atomic summit
#

Ok, need someone smarter than me to help you @balmy stirrup , sorry 😦

balmy stirrup
#

No worries Seon! I appreciate the help @atomic summit

dire spruce
#

I guarantee someone’s speaking to adafruit

atomic summit
#

though it looks like a "clean" issue.. like there is some mpy-cross stuff compiled for something that's isn't there.

dire spruce
#

I’m obviously not gonna get an answer from Microsoft lol

balmy stirrup
#

Yea I ran the cross compiler first. I think it is something with the esp32-s2 gcc toolchain perhaps an incompatible version.

atomic summit
#

you are using the one INSIDE CPY right? in the esp32s2/esp-idf folder in ports?

balmy stirrup
#

ahh the esp32s2/esp-idf folder exists but empty

atomic summit
#

I know you're playing with MPY as well. That needs an external esp-idf install, but with CPY, you MUST use the one included.

#

and you don't run mpy-cross like with MPY.

balmy stirrup
#

I think that is it the dir is empty.

atomic summit
#

re-clone the repo.

balmy stirrup
#

yea good call

analog bridge
atomic summit
#

then run export from inside ports/esp32s2/esp-idf

balmy stirrup
#

will do thanks much!

atomic summit
#

nps. @analog bridge just posted build docs as well

balmy stirrup
#

thanks @analog bridge I will do the git submodule routines as well

analog bridge
#

@balmy stirrup Follow the build guide, git submodule update --init will fix empty esp-idf folder

balmy stirrup
#

ahh! thanks!

balmy stirrup
#

@atomic summit @analog bridge worked thanks again both! It was the submodules that I did not have installed.

supple gale
#

Having a fairly wide collection CircuitPython compatible boards here I've had fun building it. I keep saying I have it's number. Lol. So far, lots of esp32s2 boards, some nrf52840, stm32f405 and even a samd21. All under WSL2. I modified all the makefiles to add new targets to run the windows executable from WSL2 environment. So its seemless. seamless? without seams.

idle owl
#

CircuitPython Weekly meeting in ~2 hours. Everyone is welcome to attend! Please add your hug reports and status updates to the notes document, even if you'll be attending the meeting - it's super helpful! Doc can be found here: https://docs.google.com/document/d/1rBN-zWSQYxJcHMfXdScKoHzltA9OOPbG7ger_TUHXu4/edit?usp=sharing If you will be attending the meeting but not participating, please add your name to the doc alphabetically with "(lurking)" after it - it's greatly appreciated! Looking forward to chatting with all of you soon! <@&356864093652516868>

manic glacierBOT
#

I think this PR has understandably gotten mixed up a little bit by the upcoming update to the ESP-IDF. In general, I think it needs some reductions to make it more clear - the current wording does a good job of trying to include both possibilities of a forked and direct IDF submodule, but that shouldn't ultimately be necessary (we're not going to use a forked IDF again) and I'm afraid it just adds extra confusion.

I would suggest removing the set of changes altogether these changes down to...

teal bear
#

how or where is the meeting?

blissful pollen
#

@teal bear There is a CircuitPython voice channel and in this channel

stuck elbow
#

but it's still 1.5h away

teal bear
#

thanks. am I the only one in the voice channel?

#

or really, am i in the right place?

blissful pollen
#

I see you in the voice channel that will be the place, in 90 minutes

teal bear
#

thanks. this meta chat was making my head swim

manic glacierBOT
#

@jepler @tannewt so, the current issue with this PR is that, while it works just fine on a host machine, the above gdbgui issue will fail CI. We also cannot update to the ESP-IDF version that fixes this without breaking USB, since TinyUSB does not work with any esp-idf commit after dde6222.

I'm not sure what to do here. We could merge this PR anyway and accept CI failures on every ESP32 build for a little while. Or we could wait until TinyUSB becomes compatible with the latest ESP-IDF ve...

slender iron
#

@dire spruce Microsoft was adding Python support to makecode but it is not the same API as CircuitPython

teal bear
#

from adafruit_circuitplayground.express import cpx ... if cpx.button_a:... where can I find "button_a"

#

or adafruit_circuitplayground

slender iron
teal bear
#

they aren't really the Pin numbers of the chip, right?

manic glacierBOT
onyx hinge
#

@teal bear the docs seem to call them "board pin names". if you have board.A0 then that usually means the physical board is going to have a silkscreen label A0 on it

#

If you want to refer to pins by how they appear on the microcontroller datasheet, that is using microcontroller.pin, such as microcontroller.pin.PA01

manic glacierBOT
teal bear
#

I am trying to figure out how to talk about these things with the right vocabulary. PA01 is what the data sheet has? and A0 is .. an alias? but I have never heard anyone say alias, so maybe label?

stuck elbow
#

label sounds good

teal bear
#

silkscreen label sounds like "label"

stuck elbow
#

it's what's printed on the pcb, basically

manic glacierBOT
teal bear
#

"label" is what I was looking for. "pin no" or "pin id" might be what is on the cpu datasheet, but as long as I don't need to talk about that, it doesn't matter

analog bridge
#

@onyx hinge your message last week regarding the delays during cpy startup caught my attention. I think it would make a nice topic to be discussed in into the weeds today.

onyx hinge
#

@analog bridge OK, feel free to add it.

manic glacierBOT
#

I guess that means we have no choice but to wait for TinyUSB compatibility. @hathach do you have a moment to check out TinyUSB compatibility with the latest release of the ESP-IDF this week? @julianrendell mentioned it might have something to do with https://github.com/hathach/tinyusb/pull/492 but I'm not familiar enough with USB specifics to be sure. All I know for certain is that TinyUSB does not work with any ESP-IDF commit after https://github.com/espressif/esp-idf/commit/0aa1c1302705b16f...

#

I guess that means we have no choice but to wait for TinyUSB compatibility. @hathach do you have a moment to check out TinyUSB compatibility with the latest release of the ESP-IDF this week? @julianrendell mentioned it might have something to do with https://github.com/hathach/tinyusb/pull/492 but I'm not familiar enough with USB specifics to be sure. All I know for certain is that TinyUSB does not work with any ESP-IDF commit after https://github.com/espressif/esp-idf/commit/0aa1c1302705b1...

ionic elk
#

@onyx hinge so, to clarify, I can test your CAN code by loading that send-and-recieve script on two feather F405s?

onyx hinge
#

@ionic elk There's a send-and-receive script, and a loopback script. You can test the loopback script using (one) feather stm32f405. to test the send-and-receive script, you need your two feathers PLUS two CAN transceivers. I can get you an Amazon link for that.

#

you wire the CANL and CANH together

#

I've tried both. note that one is 3.3v and one is 5v, so don't fry it

pastel panther
gilded cradle
#

Sure

modern wing
#

Good afternoon all you wonderful folks -- lurking today, updated the notes doc to reflect as such. adabot

idle owl
#

@teal bear Did you want to speak during the meeting?

turbid radish
#

Lurking

teal bear
#

@idle owl na, just lurk

idle owl
#

@teal bear Ok. If you ever want to participate, we need to add you to CircuitPythonistas role. That's why I asked.

onyx hinge
#

@inland tusk lurking today?

teal bear
#

thank you. (and yes, of course I want to speak. but I don't really have anything to speak about 😉

lone axle
#

I will be here for the beginning of the meeting. But am going to get pulled away for work. I am marked text only / absent in the notes doc already.

#

@onyx hinge I will paste the news the links today.

onyx hinge
#

@lone axle OK!

#

@analog bridge will you be participating during hug reports and status updates?

modern wing
#

Rolled a 1 on Stealth 😕

analog bridge
#

@onyx hinge Yep!

ionic elk
#

JEEZE

#

HARSH DM

modern wing
#

🪜 🧙

blissful pollen
#

A good DM should drive the story, not end it

teal bear
#

is there an audio test to see if this tab in this app in whatever sand box can get a beep out to the right audio device that drives my speakers?

modern wing
trim elm
#

lurking

onyx hinge
#

@teal bear if you can't hear us now then it's not working

lone axle
#

Yeah, in settings under voice and video there is a tester for both input and output

slender iron
#

@teal bear discord makes sound when you select an output

lone axle
#

as well as volumn levels, and device selectors. If your setup is anything like mine you have a bajillion devices to choose from and if you get wrong ones selected it will make the sound not seem to work.

ionic elk
#

did you push the don't-explode button

modern wing
#

And don't push the "release dragons" button.

analog bridge
balmy stirrup
#

Lurking...

thorny jay
#

Lurking, notes are encoded.

slender iron
#

@onyx hinge do you want to run it or should I?

old smelt
#

lurkin'

onyx hinge
#

@slender iron I think it must be my turn next up

slender iron
#

kk

lone axle
turbid radish
#

Twitter @anne_engineer

#

email anneb(at)adafruit(dot)com

mental nexus
#

I’m text only today.

idle owl
#

I'll start over.

thorny jay
#

text only too

idle owl
#

Give me a minute to get set up again. Forgot to unplug one monitor. Sigh.

onyx hinge
modern wing
#

Welcome back!

turbid radish
slender iron
#

next week is on Tuesday!

thorny jay
balmy stirrup
#

Where is the notes doc located specifically? Thanks.

thorny jay
#

Check pinned message.

balmy stirrup
#

Thanks @thorny jay

slender iron
lone axle
turbid radish
onyx hinge
#

@balmy stirrup participating in the round robins today, or just lurking?

balmy stirrup
#

Lurking

#

Just updating the notes doc.

slender iron
#

@turbid radish I'm releasing beta 2 now

turbid radish
#

Cool

thorny jay
#

Wait, can you actually announce both beta 1 and beta 2 in the same newsletter? I wonder how you will deal with this...

turbid radish
#

I can announce both

slender iron
#

beta will have detailed release notes but beta 2 is what folks will want to use

gilded cradle
#

It makes more sense than just not announcing beta 1 at all

onyx hinge
turbid radish
#

@slender iron - is there a release notes page and a quick "what changed" for beta 2?

onyx hinge
slender iron
#

@turbid radish working on it now. mainly that the RGBMatrix crash is fixed

turbid radish
#

cool

slender iron
#

that's the commits

onyx hinge
manic glacierBOT
#
[adafruit/circuitpython] New tag created: 6\.0\.0\-beta\.2
orchid basinBOT
ionic elk
#

@onyx hinge 👍

turbid radish
#

The headline article for the newsletter rolls together Beta 1 and Beta 2, all good

onyx hinge
#

@idle owl I believe you were thinking of mdroberts1243

#

as well as supporting core code

#

thanks so much, Scott. I'll feel much better once the rgbmatrix problem isn't affecting our community

ionic elk
#

@slender iron I can always help a bit with the digitalio stuff

slender iron
#

I think it's all fixed up now

ionic elk
#

ok

onyx hinge
#

A 40-key chocolate-bar mechanical keyboard.

Flat Planck

Ergonomic low-profile 70% keyboard.

Atreus, just flat.

slender iron
#

dave was looking the stm32 i2c issue

uncut nexus
#

Hierophect - STM I2c I/O Error sounds like issue #3376

modern wing
#

Fresh air & voting -- sounds like a lovely week.

turbid radish
#
Adafruit Industries - Makers, hackers, artists, designers and engineers!

Adafruit has had paid day off for voting for our team for years, if you need help getting that going for your organization, let us know – we can share how and why we did this as well as the g…

thorny jay
#

gamepad is also having problem in recent 6.0.0 loosing key press... could it be related? or same root cause?

manic glacierBOT
#

I don't quite know how I missed this issue, but I have a good idea of where it could be. We need to override the HAL_GetTick() system functions in order to return time properly with low power code, and this replacement function actually performs slightly differently directly after startup vs after the clocks have been initialized. Immediately after startup, HAL_GetTick must use the SystemTick, or it is impossible to correctly initialize the Low Speed External oscillator (LSE), which is requir...

onyx hinge
#

You could also use git bisect to narrow down the range of commits that introduced the problem. or just do it by grabbing various bins from the s3 bucket and testing them

#

I also wonder if this could be related to the problem where reloading also takes "a long time" on M0 parts (seen with trinket m0 at least)

analog bridge
#
// Wait 1.5 seconds before opening CIRCUITPY_BOOT_OUTPUT_FILE for write,
// in case power is momentary or will fail shortly due to, say a low, battery.
mp_hal_delay_ms(1500);
onyx hinge
#

I have a question about that code -- shouldn't we normally NOT reach that sleep?

#

only if the content of boot_out.txt would be modified

thorny jay
#

Does that PR that let you choose the name of the next "main.py" help?

analog bridge
#
for (uint8_t i = 0; i<=100; i++) {
        if (!usb_msc_ejected()) {
            //Go into light sleep
            break;
        }
        mp_hal_delay_ms(10);
}

if (usb_msc_ejected()) {
        //Go into deep sleep
        common_hal_mcu_deep_sleep();
}

onyx hinge
#

the other delay during startup is waiting for the safe mode reset, which we could skip on devices that define their own way (e.g., hold two buttons) to enter bootloader. that does happen everytime, right now.

#

wait_for_safe_mode_reset (not a sleep specifically, it is a busy loop)

#

it'll link to some of the issues, maybe that's good background to know

manic glacierBOT
#

I thought that as well, but the instrumentation I've been putting in shows
that the issue occurs when we are
just using the RTC. I can see that port_get_raw_ticks() is sometimes
returning a value that is exactly
1024 less than a prior returned value. Since they are unsigned ints, that
means that the timeout tests fail (
i.e. if current is < previous the difference is a very large value). It
sounds like the 'seconds' variable is off
by 1, but haven't been able to prove that.

On Mon, Oct 5, 2...

onyx hinge
#
 PRs count if:
Submitted during the month of October AND (
  The PR is labelled as hacktoberfest-accepted by a maintainer OR
  Submitted in a repo with the hacktoberfest topic AND (
    The PR is merged OR
    The PR has been approved
  )
)
slender iron
#

Updated (10/05/2020 15:00 UTC): Individual pull requests can also be directly opted-in to Hacktoberfest with the ‘hacktoberfest-accepted’ label, on any public GitHub repository, without the need for the ‘hacktoberfest’ repository topic.

thorny jay
#

So if I write a PR in the core (unlikely) or to a library (that you marked as HF), then I could get one of those T-Shirt, or they plant a tree for me? Is that what HackToBerFest is?

solar whale
#

Have to go offline -- have a great week all 👋

onyx hinge
#

Reminder: next meeting is TUESDAY

analog bridge
#

Thanks! blinka

modern wing
#

Thanks @idle owl for hosting, and everyone for participating adabot

onyx hinge
#

Thanks Kattni & everyone!

teal bear
#

@onyx hinge I have 2 stm's with your can CP. do you have some test.py code?

#

are the de-dump noises I hear from other people's systems?

slender iron
#

@teal bear ya, it can be

onyx hinge
#

@teal bear discord plays a noise when someone enters or leaves a voice channel you are in

#

hungry time for 🌮

ionic elk
#

@onyx hinge do we have any actual sensors that use CAN yet? Or are we just doing board to board so far?

onyx hinge
#

@ionic elk your car maybe 😉

ionic elk
#

lol

#

I think CAN is popular with robotics maybe I can find some cool PID controllers

onyx hinge
#

the only thing I've done besides talking between multiple microcontrollers is snoop the CAN bus in my Prius,but I don't know what any of it meant

ionic elk
#

I'll ask my buddy who does a robot company if he has any CAN sensors or motors or something. Maybe he'll have recommendations

modern wing
#

Delicious cpu cycles!

onyx hinge
#

if you find some inexpensive HW let me know, I've spotted some steppers or 3 phase servos but it's in the $100+ range AND direct from china AND not well documented that I can find so I stayed away

analog bridge
#

@ionic elk @onyx hinge Take a look at oDrive project https://odriverobotics.com/

#

it uses STM32F405 with CAN

ionic elk
#

Now there's a board that might be fun to port

#

But it might end up being like the OpenMV where we support the board itself but so little of the stuff on it that it's just kind of like bricking it :/

analog bridge
#

We can have a project with a feather stm32 running cpy CAN that communicates with the motor controller CAN api

ionic elk
#

I'm having a hard time telling what's going on from the schematic because he leaves so many of the ICs unlabeled... what is the CAN actually used for? Is it purely for external commands?

#

or is it actually rigged to any of the parts on the board?

thorny jay
#

I know CAN for it's usage in CAR.

teal bear
onyx hinge
#

@teal bear you have to start it on two devices at almost the same time. When you do, they send packets back and forth. When you don't, you get that

#

ERROR_PASSIVE means the device thought the CAN bus wasn't operating properly, and the ENOMEM occurs because all 3 TX slots of the CAN peripheral get filled, and none sent.

teal bear
#

got it. I can just rename it to main.py and un/plug a usb hub

onyx hinge
#

It's safe to say I don't understand how a CAN bus should properly be set up; if you don't have two devices, neither can start sending and you end up with that

#

if you modify one of them to be receive-only then it's easier, you just have to start the receiver first

#

but you can't say "oh I'll never send a message first to test the status of the bus", some device has to go first

#

it's not a well-motivated program

teal bear
#

we have been debating how much startup code is really needed

onyx hinge
#

when it's working, each device will print out the hex of the packet from the other device, which is just the ever-incrementing time in nanoseconds

teal bear
#

I was told I had extra steps because I do a "hello, anyone there?" and wait for a response .. bal bla dance ok, 2 things are up and talking.

#

woot: MSG 0x408 True e8:e6:cc:00:02:00:00:00

onyx hinge
#

yay

teal bear
#

this is from one of the wingy things. now lets try the b3 board (hacky board #3 that wasn't given a name so I wrote b3 with a sharpie

atomic summit
#

woah, we hit beta 2 already?

#

I'd like to bring up the super slow boot time of CPY on the ESP32S2

#

I'm still seeing boot times (until my APA stars cycling) of 5+ seconds.

#

Same code in MPY on my TinyPICO is < 2seconds.

manic glacierBOT
atomic summit
#

All of my Adafruit boards with CPY on them boot in sub 3 seconds.

manic glacierBOT
#

It is weird to be here and maybe it should just be removed. It's only there for debug prints.

Generally, includes should only be moved to .h if needed by the compiler for a type referenced in the header. Otherwise, .c files are better. .h files are literally copied into files that include them and should be kept as small as possible. Having extra .h includes in a .h may slow the build.

In the long run, I'd like us to use: https://include-what-you-use.org/ to check this.

slender iron
#

@atomic summit you'll need to debug it. there is a 1.5 second wait when the boot_out.txt file is out of date

#

5 seconds feels long but I don't know what it'd be

#

the uf2 bootloader has a short delay as well

atomic summit
#

What makes the boot_out.txt be out of date?

teal bear
#

storage.erase_filesystem() does that call board.reset() ?

slender iron
#

new version number

#

I think

manic glacierBOT
atomic summit
#

Ok, I see the delay just plugging in a board that's been plugged in many times before.

#

I'm building beta2 now... will have a play

slender iron
#

will be the same except with a fix for rgb matrix

atomic summit
#

Yeah, sure, just want to "pry" using the latest beta 🙂

#

Not that I have any idea where to start 😉 hahaha

#

So the wait to write the boot_out.txt is just to ensure the battery has enough juice to stay alive? hmm..

#

Also to note, the USB drive doesn't appear in my filesystem until after code.py is running.

#

A noticeable delay as well.

#

Ok, I'm, going to start commenting stuff out in main.c and see what happens 🙂 mwaahahaha

teal bear
#

5.3.1 is the current stable release, and how do I git switch to it?

slender iron
#

@atomic summit the other thing you can do is use a logic analyzer and set pin levels at different points

atomic summit
#

oh, that's a clever idea.

#

though prob lower level than my skill level right now 😉

supple gale
#

setting io was our original 'printf' debugging before serial was a thing 🙂

atomic summit
#

Hmm, why did my last PR fail for feathers2, but not feathers2_prerelase? both changes were the same. And it failed on clone IDF submodules? What's that?

#

@supple gale The issue here is how to tell the ESP32/IDF to set pin state in main.c and lower (tinyUSB) without having to wrangle the IDF into those areas directly.

#

I'm still trying to get mind around how CPY and IDF are joined.

#

And my brain heap is stretched rather thin atm 😦

#

I actually think it's something much lower than main.c - that's what my gut is telling me.

manic glacierBOT
slender iron
#

@atomic summit we have random failures due to network errors. it's unlikely your problem

atomic summit
#

Ok, ok, cool! Thanks @slender iron

lone sandalBOT
manic glacierBOT
#

I traced this around found the problem and was able to build a local copy to fix it. The actual error is in the samd-peripherals project in samd/sam_d5x_e5x/dma.c where the suspend interrupt flag was not cleared. Added channel->CHINTFLAG.reg = DMAC_CHINTFLAG_SUSP; to dma_resume_channel() and works fine on my ItsyBitsy M4.

I am assuming to fix it I create a fork/PR against that project since it is a submodule?

blissful pollen
#

As the Git bot so nicely posted I traced an issue down but I am unsure exactly how I should fork/PR an issue when it is in a submodule and not in the main circuitpython project. Not that familiar with git. Can anyone let me know?

slender iron
#

@blissful pollen for issues in a submodule please make a PR to the submodule first, then we'll need to update the submodule once a fix is in

slender iron
manic glacierBOT
manic glacierBOT
#

I was thinking about trying out Include What You Use pretty soon, maybe starting with the STM32 port to keep the project contained.

But in any case, my reasoning here was to avoid having any SoC-specific HAL files referenced outside of the actual port directory, which we don't do for any other shared-binding or shared-module that I know of. Maybe it's not that big of a deal if the Espressif chips are the only wifi-enabled SoCs we ever use, but it still seems to me like we shouldn't break ...

manic glacierBOT
rigid path
#

Can the Triple-axis Accelerometer+Magnetometer (Compass) Board - LSM303 (https://www.adafruit.com/product/1120) be used in conjunction with a Feather M4 Express or the like to create a digital compass? I am looking to incorporate into a project that uses a Feather M4 Express, an Ultimate GPS Wing and a 2.4" TFT display Wing.

lapis hemlock
#

@onyx hinge Jeff, could you spare 5 minutes for a short discussion over voice? It's not extremely urgent, so if you are busy, just say so.

onyx hinge
#

@lapis hemlock what's up?

#

if I can just ifnd my headphones

#

aha

#

ready for voice in the Amelia channel

lapis hemlock
#

I would like to "merge" the new version of ulab, and wanted to ask about the technical details. Mostly github stuff.

idle wharf
rigid path
#

@idle wharf So this is pointing towards yes?

idle wharf
#

I would say so.

onyx hinge
#

v923z and I discussed how to merge a pretty big set of changes within ulab (the "tensor branch"), and how to use git to get the desired result. Some time down the road he'll want to get circuitpython updated to use this, with the big thing (for us) being that we'll be able to enable arrays with 3 dimensions. We didn't discuss schedule.

#

@lapis hemlock just to make one thing clear that I glossed over, running those commands I suggested will discard the 2 dozen or so changes on your master branch that are not in the tensor branch, so whatever functionality those added will need to be re-done in the new branch if you didn't already...

lapis hemlock
#

@onyx hinge Those were changes either specific to that branch (i.e., wouldn't work in tensor), or I have already re-implemented the code in tensor. So that should be OK.

manic glacierBOT
ionic elk
#

Is there a good way to restart CI with a git push without actually making any changes to my PR? I've never had the restart-all-jobs button work the way I want

idle owl
#

@ionic elk You can make an empty commit and push it, though I'm not remembering how. Otherwise, it's all in the buttons.

idle owl
#

First time soldering anything that tiny period.

slender iron
#

nice job @idle owl! looks good

idle owl
#

And it works! 😄

slender iron
#

🎉

manic glacierBOT
timber mango
#

I admit I haven't gotten into circuit python but I have enough hours that support it that I feel like I should. One hesitation I have is that so many code examples are in c/c++ -- is that a real limiting factor or is it easy enough to get python examples for specialized sensors and such?

crimson ferry
stuck elbow
#

no producer will provide examples in python, but also you don't usually use those examples, you use the datasheets that explain what to do in more abstract terms, and I find it easier to implement that in python than in C

#

the C examples provided by producers are horrible code usually anyways

teal bear
#

@idle owl come join our solder party next week 😄

timber mango
#

Awesome, thanks @crimson ferry !

ornate breach
#

Is there a port for the GNU Debugger for CP?

#

I am working on a research project with my university and one tool we are using is GDB and I wanted to see if I could run GDB on CP

onyx hinge
#

@ornate breach you can debug the core C code of CircuitPython with gdb and a debug probe like jlink or black magic, but there is not a debugger for the Python code that runs inside CircuitPython.

ornate breach
#

Okay, I was going to run it on C

#

but I have grown to like CP so i figured i'd ask

#

🙂

manic glacierBOT
manic glacierBOT
atomic summit
#

So since updating just now, I'm back to this again...

#
make: *** [build-unexpectedmaker_feathers2/genhdr/en_US.mo] Error 1```
#

I was building fine this morning before I pulled latest IDF changes.

#

I've done the usual... all submodule updates, I re-ran install.sh again just in case something changed.

#

So installing gettext again fixed it... even though it was installed and building fine before my stream this morning.

#

oh wow.. now this?

#

make: esptool.py: No such file or directory <- really?

#

I just did a pull, git submodule update --init --recursive, ./install.sh and . ./export.sh

#

Could this be something to do with python 2.7 v python 3?

#

hmm, so something weird has happened and I can only get it to work if I force my python version back to 2 using alias python=python2

#

Ok, working... Adafruit CircuitPython 6.0.0-beta.2-9-g8c428a3bd on 2020-10-07; FeatherS2 with ESP32S2

#

But I can confirm that both of my outstanding issues ... boot time to APA coming on, and reload of code.py a few seconds after it starts are still present.

#

At least on the Mac, using 10.15.7

manic glacierBOT
#

I noticed something: When USB is not connected, the flickering almost disappears while othello is thinking and using 100% CPU without ever calling pew.tick(). It also gets less pronounced in maze3d when, judging from the frame rate, it maxes out the CPU and pew.tick(), while regularly called, never needs to time.sleep(). That feels suspiciously like interference from some power-saving feature inside time.sleep(). I haven’t checked the code to see if such a thing exists.

I don’t kno...

manic glacierBOT
thorny jay
#

First time soldering a chip!
@idle owl NICE. I am still waiting for mine, or should I say my two QT-Py and the single SPI chip I also ordered. And it might be my first attempt at "serious" surface mount soldering. I have not fully checked the guide yet ( https://learn.adafruit.com/adafruit-qt-py/overview ). But in a quick scan, I did not see much explanation on the two firmware (the one with Haxpress) and maybe the added build-in module you get if you use that one, in addition to more storage. I also wonder if it is possible to use the normal firmware and access the SPI chip "another way", like a SD card or something for logging.

Adafruit Learning System

What a cutie pie! Or is it... a QT Py?

manic glacierBOT
thorny jay
#

@idle owl ( or @turbid radish ) still on the QT-Py, the following repo might be of interest for new user that would have QT-Py as first CP hardware: https://github.com/todbot/qtpy-tricks . It is from Twitter user @devout jolt. I will see if I can contribute, but I can see some interest in showing how much can be done with such a board, with or without soldering.

analog bridge
#

We shouldn’t enable auto-reload when in safe mode, should we ?

blissful pollen
#

@onyx hinge I'm not quite sure how to make the PR to reimport the samd-peripherals into CP so any assistance would be great, though won't be able to get to it until later today

onyx hinge
#

@blissful pollen sure thing. The short version using the commandline is something like: in the submodule, git pull; git checkout origin/master (I think the peripherals submodule is still calling its primary branch that, not main) and then in the containing module git commit path/to/submodule.

blissful pollen
#

Okay thanks, makes sense I will try it out later

manic glacierBOT
#

The commit message tried to explain it:

If supervisor_start_terminal is called twice in a row without
supervisor_stop_terminal, it would lose track of a supervisor
allocation.

This can occur when setting the rotation of a display, including the
way that a FramebufferDisplay sets rotation AFTER initial construction,
first with a stack like

#0  supervisor_srtart_terminal
#1  in displayio_display_core_construct
#2  in common_hal_framebufferio_framebu...
solar whale
#

Just a heads up -- I tried using my normal sequence to update my clone of the CP repository with the latest updates to the esp-idf and I was not able to get the submodule synched properly. I did a clean clone and it all works fine -- on Linux, Raspberry Pi and MacOS. Sometimes its just easier to wipe it ad reclone! My "usual" sequence is ```git clone
git submodule sync --quiet --recursive
git submodule update --init
git submodule foreach --recursive 'git fetch --tags'

#

after cloning I did re-install the esp-idf ... all good

manic glacierBOT
slender iron
#

@analog bridge no autoreload in safe mode because code.py isn't run during safe mode

manic glacierBOT
#

Despite the name, #3492 does not actually update to the master branch of the ESP-IDF - due to a compatibility issue in TinyUSB, we are now simply on a more up-to-date fork. Once TinyUSB is working with the most recent version of the Espressif IDF repo, we should switch to a stable release. This will allow faster integration of new features and newly enabled modules, which are still under active development for the ESP32-S2.

#

OK. The more generic system of movable allocations that I’m currently working on should give us better tools to meet the requirements of both sharpdisplay (#3498) and rgbmatrix (#3499), and I intend to do that as a proof of concept before I consider it ready, so from that point of view that might obsolete at least part of #3498. That rework should probably not go into the 6.0 release at this point though. So if you want to merge both this and #3498 before the release, that’s fine with me. I’l...

lapis hemlock
#

@onyx hinge Yesterday I forgot to ask, how I should implement testing. I am going to have at least six versions (1, 2, 3, 4 dimensions, and for 3 and 4 two kinds of looping, where you can trade speed for flash space), which all have to be tested. These six cases come from values of ULAB_MAX_DIMS, and ULAB_HAS_FUNTION_ITERATOR in https://github.com/v923z/micropython-ulab/blob/ff8d2608098bee7ef50598fc28f67f91d611fb37/code/ulab.h#L34. I can handle the python side, because the __version__ string tells me what I have to know at run time, but the question is, how I should let github produce the 6 executables in the first place. As far as I know, I can't override the values of ULAB_MAX_DIMS, and ULAB_HAS_FUNCTION_ITERATOR from the command line. Have you any recommendations?

onyx hinge
#

@lapis hemlock At one point we added this to the mpconfigport file via actions, but later it became unneed. Would this apply to the settings you need to make now? ```+ - name: Enable ulab in micropython unix port

  •  run: echo '#define MODULE_ULAB_ENABLED (1)' >> micropython/ports/unix/mpconfigport.h
    
lapis hemlock
#

I could do this. Seems a bit hackish, but what the heck!

onyx hinge
#

to test all the combinations you can use a feature of actions called the "matrix"

lapis hemlock
#

Oh, I haven't heard of that. Thanks for the suggestion!

onyx hinge
#
  test:
   strategy:
    matrix:
     max_dims: [1, 2, 3, 4]
     function_iterator: [false, true]
``` totally untested syntax, but here's the idea
lapis hemlock
#

OK, thanks! We don't need a test against the circuitpython fork, do we? (Provided that I fix the properties issue.)

onyx hinge
#
index 20532c3..297808f 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -14,6 +14,10 @@ on:
 
 jobs:
   test:
+   strategy:
+    matrix:
+     max_dims: [1, 2, 3, 4]
+     function_iterator: [0, 1]
     runs-on: ubuntu-16.04
     steps:
     - name: Dump GitHub context
@@ -44,6 +48,13 @@ jobs:
     - name: Build mpy-cross
       run: make -C micropython/mpy-cross -j2
 
+    - name: Set build flags
+      run: |
+        echo "#define ULAB_MAX_DIMS ($MAX_DIMS)" >> micropython/ports/unix/mpconfigport.h
+        echo "#define ULAB_HAS_FUNCTION_ITERATOR ($FUNCTION_ITERATOR)" >> micropython/ports/unix/mpconfigport.h
+      env:
+        MAX_DIMS: ${{ matrix.max_dims }}
+        FUNCTION_ITERATOR: ${{ matrix.function_iterator }}
     - name: Build micropython unix port
       run: |
         make -C micropython/ports/unix -j2 deplibs
``` a full but still untested version
#

circuitpython will take responsibility for testing with circuitpython

lapis hemlock
#

I can pick it up from here, you shouldn't squander your time.

onyx hinge
#

OK, take care

lapis hemlock
#

circuitpython will take responsibility for testing with circuitpython
@onyx hinge That's fine and dandy, but it would be great, if issues came out early on.

onyx hinge
#

(philosophically, perhaps all we can do is squander our time)

lapis hemlock
#

(philosophically, perhaps all we can do is squander our time)
@onyx hinge 😉 right.

onyx hinge
#

when you (or, well, someone) PR the update of ulab into circuitpython, our CI will run the tests with our one configuration

#

I can show you how to run our tests locally if that is of interest to you

#

.. we'll have to decide what our one configuration is of course. I hope 3 dims fits everywhere.

#

stepping away again, it's lunchtime here after all

lapis hemlock
#

.. we'll have to decide what our one configuration is of course. I hope 3 dims fits everywhere.
@onyx hinge Heck, why not?

#

I can show you how to run our tests locally if that is of interest to you
@onyx hinge Well, I wanted to quote this with my previous comment.

onyx hinge
#

I think the short version is: in ports/unix, run make deplibs && make && make tests. You don't need to make deplibs again until you make clean.

lapis hemlock
#

@onyx hinge OK, I will try to set up the matrix, and we can re-visit the issue tomorrow, perhaps. It is probably not a burning one. Issue, that is.

idle wharf
#

Just a heads up -- I tried using my normal sequence to update my clone of the CP repository with the latest updates to the esp-idf and I was not able to get the submodule synched properly. I did a clean clone and it all works fine -- on Linux, Raspberry Pi and MacOS. Sometimes its just easier to wipe it ad reclone! My "usual" sequence is ```git clone
git submodule sync --quiet --recursive
git submodule update --init
git submodule foreach --recursive 'git fetch --tags'

@solar whale I also had to blow away my CP clone last night in order to build.
I didn't know about that 3rd command. Should that be added to the Build CP steps? https://learn.adafruit.com/building-circuitpython/build-circuitpython

manic glacierBOT
idle wharf
#

I should add, I got a build failure not a submodule sync issues (at least I didn't see one)

manic glacierBOT
slender iron
#

@analog bridge I'm planning on doing the deep sleep API during my stream tomorrow

analog bridge
#

👍

slender iron
#

I'll start from your branch

supple gale
#

I should add, I got a build failure not a submodule sync issues (at least I didn't see one)
@idle wharf I had no issues actually, Pulled down the latest main. Did the following under WSL2 Ubuntu20.04 instance
git submodule update --init
cd lib/tinyusb
git submodule update --init .
cd ../../ports/esp32s2/esp-idf
git submodule update --init --recursive
./install.fish
set -x IDF_PATH $PWD
source $IDF_PATH/export.fish
cd ..

#

make BOARD=espressif_saola_1_wrover clean

#

make BOARD=espressif_saola_1_wrover

manic glacierBOT
#

I did think about creating a function for the following: (it gets called at 2 places)

if (autoreload_is_enabled()) {
    serial_write_compressed(translate("Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.\n"));
} else {
    serial_write_compressed(translate("Auto-reload is off.\n"));
}
if (safe_mode != NO_SAFE_MODE) {
    serial_write_compressed(translate("Running in safe mode! "));
    serial_write_compressed(translate("Not running saved c...
#

[Not working yet]
I am trying to fix #3516 , I have fixed the build issue with hal file got move around with latest IDF. However, I got an linking issue. @hierophect Would you mind help me to fix this, I will try to test out the usb patch.

xtensa-esp32s2-elf-gcc: error: esp-idf/components/xtensa/esp32s2/libhal.a: No such file or directory
xtensa-esp32s2-elf-gcc: error: esp-idf/components/xtensa/esp32s2/libhal.a: No such file or directory
make: *** [Makefile:319: build-espressif_s...
#

@hathach please use git to revert commit https://github.com/adafruit/circuitpython/pull/3492/commits/e01e8dd6b9c886c091bdbe735f4a3f63a4fb6859. I already did all the porting work to move the file names over, and this commit is where I moved them all back in order to support the older IDF version that worked well with TinyUSB. If you revert that commit, it should bring up everything back to a compile-able state.

solar whale
#

@idle wharf that 3rd line was something @tulip sleet had recommended to me awhile ago. I'll defer to him as to whether or not is should be added to the guide. Also, I did not have any errors with the git pull/update but I also usually do a git diff after updating and it showed a discrepancy with the esp-idf submodule. Usually after an update git diff does not show anything.

idle wharf
#

That's a good thing to check (diff) I should remember to do that!

lapis hemlock
#

@onyx hinge Here is an oddity for you: I was trying to add in-place operators to ulab, when I bumped into this strange phenomenon. In numpy, the following works a = array([1, 2, 3, 4, 5], dtype=uint8) a **= 2. a, but this doesn't a = array([1, 2, 3, 4, 5], dtype=uint8) a **= 1. a. In fact, it seems to me that you can have no floating point numbers on the right hand side, except 2.0. Go figure!

lapis hemlock
#

@onyx hinge I am not sure how echo "#define ULAB_MAX_DIMS ($MAX_DIMS)" >> micropython/ports/unix/mpconfigport.h echo "#define ULAB_HAS_FUNCTION_ITERATOR ($FUNCTION_ITERATOR)" >> micropython/ports/unix/mpconfigport.h could work. The echo inserts the two lines at the end of the file, but that is already outside the scope of the header file's #ifdef/#endif. Am I missing something here?

#

I'll just have to use sed, I guess.

stuck elbow
#

or patch

manic glacierBOT
lapis hemlock
stuck elbow
#

I don't see why not, it can work exactly like sed, only more reliably

#

and if there is a change around the important line and it gets confused, you at least get an error and not mangled result

onyx hinge
#

@lapis hemlock maybe it's not as simple as I had hoped then 😦 it appeared to work back when I was doing it to enable ulab itself. For all I know there is a better way anyway.

lapis hemlock
#

@stuck elbow OK, so how should we replace the two lines in question?

stuck elbow
#

make the edits you want, generate the patches with diff or git format-patch, and then apply it with patch just like you would with sed

lapis hemlock
#

But we want to change these two lines dynamically.

stuck elbow
#

you can also undo them with patch -r

#

how would you do that with sed?

manic glacierBOT
lapis hemlock
#

Somethine like this sed "s/#define ULAB_MAX_DIMS/#define ULAB_MAX_DIMS $MAXDIMS/g"

#

$MAXDIMS is a shell variable at that point. It might be that I would have to pass it in a different way, though.

#

I guess you are right, we could just do something like this echo "#define ULAB_MAX_DIMS $MAXDIMS" > ulab.patch patch ulab.h < ulab.patch

#

This is what you meant, didn't you?

stuck elbow
#

something along those lines

lapis hemlock
#

For what it is worth, here is the working solution with sed: sed "s/#define ULAB_MAX_DIMS.*/#define ULAB_MAX_DIMS $MAXDIMS/" ulab.h

idle owl
#

Nevermind.

idle wharf
#

As-is all the ESP32-S2 boards are going to come up with the hostname "espressif". I was thinking it'd be cool if that was the board name (ex: adafruit-metro, feathers2, etc). I set CONFIG_LWIP_LOCAL_HOSTNAME="feathers2" in the board specific sdkconfig file and ran a clean build but its still coming up as espressif when I scan with Fing. I was going to look into it more, but wanted to check if this was interesting to all first.

manic glacierBOT
idle wharf
#

Actually. I think I fixed the CONFIG_LWIP_LOCAL_HOSTNAME thing (or the name was cached).
I didn't have the end line before.

#
# LWIP
#
# CONFIG_LWIP_LOCAL_HOSTNAME="feathers2"
# end of LWIP
crimson ferry
#

@idle wharf Do you know if it's possible to not have the ESP32-S2 come up in AP mode on startup?

idle wharf
#

Sorry @crimson ferry I don't. I was lucky searching the IDF docs for hostname. You can also ran idf.py menuconfig (you need to do this in ports/esp32s2 and don't leave the sdkconfig it will create there lying around) and see what's what. That setting I'm using is under LWIP.

crimson ferry
#

Thanks

manic glacierBOT
#

This is not only an I2C problem. The issue is in port_get_raw_ticks(), which can return a value less than the previous value.
This simple Python script can demonstrate using monotonic_ns, which directly calls port_get_raw_ticks() :

import time

a=time.monotonic_ns()
while True:
    b=time.monotonic_ns()
    if b<a:
        print(f"Got {b} was {a}")
    a=b
 

This does not reproduce the issue as quickly as the I2C bus does, but I get output like
`Got 11268000061036 was 1...

idle owl
#

Here is the notes document for TUESDAY'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/1OiVJFRT-x4RwJv98aJRrXWwUi1p77obFGyLtlMalWFI/edit

slender iron
#

@idle wharf if you change stuff encoded in the idf you'll want to clean your build

#

the build system doesn't know the idf deps

idle wharf
#

Do you think the end was needed? Or was it just something cached \not clean build

#

It looks like a comment to me, but so does half the C files

slender iron
#

my guess is that the end isn't needed

#

that's my understanding too

idle wharf
#

k, i'm going to try and figure out Vendor as well and if I can, then I'll make a suggested fix\open an issue for input.

slender iron
#

k, sounds like you are ready for a PR

#

🙂

idle wharf
#

Well, I'd want to put in good values for current boards AND I'd also like to set the Vendor name. But I've not found it yet.

slender iron
#

boards do have USB manufacturer settings

umbral abyss
#

is possible to assign or set the rotaryio.IncrementalEncoder position?

#

encoder = rotaryio.IncrementalEncoder(Board.D8, boardD9)

#

position = encoder.position

#

Is it possible to override or write a value to the encoder.position object?

#

sorry...why ask a question when you have REPL right in front of you

#

😆

idle wharf
#

I see a "Vendor" field in my Ubiquiti network clients list, but that might be being inferred from the MAC address not a value in the network connect\setup.

crimson ferry
#

Yes, I think those tend to get looked up by MAC/OUI

#

It shouldn’t typically be present in 802.11 frame bodies

manic glacierBOT
slender iron
#

@umbral abyss you should be able to do encoder.position = 0

slender iron
onyx hinge
#

@slender iron def __init__( self, *, width=64, height=32, bit_depth=2, alt_addr_pins=None, color_order="RGB" ): default bit_depth is 2, which would make 2^2 = 4 usable component values

slender iron
#

mind replying to them?

#

🙂

onyx hinge
#

I forget how it rounds, but 0, 0x40, 0x80, 0xc0 might be the break points

manic glacierBOT
fringe trench
#

@idle owl How did you solder the SPI flash to the QT Py? Good iron control, or hot air, solder paste, flux?

manic glacierBOT
manic glacierBOT
#

@hathach please use git to revert commit e01e8dd. I already did all the porting work to move the file names over, and this commit is where I moved them all back in order to support the older IDF version that worked well with TinyUSB. If you revert that commit, it should bring up everything back to a compile-able state.

Ah thanks, I could get it build and fixed the usb configure with latest idf. A...

manic glacierBOT
manic glacierBOT
upbeat plover
#

does cp auto update from weblate?

onyx hinge
onyx hinge
#

huh. I'm surprised these are markedly different. ```>>> l = [random.random() for i in range(1000)]

print(sum(l), ulab.numerical.sum(l))
496.797 496.826

manic glacierBOT
#

Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
A moderate security vulnerability has been identified in the GitHub Actions runner that can allow environment variable and path injection in workflows that log untrusted data to stdout. This can result in environment variables being introduced or modified without the intention of the workflow author. To address this issue ...

ionic elk
#

@slender iron whenever you get on, Thach managed to quickly resolve the USB issues we were having with the IDF, so I tested and merged that in this morning - we're back on Espressif's IDF completely now. AnalogIn and AnalogOut have had this merged in correspondingly.

slender iron
#

@ionic elk awesome thanks! Will look at it today. I have a meeting now and then am streaming later.

lapis hemlock
#

huh. I'm surprised these are markedly different. ```>>> l = [random.random() for i in range(1000)]

print(sum(l), ulab.numerical.sum(l))
496.797 496.826

@onyx hinge I can try to track this down. On which port do you see this? I have just tried on unix, and it seems to be fine.

#

I believe, micropython on unix doesn't have the full random module, so I hacked it a bit. Here is my code ```>>> import ulab as np

import random

l = [random.getrandbits(10)/1024. for i in range(1000)]
print(sum(l), np.numerical.sum(l))
507.2255859375 507.2255859375```

slender iron
#

@fringe trench when soldering the SPI flash I recommend soldering one leg first

#

that way you can apply the iron again to adjust its position

#

once it's in the spot you want I do the opposite corner

#

then you can either drag the iron from that leg to the others or you can try to do them individually

onyx hinge
#

@lapis hemlock in this case it was a stm32f405 feather. I kinda suspect the ulab answer is "more correct" but not sure

lapis hemlock
#

The difference is the order of the operations: micropython works with mp_obj_t objects, while ulab extracts the values immediately: https://github.com/micropython/micropython/blob/222ec1a4a86cdcfa9546c30243e4e244bec9697f/py/modbuiltins.c#L526, https://github.com/v923z/micropython-ulab/blob/5c75f08118dc871bd3b6c143db6fbbd5ce4d1651/code/numerical/numerical.c#L75 I have the feeling that we are dealing with a truncation error, but I don't know, where exactly.

lapis hemlock
#

@onyx hinge In any case, thanks for bringing up the issue! I have also uncovered a really silly error in the implementation in the tensor branch😊

indigo wedge
#

@slender iron with the Metro M7 incoming, is the imx port gonna get a slightly higher, since the latest release says it's still alpha state 😄

slender iron
#

slightly yes

#

but we're going to release the metro as very beta still

#

(I just spent a week on it)

indigo wedge
#

i see, was curious what the strategy will be, if adafruit thinks the port is good enough to release a product with it

#

i have 30 things in the air at the same time, focusing is hard 😅

slender iron
#

yup 🙂

lapis hemlock
#

🤹‍♂️

#

@indigo wedge

indigo wedge
#

more like 🤡 😄

slender iron
#

@uncut nexus are you looking into the STM32 timekeeping issue?

manic glacierBOT
#

A few libraries have examples that use _bleio.ConnectionError:

ibraries/helpers/ble_magic_light/README.rst
103:                    except _bleio.ConnectionError:

libraries/helpers/ble_magic_light/examples/ble_magic_light_simpletest.py
46:                except _bleio.ConnectionError:  # pylint: disable=no-member

libraries/helpers/ble_berrymed_pulse_oximeter/examples/ble_berrymed_pulse_oximeter_simpletest.py
59:    except _bleio.ConnectionError:  # pylint: disable=no-member
...
onyx hinge
#

.. could steal TIM2 or TIM5 for use as a 32-bit up counter, you have plenty of time between its overflows at 1ms or 1/1024s granularity ..

manic glacierBOT
thorny jay
blissful pollen
#

@thorny jay I can try it against the Canadian covid app if you would like

#

What am I looking for exactly? I have it up and running now

thorny jay
#

I have just update the README with the explanation of the color.

#

Each MAC address get a LED associated, the color is the signal level.

#

So if you see a GREEN LED that turn Yellow and RED when you get very close, it is the same advertisement.

#

Using that, you can know the number of phone having the app installed and start discussing the usefullness of having the app installed if people nearby are not using it.

blissful pollen
#

I can see one LED and definitely changes from Green to Yellow to Red as my phone gets close to it

thorny jay
#

Wait 15 minutes, your phone will change the advertised MAC, that one LED will be BLUE and another one used for your new MAC. Check back on my README, it gets better and better as I explain how to use and usecase. Thank you for testing... definitively the same protocol world wide, so except for country that created their own incompatible stuff, most will use the provided API with the benefit of running in the background.

blissful pollen
#

@thorny jay That's exactly what happened

thorny jay
#

@thorny jay That's exactly what happened
@blissful pollen Welcome to the club. If you have idea, you can make an issue, if you have fix or code for a feature you can make a PR. 🙂

crimson ferry
#

Is this right? For Matrix Portal, mpconfigboard.h shows #define DEFAULT_I2C_BUS_SCL (&pin_PB03) #define DEFAULT_I2C_BUS_SDA (&pin_PB02) but pins.c shows { MP_OBJ_NEW_QSTR(MP_QSTR_SCL),MP_ROM_PTR(&pin_PB30) }, { MP_OBJ_NEW_QSTR(MP_QSTR_SDA),MP_ROM_PTR(&pin_PB31) },

simple pulsar
#

Hello. For board.DISPLAY.show(whatever), is there anyway afterwards to find out what is being displayed, i.e. retrieve whatever from somewhere? I want to display somethnig else and then restore previous screen

atomic summit
#

@slender iron just a FYI - I think I just destroyed my U2 Boards branch, and I had a pending PR, and it's now messed up. Can't seem to work out how to fix it 😦

#

Is there a way to kill off a PR?

slender iron
#

what do you mean by destroyed?

atomic summit
#

it was a simple 1 file change that I can redo.

slender iron
#

you can always force push to the same branch name

atomic summit
#

I fetched and rebased this morning, and when I tried to do a submodule update, it got stuck and aborted

slender iron
#

did you do a git submodule sync?

#

the idf source changed again because thach fixed the usb stuff

atomic summit
#

but left a whole bunch of crap, and git status said I can to push to be able to continue and I did and now there is a stack of extra stuff in the commit..

#

I just ran a sync...

slender iron
#

do you have just one commit you want to redo? you can do git reset HEAD~1

#

which moves you back one commit but leaves the changes

atomic summit
#

I have a tonne of tracked and untracked files... and most look the same

#

I tried to rebase back to my last commit from my PR but it wont let me

slender iron
#

you can probably checkout the last commit

#

I don't think you want to use rebase to do it

atomic summit
#

see my PR has all of that in it now 😦

slender iron
#

looks like you rebased the new main changes onto your original commit instead of the reverse

atomic summit
#

Ok, I fixed it...

slender iron
#

I'd suggest checking out adafruit/main and then cherry pick d93a196 on top

atomic summit
#

I reverted to my last PR commit, then pushed

#

the PR looks ok now

#

yeah I think I rebased the wrong way

#

have I told you how much I hate git? 😉 hahaha

manic glacierBOT
thorny jay
#

have I told you how much I hate git? 😉 hahaha
@atomic summit Don't say that to someone that love GIT and try to educate us in his stream. 🙂

atomic summit
#

Scott already knows 😉

thorny jay
#

99% of git user hate it and suffer, but are forced to use that by the 1% that master it!

atomic summit
#

I don't understand why I have this esp-idf folder here...

#
On branch main
Your branch is up to date with 'origin/main'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
  (commit or discard the untracked or modified content in submodules)
    modified:   esp-idf (new commits, modified content, untracked content)

no changes added to commit (use "git add" and/or "git commit -a")```
#

I'm on main and my origin and upstream (sorry for the naming Scott) are pointing to the same.

#

I can't discard it, I can't commit it, I cant do a git submodule update (it aborts) and I can't build as it complains my submodules are out of date.

#

if I try to do a submodule update I get

#
    examples/device/cdc_msc/ses/samd21/ATSAMD21G18A_Registers.xml
    examples/device/cdc_msc/ses/samd21/ATSAMD21G18A_Vectors.s
    examp
Aborting
Unable to checkout '3bcc416e13cc790e2fb45fcfe9111d38609c5032' in submodule path 'components/nghttp/nghttp2'
Unable to checkout '28f89e13473d40637574bcbfe4142633b39899fd' in submodule path 'components/tinyusb/tinyusb'```
#

even if I do a git submodule sync

#

I don't want to kill off this repo and start again as I have the outstanding PR in my UM Boards branch

#
fatal: src refspec 'refs/heads/main' must name a ref
fatal: process for submodule 'ports/esp32s2/esp-idf' failed```
#

Can I suggest a "help with git" channel in the help with category? rather than filling the circuitpython channel with git questions?

stuck elbow
#

or maybe "help-with-repositories"

#

because there are more github-related stuff than just git

atomic summit
#

so I staged it, and it immediately added it as unstaged as well.

#
On branch main
Your branch is up to date with 'origin/main'.

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
    modified:   esp-idf

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
  (commit or discard the untracked or modified content in submodules)
    modified:   esp-idf (modified content, untracked content)```
#

how can it be staged and unstaged at the same time?

stuck elbow
#

some changes may be staged, and some changes to the same file may not

#

especially when the file is actually a subrepo

atomic summit
#

@stuck elbow hmm, yeah, that's not confusing at all 😉

#

I cant seem to break out of this git-trap

#

can I just delete the esp-idf folder, commit/push my changes and start again ?

manic glacierBOT
stuck elbow
#

it helps when you realize that the author of git uses it by sending patch bombs via e-mail

atomic summit
#

I fixed it by physically deleting my esp-idf folder, commit/push, then reset to upstream/main

#

it's now building

#

no complaints about out of date submodules etc

#

sorry for the GIT SPAM everyone 😦

atomic summit
#

I'm not sure what specifically changed in the "tinyusb fix" and IDF update, but I'm still seeing the 5 second boot and the re- run of code.py after mounting, no matter how many times it boots/mounts.

#

@lucid solar flashed his soala and his boot times are < 2secs to see the neopixel start cycling.

#

He did this on his Mac. So it can't be Mac specific.

#

I also tried a build removing the RAM test on boot, incase the 8MB test was the cause, but it only reduced the time by maybe half a second.

#

Maybe something to do with the size of the flash?

atomic summit
#

I just tried setting the flashmode to DIO and size to 4MB, like the soala_wrover and it boots in 4 secs and no re-start of code.py

#

the DIO/QIO bit didn't seem to change anything... but the 16MB -> 4MB did.

#

so still quite a long boot, but no restart

#

Just putting it back to QIO again to be 100% sure, but I did the QIO/DIO thing at 16MB first and it was the same. So now trying qio and 4MB

orchid basinBOT
atomic summit
#

Ok, confirmed DIO/QIO makes no difference.

#

4MB/16MB does

#

So could this be a tinyusb issue?

teal bear
#
#

I am trying to build and flash now to see what happens - but it would be good if someone who knew something about this chimmed in 😉

manic glacierBOT
manic glacierBOT
green wind
#

I'm about to try and make a Board Deff for my esp32-S2 board, a week or so back I found a tutorial but for the life of me I can't find it now!!
Can anyone help point me to somewhere to start? @slender iron ?

onyx hinge
#

@teal bear ^

teal bear
#

😄 product #1 shipped!

ornate breach
#

Yay! 😁

#

You want another CP board to test @onyx hinge ? Hehe (only half serious)

onyx hinge
#

no not really

#

however I won't mind not using the cheap transceiver modules I picked up on amazon

ornate breach
#

I need to really step up my development game. Also need to finish rewriting my board definitions for my board

#

New version is coming in next week for me to assemble

slender iron
green wind
#

@slender iron thanks 🙏🏼
Spent ages searching for that tonight. I think the sea kayaking washed my search-mojo away!!

slender iron
#

ya, learn search isn't spectacular

green wind
#

Gonna try to get it done tomorrow 🤞🏻

slender iron
#

👍

ornate breach
#

Is there a guide on how to use the Adafruit DAP?

orchid basinBOT
ornate breach
#

Never mind, I found it

manic glacierBOT
wise shard
#

I really want to be able to use make_transparent() on the ColorConvertor pixels like I can with the Palettes. Am I right in my assumption that I should be modifying CircuitPython's ColorConvertor and not some other dependency/repo? (Intention is to have transparent OnDiskBitmap images)

#

I was peeking through the PRs and saw that some required updates upstream not CircuitPython itself so I wanted to make sure

manic glacierBOT
#

Host PC: Macbook Pro running macOS 10.15.7
Board: QT Py, with no peripherals (also happens on Trinket M0)
CircuitPython version: 6-beta2

I've been noticing in CircuitPython 6 that the auto-reload doesn't seem to work much after saving a file. For instance, in the CP program below (which plays random colors on the built-in Neopixel and prints out the current time.monotonic() and a string), I can edit the "hello" string, save the file, and auto-reload does not happen.

impo...
bitter solar
#

Are there any videos or links that I can look at to get a start on learning how to develop circuitpython libraries for sensor cards not currently supported?

#

I have a few sensors that I need for a project including a TDS sensor and a PH sensor that have Arduino libraries but no python libraries.

#

I am a C# dev with some JS and Python experience. Is this enough to get started in this type of development.

onyx hinge
#

@teal bear one is the size of the internal flash storage of the microcontroller and the other is the size of the external chip. The former is used for the code and the latter for the CIRCUITPY filesystem.

#

(in the case of a board without an external flash chip, a portion of the internal flash storage is set aside for CIRCUITPY, according to the "linker script")

teal bear
#

oh... thanks. ok, I'll stop touching the mc flash.

#

we tried to use a 4m flash, and now we have no flash :p

dusty haven
wise shard
#

Not sure if I should be asking here or the #help-with-circuitpython room but I am trying to modify CircuitPython and have a question

#

I am trying to pass in a uint32_t type value into a method. But I am getting an expected type error here because it is not an int. In the runtime.h > mp_arg_t I don't see a declaration for any type that I would expect to be uint32_t

#
        { MP_QSTR_dither, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = false} },
        { MP_QSTR_transparent_color, MP_ARG_KW_ONLY | MP_ARG_INT, {.uint32_t = 0} },
    };```
#

So I am not sure what MP_ARG_INT should be here in the second allowed_args value.

#

(My first time trying C)

#

Or maybe it is better if I make a PR then have discussion there

#

Or to circumvent all of this is there a way to compare a uint32_t and int? 😅

#

ill PR and ask that seems more natural

manic glacierBOT
#

Signed-off-by: Jensen

Summary

Add the ability to pass in a color into the ColorConverter module so it flags a pixel as opaque=false which I think will make it use the background value (sub layer's pixel value) when rendering on the screen.

Example: displayio.ColorConverter(transparent_color=VALUEHERE)

I was unable to get this to compile as there is no type for an uint32_t declared in the types for mp_arg_t. That seems expected because it might be weird anyone is pas...

slender iron
#

@dusty haven I haven’t! Thank you. I’ll take a look at it

#

@wise shard you’ll want ‘.u_int’ which will be signed and then check it isn’t less than zero

#

Will reply on your or tomorrow. On my phone now

manic glacierBOT
#

This how to set the default hostname for any ESP32-S2 based board.
Without this every board will have the hostname "espressif".

Hostname can be 253 characters (a-z, A-Z, 0-9, -). Although caps are converted to lower case, they're fine to use.
I suggest using the same value as USB_PRODUCT from board/mpconfigboard.mk, but the board maker could use anything they want.

I tested this on a FeatherS2. Unexpected Maker is going to checkin his own change.

Additional work is needed to surf...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

I investigated why #3482 causes a problem with framebuffer displays. It’s not a bug in #3482 (phew), but as you say it’s actually the double call of supervisor_start_terminal that only starts causing problems once the ability to reuse supervisor allocations is there. The reason is simple: In your test case (I used the setup_display.py from https://github.com/adafruit/circuitpython/pull/3482#pullrequestreview-499834977), the double call is initiated from Python, therefore without the abili...

balmy stirrup
#

Happy Friday Everyone! I am working with the PyPortal and testing some IoT stuff. The Adafruit_IO_Python lib calls for a platform module however I can't seem to locate it any ideas?

onyx hinge
balmy stirrup
#

Ahh yes I am in the wrong repo. Thanks @onyx hinge!

wise shard
#

I actually think my approach won't work regarding transparencies after sleeping and looking at the code 😅 but I could get it to work for just a private build ha

manic glacierBOT
#

not important at all, though the github doc https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
use the syntax that put >> $GITHUB_ENV at the end

echo "action_state=yellow" >> $GITHUB_ENV
echo "/path/to/dir" >> $GITHUB_PATH

Out of curiosity, why would you change the order, or maybe they update the doc recently ?

#

I can confirm some issues with the sharp display not able to access spi in certain conditions. I have a project with a bluefruit sense nrf52840 and a 2.7 sharp memory display. I have code that runs through a menu to sepect and run sub files, and each sub file has a routine with supervisor to issue a reload command. Oddly if i use displayio.release_displays() and issue the reboot, on soft reboot it claims spi bus is busy when the display is initialized. If i hard reboot, the code functions as ...

balmy stirrup
#

@balmy stirrup I assume that is not the correct module to use. rather, you need https://github.com/adafruit/Adafruit_CircuitPython_AdafruitIO possibly called adafruit_io in the bundle
@onyx hinge
Tripping up at.

AdafruitIO_MQTTError: MQTT Error: Unable to connect to Adafruit IO.

https://github.com/adafruit/Adafruit_CircuitPython_AdafruitIO/blob/master/adafruit_io/adafruit_io.py#L116
I manually ran within the REPL and at the io.connect() same error. I can't seem to get any additional info. The wifi is connected. Any thoughts?

balmy stirrup
#

I think I found a bug in adafruit_minimqtt.py as socket is throwing an attribution error has no attribute recv I will dig in soon.

#

Disregard had an older version of the esp32spi lib. All good 😉

slender iron
#

@wise shard I'm sure we can get it working

manic glacierBOT
#

The two are equivalent in the shell. in Unix shells, probably not in the Windows CMD.EXE or powershell)

For me, placing the ">>$GITHUB_ENV" or ">>$GITHUB_PATH" near the beginning rather than near the end (like the old ::set-env was) makes the intention clearer. Otherwise, what you see first is just "echo", and you have to scan to the end of the line to find the destination, then back to the middle to find out what the environment variable or path element is.

#

Setting your host name programmatically is definitely a feature that should be implemented.

It's definitely my opinion that it is a better experience for new people to have the default name match the device name. It's also interesting that this setting exists in the IDF, which I take as an indication it is meant to be used by manufacturers. If the group disagrees that's fine.

Re: upper and lower case. I was going to add a caveat that how I tested that was using Fing on my iPhone to scan...

ionic elk
#

@slender iron if you're all set with AnalogOut and have the time today, I'd suggest we simply ignore the NotImplemented issue in AnalogIn and merge it and AnalogOut in rapid succession.

slender iron
#

kk

#

@ionic elk your analogin PR has the samd peripheral submodule changing

#

does git merge stop with a conflict?

manic glacierBOT
ionic elk
#

@slender iron dang it, sorry about that. I really don't know why it does that

#

it's very weird it doesn't come up in my Git at all

slender iron
#

hrm, maybe it's the way merge works

ionic elk
#

it doesn't even mention updating the submodule

#

normally when it swaps something out like that it actually shows the change in commit in the checkout messaging etc, but it's like it's not even happening for me...

#

Maybe some kind of leftover change where I forgot to run gitsubupdate a while ago, or something

slender iron
#

¯_(ツ)_/¯

#

seems like it's been happening more often

#

maybe something changed

ionic elk
#

ok fixed

manic glacierBOT
analog bridge
#

@slender iron how many passes does common_hal_wifi_radio_connect do before it outputs no_ap_found error ?

slender iron
#

just one I think

analog bridge
#

I want to add a timeout feature to it

#

in case we want to keep scanning until we find AP

slender iron
#

I think the python code should loop to wait, not the low level code

analog bridge
#

but mp_raise_ConnectionError(translate("No network with that ssid")); stops code.py

slender iron
#

you can catch the exception so it doesn't

#
try:
    <blah>.connect()
except ConnectionError:
    pass
manic glacierBOT
manic glacierBOT
#

ahh, yes! If I create a similar small script, but do not use time.sleep(), auto-reload works fine. E.g.

import board
import time
import neopixel
from random import randint
pixel = neopixel.NeoPixel(board.NEOPIXEL, 1, brightness=0.2)
lasttime = time.monotonic()
while True:
    if time.monotonic() - lasttime > 0.2:
        lasttime=time.monotonic()
        print(time.monotonic(), "hello")
        pixel.fill( (randint(0,255), randint(0,255), randint(0,255) ))
manic glacierBOT
slender iron
#

anyone around to review ☝️

blissful pollen
#

@slender iron just not familiar with all you want done in a review. I did look at your changes and see what you did (makes sense to me). I could try to build a copy of CP (I think) to try it

slender iron
#

@blissful pollen once the CI is done there will be builds available too

manic glacierBOT
blissful pollen
#

success! (built it and it works on my feather m0 basic), so just comment in the PR then?

manic glacierBOT
slender iron
#

@atomic summit can you give me your test code you are seeing the double reload with?

atomic summit
#

@slender iron Sure! What's the bets way to get it to you?

#

Also, I jumped on the stream this morning... doh! it was yesterday!!!!!

slender iron
#

you can just copy the file here

#

yup! sorry about that

onyx hinge
atomic summit
#

There are a few files you need, can I send a zip ?

slender iron
#

sure

manic glacierBOT
slender iron
#

@onyx hinge enough to know there isn't anything obviously weird

onyx hinge
#

@slender iron why bring this code in at this time? does it avoid some trips through the interpreter which are undesirable? is it from micropython? if (vfs->flags & FSUSER_NATIVE) {

manic glacierBOT
#

This should display three pixels in different colors:


import board
import digitalio
import _pew

rows = (
        digitalio.DigitalInOut(board._R1),
        digitalio.DigitalInOut(board._R2),
        digitalio.DigitalInOut(board._R3),
        digitalio.DigitalInOut(board._R4),
        digitalio.DigitalInOut(board._R5),
        digitalio.DigitalInOut(board._R6),
        digitalio.DigitalInOut(board._R7),
        digitalio.DigitalInOut(board._R8),
 )
cols = (
    ...
atomic summit
slender iron
#

I added the native ioctl stuff because I thought that was the issue

onyx hinge
#

once it's there, it's a "would be nice" to convert sdcardio / sdioio to use it.

slender iron
#

we already have the other two native functions so it made sense to have everything native for when the vm isn't going

#

thanks @atomic summit

onyx hinge
#
     *(EXCLUDE_FILE(
-        *flexspi_nor_flash_ops.o
         *fsl_flexspi.o``` the special handling of flexspi_nor_flash_ops is no longer needed?
slender iron
#

it's done by marking the individual functions

#

please ask these questions on the PR so they are easier to find than discord

ionic elk
#

Got a new very smol Circuitpython board on the way

onyx hinge
#

OK - I was going for the fast turnaround

ionic elk
#

we'll see how it works

manic glacierBOT