#circuitpython-dev
1 messages Β· Page 325 of 1
sometimes I have to hit the microcontroller reset switch and then start openocd right away. feels finicky.
but it's a miracle this stuff works at all, i sometimes think
i may just use the j-link
let me know if that works, I might switch.
is there a jumper to pop off so they don't have a fight?
I don't see it
@tulip sleet any idea why feather_m4_express has EXTERNAL_FLASH_QSPI_DUAL ? It seems to have all 4 QSPI data lines on the board.
@onyx hinge there was a user who wanted that, for some reason. They submitted a PR.
that's weird, won't it decrease performance?
i think it was for the particular chip they were using. I'll find the PR; it might have just been added for completeness and they wanted QSPI "single"
I understand why the underlying code would have support for 1/2/4 bits
but feather_m4_express's board config defines EXTERNAL_FLASH_QSPI_DUAL while the chip that is placed on it supports quad mode
oh, you are asking about the Feather; i'm fixating on the PR
π
I have no idea; that's the original code from three years ago. Maybe an early board design was different.
@onyx hinge yes, Rev C was dual, Rev D became quad. I have no idea if Rev C shipped. Revs A and B were straight SPI
i will ask limor
@tulip sleet what are the criteria for a release being marked as "stable"? I'm concerned about STM32 boards being defaulted to the 5.3.1 release.
re your email: 5.3 I thought didn't contain the low power stuff. That was 5.4, now 6.
Oh hmm did I mix that up?
but nevertheless, if 5.3.1 is buggy for STM32, we can advise to use 6.x
I think we have been saying for a while that the STM32 support was preliminary and evolving. I will point that user to 6.x
No, that's my bad. The primary issue on 5.3.1 then I guess was the stack limitations, which has kept coming up. But I'll check out this SPI thing
would you say 6.x is definitely better for stm now?
i can leave answering that thread to you
I'd say so, there have been a number of bugs I've found and resolved as a part of other projects, and significant reworks to the clocks, flags, etc
I'd like to get STM32 out of the "preliminary and evolving" stage someday, however. Do you feel there are specific milestones that need to happen for that?
It has most of the modules, the only big missing one now is audio. Beyond that, is it just heavy duty testing that's required?
i don't feel like we've had a lot of support issues come up, but we may not have that many users. I think some testing with various SPI and I2C devices, NeoPixels, and maybe displays would help shake out anything remaining. Limor in the past has done quite thorough testing (like testing all the Feather Wings) when we introduced a new chip family, but that was testing the board design and Arduino, not CPy.
Hey @slender iron I finally got around to making the OTG USB mod on my Kaluga, I was just trying to build and flash current circuitpython main - "make BOARD=espressif_kaluga_1 PORT=/dev/ttyS6 flash " in the ports/esp32s2 dir and I get : "CMake Error: The source directory "/mnt/c/Users/awood/Desktop/circuitpython/ports/esp32s2/build-espressif_kaluga_1/esp-idf" does not appear to contain CMakeLists.txt." what am I missing, is there something I need to run first?
Yeah I was just thinking it may be point at the wrong esp-idf
let me just check in a new terminal
export.sh will help with that
Gah the install is soooo slow..
@onyx hinge did the RGB Matrix fixes get into the latest circuitpython release?
Thanks @ionic elk but I am still getting the same issue unfortunately
@blissful palm did you run make clean before retrying ?
Thanks @analog bridge no juice with that either I'm afraid π©
@gilded cradle no, I don't think so
Ok thanks, I'll keep using 5.3.1 for now then.
@gilded cradle https://github.com/adafruit/circuitpython/compare/6.0.0-alpha.3...main shows the related commits like "recover gracefully from allocation errors", so it was merged subsequent to 6.0.0-alpha.3.
Ok thanks, if I start running into issues, I'll update. I've been able to play by it's rules so far.
@blissful palm What platform are you using ? wsl ?
Try following this
Ok @analog bridge I wil give it a try
After you finish building mpy-cross. Go to esp-idf and run ./install.sh and . ./export.sh
Ok tried all of that @analog bridge get the same errorπ«
Is this possibly related to Issue #2893/ PR #3052? Perhaps a longer delay is needed in common_hal_mcu_processor_get_voltage()?
@DavePutz: @jepler mentioned it on discord this morning, and we discussed it including that PR. He tried a longer delay, but it didn't seem to help. I have a SAME54 dev board also and will try some things eventually.
The errata say that the TEMP functionality is broken, without giving any details. I have two different boards with identical chips but different date codes: one was hanging before I added the delay, and one was fine. So it may vary by sample.
@blissful palm I had the same problem first time. I eventually wiped the install and did it again. 2nd time worked. Are you using WSL or WSL2? If so you will get better file performance moving everything to the Linux root. So under your /home/wherever
Thanks @supple gale I just started again with the instructions from start by clean cloning into my home dir but get same results!!
It's WSL not WSL2 BTW
@slender iron if you're streaming the meeting tomorrow, does that mean you'll also take the timecodes?
@onyx hinge Yup, happy to.
@blissful palm I'm around now but don't have any more insight into your problem
ah! actually, make sure you have a newer version of cmake
You also have to do the git submodule update βinit βrecursive ports/esp-idf
I have cmake version 3.10.2 is that old?
let me see if I can update that
looks like latest is 3.18.2
@slender iron ok, anything else we need to plan or do ahead of time, besides get started on time?
it'd be good to get everything setup a bit earlier
I need to add things to my calendar
<@&356864093652516868> Thanks again for working with us on the changed meetings schedule this week! We'll have the weekly meeting about 24h from now, and it will be livestreamed on youtube (as well as twitch, linkedin and twitter/periscope) as a part of CircuitPython day. I do plan to get us started promptly at 2PM ET, so I'll be around starting a little earlier (no later than 1:45PM ET) if people need to do mic checks, etc. Here's the document for the meeting, adding your hug reports and status updates is super helpful: https://docs.google.com/document/d/1Zeeb_ZJltPcESMhRtofP4_QGoLWagNtAPfoAeA2q8Ms/edit?usp=sharing
I plan on using restream so it'll go to youtube, twitch, linkedin and twitter/periscope
@slender iron handle community news in the usual way even though it won't precede the newsletter?
sure, it's ok to recap it
@blissful palm I am on Mac, but I successfully built the Kaluga from adafruit/main yesterday. Whenever I see catastrophic failures like you seem to be having is when I've not run get_idf which is an alias to do the exports the other people mentioned. My setup process is documented here: https://gist.github.com/askpatrickw/0a276c7e2d4f54e442b2cb6eaa0d32ea#building-circuitpython-for-esp32-s2-boards TL;DR: IDF steps 1-4, CP Build Steps through the MPY-Cross (skipping the ARM install stuff) and then run the make command.
Also, my cmake --version is cmake version 3.17.3
This is compile-tested, and requires updates in the related submodules:
https://github.com/adafruit/samd-peripherals/pull/35
https://github.com/adafruit/asf4/pull/37
This should not be merged until those can also be merged.
Is this bug fixed in 6.0.0-alpha.3-91?
(I tried it on circuitpython playground express board)
My loader for the OSHWA 2020 badge would appreciate this functionality. I assume that since the proposed mechanism is simply designating which file to run, there would be no need to make sure pins are released/de-initialized?
As you suggested previously @tannewt , this will mean we (I ) will need to handle the "don't reinit already initialized stuff" case for libraries. Since the libraries will need to know the 'commanded reload' vs 'default start' state, it would/could be exposed by`super...
#3318 may have resolved this problem, but it wasn't linked to this issue and thus was not automatically closed. It is included in 6.0.0-alpha.3 -- If you're confirming that it's fixed, then that's great and I'll go ahead and close this issue. If not, we'll need to re-test and figure out why the fix was incomplete.
Well its working fine for me. Lets wait for @kevinjwalters' comment
@blissful palm For fun i did the install and build again. For me it works, Which doesnt help you.
git clone https://github.com/adafruit/circuitpython.git
cd circuitpython
git submodule update --init
git submodule update --init lib/tinyusb
git submodule update --init --recursive ports/esp32s2/esp-idf
cd ports/esp32s2/esp-idf
./install.sh
souce ./export.sh
cd ..
git status (for fun)
make BOARD=espressif_kaluga_1 clean
make BOARD=espressif_kaluga_1
My process was
I tried updating use apt-get update/upgrade but cmake is still old, trying to build cmake from source to see if that helps
(very slowwww)
what's your cmake version? @supple gale ?
i'm on cmake 3.16.3
@warped laurel did you make sure you have the entire esp-idf submodule? you can also clone it somewhere else and do it that way
this was done on a linux box. i did it previously on WSL2/ubuntu on my windows laptop
what is in your esp-idf/CMakeLists.txt file?
first line is
cmake_minimum_required(VERSION 3.5)
So your cmake should be ok
I think we changed the cmake requirement
3.13+
It seems to be building now @tannert I also had to change the requirements to eliminate gbdui
π
did you do the export?
yup
hrm
Ok re did it seems fine, very strange
π
OK built now to flash
@slender iron still planning SPI tomorrow?
yup, think so
good. was looking at how micropython does it. for fun.
what did you find?
they do a malloc from DMA capable memory if needed, and move the buffer there
every transmit?
yes
interesting....
they actually check during the ISR i think
how do I change the flash upload speed default baud rate?
I was thinking I'd move it on first transmit only
i thought it was odd . i would have thought the same.
it's more work to move it once because then you need to worry about freeing it
yes. why not just setup the buffer in the right place rather than move it
they must have their reasons?
you don't want to set it up in DMA memory to start because you don't know you'll need to DMA it
and it is a scarce resource
dont you know that the spi is using dma when you create it?
sure but you give the spi and array or bytearray to transmit
the spi doesn't hold the memory itself
unless you plan on copying it every transmit
np, all up for discussion tomorrow π
see you then.
@siddacious I was thinking it would be a full reload that would reset everything.
What is an example of things you don't want to reset?
I lowered the baudrate in the Makefile to 115200, others may need to do that also
Spresense needs 32-byte alignment. Do you have any ideas on how to achieve this?
Is this true for other memory allocations? Maybe we should change the GC on the Spresense port to do 32-byte blocks rather than 16.
We should also make sure the allocations for the heap are aligned to the block size too.
Yay I think my Kaluga mod works..
I'm seeing both an ESP32-S2 device and a com port
using a single usb cable on the Kaluga (power) usb
I literraly just ran mod wires from GPIO19/20 to respective d+/d- test points using tiny mod wire
@kmatch98 That's a great question! My first instinct is to return a TileGrid that matched. However, the group may actually be the best unit. Perhaps the missing piece is adding a depth kwarg that could be set to indicate that a group is fine. I imagine that would be best for a button grid for example.
I'd like to see this in the STM port. It looks like there are places that do not check for a valid pin object: https://github.com/adafruit/circuitpython/blob/main/ports/stm/common-hal/microcontroller/Pin.c#L100
In fact, we should probably make this more resilient by modeling after SAMD which checks validity rather that for the special value.
I think this is good as well! We should follow up with better validation but this is already an improvement. Thanks @DavePutz
My plan is to work on it tomorrow. I'll update here when a fix is created.
@hierophect Where are you at on this? Has it inadvertently been fixed?
Thanks for the retest @DavePutz
@water5 Please describe the issue here.
0 bytes used, 499712 bytes free in flash firmware space out of 499712 bytes (488.0kB).
that's interesting
very impressive; what optimization flags did you use?
It was a missing 'attribute((used))' on the vector table in the (new) same51 port
too bad; i thought we could make more room on the samd21 ports π
Thanks everyone for all the help, it's all working nicely now..
π
I think send_report() is fine as-is. I think @dhalbert's proposal is a property received_report that is the most recently received report (not a function as you suggest @deshipu.)
My one concern is if folks use HID as a serial-like transport and need every HID out report buffered. I think it's an abuse of the protocol but may still be done.
I was proposing an actual function; I didn't really think about the hanging part. It could return None if no report was available.
We have a long-term interest in using HID RAW reports for communication with a host, because all hosts already support HID RAW natively and don't need drivers. That would require real FIFO support, so I would lean toward a function. It does not have to buffer for now; we can add that later.
Are you reading tags or acting like a tag?
I think you are on the right track with shared-bindings and common-hal. It'd be great to have an nfcio in shared-bindings to use across ports.
The license doesn't worry me as long as its use is kept to the nrf port because of the license exception for it.
The #circuitpython channel on the Adafruit Discord is the best place to get help.
Good job handling the mirroring and hooking into the refresh API. The core logic is a bit hard to read so I've suggested using helper macros to make it clearer. Thanks!
I don't think you want any changes by default.
self->dirty_area.x2=0;
Mind rewriting this bit with MIN and MAX macros from py/misc.h? I think it'll make the code much clearer.
Could you please post your code.py so we might be able to reproduce?
I suspect the STM HAL is returning a more useful error code to us. Are you interested in helping debug this? Thanks!
One question about when SPI is used for a display. (Maybe this is the issue that causes the display to stop updating.)
I wonder if this should go below before spi_singleton = NULL is set. That would handle a dangling try_lock when the display is in use.
Testing on a PyBadge (which has an SPI display) showed that the proposed patch did not interfere with display functions. But, if you feel that a better place for it would be in reset_board_busses() I would be fine with that. Testing shows it works just as well there.
I am all for a function and adding FIFO in the future.
Report can be used to exfiltrate data from a computer (back to what pretend to be a USB keyboard).
To have a good bandwidth, you need to make sure no data is lost in those "LED" report.
Acting like a tag. The peripheral in the nRF52 platform is actually called "NFCT", since it only behaves as the NFC Tag side. Updated the title to more clearly call attention to this! So in other words, this effort wouldn't overlap with parts like the PN532 pretty much at all (for now, at least.)
I agree: an nfcio interface makes a lot of sense to me, especially as I hope the NFC tag (and reader, for that matter) c...
@narrow dirge E. I am looking at the CPy PR for the new boards. It's contingent on the asf4 PR. I had one comment there about including asf pr #21. Is that in your sights? I don't want to hold everything up.
Is the thing that #21 is on the main branch but not the circuitpython branch?
oh I think I understand what you mean, these changes need to be made in the new e51 files
yeah, and you might want to make them for same54, if you have not already
sure, I'll get to it soon
got it, i just wasn't sure who was waiting for whom
I assume there's some way we could "deduplicate" the files
you mean factor out the identical routines? well, maybe, but I'm not sure it's worth it.
weird, ```>>> "".format(7)
''
it's not an error in CPython either
there's nothing in the string that needs an arg, so all the format args are ignored
I guess, but in my case it was a mistake
oh π
I guess the idea is that you might supply multiple strings to a single format statement, and it uses what it needs
Ok, I've tested on both WROOM and WROVER Saola. I had a merge error with the WROOM version that has been fixed plus I added a safe mode in case the heap size is too large. Please take another look.
The code was even crazier when I didn't use these intermediate upper_x and lower_x variables!
Thanks for pointing out the availability of MAX/MIN in py.misc.h. I incorporated these changes.
When the Shape is constructed, I think the dirty area should cover the whole Shape.
I wrote it consistent with the constructor for Bitmap.c (see below). Maybe I am missing something?
Also, I feel like the Shape code has an "off by one" error in the for loop in line 53. The malloc is based on height, but the for loop here goes from 0 to `height...
For USB keyboard, losing some LED reports is not a big deal. We just need to show the latest LED status.
For HID RAW report, It would be different as it, would probably not use report IDs.
Two problems: The lead byte for 3-byte sequences was wrong, and one mid-byte was not even filled in due to a missing "++"!
Apparently this was broken ever since the first "Compress as unicode, not bytes" commit, but I believed I'd "tested" it by running on the Pinyin translation.
This rendered at least the Korean and Japanese translations completely illegible, affecting 5.0 and all later releases.
Testing performed: Ran the japanese translation in the unix port:
$ ./micropython...
I also added to this a main-branch version of #3385 which is an important bugfix. I will split that out if there are any other things to revise on this PR, because I'd like to see it fixed now that I know it's there.
@tulip sleet do you think you could remove me from the librarians group on github? All those notifications make it difficult to see the actually important things for me.
Hi, use the example code:
set the delay at the end of loop to 0.1 sec. This should be enough, and the error should manifest itself in a reasonable time. Try code for a few minutes.
Because of this I2C bug I can not use Circuitpython. I use different development environment now, so I can not test this issue again to provide a small example. If issue will not be reproducible with "simp...
@stuck elbow you can also un-watch things via https://github.com/watching or via API https://developer.github.com/v3/activity/watching/#set-a-repository-subscription
I believe that removing you from librarians would also remove your abilities to review and/or merge PRs
Just to know: have you tried this on any other CircuitPython boards? The #2635 bug is peculiar to the I2C device, as you saw.
@stuck elbow also https://github.com/settings/notifications. Do you want to be just watching circuitpython itself? We could make you an individual collaborator on that.
Does someone know if the circuitpython gameboy cartridge is still in development or that it has been cancelled?
@onyx hinge I can't merge things anyways
@wooden lichen I think @slender iron still works on it in his free time sometimes
For my use case, I think a full reload/reset would be optimal.
Getting Started with #circuitpython-dev - Hosted by Dan! LIVE in 10 minutes https://www.youtube.com/adafruit/live. Join discussion in #live-broadcast-chat
Heads up; a warning icon popped up in weblate. Not sure what to make of it.
Para participar en el show and tell en espaΓ±ol
https://streamyard.com/r57wh4uxf8
Ok, I'm still forming my thoughts around this concept. I think this can be done in python, but adding the opacity check may required some additions to the core.
Function definition: child_at(x, y, group, search_level=0, **require_opacity=False**)
This function iterates through this group and its subgroups to determine the top display element that is located at the given x,y pixel position. This display element could be a Group, a TileGrid or a Shape. This function will re...
@tannewt is having a more streamlined DMA process something you'd like to eventually explore?
Is there a good name for the kind of bug that's caused by something far away in the program? Like if you have memory corruption from some process way off in other code, but it happens to land in something you're working on. I feel like that must have some kind of hacker-dictionary type name
@tannewt I'm getting back to it today, I took a break from banging my head against it at the end of last week to do some F1 stuff and cool off. Even if it's been inadvertently been fixed I'd like to figure out what it was - it seemed related to memory corruption so even if it disappears here I'd worry about it popping up somewhere else.
@wooden lichen I do want to get back to it but had reliability issues without great tooling to debug.
Aah too bad!
yup!
@ionic elk "second-order bug" is usually what I say when one bug causes another
@stuck elbow it would be nice to keep your review privileges
Sorry I'm late to the party here. If I'm understanding this correctly @tannewt you'd rather have functions like common_hal_reset_pin check whether the incoming pin object is NULL? Rather than having the special values?
The main thing the non-object API is used for (port and number) is iterating resets - iterating through the pin objects for a microcontroller is kind of annoying, and doing it with the STM32 port and number values is easier. That said, we have done pin iteration a couple tim...
@dhalbert No, I do not have any other Circuitpython board.
<@&356864093652516868> The special CircuitPython day edition of the meeting is coming up in about 2 hours at 2PM ET. We'll be streaming it live on youtube and other services. If you plan to participate, add your name (and if possible, your notes) to the notes document beforehand -- to make things go more smoothly, we'll assume that anyone who hasn't done that is lurking. If you plan to participate but for any reason you can't add yourself to the notes doc, let us know and we'll add it for you. https://docs.google.com/document/d/1Zeeb_ZJltPcESMhRtofP4_QGoLWagNtAPfoAeA2q8Ms/edit?usp=sharing
.. and if the discord voice chat fills up, remember that you will be able to head over to https://adafru.it/live to listen/lurk
I think it is 1800 GMT EDT is -4
google will tell you what time it is somewhere else π
https://open-web-calendar.herokuapp.com/calendar.html?url=https://raw.githubusercontent.com/adafruit/adafruit-circuitpython-weekly-meeting/master/meeting.ical should show you the meeting time in your time zone
CircuitPython Day events schedule https://adafru.it/cpdayschedule
The next event is here on Discord - the weekly CircuitPython Discord meeting in the CircuitPython voice chat
in 30 minutes
I should clarify GMT + DST nonsense, since I've turned up an hour early before and wondered where everyone was π
I guess that's BST π
Feel free to join the voice channel to do mic check -- if you are not usually a participant, please note that (A) you need to be added as a Circuitpythonista to speak and (B) you need to list yourself in the notes document. When not actively speaking, please keep your mics on mute. And if the voice chat fills up, remember that we'll also be streaming live on youtube so you can catch the audio there. We'll be getting started prompty at 2PM ET, about 17 minutes from now. Notes doc: https://docs.google.com/document/d/1Zeeb_ZJltPcESMhRtofP4_QGoLWagNtAPfoAeA2q8Ms/edit?usp=sharing
Good afternoon all you wonderful folks -- happily lurking today 
I've updated the notes doc to reflect as such.
[If more space is needed, I'd be happy to drop to Twitch or Youtube.]
@onyx hinge xwit?
Thanks π
notes doc: https://docs.google.com/document/d/1Zeeb_ZJltPcESMhRtofP4_QGoLWagNtAPfoAeA2q8Ms/edit?usp=sharing
yup
Live on Youtube.
@hybrid scarab Would you like to participate in the meeting by talking?
I am here, not lurking for once
@hybrid scarab Because if so, I need to add you to the CircuitPythonistas role.
It's always morning somewhere π
@river quest @meager fog will either of you be talking during hug reports or status updates?
@turbid radish and you ?
Hi, I am going to be lurking today. Some stuff in the notes.
I will be talking
She's already got the role.
u kan azk
Sorry @idle owl I'm lurking!
Was also afk, rooting through cupboards π
lurking today
@inland tusk If you join, please mute.
Adafruit is open and shipping.
https://www.adafruit.com/opensafely
Adafruit Industries, Unique & fun DIY electronics and kits : - Tools Gift Certificates Arduino Cables Sensors LEDs Books Breakout Boards Power EL Wire/Tape/Panel Components & Parts LCDs & Displays Wearables Prototyping Raspberry Pi Wireless Young Engineers 3D printing NeoPixe...
yay this is like that time when the Undertaker came back from the dead
and gave WWE updates & notes
Dedicating today to Lamba Labs:
https://adafru.it/impactlebanon
https://adafru.it/globalshapersbeirut
September 9, 2020 (9/9/2020) is CircuitPython Day, the snakiest day this year! Today we highlight all things CircuitPython and Python on Hardware.
THERE IS A FINAL SCHEDULE OF EVENTS WORLDWIDE ON GITHUB HERE
https://github.com/adafruit/circuitpython-weekly-newsletter/blob/gh-pages/circuitpythonday2020.md
Celebrating 99th newsletter! Sign up!
Python for Microcontrollers:
https://www.adafruitdaily.com/
150+ boards!
https://circuitpython.org/downloads
could there be any .. "leax"?
50+ boards in Blinka!
https://circuitpython.org/blinka
We are going to party like it's '99.
A New Version of MicroPython Released: A new version of MicroPython has just been released: Version 1.13. It includes a new uasyncio module, code formatting, and BTstack bindings with Unix support. For the ESP8266, the default filesystem has changed from FAT to littlefs v2 β
https://github.com/micropython/micropython/releases/tag/v1.13
Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
https://adafruit.com/vote
STM32H750? π
We have some H7 support already I think
Honestly the thought of doing bring-up on our hardware scares me!
hope to see eps32s2 grand central
On a CLUE running 5.3.1 there appears to be some timing issue where if the frequency is changed and then the duty_cycle immediately afterwards the latter does not take effect.
Adafruit CircuitPython 5.3.1 on 2020-07-13; Adafruit CLUE nRF52840 Express with nRF52840
>>> import board
>>> import pulseio
>>> import time
>>> board.DISPLAY.auto_refresh = False
>>> pwm_p0 = pulseio.PWMOut(board.P0, frequency=50, duty_cycle=0, variable_frequency=True)
>>> pwm_p0.frequency = 440 ; p...
I don't think the s2 has enough pins
@hybrid scarab it's usually not too bad. the MCU support is the toughest bit
lurking
Cute!
I hope that moors law keeps up long enough for us to get that 500MHz Wifi Bluetooth HS USB Uberchip for <$1
Played with the FT232H recently, very slick experience hooking up a qwiic sensor and running the code
Holiday season as in Halloween?
hug report to the team, the community, and customers - see you all tonight! 7pm SHOW and TELL 9/9/2020 https://youtu.be/BGVP0vJlqvI & 8pm ET ASK AN ENGINEER! https://youtu.be/JqK911g7O7Q
Another 100 episodes
ποΈ π§
Would like to get Blinka working with an FT part that can do SPI and I2C simultaneously... .for.... reasons π
you could look at the FT2232H issue list - you can use the MCP2221 with bitbang SPI + I2C
afk
π
Yes, thanks @silver tapir
@slender iron oh whoops I tested and merged it this morning
np
@DavidGlaude Just tested out your idea, you can indeed use a FeatherCap to run @adafruit FeatherWings off a @Raspberry_Pi board, it's the reverse of what I designed it for but it works fine! (I didn't solder I2C pullups on because the Pi has them.) https://t.co/u6pGVhKgyV
hi
Hello, @static sphinx
nice stream
@static sphinx It's the CircuitPython Weekly meeting. We typically don't stream it, but the videos are posted to YouTube. This meeting is normally held Mondays at 2pmET/11amPT. Glad to have you!
oh cool
and you can join live here on discord every week
thx I will
we just don't stream out to youtube and others normally
@ionic elk You're not muted.
looking forward to the CANBUS support. Will mesh nicely with some stuff I'm playing with. Thanks for it
That was a top secret?
saludos desde colombia
Hola, bienvenidos!
An opensource hiking, pilot, skiing, Signal-App-extending GPS mesh communicator
greetings from colombia, gracias por su labor en organizar eventos de encuentro
Hola @opaque yew
I'm happy to make a spanish language channel here on discord. what should we call it?
what games @idle owl? well earned break
Enjoy your time off @idle owl !
Hola @opaque yew
@silver tapir hi
https://twitter.com/CycleMatch/status/1302708068271222784?s=20
PyPortal holder and reset button
Made holder for a second display for my computer, an @adafruit PyPortal to keep it off the desk. Also added an easy to press RESET button:
https://t.co/YH9FRd4Hu2
Thanks, @modern wing !
@slender iron perhaps name the spanish language channel hola
@candid herald It should probably be a little more explanatory than that π
@idle owl Perhaps π
If you have material for the newsletter, please send on Twitter to @anne_engineer or put in a pull request on GitHub at https://github.com/adafruit/circuitpython-weekly-newsletter/tree/gh-pages/_drafts
https://twitter.com/CycleMatch/status/1303768766095003649?s=20
Paper making progress with custom mould and deckle.
I saw that one @mental nexus. It's great!
Hi , I'm Curtis from Hackerlab in Sacramento California, I was planning on three hours of Circuit Python Day events for later today but unfortunately I have been impacted by the intentional power cut off here in California due to high fire risk in my area; high winds, low humidity, high heat. Super sorry, we'll plan to do a follow up event to celebrate at some point in the future, not due how to best get the word out to this community, im sending this out on my solar backup but wont be online much longer
@slender iron looking forward to joining the Deep Dive streamβοΈ today:)
Be safe @pastel skiff and let us know when it is rescheduled for
@pastel skiff So sorry to hear that! Let us know when you're ready to do your follow up event!
@pastel skiff Best of luck out there. Stay safe.
@pastel skiff will do, thanks for letting me know
thanks all, bumming I wanted to join in the days fun
Range_Slicer Euro module display test. The module is used to process a control voltage signal, compressing, expanding, and quantizing into an analog output.
The latest version of the StringCar M0 Express.
@pastel skiff - schedule changed, I hope I got the text correct
Had to remove lots of modules. as with RFM9X.
It's done
Thanks Anne, can you ;link me to the schedule?
@pastel skiff https://adafru.it/cpdayschedule
thanks!
For sure!
Hackerlab Sacramento activities delay tweet https://twitter.com/adafruit/status/1303771426365857793 @pastel skiff
A #CircuitPythonDay update, Hackerlab Sacramento has been impacted by state power outages. They plan to have material to present at a later date.
Will Do, Thanks Jeff.
Hmmm. Pickles. Yum.
yayyyy

Thanks everyone! Thanks for participating or lurking!
Awesome get-together, everyone!
Thanks. Excellent moderation today @onyx hinge !
Thank you everyone!
Thanks Everyone
Thanks all
Thanks eerybody and see you next week
Thanks!
Thanks everyone
π
@meager fog I was just wondering if you could create a stema board for the mcp23017
@onyx hinge are you going to do notes or should I?
Strange. My Mac went to sleep and the soft reboot issue went away.
@inland tusk dont have any current plans, kinda huge π
you could try https://www.sparkfun.com/products/13601
@slender iron I was planning to do the post-meeting notes stuff but not until tomorrow. if you have the time to do it now that would be great though
I really want an M7f Feather if we're taking hardware requests =)
I love my m4f's, just would love the extra power efficiency and performance of the 7's. I don't know how feasible it is, I just literally designed my first circuit board this weekend (made a featherwing).
congrats π
The first board is was starts you down the rabbit hole
I have some boards coming that will hopefully be the final iteration before launch of my ICE40 Ultra feather wings π
@low sentinel @indigo wedge has designed at least one feather with an imx rt on it
@ornate breach I'm excited for your work π
I'm hoping it plays well with your SoC library π
built in
yeah
hi all
the teensy 4 and 4.1 are imxrt
as an aside @slender iron the dma buffer switching is done in the esp-idf stuff, so should work
oops
so confused
@slender iron @tulip sleet do you remember working on an error where DisplayIO instances that were initialized wrong would cause null reference errors when cleanup_after_vm tried to deal with them? This esp32 crash seems related to that, and it's giving me crazy deja vu - I could have sworn I worked on or solved this exact issue before...
@ionic elk I don't think it was me, but it sounds vaguely familiar. Maybe they are not getting cleared out at startup?
though this kind of thing is common, maybe something is not in root pointers list or is not listed in the specialized gc routine for the module
So, the call stack is:
#0 reset_displays () at ../../shared-module/displayio/__init__.c:169
#1 0x4009cfde in cleanup_after_vm (heap=0x3ffc9f4c <allocations>) at ../../main.c:219
#2 0x4009d0bf in run_code_py (safe_mode=NO_SAFE_MODE) at ../../main.c:286
#3 0x4009d346 in main () at ../../main.c:511
Best I can tell, this is the cleanup_after_vm that runs after the code is done. And the issue seems to be that it calls reset_displays, and there's an item in display[0] that has a valid type, but not a valid bus. So it tries to reference the bus in a memcpy and explodes.
So a display is made... but it's wrong? Incomplete? And the reset_displays code can't tell that it's invalid. I'm trying to figure out whether I need to add more error checking to reset_displays, or if the real answer is something else.
I think that if initialization of a display or a bus fails, the failure needs to ensure that the object's type is set to NULL or none type
and presumably also raise a python exception
@ionic elk you could set a watchpoint on the bad pointer and see when it gets set
I mean, what I'm pretty sure is happening is it's hitting the mp_raise_ValueError_varg(translate("Unable to find I2C Display at %x"), device_address); exception, but not actually resetting the type of the display, like Jeff was suggesting. Adding a self->base.type = &mp_type_NoneType; seems to have resolved it. But as usual with bugs like this, I'm scratching my head trying to figure out how this has not been breaking stuff constantly across every port??
I mean surely someone has plugged in the wrong I2C address for a display before, without immediately landing in perpetual hardfaults
is it damaging in any way to leave the circuit playground express on for a long time? Sorry I'm new to this stuff and I dont know what other chat to put this on
@manic moat the best channel for questions like this is #help-with-circuitpython. No it shouldn't be damaging. if your code is doing things with time it can start to get a bit wonky after a while but you can use resets to work around it. It's also not damaging really, just something to account for.
ok, thank you.
I'm not sure if it's the same thing, but my first venture into i2c also involved this error message and sensor but on a different board. In my case I had removed a 100ms pause when translating the code and that seemed to trigger it after a while. Gemma M0 gives OSError: 5 on i2c.writeto to tinyLiDAR. Perhaps it's worth verifying the VL53L0X isn't in one of the slower ranging modes?
@kevinjwalters I used default settings. The distance measurement took approx. 35ms (I can't remember exactly). So, the 100ms delay should be perfectly fine.
I found some time. My code is:
import time
import board
import busio
import adafruit_vl53l0x
i2c = busio.I2C(board.SCL, board.SDA)
vl53 = adafruit_vl53l0x.VL53L0X(i2c)
while True:
print("Range: {0} mm".format(vl53.range))
time.sleep(0.1)
serial output:
log.txt
Sometimes it takes longer.
For example, with time.sleep(0.05) it take about 10 seconds for an error to pop up.
@idle owl is this where you wanted me to post my use case for CAN? What I am looking for is an interface that allows several devices to talk to each other. I have started creating/designing things that do 1 thing well. So a neopixel controller, a sound controller, motor controller, etc, that respond to set commands. I started using I2C for this, but it has become limiting. I like the idea of CAN, that any of the controllers can broadcast a message and any one can choose to listen. So my use case is pretty simple, wanting to be able to broadcast a message with an identifier, and for receiving, be able to set the filter identifiers and respond when there is a match.
I (think I) know that the SAMD doesn't support CAN its self. There are a couple of hardware solutions including Arduino shields. The one I decided upon is the MCP2515 CAN Bus Transceiver Breakout Boards. They are pretty cheap. They communicate via SPI with the microcontroller, and have an onboard chip to convert to the CANBUS voltages.
I am guessing that this might not be the support that most are looking for. It seems like most people want to interface with a vehicle. I am a First Robotics mentor, and their robot components communicate over CANBUS, (but with their own software stack) so thats how I heard about it.
@tall owl Yes! @onyx hinge check it out!
I have started to do the above with a couple of the breakout boards in Arduino, but that was a few months ago before things got crazy.
@tall owl I would love to talk about motors and canbus! But it's late, it'll have to be another day.
Right now we have one person working on CAN support for the SAM E51 and E54 MCUs (me) and another person working on a SPI to CAN chip which I think is the MCP2515 you mention.
Does anyone know if there are any libraries available to integrate a current CT for current monitoring?
@tall owl you can also drop your thoughts in https://github.com/adafruit/circuitpython/issues/2527 as we're keeping an eye on that issue as well
Add CAN bus API. Very common in cars and robots. https://en.wikipedia.org/wiki/CAN_bus
Since I have the most experience with it, it makes sense for me to tackle Type 2 Tags first, but the nRF libraries do have Type 4 Tag support too, so I'm designing with that in mind.
One thing I'm definitely curious about is memory management. Because the API that renders the NDEF messages requires the message to be defined with the number of records it has, I was planning on collecting up the records in a python object, then rendering them as the raw buffer that is used as the actual pay...
@placid stirrup not that I know of; we have libraries for the INA series of DC current sensors: https://www.adafruit.com/?q=current+sensor+ina&sort=BestMatch
I saw that, thank you. I'm trying to use a current transformer
i had not heard of that; I looked it up, but could you measure the current in the secondary using one of those sensors (after rectification)??
i know only what I read in wikipedia π
@gilded cradle you mentioned tonight about a wish list for UI display/input elements. On a tangentially-related note, I know @lone axle is working on a remote JSON scripting language for displays using existing display elements and is coming up with some new ones, like text input. Iβve just started looking into an open issue βmake dispio more touch friendlyβ and your comment tonight seems along a related but higher level concept. If you have some ideas on what you would like to achieve and maybe a specific starting project, Iβd be glad to assist.
On CircuitPython Release 5.3.1 , when run
adafruit_wiznet5k examples (from: https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases)
and
nRF24L01 examples (from: https://github.com/adafruit/CircuitPython_Community_Bundle/releases)
the NeoPixel LED goes off (in REPL it should be steady white), REPL stop respone, but the CIRCUITPY drive w...
OK, looks good. Thanks for all this work!
Let's try to finish this off. @xiongyihui I think you are right about the report ID's: they cannot be used for raw mode. Are you saying you still prefer a property, or that the received_report() function is not applicable for raw mode? I don't know if there are non-raw examples of OUT reports that should be FIFO'd.
This is a follow-up to 9-9-20 (CPY Day) esp32s2 Deep Dive in which esp32s2 manual safe mode support was briefly discussed.
The esp32s2 posses a challenge for manual safe mode implementation as it lacks a dedicated reset pin instead the reset button is connected to CHIP_PU which when pulled low turns off the power to the chip thus causing a hard reset.
A solution to this problem as discussed during the deep dive is to use IO0 (boot but...
@mental nexus along the same lines, I also created this "hamburger" menu button a while back: https://gist.github.com/FoamyGuy/b11390a020d213b1ee15fb5f02eacfff. It could use some refining to make it a bit more re-usable. But it could also be reworked into a select/dropdown type control fairly easily I think. @gilded cradle's answer last night has inspired me to make an attempt at Checkbox and Radio buttons next. I am keenly interested in what is possible on the touch event location front as well. It would be great if the system could tell you what got clicked somehow instead of having to pass the touch event object into a function on each control to check if it got hit or not.
The implementation of USB_HID depends on report IDs. It would be very difficult to add a raw mode to USB_HID.
Maybe add a new module USB_RAW_HID and an USB interface to support HID RAW, or use WebUSB instead of HID RAW.
I don't think we should consider raw mode or FIFO here, so I still prefer a property.
Thanks @lone axle that sounds cool. Your point about touch reaction is what Iβve been wondering about, and about how to structure it. If there are a bunch of touch-reactive elements, should they somehow get βregisteredβ in a touch handler so that when an element is touched that their .pressed function is called and .released is called upon button release? I think multitouch might be considered in the future too, and what hooks should be there for that? How can we organize this so people can weigh in, give feedback, come up with a plan and divvy up the work, maybe a github issue?
That is clear thinking, thanks. OK, how about calling it .last_received_report? That makes it clear it's not related to outgoing reports, and is not FIFO'd.
I do think an issue on github is a good place to start collecting thoughts and conversation. I would assume some or most of these UI controls will end up in libraries like the existing ones for button, label, and some others. But I think the touchscreen discussion is probably best fit for the main CircuitPython repo atm since it's likely to be integrated into the system somehow if it's making use of some of the displayio internals.
I'm OK with .last_received_report.
@lone axle @mental nexus I'd also be interested in seeing some kind of summary of the UI elements discussion, as I've got some touch UI projects coming up.
Thinking outloud a bit. Maybe the systen could provide a Gamepad-like object where each property represents a screen control instead of a IO pin or similar.
Thanks @mental nexus and @lone axle. It's kind of like experiencing the Graphical UI all over again and that's been my inspiration on the UI controls. It's really just a bunch of loose ideas at this point. So as you mentioned, radio button and checkbox. Maybe a scrolling text area (which may have been done on a project or two already). A drop down box, list, tree control, maybe groups. I like to look at some old Visual Basic interfaces with available controls for inspiration. I do like the idea of touch events where each element keeps track of it's own touches it receives.
@tulip sleet so, as crazy as it is, I'm getting the same hardfault crash on my STM32 control of DisplayIO when I intentionally put in the wrong I2C address. So potentially this null reference error has been around on all ports, possibly for a long time?
So yeah anyway putting in a fix, maybe we can poke around and see if there's even more object validity checking we should be doing in the DisplayIO reset functions
@gilded cradle do we have a system for a rotating selection list? Like the kind of thing you have on a 3D printer, where a carrot moves down a list to select menu items, can enter submenus and such. And if the list is larger than the screen, it will cycle into new items once you hit the bottom or top?
Not that I'm aware of @ionic elk, though it would make a cool library.
I put together one on Mbed one time, maybe I'll try doing it for circuitpython
I'll need it for some upcoming things I think
@tulip sleet FYI -- I have been using my Linux box again lately for building CP and flashing to several boards (esp32s2,feather_m4, itsy_bitsy_m4, metro_m4_airlift) and I have not experienced any crashes. I should know better than to jinx it, but it sure seems to be improved. No idea why...
There was a recent demo of a touch menu buttons and/or page changing, I think on a pyportal. Can anyone point me there? I think it may have been a YouTube video. Not sure if it was CP or Arduino.
Hullo. I'd like some advice on debugging. I'm trying to run some CPy tests on a Feather M4 connected to a 144-led RGBW NeoPixel strip. The strip's not lighting up but I can control the onboard LEDs. Here's how I have it hooked up (shown without power hookups) EDIT: That resistor is 470-ohm as measured by multimeter:
The code I'm running is this one:
# Test NeoPixel
import time
import board
import neopixel
pixel_pin = board.D6
num_pixels = 10
# For RGBW NeoPixels, simply change the ORDER to RGBW or GRBW.
# ORDER = neopixel.GRB
ORDER = neopixel.GRBW
pixels = neopixel.NeoPixel(
pixel_pin, num_pixels, brightness=0.2, auto_write=False, pixel_order=ORDER
)
def wheel(pos):
# Input a value 0 to 255 to get a color value.
# The colours are a transition r - g - b - back to r.
if pos < 0 or pos > 255:
r = g = b = 0
elif pos < 85:
r = int(pos * 3)
g = int(255 - pos * 3)
b = 0
elif pos < 170:
pos -= 85
r = int(255 - pos * 3)
g = 0
b = int(pos * 3)
else:
pos -= 170
r = 0
g = int(pos * 3)
b = int(255 - pos * 3)
return (r, g, b) if ORDER in (neopixel.RGB, neopixel.GRB) else (r, g, b, 0)
def rainbow_cycle(wait):
for j in range(255):
for i in range(num_pixels):
pixel_index = (i * 256 // num_pixels) + j
pixels[i] = wheel(pixel_index & 255)
pixels.show()
time.sleep(wait)
while True:
pixels.fill((255, 0, 0, 0))
pixels.show()
time.sleep(1)
pixels.fill((0, 255, 0, 0))
pixels.show()
time.sleep(1)
pixels.fill((0, 0, 255, 0))
pixels.show()
time.sleep(1)
rainbow_cycle(0.001) # rainbow cycle with 1ms delay per step
Measuring voltage from the power supply (5V 10A) at the barrel adapter, it reads 5.25V. Is that too much for the NeoPixels?
@ionic elk yup
I'm finding some null reference errors that have me very confused, because it seems so improbable that nobody would have run into them before. So I'm wondering if I'm somehow barking up the wrong tree or if there's some kind of meta-fix I should be doing.
Like, for instance, I'm having one where if you set the reset pin to none in I2CDisplay, release_displays doesn't actually detect that it's not there, and tries to reset it anyway, leading to a hardfault
Does that mean that nobody ever set a reset pin to none in I2CDisplay before?? I'm sure I've even done that myself, so why is it only cropping up now?
where does it hardfault? that generally doesn't surprise me
my code doesn't cover edge cases like that very well
It will crash whenever release_displays is called at the beginning of a sketch, if you have defined an I2C screen with no reset pin
@mental nexus I saw one go by recently that was an e-ink one I believe. A touch enabled version of the open book ereader. It was running a script that looked similar to this pyportal interface demo from the guide: https://learn.adafruit.com/making-a-pyportal-user-interface-displayio.
Same deal with the memcpy hardfault I just found in reset_displays for I2CDisplay (that's the one Limor was running into), it implies that nobody ever put in a wrong address for their I2CDisplay, because that causes an immediate hardfault when your code_py completes.
as soon as cleanup_after_vm is called. It's not a hard fix or an especially big issue, I was just baffled that it hadn't come up before
just seems like that'd be something we'd be seeing recurring issues about
reset looks correct to me here: https://github.com/adafruit/circuitpython/blob/main/shared-module/displayio/I2CDisplay.c#L45
@idle owl if you have a second can you mark the old notes doc read-only ?
The issue is that if you hit mp_raise_ValueError_varg(translate("Unable to find I2C Display at %x"), device_address); it won't set self->bus, but it keeps the display with a valid type in the display array, so it blows up a memcpy in cleanup_after_vm later
I've verified that it happens on the ESP32 and the STM32
so that seems like a legit bug then
Ok, cool. I might scrounge around more then, and see if I can find more dereferences that might be going on
I was just worried there was something I had missed for those ports in particular
there are plenty of bugs to find and fix
Here is the notes document for Monday 14 September 2020's CircuitPython Weekly meeting. We return to our normal Monday meeting schedule, at the typical 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/1vPWZyHRhsrAMZdc7nQJCDBmshHgtot2UotPJuIgSM_U/edit?usp=sharing
I guess I just shouldn't second guess myself so much, maybe there just aren't that many people using the I2CDisplays
π
Thanks! Thatβs it @lone axle, the one with the cartoon finger! Iβll start an issue and add a few examples including this one and your hamburger menu. Also Iβll put some references to one or two existing python GUIs that Iβve found.
Thanks for the switch Dave! I think we'll want it in a bit different spot.
I think we want this outside the if because user code could lock and prevent the display from refreshing.
Thanks @jerryneedell ! Nice work!
This is a great start! Take a look at the design guide here: https://circuitpython.readthedocs.io/en/latest/docs/design_guide.html It's a random collection of things that could be helpful to know.
The reason I point it out is because this API could actually be split into two. Native APIs should be minimal and just encompass the core of the functionality. For example, NDEFMessage could be done in Python much easier than C.
One existing API to compare against is [the BLE Advertising API...
Also, no need to layout common-hal if you have a Python API. They should map from one to the other clearly.
Ok thanks for the update! Please let us know when you've figured out the issue on 6.0.0-alpha.3. Sounds like the fixed one issue already.
@onyx hinge Done.
thank you @idle owl
Awesome! Thank you!
I think the easiest thing is to add a board define CIRCUITPY_BOOT_BUTTON that can be used to include the code you've added.
Want to make a PR? Thanks!
The library uses spi readfrom with the write_value parameter. This does not presently work on stm32's implementation of spi in circuitpython (arbitrary/uncontrolled data is sent instead). #3176 is an existing issue about this problem, and it is possible that this explains why the library does not work on stm32f405.
I don't think it's worth doing in Python. Instead, layer_at could be a function on the native Group object. It'll be faster and have raw access to displayio internal APIs.
I do think you'll want to handle transparency.
To handle fuzzy touch you could call layer_at for surrounding pixels as well and then decide amongst all of the results what was touched.
@hierophect Not really. The SPI delays are very minor compared to the setup cost in Python.
Objective: To define a CircuitPython friendly method for an easy-to-use set of touch-based graphical controls for displays
Recent discussions highlight the desire for easy-to-use screen based Graphical User Interface elements for CircuitPython displays.
These requests range from a desire to relate touch input to existing displayio graphics elements (https://github.com/adafruit/circuitpython/issues/1598) and to @makermelissa 's request for [radio buttons and scrolling text boxes](ht...
@hierophect Any pin API that takes a pin pointer should check for NULL.
Any API that takes port and pin numbers should validate them. Only checking for a special value risks not catching other invalid values. When we need to set an invalid value a special value is appropriate.
Is there any ESP32-S2 test CP code around for exercising wifi, socketpool, and ipaddr?
@tannewt would you say this is worth closing, then?
cool, thanks!
@atomic summit I just merged in the native wifi code
Awesome @slender iron - I missed the second half of your deep dive when you started going over the SPI + SPRAM +DMA stuff... where did you land on that?
What did you decide to do? turn off DMA?
ok
d'oh! it's already in readthedocs too
I love whoever put together this whole build system... all the things in their right places every time there's a merge π
Better and better! Just a couple more things. Thanks!
I think this is correct but I'd be simpler if you handled computing y bounds before saving it into dirty_area.
So, factor it out so you have lower_y and upper_y and then do the merge with the existing area.
Ah ok. Yup, I think you are right about the off by one error.
part of it is me realizing having artifacts from the latest commit means early testing on everything π
Wifi messages in language files.
@DavePutz Would you like me to finish this? I think it has more to remove to leave only the PulseIn changes. Thanks!
This PR fixes null reference exceptions in DisplayIO related to the use of I2CDevice, which were causing crashes if the user entered the wrong I2C address for an I2C OLED screen, or did not include a reset pin in the construct function. These issues were identified by @ladyada in #3334, but were apparently occurring across all ports, not just the ESP32-S2.
This PR also adds an openocd configuration file and linker flag required to use GDB with the ESP32-S2, which assisted in tracking this ...
π
I pushed changes to make it .last_received_report. @tannewt, if this is OK by you, we can merge.
Thank you @xiongyihui for your patience.
Can the source bitmap be the same bitmap? If so, can the regions overlap and is that handled well?
cool!```
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 6.0.0-alpha.3-151-ge5dd2a32f on 2020-09-10; Saola 1 w/Wrover with ESP32S2
import wifi_test
cp mem free 2036592
idf total mem 157280
idf mem free 97208
idf largest block 53032
<Network> Needell Airport -62 1
<Network> Needell Airport -48 11
<Network> WYZE_FBAB62DE71811B38 -64 11
<Network> Expelliarmus2 -79 2
<Network> central2.4 -84 5
<Network> 31A -84 5
None
ip 10.0.0.107
8.8.4.4
ping 0.038
200
This is a test of Adafruit WiFi!
If you can read this, its working :)
200
{'url': 'https://httpbin.org/get', 'headers': {'User-Agent': 'Adafruit CircuitPython', 'Host': 'httpbin.org', 'X-Amzn-Trace-Id': 'Root=1-5f5a8aeb-28890ae856666eb9eaf7ba7d'}, 'args': {}, 'origin': '73.61.89.123'}
sorry did not see post above -- great work @slender iron
And FYI -- this build for my saola-wrover was done on my Mac in a "non-casesensitive" file system !
@jepler I thought that issue was exclusively specific to SD cards?
@kevinjwalters I envision situations where blitting into itself will cause strange behavior.
The function is pretty simple and iterates pixel-by-pixel through the source bitmap through y, then x. I think if you copied from a higher x or y in the "source" bitmap to a lower x or y in the same "target", it would work ok. But if you copy pixels into regions of the "source" that haven't been copied yet, it will do something strange. (Maybe that would be cool for an art project?)
If yo...
You can actually do this without a temporary bitmap, if you just select the direction of the copy based on the relative positions of the areas being copied from and to. Micro:bit MicroPython's Image.blit does that, and it works very well.
Awesome, the design guide is exactly the sort of thing I was looking for!
I definitely wanted NDEFMessage to be python only, so the fact that it's not only possible but encouraged sounds excellent to me!
For your questions:
- First I guess it makes sense to touch on what makes them similar: They do both have byte payloads (typically NDEF messages according to the spec I think.) They both are the "target" device in an NFC interaction. The "reader/writer" would be something like your ...
I think scott may kill me based on the novellas I've written about NFC before I ever write a line of code π¬π
That's odd... I didn't put any AP code on the ESP32-S2 (there isn't any via CP yet afaik), but it broadcast a Beacon frame ( MAC address + 1) earlier in testing. Must be some startup in the core or ESPIDF sub-core? (advertised rates = 5, 11, 1, 2, 6, 12, 24, 48 Mbps)
Β―_(γ)_/Β―
lol
sounds like you have a better setup for testing than I do π
you can help me fix bugs
Is this expected```E (136) esp_image: image at 0x2d0000 has invalid magic byte
E (142) boot: Factory app partition is not bootable
Ok, I've confirmed its very fast at transmitting zeroes. :-) Working on a fix now.
ah yea, here it is: I (12901) wifi:mode : softAP (DE:AD:BE:EF:FE:ED)
yum, hamburgers.
(redacted)
I see that there is no 5.3.1 UF2 download option for our board. Is that because we added it to the repo after 5.3.1 was released? If so, will there be a stable release option for our board after the next official stable release?
@old smelt yes I believe you are correct. Once the next major stable release occurs that option should appear.
@crimson ferry That error is because there is no valid factory partition where the uf2 bootloader will go
ah, makes sense, thanks
@old smelt your board won't have a stable release until 6.0.0 is released. we're not backporting to 5.x any more
yay, after many tries I think the releasing from my github repo is right. https://github.com/jepler/Jepler_CircuitPython_udecimal/releases/tag/1.0.0-alpha.3
Wifi messages in language files.
This fixes SPI with PSRAM allocated buffers. DMA with SPI2 was
attempted but produced junk output. This manual copy is less than
2x slower than DMA when not interrupted.
Fixes #3339
@emard please test artifacts from this build once it completes. Thanks!
Two minor things. Thanks for the fixes! Nice job finding them!
Where did this file come from? Does it have a license?
This should probably use digitalio to match the constructor.
if (self->reset.base.type == &digitalio_digitalinout_type) {
common_hal_digitalio_digitalinout_deinit(&self->reset);
}
@jepler are the asf4 and samd-peripheral submodules up to the versions you want in the PR now?
@hierophect Do you have anything to add or shall we merge?
No, I will tend to it tomorrow or monday.
I was able to find that it is a copy or near-copy of a file from openocd-esp32. The overall openocd project is GPL licensed. These cfg files do not have an alternate or exception notice posted.
FWIW the esp32s2.cfg file is also installed when install esp-idf, e.g., to $(HOME)/.espressif/tools/openocd-esp32/v0.10.0-esp32-20200420/openocd-esp32/share/openocd/scripts/target/esp...
Thanks for confirming @lone axle & @slender iron
Ok, thanks for the additional prodding, I now see what you were getting at. I cleaned up the y-portions similar to what I did with x, I hope it's clearer.
Also, I fixed the off-by-one error and realized that the dirty-rectangle tracking is "exclusive" for the .x2 and .y2 values, so I plastered that through the comments for posterity. I think this is good now.
I fixed the off-by-one error and corrected an issue with half_width and half_height calculation.
Also, I clarified that the dirty rectangle tracking is exclusive for .x2 and .y2.
the board take like a minute to boot, after which REPL is available, but the drive shows

i tried to reset the file system and no change, tried on ubuntu and linux
what can i do ?
@hierophect good eye! I didn't see that issue.
@water5 I will look into updating the library with a fix that doesn't involve using the write_value parameter in any spi.readfrom() calls.
Currently I have tested this:
adafruit-circuitpython-espressif_saola_1_wroom-en_US-20200911-9256e6b.bin
everything works
adafruit-circuitpython-espressif_saola_1_wrover-en_US-20200911-9256e6b.bin
doesn't work
import spiloopback
loopback IO35-IO37
bytearray(b'\x00\x00\x00\x00') fail
bytearray(b'\x00\x00\x00\x00') fail
bytearray(b'\x00\x00\x00\x00') fail
bytearray(b'\x00\x00\x00\x00') fail
On 9/11/20, Scott Shawcroft notifications@github.com wrote:
@emard please test artifacts from t...
Spresense only needs a 32-byte alignment for camera. I changed BYTES_PER_BLOCK to 32 and aligned the heap to 32 bytes.
I also changed the API. Now Camera constructor has two arguments: width and height. The take_picture function also has two arguments: buffer and format. It also returns the size of the taken picture. The ImageFormat enum is created for the format.
Let me know what you think about it.
Hi, I wanted to try an artifact (from https://github.com/adafruit/circuitpython/runs/1098098607 ) with the latest library from 11 september. But I get a strange error:
SOLVED: MpyError: Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/mpy-update for more info.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 6.0.0-alpha.3-147-gfd30832e3 on 2020-09-10; Adafruit PyRuler with samd21e18
Ok, could be a corruption on my Flash... I need to "clear" everything. Was there a uf2 for doing that?
Can I "format" the drive? Not sure I want to lose the folder ".fseventsd" or the files ".metadata_never_index" and ".Trashes".
Ha ha, now adafruit_dotstar need adafruit_pypixelbuf ... this is new to me. Maybe some guide will need to be updated.
sure, you just run storage.erase_filesystem()
it will also re-create those hidden files
CIRCUITPY should be available in seconds.
- Is this the PCA10056 board?
- Did you install the nRF UF2 bootloader on the board? If not, how are you loading the firmware?
- What happens on Ubuntu when you plug the board in? Could you start monitoring
/var/log/syslogfrom just before you plug in to the time things stabilize, and attach the log here?
@analog bridge I have one -- what version of CP are you using? need to update mine
Hi, @solar whale What ver do you have ?
what version of CP? -- any you want -- I just loaded the latest tip of main to it.
That will work. Can you post the output of serial console when the board is powered-on/reset while holding both A & B buttons
nothin special
Does it enter safe-mode ?
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 6.0.0-alpha.3-165-g9256e6b37 on 2020-09-11; Adafruit CircuitPlayground Express with samd21g18
>
> ```
no - this is just a control -d -- let me try a power cycle
yes on power cycle it does go to safe mode
You are in safe mode: something unanticipated happened.
CircuitPython core code crashed hard. Whoops!
Unknown reason.
Please file an issue with the contents of your CIRCUITPY drive at
https://github.com/adafruit/circuitpython/issues
Press any key to enter the REPL. Use CTRL-D to reload.
Yup!
same on RESET -- either A or B is ok , but both results in safe mode
The reason being provided for safe mode is wrong.
// pressed, then boot into user safe mode.
``` It's intended that holding both enters safe mode, but .. yeah what microDev said π
return USER_SAFE_MODE;
just says "unknown reason"
USER_SAFE_MODE is not handled in safe_mode.c properly. I came accross this while implementing manual_safe_mode for esp32s2
yup, supervisor/shared/safe_mode.c switch(reason) near line 116 lacks a case for USER_SAFE_MODE
shoot us a PR, @analog bridge !
117 case MANUAL_SAFE_MODE:
unless USER_SAFE_MODE and MANUAL_SAFE_MODE should be the same, with the MANUAL_SAFE_MODE text revised slightly
``` maybe this text can be used somehow
USER_SAFE_MODE seems to be board specific reason for entering safe mode
oh wait the block that's supposed to be running is the one above in safe_mode.c: ```106 // Output a user safe mode string if it's set.
107 #ifdef BOARD_USER_SAFE_MODE
108 if (reason == USER_SAFE_MODE) {
109 serial_write_compressed(translate("You requested starting safe mode by "));
110 serial_write(BOARD_USER_SAFE_MODE_ACTION);
I searched whole CPY but was unable to find any definition for BOARD_USER_SAFE_MODE
I bet the guard on line 107 should be BOARD_USER_SAFE_MODE_ACTION instead
Also there is an else statement just chilling there without curly braces
This part of code never gets compiled
I agree, right now that part never gets compiled due to the #ifdef
OK so what if you reorganize it like this:
case USER_SAFE_MODE:
#ifdef BOARD_USER_SAFE_MODE_ACTION
serial_write_compressed(translate("You requested starting safe mode by "));
serial_write(BOARD_USER_SAFE_MODE_ACTION);
serial_write_compressed(translate("\nTo exit, please reset the board without "));
serial_write(BOARD_USER_SAFE_MODE_ACTION);
serial_write("\n");
break;
#else
// fallthrough
#endif
case MANUAL_SAFE_MODE:
serial_write_compressed(translate("CircuitPython is in safe mode because you pressed the reset button during boot. Press again to exit safe mode.\n"));
``` so that USER_SAFE_MODE case is handled in the first block, and you get the special message if it's available and otherwise you get the manual safe mode message (which might be inaccurate but is better than nothing)
and get rid of the weird if/dangling else as a bonus
I was planning to rename BOARD_USER_SAFE_MODE_ACTION to BOARD_USER_SAFE_MODE
And in the board specific mpconfigboard.h #define BOARD_USER_SAFE_MODE "board specific reson here"
I don't have a strong opinion about that, but I do think the #ifdef should check the existence of the same thing that the serial_write is going to print
@slender iron prefers to use #if MACRO instead of #ifdef MACRO or #if defined(MACRO) and ensuring that MACRO is always defined to 0 or 1, as the way to enable/disable functionality. However in this case I feel like sticking with #ifdef for the macro that expands to the text is probably the way to go, because otherwise the guard and the text can get out of synch (as they have, and nobody noticed)
switch (reason) {
case USER_SAFE_MODE:
#ifdef BOARD_USER_SAFE_MODE
serial_write_compressed(translate("You requested starting safe mode by "));
serial_write_compressed(translate((BOARD_USER_SAFE_MODE));
serial_write_compressed(translate("\nTo exit, please reset the board without "));
serial_write_compressed(translate((BOARD_USER_SAFE_MODE));
serial_write("\n");
return;
#else
// fallthrough
#endif
case MANUAL_SAFE_MODE:
This seems to work
I also compile-tested it on a trinket m0, which does not have BOARD_USER_SAFE_MODE_ACTION and it built
I'll let you select the final form, thanks for letting me work through the problem with you especially when it came to me announcing things you had already learned for yourself π
Np. I'll get a PR for this along with manual_safe_mode implementation for esp32s2
π
Thanks @solar whale & @onyx hinge
@solar whale can you link the wifi_test code for esp32s2
@2bndy5 I'm also working on a fix for the write_value issue itself, but please let me know if removing those calls helps at all - my original research indicated that issue was exclusively for SD cards as per an oversight by ST regarding SD specific spec requirements, but if it affects other devices that makes the fix much higher priority.
@onyx hinge is the sdcard on the teensy4.1 supported by sdioio?
@solar whale No, I don't think so
it needs some port-specific code. I wrote it for atmel-sam and stm32(f405) and I think there was an implementation contributed for spresense. someone would need to code it up for i.mx
Not a problem -- just answering a forum question.
would be happy to see that PR come in π
I obtained the file from the script location noted by @jelpler on my machine (the path is also obtainable by using $OPENOCD_SCRIPTS after running the export script). It is the same as the esp32s2.cfg file but with the essential difference of adding the adapter_khz 1000 line, without which debugging will fail. I don't know why they don't include it by default.
I assumed it would have the same Apache2 licensing as the rest of the project. Do I need to take it out?
@onyx hinge if you find yourself with a few moments to spare at some point today I'd love the chance to pick your brain a bit about adafruit_sdcard causing device lockup when used with OnDiskBitmap
@lone axle I'm around, do you wanna do it now-ish or in a couple hours?
Now's good for me.
OK let me go to my circuitpython computer and grab a board for testing. would a pyportal or pygamer do it?
Yep, pyportal is the one I've been using but another user has said the PyGamer has the same issue
OK, I have a pygamer with a debug header soldered on which is great for getting extra info in these circumstances
do you want to do text only or do you prefer to hop into a voice or video chat?
whatever you feel will work best for you.
Okay, I haven't used any of the voice rooms outside of the meeting. Are they available to just jump in to at any time or is there something specific that needs done in order to activate them or something?
yeah you should just be able to enter one of those shared voice chats
...
#10 0x00030a04 in f_read
#11 0x0004749a in common_hal_displayio_ondiskbitmap_get_pixel
#12 0x00047e52 in displayio_tilegrid_fill_area
#13 0x00046fd6 in displayio_group_fill_area
#14 0x000490b8 in displayio_display_core_fill_area
#15 0x00045990 in _refresh_area
#16 0x00045a66 in _refresh_display
#17 0x00045fe2 in displayio_display_background
#18 0x0004842a in displayio_background
#19 0x00021a32 in supervisor_background_tasks
#20 0x00021114 in background_callback_run_all
#21 0x00021b06 in supervisor_run_background_tasks_if_tick
#22 0x0001ca3a in mp_execute_bytecode
[...]
#36 0x00030a04 in f_read
#37 0x0004749a in common_hal_displayio_ondiskbitmap_get_pixel
#38 0x00047e52 in displayio_tilegrid_fill_area
#39 0x00046fd6 in displayio_group_fill_area
#40 0x000490b8 in displayio_display_core_fill_area
#41 0x00045990 in _refresh_area
#42 0x00045a66 in _refresh_display
#43 0x00045cc4 in common_hal_displayio_display_refresh
#44 0x0003ee12 in displayio_display_obj_refresh
#45 0x00013618 in fun_builtin_var_call
#46 0x0000ebbc in mp_call_function_n_kw
@lone axle
@lone axle and additionally the same change should be made in FramebufferDisplay.c as Display.c. I don't suppose you happen to have an RGBMatrix display for testing with that.
I don't, but I've been looking for an excuse to get one because I do want to play with it. So I'm happy to have testing this out be that excuse π .
@onyx hinge do you know why the SPI write_value is 8 bits? Is it binary data that's simply supposed to be repeated over and over? Seems like all it's ever supposed to do is just drag the bus to a certain level for these SPI out-of-spec special cases like SD, right?
Is there any reason it would ever send anything other than 0xFF?
@ionic elk I think 0x0 and 0xff would cover the real world cases
spi is two-way full-duplex, so you always send and receive at the same time
there are some tricky devices that allow you to take advantageΒ of that
like sensors that give you the reading from the last measurement while at the same time letting you set up the next
buf = bytearray(2) # 2 = 1 status byte + 1 byte of returned content
with self._spi as spi:
time.sleep(0.005) # time for CSN to settle
spi.readinto(buf, write_value=reg)
self._status = buf[0] # save status byte
return buf[1] # drop status byte and return the rest``` actually the way this is coded it needs values other than 0x00 and 0xff
(that's the nrf24 lib)
I don't know whether specifically it needs to receive the register number twice (once with each byte it reads) or if this is just a shortcut to send the register value out without allocating more buffers
@stuck elbow interesting. At the moment, only atmel-samd and i.MX actually implement write_value at all
so this will fail on every port except those, not just STM32
Probably at the very least we should put in a not_implemented exception here
for all ports without this capability
While SPI just needs the value 0xff (all bits same), the nRF24 library needs specific values:
def _reg_read(self, reg):
buf = bytearray(2) # 2 = 1 status byte + 1 byte of returned content
with self._spi as spi:
time.sleep(0.005) # time for CSN to settle
spi.readinto(buf, write_value=reg)
self._status = buf[0] # save status byte
return buf[1] # drop status byte and return the rest
@ionic elk with respect to the stm hal, would it work to fill the var we call "data" with the outgoing byte value using memset, then pass the same "data" pointer twice to HAL_SPI_TransmitReceive ? Rather than introducing an extra buffer.
@xiongyihui - what was your intent with the PR #3244 patch in regard to displays? Right now I see that qspi_enable() is being called during startup after qspi_disable(); but the Clue display does not come back on. I see that you did not use the NRF provided nrf_qspi_disable() to turn off QSPI, but you did use nrf_qspi_enable() to turn it back on. Was there a reason for this? I did find out the commenting out the
NRF_QSPI->TASKS_DEACTIVATE = 1;
line in qspi_disable() keeps the display...
This complicates my implementation as well, since the workarounds I've found for the ST HAL assume a binary idle level, and implement it by dragging the pin up and down as a GPIO temporarily
uint8_t *data, size_t len, uint8_t write_value) {
if (self->miso == NULL) {
mp_raise_ValueError(translate("No MISO Pin"));
}
HAL_StatusTypeDef result = HAL_OK;
if (self->mosi == NULL) {
result = HAL_SPI_Receive (&self->handle, data, (uint16_t)len, HAL_MAX_DELAY);
} else {
memset(data, write_value, len);
result = HAL_SPI_TransmitReceive (&self->handle, data, data, (uint16_t)len,HAL_MAX_DELAY);
}
return result == HAL_OK;
}
π€
I can try
I mean, probably just running read as transmit_recieve should solve it, right? Why worry about the memset?
I'm trying to imagine a reason (aside from "chip implementors are mad! MAD, I TELL YOU!") that it wouldn't work
the memset makes every byte of the outgoing data equal to the write value
compared to an earlier suggestion I made, it just tries to re-use the same memory region for both purposes
it's at the boundary of possibility that the time to memset() would matter so you might still special case 0x00 and 0xff .. but only if you can measure it (vs time time to do SPI at 8MHz or something)
you might also want to be able to recognize the "write_value not specified" case, which would involve making the type of write_value wider than 8 bits (e.g, just an int) and then check for a distinguished value like -1 to mean "not specified". 0-255 would be all the valid single byte values.
but I would only do those complications subsequent to measuring performance with a simple variant like the above
I'm still trying to wrap my head around what you're suggesting. i might just need to try it and see what happens
was my suggestion at https://github.com/adafruit/circuitpython/issues/3176#issuecomment-662618320 clear(er)?
This issue appears to have been resolved -- at least, it works on my CLUE now ... should this be closed?
or is it all a case of being clear as mud
memset(data_out, write_value, len);
HAL_StatusTypeDef result = HAL_SPI_TransmitReceive (&self->handle,
data_out, data_in, (uint16_t)len,HAL_MAX_DELAY);```
Oh, ok I get it now. I got the lines mixed up in my head. So, memsetting the data value is just a space saving measure, it re-uses the same array that is used for outgoing data to provide incoming idle values.
?
Right, compared to my earlier suggestion on that issue the intended difference is re-using the same buffer
as well as making sure not to TransmitReceive on a bus that is transmit-only, which would give a HAL error I think
Why would we want a write value not specified case? It appears that the bus defaults to a logic level of 0 for a normal transmit function, so it makes more sense to me that we just have write_level default to 0
Which is the current case. What differences do you think would need to be implemented for an undefined write_value?
I was prematurely worrying about performance
if you're moving a bunch of data you'd rather it be as fast as possible, so slowing down every case with a memset() might be something you'd notice
@hierophect Since CircuitPython 6.0.0 Alpha-3, added sdioio module to access SD Card, I think the sdioio is major interface to access SD Card since 6.0.0 (sdioio faster than SPI), unless want to save IO or other reason to specify use SPI to access SD Card, or port to none SDIO interface STM32 chip?
@onyx hinge Ah, I see. So the idea with that would be to avoid actually performing the memset at all.
I think I'll just run a check for whether it's 0, and run a regular receive in that case, since that appears to be the default behavior.
my testing indicated that arbitrary/uncontrolled data is being sent in the current implementation, not zero.
it might or might not be the last byte received, a common hardware optimization seems to be to share a single shift register with the send and receive machinery
@water5 SDIO is generally preferable, but it is not available for some breakout boards like the Adalogger, which assume SD card access over SPI. I brought it up because the "write_value" issue Jepler mentioned (a problem with dictating what value the SPI write line is idling at while a read is occurring) is most commonly found on SD cards, but it also appears to affect some sensors like this one which require specific data to be transferred while reading.
To be honest, I see some redundanc...
@onyx hinge I had assumed from your pic that it had started an actual transfer later on - so what's actually happening in that image is that the data on MOSI starting with 0xC0 is actually all junk?
"0x00 0xc0 0x7f" should have been "0xff 0xff 0xff"
I guess I didn't make it super clear did it
In the "good" trace, 0xff goes out and 0x3f comes in, so that's the point of departure
because that byte didn't have the expected value, the SD card implementation keeps sending out more bytes until it gives up
@slender iron - using your demo code for the esp32s2 wifi, sometimes the last request fails
response = requests.get("https://api.github.com/repos/adafruit/circuitpython")
print(response.status_code)
print("circuitpython stars", response.json()["stargazers_count"])
200
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "wifi_scott.py", line 53, in <module>
File "adafruit_requests.py", line 315, in json
File "adafruit_requests.py", line 69, in readinto
File "adafruit_requests.py", line 197, in _readinto
TypeError: unsupported types for __sub__: 'NoneType', 'int'```
>
but sometimes it works OK
>
>
> if I try getting data from this URL (from the cheerlights demo) I get ```
> response = requests.get("https://api.thingspeak.com/channels/1417/feeds.json?results=1")
> ``` fails with
> ```Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "wifi_test.py", line 51, in <module>
> File "adafruit_requests.py", line 506, in get
> File "adafruit_requests.py", line 456, in request
> File "adafruit_requests.py", line 401, in _get_socket
> File "adafruit_requests.py", line 397, in _get_socket
> OSError: Failed SSL handshake
> >
> > ``` Is that expected at this time?
@crimson ferry when you tried the wifi test, dids you have the same error as above?
Please go through issue https://github.com/adafruit/circuitpython/issues/3389 for a background of this PR.
What works:
- On esp32s2, one can manually enter safe mode by pressing boot button during the 700ms loop on startup. This loop is indicated by:
- yellow color on rgb led and/or,
- a blinking led
Note: If you do not have any way of guessing the loop status, power-on the board/press the reset button and after a short delay, press and hold boot button for a while ...
@solar whale I did see that a couple of times, but haven't done rigorous testing yet. I'll be doing more testing later today hopefully. I also noticed and need to narrow down that connect seems to not connect (tries forever) unless a scan has been done, even with a timeout= kwarg.
I saw the handshake error, not the first one
hmm you got the "stargazer" count OK?
Hmm, interesting that yours is now working. I just pulled and built the
latest main (commit 9256e6b37)
and I still have nothing on the display when booting the Clue off a
battery, and running some
displayio code still produces nothing.
On Fri, Sep 11, 2020 at 10:54 AM jerryneedell notifications@github.com
wrote:
This issue appears to have been resolved -- at least, it works on my CLUE
now ... should this be closed?β
You are receiving this because you were mentioned.
Reply to ...
@solar whale I saw it (stargazer) work a couple of times I'm pretty sure, but then replaced the URLs with my own targets. I'll try again today.
@crimson ferry Thanks -- I was just not sure what to expect at this point. I'll keep playing with it as well.
@crimson ferry odd -- now the stargazer is working (takes several seconds) but its working.
I was trying it more and I'm getting that error now
I guess I passed it to you π
huh, now it's working
I feel much better now ...
I have it looping and it keeps working, weird
@solar whale @crimson ferry the github endpoint sometimes returns a chunked response
the adafruit_requests version I copied here may be older than my http11 branch which I think fixes it
@slender iron thanks - is the SSL handshake error expected?
I've seen it before but not sure why it happens
OK -- that's fair π fun to be an early adopter -- I'll keep poking at it.
thanks! which version of requests are you using?
@slender iron UART doesn't need bus_device does it?
nope because UART as we use it is just one device to another
Ok. Essentials guide says you need it for a UART example. I'll fix it.
thanks!
I'm getting modified: esp-idf (modified content) in my git status now that I've updated the esp-idf to the latest version on main. How do I get that to go away? updating the submodule doesn't seem to do anything
I usually do a βrecursive inside the esp-idf folder. Not sure if that is correct
That worked! I thought my shell alias had --recursive already though, hmm
I think the entire process with esp32 needs a bit better docs at some point. Most of what I do seems more like an incantation.
@slender iron I got a PR for esp32s2 safe_mode support
@onyx hinge might also want to have a look at it
I saw! Thank you! I'll look later today
sure...
@solar whale this is fun, to ping a named host wifi.radio.ping(ipaddress.ip_address(pool.getaddrinfo("dns.google.com", 443)[0][4][0]))
@supple gale if you think this is bad you should try installing Zephyr RTOS
that's a party
@onyx hinge what's the SD card SPI speed supposed to be? I see 163kHz, which seems a little arbitrary
There's a parameter for it in the constructor. ```adafruit_sdcard.py: def init(self, spi, cs, baudrate=1320000):
while for sdcardio sdcardio/SDCard.c: { MP_QSTR_baudrate, MP_ARG_INT, {.u_int = 8000000} },
163kHz doesn't seem right, unless you're using adafruit_sdcard and counting the byte time rather than the bit time
I'll be planting a couple of trees in honor of CircuitPython Day, as well as proposing the species Jacaranda mimosifolia as a Blinka Tree :)
https://diacircuitpython.org/blog/plantando-blinkas/
I thought I needed it to fix Logic picking up the signals with an analyzer, but it was actually confused about the clock signal idle level
My clock is pretty weird, it doesn't have any gaps. Wondering what's up with that...
@supple gale if you think this is bad you should try installing Zephyr RTOS
@ionic elk Quite true. Did that recently, and first time no go, wipe and try again and it works. Its amazing.
Nothing concrete. Will close.
@tannewt I was referring to our previous convo where you suggested thinking about how sensors libs should handle a restart, though in that context I think you were talking about waking up from a sleep that was entered for power saving purposes so I may have crossed the streams.
It sounds like this is a related but different issue as there are certainly use cases where you would want a complete reset, sensors included ie: running an app that wants different configurations for a sensor.
This could just be:
return format == IMAGEFORMAT_JPG;
Are you possibly limiting the size of the heap this way?
You could have port_heap_get_bottom() and port_heap_get_top() return the nearest 32-byte-aligned address (in the right direction) instead of allocating the heap as a fixed size.
Looks good! Just a few suggestions.
This could just be return length >= (size_t)(width * height * 2 / 9);
Is there a significant delay between starting the camera and being able to take a picture? I'm wondering why we can't just pass size into take_picture too.
//| :return: the number of bytes written into buf
Unfortunately I don't think this will do what you want necessarily because this heap region also contains supervisor allocations in addition to the MicroPython heap. Are you sure this is needed once the heap block size is set?
{ MP_ROM_QSTR(MP_QSTR_ImageFormat), MP_ROM_PTR(&camera_imageformat_type) },
I'd err on the side of caution and remove it. Instead document where to find it in the IDF and that the modification may be needed.
@tg-techie Has been interested in this as well.
needs to merge weblate PRs first
it just pushed another batch 2 minutes ago :/
ya, it does every PR merge I think
at least those that add messages
Try a file from here: espressif_saola_1_wrover.zip
The PR artifacts aren't available on S3.
This looks great! This essentially does match behavior of other ports already and this doesn't need to change.
We will need the soft reboot approach for other safe mode failures though.
2. From my understanding, no.
Ok, so this means we may want to think of it as a singleton like the BLE Adapter class.
I think we can handle writing by reading the buffer back. No need to do any fancy callback stuff.
The caveat is that An NDEF message can have 0 or more records of any types. Perhaps an
NDEFRecordobject that could describe what it is, and provide interfaces to get it's data as the applicable type? (I see that being an intuitive thing, but I don't know how un...
@slender iron @mental nexus thank you for tagging in the touch-extension issue. I have an assembly assignment to finish for class then i'll draft a response. I've spent some time on this problem and would love to provide whatever help I can.
no rush. just knew you'd have thoughts
- it is nRF52840-MDK https://github.com/makerdiary/nrf52840-mdk
- it dose not support it
3.`
Sep 11 20:04:36 ubuntu /usr/lib/gdm3/gdm-x-session[1819]: (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2.2/1-2.2:1.3/0003:239A:802A.000B/input/input44/event23"
Sep 11 20:04:36 ubuntu /usr/lib/gdm3/gdm-x-session[1819]: (II) XINPUT: Adding extended input device "makerdiary nRF52840-MDK Keyboard" (type: KEYBOARD, id 2...
i tried to build it myself and by this port
and after adding SoftDevice this is my problem
It would be best if you consulted with the MakerDiary folks about this. We accepted their board definition, but do not support it ourselves.
If you were using SoftDevice 7.x, try 6.1.1. They are different sizes and the build has to allow for that.
already tried to ask them for help, but they said it only REPL that is suppurated is it possible to upload a sketch, or to enable the drive ?
Any way to recover in code from a espidf.MemoryError: ?
YEEESSS this one is fully working on WROOM and 2MB free!
I don't see any speed difference compared to WROVER.
On 9/11/20, Scott Shawcroft notifications@github.com wrote:
Try a file from here:
espressif_saola_1_wrover.zipThe PR artifacts aren't available on S3.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
https://github.com...
@crimson ferry do you have concurrent sockets in use?
Strange syntax errors tend to happen when the host OS hasn't fully flushed it's writes to the filesystem.
OK!
I reloaded again and now it seems ok 64K buffer is working!
@slender iron I do get a new from the pool on some exceptions in my code. The Github main comment code (yours) does not do that, but some of the other errors could be related. Possibly also related... I noticed:```after many reloads...
cp mem free 1994912
idf total mem 157296
idf mem free 95760
idf largest block 65596
after a fresh power cycle...
cp mem free 1994912
idf total mem 157296
idf mem free 98964
idf largest block 98592```Not sure if there's any user code action to clean up IDF mem
I opened this after a brief discussion with @brentru about the Azure Iot Library supporting X509 based identification. It was Brent's suggestion that this would more likely be a CP library specific to the esp32s2 port than in the Azure IoT Library itself.
For additional context Azure IoT Device Provisioning Services(DPS) allows you to ship devices with Keys which are then used as Device IDs. Based on these Device IDs, DPS gives the device its name and its IoT Hub to which it connects and a...
largest block down 1/3
or there is a fixed overhead of having wifi on
hm, will test that
ya, fragmentation is a reality I think
idf largest block stays constant through connect and getting new session, drops a lot after some HTTP activity
should we be explicitly closing?
there is a lot that happens under the hood
you can try that but the finalizer should close when the object is cleaned up
ok, I'll keep at it
Regarding latest SPI, Is SD card supposed to work on WROVER?
I tried to mount SD card
import sdmount
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "sdmount.py", line 31, in <module>
File "adafruit_sdcard.py", line 116, in init
File "adafruit_sdcard.py", line 177, in _init_card
File "adafruit_sdcard.py", line 155, in _init_card
OSError: couldn't determine SD card version
If I remove SD card then it prints:
OSError: no SD card
You are the first to try. Please file a separate issue. This might be default speed related or the MOSI state.
@crimson ferry I just pushed a new version of requests
I think you are hitting a bug with http that I just fixed
actually just pushed
had only committed locally
Is SD card supposed to work on ESP32-S2 WROVER?
I pulled latest driver bundle and tried this example to mount
SD card:
https://github.com/emard/esp32ecp5/blob/master/circuitpython/sdmount.py
If SD card is inserted (it has FAT and old ESP32 non-S2 is able to mount),
then ESP32-S2 prints
Traceback (most recent call last):
File "", line 1, in
File "sdmount.py", line 31, in
File "adafruit_sdcard.py", line 116, in init
File "adafruit_sdcard.py", line 177, in _init_car...
@slender iron still get ```Traceback (most recent call last):
File "code.py", line 34, in <module>
File "/lib/adafruit_requests.py", line 507, in get
File "/lib/adafruit_requests.py", line 494, in request
File "/lib/adafruit_requests.py", line 102, in init
RuntimeError: Unable to read HTTP response.
(only changes to code.py are import secrets (adds two lines to line #s), and credentials)
this is after a hard reset
hrm
I can try latest S3, but it didn't look like any relevant changes
the native wifi stuff didn't change much
I wonder if it requires the hostname
and the esp32spi code requires the ip π
nope, not that
latest S3 6.0.0-alpha.3-180-g7611e71a1 on 2020-09-11, latest Requests, Discord code.py with my credentials: same RuntimeError: Unable to read HTTP response @ line 34: requests.get("http://wifitest.adafruit...
ya, the new requests doesn't work
looks
ya, I think socket recv_into isn't correct
0 means receive up to the size of the buffer
not a great api choice
@slender iron lmk when you've got a sec for an allocation q
shoot
dangit π€
basically: how can one clear a bytearray without wasting memory
I've got a big buffer I make on __init__ and need to clear out chunks before use
this works but causes an allocation, right?
self._ole_faithful[0:20] = bytearray(20)
and it slices
ok, that's about where I landed
you could get fancy and use a generator but I can't imagine it's faster than a loop
I got my simple wifi code updater working on the ESP32-S2. I'll clean it up and post it this weekend
@kind river Are you saying an over the air application code updater?
Yeah, it pulls files from a HTTP server on boot
It returned 0 when it should have filled the buffer.
Python reference: https://docs.python.org/3/library/socket.html#socket.socket.recv_into
@crimson ferry βοΈ
@kind river I love this idea !
@slender iron afk, will check after dinner
thanks!
@slender iron how much of a hack is it to keep an empty buffer around that I copy into the one that is used, replacing the right side in the example above
@idle wharf My ESP32_SPI version is at https://gist.github.com/ryang14/019c44bf6e155ec160f663df74473fca. I'll update the gist after I clean up the networkInit file abstraction so it can work with either depending on which networkInit is included
A singleton makes most sense to me. I suppose it's theoretical that a device could implement more than one NFC Tag, but that seems way out of scope for what CP looks to cover. I'm good with using the buffers as well for communication. Wouldn't be as "fully featured", but that's the kinda thing someone would probably be using their own stack for anyways.
For record types, I think the practical answer for now should be 5: Text, Uri, Application Launch, Connection handover [more on that much ...
@kind river very cool, i'll check it out
@pastel panther is the for loop too slow?
my guess is that it's only worth it if speed is critical
we usually prefer memory efficiency over performance
right
@jepler to be clear, the nRF24L01 hardware actually ignores MOSI after the first byte. I wrote that code when I was just starting out with CircuitPython in an effort to better familiarize myself with SPI transactions. Using spi.write_readinto() works just as well in regards to the nRF24L01 transceiver.
I've been slowly optimizing the nrf24l01 library, and I inadvertently already replaced the spi.readinto() calls with spi.write_readinto() calls (a while ago). Now I have a reason to expedite debugging my lite-beta branch for a new release.
@hierophect I don't own a STM32F405 Feather, so I'm depending on @water5 to test my changes on that board. Initial tests of my changes work well with the nRF24L01 transceiver, althou...
Tested on Saola-R with latest Requests.
This change fixes the RuntimeError: Unable to read HTTP response. in Requests.
Yes, for other safe mode failures soft reboot approach is needed.
Also, I get weird text formatting issues when using screen utility as my serial console.

@slender iron your online time
seems to coincide with my sleep time π΄ so can only have discussion during early morning or late night
that said should I mark the safe mode PR ready for review or also add the soft reboot approach ?
@analog bridge mark it ready. If you ever want to plan a time to chat Iβm happy to. Iβm in seattle so pacific time
quick q.
if I had two versions of python on my laptop would that screw with things?
@water5 has notified me that my changes (replacing readinto() with write_readinto()) are working on the STM32F405 Feather. This issue can be closed. THANK YOU everyone for your help. Go Team!
after a bit of research, how do i config this board to use its internal memory ? and not the flash chip on board ?
This looks great! This essentially does match behavior of other ports already and this doesn't need to change.
We will need the soft reboot approach for other safe mode failures though.
@idle spindle It could. It just depends what else is going on within the system and what things are relying on python. Look up Python "Virtual Environments" to find one tool that is designed to solve that particular problem of using multiple versions of python within the same computer.
@jepler @tannewt
FYI.
I was doing a similar experiment and found choosing longer patterns could save more bytes.
https://gist.github.com/ciscorn/915ef9970c1b7f662af33e7679e4efba#file-results-txt
The computational cost for finding frequent patterns may be a bit high.
I have no time and skill to implement this in C.
Current Status:
soft rebootapproach is not yet implemented,
some core functions need to be updated before it can be properly implemented.
What changed:
(since last review)
- A fall-through reason was added in case
BOARD_USER_SAFE_MODE_ACTIONis not defined in the board specific config file. - There was a text formatting issue which I traced back to
serial_write("\n"), it advances a line but doesn't set the cursor to the beginning of the next line. Fixed.
_Th...
@ciscorn wow that looks like another amazing improvement.
@ciscorn if you can code up the Python-side decompression part, I'll take a stab at translating it to "C". I'm not sure I immediately understood all that is going on.
I'm having a a hard time reading your screenshot. Make sure you update the git submodules if you've pulled recently. Yes, copy the config from the pca10059 or similar board.
what version of the gcc-arm compiler is suggested for building circuitpython and the related bootloaders?
This issue come from when I test nRF24L01 library , that library improved now, reason is: #3176
Thanks jepler remind : "This does not presently work on stm32's implementation of spi in circuitpython (arbitrary/uncontrolled data is sent instead)."
Thanks all participants.
Massive savings. Thanks so much @ciscorn for providing the initial code for choosing the dictionary.
This adds a bit of time to the build, both to find the dictionarybut also because (for reasons I don't fully understand), the binary search in the compress() function no longer worked and had to be replaced with a linear search.
I think this is because the intended invariant is that for codebook entries that encode to the same number of bits, the entries are ordered in ascending value. ...
@marble hornet I am not 100% certain but I think that 9-2019-q4-major version is still the suggested version (it's what is listed in the building CP guide). But I believe there has been some folks recently (Scott maybe?) that started using version 10 something.
There are still some issues with gcc 10
iirc he switched to a version of Arch linux or something where gcc 10 was the one available by default
at least for SAMD51 builds
thank you! I'm hunting down an issue in build the nrf bootloader and wanted to make sure it wasn't my installation of gcc
if either of you are near a terminal could I please ask for a small favor?
I am and yes
can you run
echo $GIT_VERSION
please
and post what you get
i've been getting an empty variable:
jonahym@Jonahs-MacBook-Pro Adafruit_nRF52_Bootloader % echo $GIT_VERSION
jonahym@Jonahs-MacBook-Pro Adafruit_nRF52_Bootloader %
printed nothing for me:
~/circuitpython_me_edited$ echo $GIT_VERSION
~/circuitpython_me_edited$
have you tried building the nrf bootloader(https://github.com/adafruit/Adafruit_nRF52_Bootloader) before?
~/circuitpython_me_edited$ git --version
git version 2.20.1
I haven't. I don't think I've built any of the bootloaders
thank you, one last question. are you on a mac or gnu+linux box? (i presume that terminal is not windows)
@marble hornet https://github.com/adafruit/Adafruit_nRF52_Bootloader/blob/master/.github/workflows/githubci.yml#L30
a specifc version of gcc is installed using a tool I'm not familiar with, xpm xpm install --global @xpack-dev-tools/arm-none-eabi-gcc@9.3.1-1.1.1
xpm seems to be a package manager in javascript for managing non-javascript packages.
I ran it on a debian VM that is running in virtual box on Win7
https://github.com/adafruit/circuitpython/blob/main/.github/workflows/build.yml#L328 for circuitpython we use gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2
I find it's always helpful to refer to the CI scripts to determine exactly what is "correct", rather than relying on crowd wisdom. Also remember to check out the files in the specific branch you're building; it could be different for 5.3 vs main, for example
except for the build that creates the mac static version of mpy-cross, it's a safe base assumption that the canonical environment for building circuitpython or the bootloaders is a linux system, probably an ubuntu lts system 14.04, 16.04, or 20.04. Again, checking the CI scripts is going to get you the truth of the matter.
as for the compiler for the nrf bootloader, looks like they have bins for darwin (mac), linux, and windows (says win32 but who does win32 these days? surely it's 64 bit software inside)
thank you, i'm running on a but of an outdated compiler but i think the issue is related to something else.
when I built an nrf bootloader locally recently, it didn't work. I am pretty sure the code was just too big for the segment of flash dedicated to it
when I downloaded a prefab one it was fine
I've been having trouble getting it to build. the nrf build scripts require a environment variable 'GIT_VERSION' but mine is an empty-string when it seems lie it should be a dot separated number. and google doesn't seem to have many answers about GIT_VERSION. may i ask what your echo $GIT_VERSION prints?
nothing.
Makefile:GIT_VERSION = $(shell git describe --dirty --always --tags) In the context of the build, GIT_VERSION will be assigned a value by running 'git describe'. This assumes the build is taking place in a tree that is managed by git, not e.g., by a source code zip from a release on github
however, GIT_VERSION would not be set just in a regular shell/terminal session
Ah, the version I downloaded is different. Give me one mo to find it
I'm looking at https://github.com/adafruit/Adafruit_nRF52_Bootloader -- I have an old clone which seems to be behind the times so some of the information I stated based on information in my working files may be incorrect
GIT_VERSION != git describe --dirty --always --tags
Does anyone know where to find or have a copy available of the pre-loaded "demo" script that comes on the Circuit Playground Bluefruit? Often times I find them in the downloads section of the primary product guide. But not seeing it listed for that device.
on line 25 of the MAKEFILE
@marble hornet I was just able to build the feather-nrf52840_express bootlaoder
I: During build, GIT_VERSION set to 0.2.11-9-g661827c-dirty
I: During build, GIT_SUBMODULE_VERSIONS set to lib/nrfx (v1.1.0-1-g096e770) lib/tinyusb (0.5.0~48)
``` after changing the build process to print the information: ```diff --git a/Makefile b/Makefile
index 55082e4..d198eba 100644
--- a/Makefile
+++ b/Makefile
@@ -26,7 +26,9 @@ LD_FILE = $(SRC_PATH)/linker/$(SD_NAME)_v$(word 1, $(subst ., ,$(SD_VERSION
MERGED_FNAME = $(OUTPUT_FILENAME)_$(SD_NAME)_$(SD_VERSION)
GIT_VERSION = $(shell git describe --dirty --always --tags)
+$(info I: During build, GIT_VERSION set to $(GIT_VERSION))
GIT_SUBMODULE_VERSIONS = $(shell git submodule status | cut -d' ' -f3,4 | paste -s -d" " -)
+$(info I: During build, GIT_SUBMODULE_VERSIONS set to $(GIT_SUBMODULE_VERSIONS))
OUTPUT_FILENAME = $(BOARD)_bootloader-$(GIT_VERSION)
I don't know if the resulting bootloader files work, but I also don't have the same gcc that the CI process uses.
29044 348 22258 51650 c9c2 _build-feather_nrf52840_express/feather_nrf52840_express_bootloader-0.2.11-9-g661827c-dirty-nosd.out
@solar whale what branch? and when did you clone it?
and i'll try changing that line to what you have , jeff
I did not have to make any changes
ah it's working. and i;m on macos 10.15.6 (19G2021)
ah -- same issue on Mac
I think you want to invoke make with something like: make BOARD=feather_nrf52840_express genhex genpkg one or both depending which kind of file you want (hex or zip)
agreed, it may be a mac thing. since changing line 25 works with the assignment being = $(shell <...>) and not != <...>
what version of make do you have installed? i have GNU Make 3.81
same on MAc -- on Linux it is 4.2.1
disregard what I said about genhex/genpkg
@lone axle do you want the as-shipped .uf2? I have that
yeah that would be great
I am trying to record a video of the "out of box" setup process. but mine already has Circuit Python loaded
@solar whale if you change line 25 to GIT_VERSION = $(shell git describe --dirty --always --tags) does your macos build work?
be just a few minutes
ah you weren't making some kind of typo when you said !=. ``` For the shell assignment operator, '!=', the right-hand side is
evaluated immediately and handed to the shell. The result is stored in
the variable named on the left, and that variable becomes a simple
variable (and will thus be re-evaluated on each reference).
"!=" was added in GNU make 4.0, released in 2013.
CPB as -shipped
Because Apple chooses not to include software licensed as GPLv3 in the base systems, they use very old versions of a lot of GNU tools. You may be able to get newer versions with brew, but that's speculation, as I have never owened/used a mac
I'm following https://ninenines.eu/docs/en/cowboy/2.0/guide/getting_started/
which requires make. When I run the install scripts, the prompt tells me to use make 4.1 . I run brew install erlang git
Thank you! @solar whale
@marble hornet it fails at ```LD feather_nrf52840_express_bootloader-0.3.2-165-g35e8ad9-dirty.out
text data bss dec hex filename
31356 1572 22618 55546 d8fa _build/build-feather_nrf52840_express/feather_nrf52840_express_bootloader-0.3.2-165-g35e8ad9-dirty.out
Create feather_nrf52840_express_bootloader-0.3.2-165-g35e8ad9-dirty.hex
Create feather_nrf52840_express_bootloader-0.3.2-165-g35e8ad9-dirty-nosd.hex
Traceback (most recent call last):
File "tools/hexmerge.py", line 178, in <module>
sys.exit(main())
File "tools/hexmerge.py", line 139, in main
import intelhex
ModuleNotFoundError: No module named 'intelhex'
make: *** [_build/build-feather_nrf52840_express/feather_nrf52840_express_bootloader-0.3.2-165-g35e8ad9-dirty-nosd.hex] Error 1
[Jerry-desktop-mini:~/projects/adafruit_github/Adafruit_nRF52_Bootloader] jerryneedell%
I have not built built it before on my MAc so may be missing something
python3 -mpip install intelhex
or whatever general incantation you use to install python packages
.github/workflows/githubci.yml: pip3 install adafruit-nrfutil uritemplate requests intelhex
I wanted to use Debouncer library on the Touchio interface from a PyRuler.
I was lost between a guide saying it is easy but not giving an example ( https://learn.adafruit.com/debouncer-library-python-circuitpython-buttons-sensors/advanced-debouncing ) and a Pull request that seems to make the guide obsolete ( https://github.com/adafruit/Adafruit_CircuitPython_Debouncer/pull/8 ).
So after abandonning my unecessary fight to use lambda function, I was hitting an error:
'''
File "adafruit_debouncer.py", line 112, in update
NotImplementedError: No long integer support
'''
That line 112 problem is not due to my code... but this line:
now_ticks = MONOTONIC_TICKS()
My current believe is that long integer has been removed to save space on M0, but it has impact on the use of time.monotonic_ns (or time.monotonic).
Any hint on where the problem is? Should Debouncer library be fixed?
Starting from what version did I loose long integer?
π also need adafruti-nrfutil --- works now!
thank you
My code is working if I don't try to use a nice debouncer: https://twitter.com/DavidGlaude/status/1304556043465351169?s=20
New long awaited feature in the next @CircuitPython firmware: reading USB HID report.
You can now read the state of NUM, CAPS and SCROLL LOCK.
Here using @adafruit PyRuler to display the status LED, but that can also change it.
Source code: https://t.co/YfskzlCUV0 https://t...
I'll put it in the running issue for this build problem.
@thorny jay LED animation library provides this code as a workaround for boards without monotonic_ns, but I am not sure what platform(s) it works on. https://github.com/adafruit/Adafruit_CircuitPython_LED_Animation/blob/master/adafruit_led_animation/__init__.py#L36
and my I call you the names in your usernames? ie do you mind 'Jeff' and 'Jerry' respectively?
If you're writing on github then I am @jepler
Not at all! What would you prefer to be called?
on github, I am "jerryneedell"
but I respond to most anything π
with respect to timekeeping, competing factors put us in a bind. monotonic_ns is untenable without long int because it overflows within seconds of boot without long ints, montonic returns floats which have precision limitations, and nothing else is compatible with the dekstop Python3 standard library.
(but yeah you can call me Jeff anytime)
something like microcontroller.monotonic_ms_wrapped() which is always modulo sys.maxsize should be possible on any platform but it would not be standard. (I think it wraps about every 12.4 days) It might be time to make the case for it, now that we have seen the pain that comes from the currnetly available APIs
Thank you Jeff and Jerry for all the help and time, it is really appreciated.
I'm @marble hornet on most platforms (- or _ depending)
but I'm usually called Jonah, I will respond to either
(also the value for monotonic_ms_wrapped should start about 30s from its first overflow so that people write their code in a way that works right when wraps actually do occur πΉ )

handy ?