#circuitpython-dev
1 messages · Page 331 of 1
@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.
@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.
I connected one of the row pins to a logic analyzer. It should go low for one cycle, and they stay high for seven cycles, at regular intervals. Instead I got this:

@grim dagger I'd actually recommend you grab these three things!
- https://www.adafruit.com/product/752
- https://www.adafruit.com/product/1675
- https://www.adafruit.com/product/2743
That way you avoid fragile wires
This 1.27mm pitch, 2x5 male SMT Box Header is the same one used on our SWD Cable Breakout Board. The header alone is great if you want to incorporate this piece of hardware with your ...
These little cables are handy when programming or debugging a tiny board that uses 10-pin 1.27mm (0.05") pitch SWD programming connectors. We see these connectors often on ARM Cortex ...
This'll also make it easy to connect to debuggers like a JLink or Black Magic probe
I saw test pads for SWDIO and SWCLK but I thought the SMT pinout was for a flash device... I'll look closer
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
You'll want to grab these too, https://www.adafruit.com/product/2830, since otherwise your Feather won't fit into a breadboard anymore!
The has successfully run my loopback self-test program for CAN, which tests transmission, reception, and filtering. The 1M baud rate setting was also verified on a saleae to be accurate.
I also verified that I could exchange packets with Adafruit_CircuitPython_MCP2515 at baudrate=250_000.
my typical setup:
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.
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
A feather quadrupler? What is that?
I implemented a send-and-receive program that operates on both built in canio and adafruit_mcp2515: https://gist.github.com/ffc169a73954e02ab9f18f9c53fa4618
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.
https://www.adafruit.com/product/4254 @ionic elk
I'm stupid, this was a wrong column to check, I will check again with the proper measurement. Still, it looks to be more irregular than it should.
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...
This can happen when your OS writes to the device. We did update the USB stack so it may be working better. Why do you think this is an issue?
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.
I did this properly now. I made two analog captures from the R5 pin, which is a row pin. The first one is running 5.3:

The second one is with 6.0-beta-1:

You can tell the frequency is much lower and much more uneven.
I can send the captures on request, but they are about 100M...
Could this be cause by changes in interrupt priorities?
@timber mango did you sort it out?
your issue might be that we don't tick unless we need to
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...
Where are we at on this? It's marked as blocking 6.0.0
CircuitPython 6 Beta 1
Matrix Portal M4
Trying to run the Moon Phase Clock for Adafruit Matrix Portal
Crashes hard and I have to reload CircuitPython from the bootloader to recover
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...
Micro Development Kit for IoT Applications using nRF52840 SoC
Also the nordic nrf52840-dk dev kit has a connector as well as the pcb trace antenna. not sure if its useful
I updated the photos of a couple more boards with Adafruit versions, added another purchase link and replaced the OSH Badge photo with a better looking one.
I have reproduced this problem on my matrixportal. I ran the following lines at the REPL and got the same behavior (safe mode reset):
>>> from adafruit_matrixportal.matrix import Matrix
>>> MATRIX = Matrix(bit_depth=4)
^^ @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.
I think it's an issue because it happens every time I plug the device in, not just the first time, and it never happened before beta 1. Not in beta 0 or any build prior to that. So it's new to beta 1.
If it's the expected behaviour why has it only started in beta 1?
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"...
Hi @makermelissa - The prerelease board has a different header pin layout. Different pins for I2C etc, and there are quite a few folks with them, so please make it visible again. Maybe down the line we can hide it.
#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...
@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.
thanks @onyx hinge! now is the time to find issues
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.)
Sure thing @UnexpectedMaker. Do you have an image or info we can add to the board file?
Hmm, all of that was already in CircuitPython.org. Something has gone wrong .. seems the info for my pre-release and proper board have been merged. There is a listing only for the pre-release, but it's not using the pre-release image (green board).
Can you revert to my original commit? I had both boards setup with correct images and headings.
Hmm, I didn't see an existing one for the prerelease. #555 will make the older one reappear as soon as it's approved and merged.
Ok, once #555 (great commit number!) is merged, I'll pull and re-submit the board info again for both board revisions.
Thanks :)
Ok, will take a look to see if it's as expected.
What code is setting the pin? Is the pulse width how long the interrupt is occurring? We have to fake the once a ms timing so our math could be bad.
https://github.com/adafruit/circuitpython/blob/main/ports/atmel-samd/supervisor/port.c#L493
Thanks! I made the issue blocking the next stable release.
Ok, it looks like I may have accidentally fixed the features link issue with #552. It's still not populating the URL and the special characters still appears to be an issue.
A few questions but nothing major. Please fix up lib/tinyusb as well.
Are these different than the functions used by shared-bindings? I don't usually prefix them with common_hal in that case so that they are distinct.
Do you want to enable this on all F4s instead?
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.
Note that the frequency being lower is not a problem, but the fact that it is inconsistent causes flickering.
Thanks for switching those headers! Just a few questions.
Want to raise NotImplementedError instead?
Shouldn't the -isystem take care of this?
CAN does not exist on Access tier F4s, and we don't support any foundation line ones, so there's not much point in doing so at the moment. It could be moved to mpconfigport under an #ifdef STM32F405 though.
Re-Added FeatherS2 pre-release board file and images and updated production board images.
Could you resize the images so they are a 13:10 width to height ratio so they match the other images on the site?
Also, I think maybe you meant to add a space in "Unexpected MakerFeatherS2 Prerelease".
Otherwise this looks good.
Woops, sorry, that's what you get when you rush!
I hope these are fine. The small ones were correct from what I can tell.
hey @gilded cradle have you seen any crashes into the hard fault handler with the Matrix Portal lib?
I saw somebody posted an issue with beta 1
ya, I'm seeing the same with latest and beta 1
I didn't try Beta 1 because I saw that
ah; ok, looks like jepler is on it
yah
thanks
I can confirm that this fixes the crash; got me some sweet werewolf eye action after building and flashing a uf2 from @jepler 's fork
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.
@atomic summit board_init
@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?
yup, and you'll want to never_reset it if you don't want it to change
"dont want it to change" meaning, no longer changeable by the user?
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
you could set it once then
ok, great!
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.
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?
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.
look in digitalio. it'll change with lucien's change
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
k
wow, I just saw RMT's been implemented for NeoPixel !
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
ya, could be if you snagget if from the samd port
brains a bit too mushy
you can look in DigitalInOut.c for the esp version
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?
ok
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...
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 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.
Micro Development Kit for IoT Applications using nRF52840 SoC
@hazy plover there is a list of flash chips that are supported
@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
@hazy plover I always look at https://github.com/adafruit/circuitpython/blob/main/supervisor/shared/external_flash/devices.h
also, if you want one more chip to be supported, that's where you add it
@stuck elbow Excellent. The exact chip I was looking at is supported. Bookmarked for future use.
@hazy plover also make sure that you account for if the package is wide or not. the footprint is the narrow one
10-4
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...
Thanks for the report @wifijt -- you should now be able to grab a fixed firmware by using the "absolute latest" link at https://circuitpython.org/board/matrixportal_m4/ or wait for the next prerelease to come out. Either way, please let us know your results!
@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.
@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.
you can vote with a pull request 🙂 feel free to ask here if you need help
@onyx hinge I added a pull request to the github devices.h mentioned above.
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()
@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 !
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...
Running this circuitpython library on a Raspberry Pi 4 I am running into issues with the microcontroller module missing the delay_us function that is documented here.
Installed the library through blinka with on the pi using the command pip3 install adafruit-blinka
When I did digging into the microcontroller module using `help(microcontrolle...
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.
@balmy stirrup is it a clean build?
@atomic summit yes.
Anyone know when makecode support for circuit python is coming out?
the what?
Right not it only does JavaScript which sucks
Makecode announced that they were going to support circuit python
you can already use circuitpython on the makecode boards
@balmy stirrup try a submodule update?
Use with the board sure
how would you use it otherwise?
But I want it to convert my makecode to circuit python
I don't think that's possible
automatically converting between different programming languages is extremely hard
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
I guess you would need to ask at Microsoft
@atomic summit no effect
because I don't think it was announced by Adafruit?
Ok, need someone smarter than me to help you @balmy stirrup , sorry 😦
No worries Seon! I appreciate the help @atomic summit
I guarantee someone’s speaking to adafruit
though it looks like a "clean" issue.. like there is some mpy-cross stuff compiled for something that's isn't there.
I’m obviously not gonna get an answer from Microsoft lol
Yea I ran the cross compiler first. I think it is something with the esp32-s2 gcc toolchain perhaps an incompatible version.
you are using the one INSIDE CPY right? in the esp32s2/esp-idf folder in ports?
ahh the esp32s2/esp-idf folder exists but empty
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.
I think that is it the dir is empty.
re-clone the repo.
yea good call
then run export from inside ports/esp32s2/esp-idf
will do thanks much!
nps. @analog bridge just posted build docs as well
thanks @analog bridge I will do the git submodule routines as well
@balmy stirrup Follow the build guide, git submodule update --init will fix empty esp-idf folder
ahh! thanks!
@atomic summit @analog bridge worked thanks again both! It was the submodules that I did not have installed.
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.
?? what exact library are you trying to run - you should follow our blinka guide
https://learn.adafruit.com/circuitpython-on-raspberrypi-linux
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>
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...
I don't know that this change adds clarity, as per my general comments.
how or where is the meeting?
@teal bear There is a CircuitPython voice channel and in this channel
but it's still 1.5h away
I see you in the voice channel that will be the place, in 90 minutes
thanks. this meta chat was making my head swim
@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...
@dire spruce Microsoft was adding Python support to makecode but it is not the same API as CircuitPython
from adafruit_circuitplayground.express import cpx ... if cpx.button_a:... where can I find "button_a"
or adafruit_circuitplayground
yes, that. thanks. next Q: is there a term to describe what A1, A2.. is in board.A1 https://github.com/adafruit/Adafruit_CircuitPython_CircuitPlayground/blob/main/adafruit_circuitplayground/circuit_playground_base.py#L113-L119
they aren't really the Pin numbers of the chip, right?
I don't think gdbgui error is just a CI thing. The esp-idf installation fails in my environment Ubuntu 20.04 LTS.
It does for anything that is internal to Circuitpython, but we cannot guarantee that external libraries such as TinyUSB will not include a full path esp-idf file and thus break the -isystem fix. @hathach suggested this as an extra layer of protection.
@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
I moved it to the common-hal/socketpool/socket.h along with the other ESP-IDF includes. As an ESP-IDF system file, it didn't seem like it should be out here in shared-bindings?
I actually have no idea where this came from. It just showed up out of nowhere when I ran make-translate?
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?
label sounds good
silkscreen label sounds like "label"
it's what's printed on the pcb, basically
It may have been left over from an old commit, and I just didn't run Make Translate recently enough?
"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
@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.
@analog bridge OK, feel free to add it.
I don't think
gdbguierror is just a CI thing. Theesp-idfinstallation fails in my environmentUbuntu 20.04 LTS.
Interesting. I wonder why it does not with my setup on Mac OSX?
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...
@onyx hinge so, to clarify, I can test your CAN code by loading that send-and-recieve script on two feather F405s?
@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.
amazon link for the CAN transceiver boards I used: https://www.amazon.com/gp/product/B00KM6XMXO/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1
you wire the CANL and CANH together
another choice but the HW quality was lower https://www.amazon.com/gp/product/B07W4VZ2F2/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1
I've tried both. note that one is 3.3v and one is 5v, so don't fry it
heya @gilded cradle when you have a few minutes can you try to help this forum user with their Matrix project?:
https://forums.adafruit.com/viewtopic.php?f=60&t=170209
Sure
Good afternoon all you wonderful folks -- lurking today, updated the notes doc to reflect as such. 
@teal bear Did you want to speak during the meeting?
Lurking
@idle owl na, just lurk
@teal bear Ok. If you ever want to participate, we need to add you to CircuitPythonistas role. That's why I asked.
@inland tusk lurking today?
thank you. (and yes, of course I want to speak. but I don't really have anything to speak about 😉
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.
@lone axle OK!
@analog bridge will you be participating during hug reports and status updates?
Rolled a 1 on Stealth 😕
@onyx hinge Yep!
🪜 🧙
A good DM should drive the story, not end it
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?
In settings:
lurking
@teal bear if you can't hear us now then it's not working
Yeah, in settings under voice and video there is a tester for both input and output
@teal bear discord makes sound when you select an output
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.
did you push the don't-explode button
And don't push the "release dragons" button.

Lurking...
Lurking, notes are encoded.
view calendar in your calendar app: https://raw.githubusercontent.com/adafruit/adafruit-circuitpython-weekly-meeting/master/meeting.ical view calendar online: https://open-web-calendar.herokuapp.com/calendar.html?url=https%3A%2F%2Fraw.githubusercontent.com%2Fadafruit%2Fadafruit-circuitpython-weekly-meeting%2Fmaster%2Fmeeting.ical&title=CicuitPython Weekly Meeting Schedule&tab=agenda&tabs=month&tabs=agenda
next meeting is moved due to a US holiday and will be on October 13, a Tuesday.
@onyx hinge do you want to run it or should I?
lurkin'
@slender iron I think it must be my turn next up
kk
New gui framework is shaping up well for the #circuitpython watch! https://t.co/BATAvVQAmk
250
This year we are conducting the fourth iteration of the official Python Developers Survey. The goal is to capture the current state of the ...
Twitter @anne_engineer
email anneb(at)adafruit(dot)com
Subscribe https://www.adafruitdaily.com/
I’m text only today.
I'll start over.
text only too
Give me a minute to get set up again. Forgot to unplug one monitor. Sigh.
Welcome back!
Twitter @anne_engineer
email anneb(at)adafruit(dot)com
PR on https://github.com/adafruit/circuitpython-weekly-newsletter/
Subscribe https://www.adafruitdaily.com/
next week is on Tuesday!
Déjà vu.
Where is the notes doc located specifically? Thanks.
Check pinned message.
Thanks @thorny jay
they get archived here: https://github.com/adafruit/adafruit-circuitpython-weekly-meeting
New gui framework is shaping up well for the #circuitpython watch! https://t.co/BATAvVQAmk
250
This year we are conducting the fourth iteration of the official Python Developers Survey. The goal is to capture the current state of the ...
Send news items/project info to me via Twitter @anne_engineer
email anneb(at)adafruit(dot)com
PR on https://github.com/adafruit/circuitpython-weekly-newsletter/
Subscribe https://www.adafruitdaily.com/
@balmy stirrup participating in the round robins today, or just lurking?
@turbid radish I'm releasing beta 2 now
Cool
Wait, can you actually announce both beta 1 and beta 2 in the same newsletter? I wonder how you will deal with this...
I can announce both
beta will have detailed release notes but beta 2 is what folks will want to use
It makes more sense than just not announcing beta 1 at all
https://github.com/adafruit/circuitpython/pulse#merged-pull-requests shows 22 pull requests merged to the core from 16 authors
@slender iron - is there a release notes page and a quick "what changed" for beta 2?
@turbid radish working on it now. mainly that the RGBMatrix crash is fixed
cool
that's the commits
ooh the language dropdown, I like!
Automated website update for release 6.0.0-beta.2 by Blinka.
@onyx hinge 👍
The headline article for the newsletter rolls together Beta 1 and Beta 2, all good
@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
@slender iron I can always help a bit with the digitalio stuff
I think it's all fixed up now
ok
https://hackaday.io/project/174095-dorsch-40k-keyboard
https://hackaday.io/project/174917-dorsch-48k-keyboard
https://hackaday.io/project/174982-turbot-keyboard
https://hackaday.io/project/175043-flatreus-keyboard https://github.com/deshipu/ukeeb
dave was looking the stm32 i2c issue
Hierophect - STM I2c I/O Error sounds like issue #3376
Fresh air & voting -- sounds like a lovely week.
gamepad is also having problem in recent 6.0.0 loosing key press... could it be related? or same root cause?
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...
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)
// 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);
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
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();
}
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)
https://github.com/adafruit/circuitpython/pull/804 <-- the PR which added the change
This is the 3.0 version of #802. Fixes #280 for 3.0. Fixes #651.
Do not write boot_out.txt if there's no boot.py or equivalent, and the version info in boot_out.txt will not change.
If the...
it'll link to some of the issues, maybe that's good background to know
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...
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 ) )
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.
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?
Have to go offline -- have a great week all 👋
@thorny jay https://hacktoberfest.digitalocean.com/ has the details
Reminder: next meeting is TUESDAY
Thanks! 
Thanks @idle owl for hosting, and everyone for participating 
Thanks Kattni & everyone!
@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?
@teal bear ya, it can be
@teal bear discord plays a noise when someone enters or leaves a voice channel you are in
@teal bear https://gist.github.com/05ee480b9a06da7ee616224d6762663f is one
hungry time for 🌮
@onyx hinge do we have any actual sensors that use CAN yet? Or are we just doing board to board so far?
@ionic elk your car maybe 😉
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
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
Delicious cpu cycles!
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
@ionic elk @onyx hinge Take a look at oDrive project https://odriverobotics.com/
it uses STM32F405 with CAN
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 :/
We can have a project with a feather stm32 running cpy CAN that communicates with the motor controller CAN api
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?
I know CAN for it's usage in CAR.
@onyx hinge what do I do with can_rxtx .. here is my guess: https://paste.ubuntu.com/p/kTVWrbJwbg/
@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.
sure you can rename it to main.py
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
we have been debating how much startup code is really needed
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
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
yay
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
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.
I'd rather not add this in case we need it. If submodules use the full IDF path, we can -isystem the submodule's IDF path.
All of my Adafruit boards with CPY on them boot in sub 3 seconds.
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.
Do you have a ports/stm/ref directory outside of git? Looks like it found the string there.
Removed hardware APA settings from mpconfigboard.h because they make the APA flicker on boot. I need to look into why, but for now I'd rather no flicker.
Replied to the unresolved comments.
@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
What makes the boot_out.txt be out of date?
storage.erase_filesystem() does that call board.reset() ?
new version number
I think
@hierophect Sounds like you should make a new fork of the idf to fix gdbgui with tinyusb working. It'll still be better than mine because it'll be closer to the espressif version.
@deshipu Do you have anything else running concurrently (maybe gamepad). I think the RTC has a slow re-sync process on the SAMD21 which could be causing trouble.
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
will be the same except with a fix for rgb matrix
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
5.3.1 is the current stable release, and how do I git switch to it?
@atomic summit the other thing you can do is use a logic analyzer and set pin levels at different points
setting io was our original 'printf' debugging before serial was a thing 🙂
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.
No, _pew has its own key scanning built in.
@atomic summit we have random failures due to network errors. it's unlikely your problem
Ok, ok, cool! Thanks @slender iron
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?
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?
@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
@lunar crown I think the core problem with the imx port is that the dcache is disabled: https://github.com/adafruit/circuitpython/blob/main/ports/mimxrt10xx/supervisor/usb.c#L56
Running the following code will return the CIRCUITPY drive mount status which can be utilized to check USB connection.
import supervisor
print(supervisor.runtime.usb_connected)
_This PR is linked to issue https://github.com/adafruit/circuitpython/issues/544._
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 ...
Oh you're right, I missed that. That's a gitignored folder I use to hold the stm32 micropython directory for porting reference. I wonder why it only started finding it now?
I changed the enable to be in mpconfigboard.mk ifeq ($(MCU_VARIANT),STM32F405xx)
unneeded declarations removed
This PR has been rebased. I believe there's no longer an unintended change to tinyusb. I've attempted to address all review comments.
Testing performed (today): sending to a Feather M4 CAN prototype board
@tannewt I removed the logging from shared-bindings - however, we could alternatively add a common-hal-log function to common-hal/microcontroller and use that, to keep things encapsulated?
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.
@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.
@lapis hemlock what's up?
if I can just ifnd my headphones
aha
ready for voice in the Amelia channel
I would like to "merge" the new version of ulab, and wanted to ask about the technical details. Mostly github stuff.
@rigid path I don't have that board\sensor, but I do see in the library for it, there's an example for a using it as a compass. """ Display compass heading data five times per second """
https://github.com/adafruit/Adafruit_CircuitPython_LSM303DLH_Mag/blob/master/examples/lsm303dlh_mag_compass.py
@idle wharf So this is pointing towards yes?
I would say so.
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...
@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.
This PR adds the AnalogOut module to the ESP32S2. Tested on a Saola 1 Wrover, works correctly across the ESP32S2's effective range of 0.1V minimum to 3.15V maximum.
Requires #3501 for merge compatibility. View latest commit for AnalogOut specific changes.
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
@ionic elk You can make an empty commit and push it, though I'm not remembering how. Otherwise, it's all in the buttons.
nice job @idle owl! looks good
And it works! 😄
🎉
CI is being flaky, it's failed random boards a couple times in a row now. I don't think there's anything actually wrong with this.
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?
@timber mango There are tons of sensor libraries, tutorials, and example code for CircuitPython, (see here https://circuitpython.readthedocs.io/en/latest/docs/drivers.html and here https://learn.adafruit.com/search?q=circuitpython and here https://github.com/adafruit?q=circuitpython+&type=&language=) and plenty of help in #help-with-circuitpython
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
@idle owl come join our solder party next week 😄
Awesome, thanks @crimson ferry !
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
@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.
Okay, I was going to run it on C
but I have grown to like CP so i figured i'd ask
🙂
Hrm, I'm not sure what the issue is then. It'll take more digging. Maybe @DavePutz will have a guess.
I don't think we want this tied to the drive status at all. Instead it should be true whenever USB is communicating at all. I think this is tud_mounted (which has nothing to do with MSC). Please don't delay in this method either. Calling code can do it if it wants.
Please update this now that the IDF switch is merged.
Please update this now that the IDF switch is merged.
I still see a TinyUSB change in the first commit: c46cf8590f2e532e8c0e2a0b654cfd838d05fbc6
Everything else looks good.
Thanks for the patience, I've tried again to correct it.
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
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...
I still didn't do the experiments I mentioned on the meeting (checking PWM and checking just toggling a single pin), but I stumbled upon this code, and I'm tempted to see if commenting it out will change anything: https://github.com/adafruit/circuitpython/blob/main/ports/atmel-samd/supervisor/port.c#L185
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.
Hi, Could you please add support to this external flash cause i cant get my hand on any of the supported flash devices with uson 2x3package and greater than 2MB except this one.
Thanks in advance!
Datasheet:
PUYA-P25Q32H-UXH-IR.pdf
@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.
We shouldn’t enable auto-reload when in safe mode, should we ?
@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
@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.
Okay thanks, makes sense I will try it out later
The commit message tried to explain it:
If
supervisor_start_terminalis 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...
I did further testing and found some other problems around supervisor allocations and displays, which I'm trying to address in #3498. I think the fix in #3498 has to go in when this does, or there will be a new bug at least with FramebufferDisplays.
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
While doing this, why not add the support for the full line of GigaDevice 25QCTxxx? It appears that the 32M will work.
And it looks like the board could be routed for the wider package. Then up to 128M would fit.
@analog bridge no autoreload in safe mode because code.py isn't run during safe mode
This all-in-one Metro design is Arduino UNO shaped so it works with shields, and features an iMX RT1011 500 MHz processor with 128K of RAM and QSPI memory. Even though it doesn't have a ton of RAM, it's got a nice speediness to it which we really dig. Here we are testing out C...
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.
@hathach if you are able to dig up anything in your testing, please track update in this issue.
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...
Thanks, doing further improvements to the supervisor heap in an additional PR is probably a good plan.
@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?
@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
I could do this. Seems a bit hackish, but what the heck!
to test all the combinations you can use a feature of actions called the "matrix"
Oh, I haven't heard of that. Thanks for the suggestion!
test:
strategy:
matrix:
max_dims: [1, 2, 3, 4]
function_iterator: [false, true]
``` totally untested syntax, but here's the idea
OK, thanks! We don't need a test against the circuitpython fork, do we? (Provided that I fix the properties issue.)
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
I can pick it up from here, you shouldn't squander your time.
OK, take care
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.
(philosophically, perhaps all we can do is squander our time)
(philosophically, perhaps all we can do is squander our time)
@onyx hinge 😉 right.
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
.. 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.
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.
@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.
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
@hanyelkomy The device definitions are here: https://github.com/adafruit/circuitpython/blob/main/supervisor/shared/external_flash/devices.h Please make a PR for it. I don't have that flash so I can't test it.
@veng1 You are welcome to add more definitions as well.
I should add, I got a build failure not a submodule sync issues (at least I didn't see one)
Why are you deleting this?
:+1: Seems to me you'll want to remove the direct call in favor of the one done by core_construct.
@cwalther On the SAMD21 you'll see the main clock change when USB is connected because it performs clock recovery from USB. Off USB I've seen the 48mhz be something like 46mhz. The USB interrupt could also be taking time.
@analog bridge I'm planning on doing the deep sleep API during my stream tomorrow
👍
I'll start from your branch
No, I don't think we should expose that until we need it. Instead, let's change how this works.
Currently I use this for checking usb in deep sleep PR.
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
It isn't because of serial_connected_at_start. It'd probably be clearer to factor out these messages into a function and call it at the start if serial is connected or while we are waiting for a serial connection.
Please change the comment here or remove it.
Looks good overall! Just a couple questions. Thanks!
Is there a specific error code for this? I thought the S2 would automatically share the ADC with WiFi.
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...
What comment do you mean? The "No DAC on chip" translation? Is it possible to throw a not implemented error with no message? I didn't want to add a new translation string for something that'll hopefully get overwritten in less than a couple days (since I've already submitted an AnalogOut PR).
It does share, to the extent that it has a hardware arbitrator that lets the user access the ADC2 as long as Wifi isn't using it, as compared to the ESP32 which I think just locks down all of ADC2 completely from the moment you start WiFi. But there will still be moments where you can't access it, users will have to use a Try/Except to get around it.
Shoot, didn't get a chance to test. My CAN stuff is coming in late. I'll open an issue if I have any issues once I get them.
[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.
@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.
That's a good thing to check (diff) I should remember to do that!
@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!
@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.
or patch
Integrating atmel-samd peripherals submodules to fix #2374 samd audioout: paused property doesn't reflect resuming playback
@stuck elbow I think patching wouldn't work in the context. Here is the original question: https://discordapp.com/channels/327254708534116352/327298996332658690/763444984711610448
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
@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.
@stuck elbow OK, so how should we replace the two lines in question?
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
But we want to change these two lines dynamically.
The 6.0.0-beta.2 release seems to crash during start up. No USB is available.
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?
something along those lines
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
If anyone has a moment: https://github.com/adafruit/Adafruit_CircuitPython_Pypixelbuf/pull/27
Nevermind.
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.
This unifies the flash config to the settings used by the Boot ROM.
This makes the config unique per board which allows for changing
quad enable and status bit differences per flash device. It also
allows for timing differences due to the board layout.
This change also tweaks linker layout to leave more ram space for
the CircuitPython heap.
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
@idle wharf Do you know if it's possible to not have the ESP32-S2 come up in AP mode on startup?
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.
Thanks
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...
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
@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
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
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.
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.
boards do have USB manufacturer settings
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
😆
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.
Yes, I think those tend to get looked up by MAC/OUI
It shouldn’t typically be present in 802.11 frame bodies
Replace uses of _bleio.ConnectionError with regular ConnectionError
Fixes #3008
@umbral abyss you should be able to do encoder.position = 0
@onyx hinge is this an artifact of the bit depth: https://forums.adafruit.com/viewtopic.php?f=60&t=170339 ?
@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
I forget how it rounds, but 0, 0x40, 0x80, 0xc0 might be the break points
Reported on the forum: https://forums.adafruit.com/viewtopic.php?f=60&t=170339
I know I saw this at one point, though I did believe it was fixed. I'll begin by re-testing, if nobody else takes the time to confirm it.
@idle owl How did you solder the SPI flash to the QT Py? Good iron control, or hot air, solder paste, flux?
@tannewt I haven't had a chance to circle back just yet, but I'm planning on carving out some time during the rest of this week/weekend! Still would like to get this done for sure.
@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...
There's something afoot with port_get_raw_ticks() underneath monotonic_ns() for STM32F405 boards in #3376 which sounds like this.
Perhaps this should go in whatever test suite there is to detect and prevent this from reoccuring?
When is this nvm-related test https://github.com/adafruit/circuitpython/blob/main/tests/circuitpython/nvm_present.py#L2-L3 executed? It has a note in it about removing a skip_if.always() which might be important?
does cp auto update from weblate?
@upbeat plover weblate creates a pull request automatically, we have to review and merge it. https://github.com/adafruit/circuitpython/pulls/weblate there's currently one open and it has failed CI for some reason (apparently network problems)
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
Looks good to me! Tested on a Saola and it seems to be working just fine. Glad that all that time I spent chasing down those headers wasn't wasted - thanks for looking into this so quickly!
I am glad that helps out.
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 ...
@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.
@ionic elk awesome thanks! Will look at it today. I have a meeting now and then am streaming later.
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```
@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
@lapis hemlock in this case it was a stm32f405 feather. I kinda suspect the ulab answer is "more correct" but not sure
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.
@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😊
@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 😄
slightly yes
but we're going to release the metro as very beta still
(I just spent a week on it)
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 😅
yup 🙂
more like 🤡 😄
@uncut nexus are you looking into the STM32 timekeeping issue?
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
...
The reference manual 26.3.6 has a number of caveats about how the RTC must be read for the content of the 3 registers to be synchronized. Maybe we're "[making] read accesses to the calendar in a time interval smaller than 2 RTCCLK periods"? It does seem that "BYPSHAD control bit is cleared" (it's the power on va...
.. 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 ..
@tannewt thanks for spotting that... how did it get in there? Git merge plays games with me that I'll never understand.
Wondering if the NY COVID app is using the (same) Google/Apple protocol (as in Belgium), and if someone from adafruit in NY could give my code for CPB a try: https://github.com/dglaude/CircuitPython_ContactScanner/blob/main/cpb_corona.py
@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
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.
I can see one LED and definitely changes from Green to Yellow to Red as my phone gets close to it
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.
@thorny jay That's exactly what happened
@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. 🙂
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) },
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
@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?
what do you mean by destroyed?
it was a simple 1 file change that I can redo.
you can always force push to the same branch name
I fetched and rebased this morning, and when I tried to do a submodule update, it got stuck and aborted
did you do a git submodule sync?
the idf source changed again because thach fixed the usb stuff
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...
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
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
you can probably checkout the last commit
I don't think you want to use rebase to do it
looks like you rebased the new main changes onto your original commit instead of the reverse
Ok, I fixed it...
I'd suggest checking out adafruit/main and then cherry pick d93a196 on top
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
@DavePutz @jepler Yup, that seems like it could be the issue.
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. 🙂
Scott already knows 😉
99% of git user hate it and suffer, but are forced to use that by the 1% that master it!
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?
or maybe "help-with-repositories"
because there are more github-related stuff than just git
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?
some changes may be staged, and some changes to the same file may not
especially when the file is actually a subrepo
@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 ?
This isn't right, because the place where I can spot the environment variable being used, it gives blank instead of the right value:
Run sphinx-build -E -W -b html -D version= -D release= . _build/html
it helps when you realize that the author of git uses it by sending patch bombs via e-mail
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 😦
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?
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
Hi, thanks for submitting this. Could you resize your images to better match the website? See https://learn.adafruit.com/how-to-add-a-new-board-to-the-circuitpython-org-website/preparing-the-images for guidelines. Thanks.
Ok, confirmed DIO/QIO makes no difference.
4MB/16MB does
So could this be a tinyusb issue?
as long as we are talkin gabout flash things, I have https://lcsc.com/product-detail/FLASH_Winbond-Elec-W25X40CLSNIG_C19617.html ... someone (Andrew) said maybe it is compatable with: https://github.com/jepler/circuitpython/blob/56367b197bdf8b6d4adced23b128fb45d17fbd27/supervisor/shared/external_flash/devices.h#L586
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 😉
Hi @makermelissa ready, thanks
@PaintYourDragon Are you still seeing this issue?
Update: Testing this morning on latest as of today, I can confirm that:
- Re-start code.py issue still exists - but it seems to only happen with the flash size is set to 16MB
- Switch from 16MB to 4MB stops the restart. Switching back to 16MB introduces it again
- Switching between DIO/QIO makes no difference
@jepler Do we need to fix this 6.0.0.
Next iteration was right: Run sphinx-build -E -W -b html -D version=6.0.0-beta.2-33-g5ae2423c4 -D release=6.0.0-beta.2-33-g5ae2423c4 . _build/html
However, the important "upload to s3" steps can't be 100% checked until after this is merged.
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 ?
😄 product #1 shipped!
no not really
however I won't mind not using the cheap transceiver modules I picked up on amazon
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
@green wind this? https://learn.adafruit.com/how-to-add-a-new-board-to-circuitpython
@slender iron thanks 🙏🏼
Spent ages searching for that tonight. I think the sea kayaking washed my search-mojo away!!
ya, learn search isn't spectacular
Gonna try to get it done tomorrow 🤞🏻
👍
Is there a guide on how to use the Adafruit DAP?
I noticed this just after merging #559
Never mind, I found it
Could you add a print here: https://github.com/adafruit/circuitpython/blob/main/supervisor/shared/autoreload.c#L79
Then you'll be able to see when writes to the USB occur. The new behavior sounds more correct because any Host OS write will cause a reload.
The other thing to check is the behavior of it with a Linux and Windows computer.
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
Why is there both #define FLASH_SIZE (0x100000) https://github.com/adafruit/circuitpython/blob/main/ports/stm/boards/feather_stm32f405_express/mpconfigboard.h#L32
and .total_size = (1 << 21), /* 2 MiB */ https://github.com/adafruit/circuitpython/blob/main/supervisor/shared/external_flash/devices.h
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...
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.
@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")
oh... thanks. ok, I'll stop touching the mc flash.
we tried to use a 4m flash, and now we have no flash :p
@slender iron I saw your livestream today. Have you seen https://github.com/hathach/tinyusb/issues/129 for instrumentation over usb?
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
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...
This is where I run into issues because obviously this is not a MP_ARG_INT and mp_arg_t doesn't seem to have a type for uint32_t. I'd imagine the fact I am trying to do this and it doesn't exist is a bit of a code smell.
@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
The current network is usually represented as an ip_interface isn't it? See https://docs.python.org/3/library/ipaddress.html#ipaddress.ip_interface
The network object has the host bits and'ed away.
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...
@askpatrickw I would like to add default hostname for my microS2, should I make a PR in your branch ?
@microDev1 you can do your own PR direct from your branch. The changes are per board in their own sdkcondig so no conflicts.
In my testing, caps aren't converted to lower case.
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...
As per my analysis in https://github.com/adafruit/circuitpython/pull/3498#issuecomment-706141460, I concur that this PR should only go in together with #3498 (or an alternative fix for the double supervisor_start_terminal issue).
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?
@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
platform is a module in desktop python3 but not in circuitpython https://docs.python.org/3/library/platform.html
Ahh yes I am in the wrong repo. Thanks @onyx hinge!
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
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 also face a similar problem. I am using a Seeeduino Xiao board. When using the latest CircuitPython 6.0.0 Beta 2 the program does not autoload when saving. Any program, even the blink program does not run on save. I have to disconnect and reconnect the board in order for the program to run. When using CircuitPython 5.3.1 everything works as expected.
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 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?
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 😉
@wise shard I'm sure we can get it working
I usually use ESP_LOG to print which goes out the UART.
Anyone tried this on an M0 Express board?
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.
I just tried this on an M0 Basic (and just changed the print as no neopixel) and saw the exact same behavior. Hitting Ctrl-S in Mu did not auto-reload. Ctrl-C & Ctrl-D reloaded it.
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...
I just realized I missed understood your comment. Setting this programmatically during connect versus the config file… Someone else should chime in on which is the preferred way. I don't have any strong feelings either way about that.
right, it makes lots of sense :+1:
@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.
kk
@ionic elk your analogin PR has the samd peripheral submodule changing
does git merge stop with a conflict?
Looks good to me! Thank you!
Build failure is a clone issue and unrelated.
@jepler Do you have time to review this?
Thanks for the PR @jensechu! Instead of changing the constructor, how about adding make_transparent and make_opaque like Palette has? https://github.com/adafruit/circuitpython/blob/main/shared-bindings/displayio/Palette.c#L151-L179
We'll only be able to have one color at a time but then the API will be the same.
{ MP_QSTR_transparent_color, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0} },
Do this check once before if (self->dither){ so that the pixel value hasn't been randomly changed before checking. Once you set opaque to false you'll also want to return. Nothing else needs to run.
@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
hrm, maybe it's the way merge works
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
ok fixed
Do you want to set it for other boards or just this one? Seems like we should add a property for it on the wifi.Radio object. https://github.com/adafruit/circuitpython/blob/main/shared-bindings/wifi/Radio.c
@slender iron how many passes does common_hal_wifi_radio_connect do before it outputs no_ap_found error ?
just one I think
I want to add a timeout feature to it
in case we want to keep scanning until we find AP
I think the python code should loop to wait, not the low level code
you can catch the exception so it doesn't
try:
<blah>.connect()
except ConnectionError:
pass
A property in wifi.Radio object which defaults to USB_PRODUCT if no custom hostname is set would work well.
Awesome! Thanks @astrobokonon
You shouldn't use the MSC connection to know when to sleep. Instead, it should be if enumerated at all. TinyUSB calls this being "mounted" I think.
This meant to be an example other boards could use. I don't think its my place to make checkins for other Manufacturers boards. But since @tannewt can speak for Adafruit, I thought it was a reasonable first PR to show an example.
If @microDev1 wants to run with adding it to wifi.radio, that's great!
Ok, I suspect that this is an interaction with the time.sleep and the autoreload timing.
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) ))
The issue was that a time.sleep() would set the RTC wake up
further into the future even if we wanted to tick every ms. Ticking
every ms is used to time the autoreload delay and without it,
autoreload doesn't work.
Fixes #3528
@todbot, this should fix the autoreload issue.
anyone around to review ☝️
@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
@blissful pollen once the CI is done there will be builds available too
Could you provide a minimal example that only uses the native classes? I'm not sure how to reproduce this.
success! (built it and it works on my feather m0 basic), so just comment in the PR then?
Thanks for the review! I saw you suggested to change the type to an int but then when I get to this comparison C is not happy that I am trying to compare an int and int32. 😞 That was my original approach. Any ideas?
(Also the API change sounds good I can do that.)
I expect it's complaining about signedness. You can cast the int to an unsigned by doing (uint32_t) int_variable. It won't cause problems as long as it's >=0.
@atomic summit can you give me your test code you are seeing the double reload with?
@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 how much do you expect me to grok about https://github.com/adafruit/circuitpython/pull/3522/files ?
There are a few files you need, can I send a zip ?
sure
Built and tested on a Feather M0 Basic that I had tested the issue on previously. These changes fix the problem.
@onyx hinge enough to know there isn't anything obviously weird
@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) {
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 = (
...
I added the native ioctl stuff because I thought that was the issue
once it's there, it's a "would be nice" to convert sdcardio / sdioio to use it.
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
*(EXCLUDE_FILE(
- *flexspi_nor_flash_ops.o
*fsl_flexspi.o``` the special handling of flexspi_nor_flash_ops is no longer needed?
it's done by marking the individual functions
please ask these questions on the PR so they are easier to find than discord
Got a new very smol Circuitpython board on the way
OK - I was going for the fast turnaround
I'm going to try and figure it out over this weekend.
Some items discussed on Discord:
- native ioctl was not actually the problem, but is good to have
- the linker treatment of flexspi_nor_flash_ops.o is no longer required, as individual functions are marked
I didn't spot anything hinky but I was not able to usefully review the flash_config.c file changes. No testing performed.
