#circuitpython-dev

1 messages ยท Page 373 of 1

tulip sleet
#

I wish the supervisor storage allocator had more mechanism to copy things in and out of the heap. I did this tricky thing for USB where I store some data temporarily on the stack in main.c to keep it between VM instanatiations. I didn't realize intially that the supervisor allocator didn't work when a VM was running.

ionic elk
#

also @tulip sleet you have time to take another look at the sleep API updates again? They're all set to go I think

tulip sleet
#

yes, I should be able to. I was looking for unreviewed PR's this morning, but I may have missed them.

manic glacierBOT
#

The actual example is significantly longer, but I narrowed it down to the following 10 lines of code to reproduce it. Tested on two different NeoKey Trinkeys running the same firmware.

Limor reported that the original example worked fine a few weeks ago. (If I change the setup order, it works now.)

Firmware

Adafruit CircuitPython 7.0.0-alpha.2-610-g7511e1c78 on 2021-05-20; Adafruit NeoKey Trinkey M0 with samd21e18

Code/REPL

import board
impor...
digital ibex
slender iron
#

are you talking about the boochow repo? its probably better as a reference

digital ibex
#

Oops! Wrong link, let me edit

slender iron
#

@crude blaze has been thinking about circuitpython on rpi too

digital ibex
#

The boochow repo is out-of-date. The one I have in my post seems to work better

manic glacierBOT
slender iron
#

ah, I haven't seen that one

digital ibex
#

I found it in the PRs; it's just a fork

slender iron
#

I don't have good guidance on where to start. starting a new port is tricky

#

timon just asked me about it too so you should definitely coordinate

#

some of my deep dives might be best. this is the first rp2040 one: https://www.youtube.com/watch?v=LXAwW2IYT7o&list=PLjF7R1fz_OOXBHlu9msoXq2jQN4JpCk8A&index=17&t=3s

Iโ€™m sponsored by Adafruit to work on CircuitPython. Support them, and by extension me, by purchasing hardware from https://adafruit.com

Chat with me and lot of others on the Adafruit Discord at https://adafru.it/discord.
Deep Dive happens every week. Normally Fridays at 2pm Pacific but occasionally shifted to Thursday at 2pm. Typically goes for...

โ–ถ Play video
#

Watch as Scott tries out the latest version of TinyUSB on the brand new ESP32-S2. Hang in there through the bumps and crashes to see it work! Then, Scott goes over things to think about when bringing CircuitPython to the ESP32-S2.

Visit the Adafruit shop online - http://www.adafruit.com


LIVE CHAT IS ...

โ–ถ Play video
digital ibex
#

Thanks!

slender iron
orchid basinBOT
#

Bumps nokogiri from 1.11.3 to 1.11.5.

Release notes
Sourced from nokogiri's releases.

1.11.5 / 2021-05-19
Fixed
[Windows CRuby] Work around segfault at process exit on Windows when using libxml2 system DLLs.
libxml 2.9.12 introduced new behavior to avoid memory leaks when unloading libxml2 shared libraries (see libxml/!66). Early testing caught this segfault on non-Windows platforms (see #2059 and libxml@956534e) but it was incompletely fixed and...

ionic elk
#

I don't suppose anyone might have a handy little applescript for deleting the constant, non-expiring deluge of notifications macOS Big Sur gives you when unplugging a circuitpython device?

#

at least on High Sierra they'd expire, now they fill up half my screen until I manually close them all

storm minnow
#

^^^ that's a fix :D

ionic elk
#

AWESOME THANK YOU :DDDD

storm minnow
#

No problem ^_^

ionic elk
#

IT WORKS THANK YOU

storm minnow
ionic elk
#

oh man that was driving me nuts, it was making me regret moving to big sur

#

thank god for pb

#

what a champ

storm minnow
#

I was having that happen on my High Sierra machine

ionic elk
#

I don't remember them sticking around on high sierra?

storm minnow
#

Maybe mine is weird? I have sticky notifications on my Catalina machine too

#

Some are sticky, some aren't

ionic elk
#

i mean terrible design by apple in any case

storm minnow
#

Yeah, it should stick around for a bit, then hide where I can find it

crude blaze
#

Pi4 has a couple changes to the peripherals but nothing drastic

manic glacierBOT
#

Before, these would cause a board reset:

>>> import ipaddress
>>> ipaddress.IPv4Address(0x08080808)
>>> import ipaddress
>>> ipaddress.IPv4Address("8.8.8.8")

After:

>>> import ipaddress
>>> ipaddress.IPv4Address(0x08080808)
8.8.8.8
>>> ipaddress.IPv4Address("8.8.8.8")
8.8.8.8

Also a fix in the error message for ipaddress.ip_address, since this works:

>>> import ipaddress
>>> ipaddress.ip_address("8.8.8.8")
8.8.8.8

Note: `ipaddre...

crimson ferry
storm minnow
#

Oof

crimson ferry
#

can't even multi-select in that list to delete

storm minnow
#

I'm not familiar enough with the Apple Dark Arts to know what to do for that

manic glacierBOT
#

When I was working on ParallelBus for RP2040 I ran into a speed problem as well, and could not find any limitation in the product sheets for the displays so I'm not really sure. I found the same thing @kmatch98 has that the ESP32S2 supports SPI at 80Mhz. And I'm at a loss (or missed something) as to why the M4 Hallowing seems okay with 60Mhz.

I do know the official ESP32S2 Arduino library has SPI default to 1 Mhz and that is what the displays will start as.

I would suggest submit a PR l...

jaunty juniper
#

well that didn't work

$ networksetup -removenetworkservice MagTag
You cannot remove MagTag because there aren't any other network services on MagTag.
jaunty juniper
#

ok now I need to make a script that edits /Library/Preferences/SystemConfiguration/preferences.plist

crude blaze
#

so I'm poking about with getting stuff compiled using the MPY port for the RPI and the only remaining error I have right now is this odd one coming from the core:
root@timon-pc:/mnt/f/circuitpython/ports/broadcom# make MICROPY_MOUNT_SD_CARD=1 Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity. ../../py/moduerrno.c: In function 'mp_common_errno_to_str': ../../py/moduerrno.c:140:14: error: 'EPERM' undeclared (first use in this function); did you mean 'MP_EPERM'? 140 | case EPERM: | ^~~~~ | MP_EPERM ../../py/moduerrno.c:140:14: note: each undeclared identifier is reported only once for each function it appears in ../../py/moduerrno.c:143:14: error: 'ENOENT' undeclared (first use in this function); did you mean 'MP_ENOENT'? 143 | case ENOENT: | ^~~~~~ | MP_ENOENT
and a bunch more from that switch statement.
I can compile atmel-samd just fine, only happens with the frankenstein ports folder I made

slender iron
#

maybe an include is wrong?

#

you could probably turn that module off for now

ember iris
#

When pushed to mpy, code comments are stripped--so I can be verbose in them and not worry about space, right?

tulip sleet
#

right

crude blaze
slender iron
#

there may be a micropy version

jaunty juniper
#

it's a python script that takes the file containing the annoying services and removes the ones that are created for Circuitpython serial ports, the file then has to be copied back with a sudo (the comment in the scripts has more info)

manic glacierBOT
#

This all may not be new info, but... my understanding is that setting and checking SPI frequency has no effect unless you do it within the context of the object. For example, you can check actual ESP32SPI speed with:

with esp._spi_device as espspi:
    print('{:,}'.format(espspi.frequency), "Hz")

But Fourwire has no such method that I know of. I get no immediate error setting it to 80MHz. Default looks to be 24MHz:
https://github.com/adafruit/circuitpython/blob/f5aa55c247561e380...

crimson ferry
jaunty juniper
#

ah right of course !

#

every rule has exceptions

crimson ferry
#

I'll reboot in a few weeks and see if it sticks (re: comments in the code)

jaunty juniper
manic glacierBOT
#

This is a workaround to eliminate the display glitch reported in: https://github.com/adafruit/circuitpython/issues/4775

This PR reduces the display SPI speed from 60 MHz to 5 MHz.

(Note: Not sure if this is a workaround or a fix, since it is currently unclear why the display glitches occur at higher SPI speeds. The same glitches occurred on ILI9341- and ST7789- driver displays. Perhaps this is an issue with the ESP32-S2 SPI timings at higher speeds.)

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Affects all versions of CircuitPython, all architectures.

The approach currently used for scaling ADC inputs to 16-bit range never actually reaches 65535. For example, the oft-seen Python snippet:
coefficient = adc.value / 65535
will never return 1.0 under any circumstance.

There are two ways this might be corrected: fix the conversion (which might break or alter existing code behavior), or provide a constant that can be used for division to correctly attain 0.0 to 1.0 range.

R...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Here's a quick first look at what it might take to split out the sending of "setup" vs "bulk data" with different speeds.

Data is sent to the display using a structure displayio_display_core_t with a begin_transaction function. Currently, the same begin_transaction function is used for both "setup" and "bulk graphic data" ([for bulk graphic pixel data see Display.c _send_pixels](https://github.com/adafruit/circuitpython/blob/3bcbf2bdbbfee1a0835a2213740ca70959b3efcb/shared-module/d...

manic glacierBOT
#

I tried this on a Rotary Trinkey pretending to be a NeoKey Trinkey, and it did not crash. My lib/ directory is completely empty, so I am using all the frozen versions, and using _pypixelbuf.

Adafruit CircuitPython 7.0.0-alpha.2-628-g9a7a2bb27-dirty on 2021-05-21; Adafruit NeoKey Trinkey M0 with samd21e18
>>> import board
>>> import neopixel
>>> import usb_hid
>>> from adafruit_hid.keyboard import Keyboard
>>> from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS
>>> 
...
idle owl
#

@slender iron Do you need that tested on more than the Itsy RP2040? Safe mode works as expected there.

manic glacierBOT
#

I think having two baudrates would be the best fix for this (and 7.x is a good time to do it!). data_baudrate and command_baudrate could provide two knobs and baudrate could set both and be deprecated in 7.x.

command vs data is given with display_byte_type_t to send. the configure line should be moved from begin_transaction to send so it can change the speeds for each.

idle owl
#

I entered Hello World! into a MacOS terminal, and it returned, The number is 23.

silver tapir
#

In this message, what does 'raw' mean? Or another way of asking would be, why not just 'int' instead of raw int.
Only raw int or string supported for ip

jaunty juniper
#

good question ๐Ÿค”

silver tapir
jaunty juniper
#

I think it's intended to mean an actual int as opposed to bytes([a,b,c,d]) ?

#

I don't know

slender iron
idle owl
storm minnow
idle owl
#

It was a complete coincidence I did it, I have a NeoKey Trinkey setup as an HID device and that's the string it sends. I've been doing it into an editor this whole time, but had the terminal up, so I made a new window and clicked it.

#

ยฏ_(ใƒ„)_/ยฏ

storm minnow
#

Some of the best discoveries in history have been accidental XD

still zephyr
#

๐Ÿ˜ฎ 23 was my student class number last year of school. @idle owl question, what should I do with my own old PRs?

idle owl
still zephyr
#

Ok thanks will do ๐Ÿ™‚

#

@slender iron do you have a minutes for two questions?

cobalt grail
still zephyr
#

unsigned?

jaunty juniper
#

the original message was Only raw int supported for ip I just added strings without thinking what raw int means

cobalt grail
#

Unclear to me, it uses mp_obj_get_int_maybe to check.

still zephyr
#

do ips accepts hex or binary?

jaunty juniper
#

the code structure makes the exception be where another code takes an array of bytes

#

we could just drop the "raw" from the message honestly

cobalt grail
still zephyr
#

I have never heard of raw int in python but, now that you mentioned the only application is when converting from signed binary to int

manic glacierBOT
cobalt grail
#

OK, just hoping I didn't screw up the pull request. I am a GIT newbie. ๐Ÿ˜ฌ

idle owl
#

So really close!

#

I'll leave a review.

manic glacierBOT
cobalt grail
#

Argh.

idle owl
#

They're sneaky.

cobalt grail
#

Yeah, never used submodules before. Will have a look later then.

jaunty juniper
#

you git rebase main and git submodule sync --quiet --recursive; git submodule update --init and that should clear the things up

cobalt grail
#

Oh, how very very logical. And intuitive. ๐Ÿ˜ (Thanks)

jaunty juniper
#

unless git does git thing

idle owl
#

Haha

#

True.

jaunty juniper
#

and make translate and like git push -f fork or something

#

I made a gitsubupdate alias ๐Ÿ˜‰

idle owl
#

Same

cobalt grail
#

Yeah, I just made a pull from adafruit remote, changed one line and did a git add .

jaunty juniper
#

maybe it should be a post-pull action

cobalt grail
#

I guess the add . added stuff I wasn't aware of.

jaunty juniper
#

to quote Scott: always git status ๐Ÿ˜‰

#

(I have a alias st="git status --short --branch" ๐Ÿ˜‰ )

#

(also a git config where git st is that too, I kind of have aliases everywhere)

idle owl
#

I wanted to call one of the pages in my Git/GitHub guide "Status, Add, Status, Commit, Status, Push" but it was too long of a title. ๐Ÿ˜„

cobalt grail
#

alias git="prettyplease"

#

The precommit checks are neat though. I did remember I should run some translation cammand, but couldn't remember what. And the precommit just told me.

tulip sleet
#

@idle owl I fixed the usb_hid bug but now I am getting ValueError: NEOPIXEL in use on your test code when it runs a second time after ctrl-D. I think that's a completely different bug, maybe having to do with the new status stuff

idle owl
tulip sleet
#

yeah, i will simplify it

idle owl
#

Yeah.

manic glacierBOT
idle owl
#

@tulip sleet I'm not sure CI will complete in time for me to test it today. So either it waits until Monday, you give me a build for NeoKey Trinkey, or somebody else tests it. All fine options, simply letting you know.

tulip sleet
#

something is wrong at the moment, so don't worry about it

idle owl
#

Ok. Also a valid option.

tulip sleet
#

it was working and then it stopped workign ๐Ÿ˜ฆ

idle owl
#

Aw.

manic glacierBOT
ornate breach
#

sorry didn't get my whole message out

#

I'm trying to build a binary bootloader for the samd21g17a but keep getting a divide by 0 error on build

#

might be better for projects channel

tulip sleet
#

here is ok. there may not be enough ram/flash for what you want to do

ornate breach
ornate breach
#

do you know where the stack size is defined where i could change it specifically for this branch?

ornate breach
#

figured it out and it built but it didn't end up working out. Thanks for the help Dan ๐Ÿ™‚

slender iron
#

@still zephyr back now

manic glacierBOT
manic glacierBOT
manic glacierBOT
crimson ferry
tulip sleet
crimson ferry
tulip sleet
jaunty juniper
#

ok, so I get the NEOPIXEL_POWER in use error back with main, even though I didn't have it when testing the status LED PR before merging ๐Ÿค”

#

ah wait I'm being confused by git I think

storm minnow
#

Can I, someone incredibly new to CircuitPython, possibly help test CP 7? Or do I need to actually know what I'm doing?

slender iron
#

it's not too bad. you could use it

storm minnow
#

Giving it a go!

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Is there any good way to reduce the startup time of circuityython?
The current deep sleep wake-up takes 4 seconds to enter code.py.

This will consume a lot of power in the actual low-power scenario, and the wake-up time is too long, and the experience is not good.

I tried to use only esp32sdk instead of circuitpython; This time will be reduced to less than one second.

Is there any way๏ผŸ

cobalt grail
#

Well. I'll just give up and start from scratch.

cobalt grail
#

Ok, this looks much better, right?

#

Also; I do not like GIT. ๐Ÿ˜›

manic glacierBOT
manic glacierBOT
#

The current code does not enter true deep sleep if you are connected to a host computer. The idea is to allow you debug a deep-sleep program and not get stuck in an infinite deep sleep loop, where you cannot edit your code, since USB would be disabled during a deep sleep.

However, it can take several seconds for the USB negotiations to finish, so we wait up to 5 seconds to see if USB is really connected.

The issue of being locked out from code changes happened to me personally a number ...

#

If you are going to be in mass production, then it might make sense to make your own build of CircuitPython.

The delay is here:
https://github.com/adafruit/circuitpython/blob/20946d97a1be97e07fb9dfc42fa5f07395aa1e54/main.c#L425-L452.

If you want to shorten the delay, you can change the value conditonally defined her by defining in it ports/esp32/boards/<yourboard>/mpconfigboard.h.
https://github.com/adafruit/circuitpython/blob/20946d97a1be97e07fb9dfc42fa5f07395aa1e54/py/circuitpy_mp...

manic glacierBOT
#
[adafruit/circuitpython] New branch created: BlitzCityDIY\-main
main furnace
#

If I want audiomixer on the Feather RP2040 do I just need to build a custom .UF2?

blissful pollen
main furnace
manic glacierBOT
#

example of displaying gyro data on oled

import time
import board
import displayio
import terminalio
from adafruit_display_text import label
import adafruit_displayio_ssd1306
from adafruit_lsm6ds.lsm6dsox import LSM6DSOX

displayio.release_displays()
i2c = board.I2C()
display_bus = displayio.I2CDisplay(i2c, device_address=0x3D, reset=None)
display = adafruit_displayio_ssd1306.SSD1306(display_bus, width=128, height=64)

sensor = LSM6DSOX(i2c)

while True:
    print("Acc:...
main furnace
#

Okay I do see audiomixer in Adafruit CircuitPython 7.0.0-alpha.2-639-g20946d97a on 2021-05-21; Raspberry Pi Pico with rp2040

#

Looks like I'm upgrading to 7.0.0 ๐Ÿ˜„

blissful pollen
storm minnow
#

So I put the latest CP 7 build and latest CLUE lib file from the GitHub CP 7 lib bundle, getting an incompatibility error -- is the bundle not updated for the absolute latest CP 7 build?

blissful pollen
#

Or you can get the mpy compiler working

jaunty juniper
#

no they are

tulip sleet
#

Make sure you don't have a duplicate older copy of the library someplace other than /lib. If there is a .mpy version in / instead of /lib, it will get run instead of what is in /lib

jaunty juniper
#

and it's adafruit-circuitpython-bundle-7.x-mpy-20210522.zip from https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/tag/20210522 you want

blissful pollen
#

Oh thanks, I see them now. Never thought to look there (or looked too hard)

jaunty juniper
#

by the way I'm looking into circup not finding the version number in CP7 mpy files and also consider MPY files with a version that does not match the CP version as out-of-date (maybe with a harsher message "you have to update")

stiff pelican
storm minnow
#

Yeah, looks like I have the right files? UF2 from the S3 bucket

#

Confirmed only the one lib file

#

Some files on the CLUE think they're 22 years old -- could that indicate something going on with the file system?

main furnace
#

Updated RP2040 Pico to 7.0.0 alpha, libraries from the 7.x bundle. All ๐Ÿ˜„.

stiff pelican
manic glacierBOT
#

example code for wifi connectivy

import time
import board
import busio
from digitalio import DigitalInOut
import adafruit_requests as requests
import adafruit_esp32spi.adafruit_esp32spi_socket as socket
from adafruit_esp32spi import adafruit_esp32spi
import displayio
import terminalio
from adafruit_display_text import label
import adafruit_displayio_ssd1306
from adafruit_bitmap_font import bitmap_font

displayio.release_displays()
i2c = board.I2C()
display_bus = display...
tulip sleet
#

well, it was easy, and if I do it right away, then it's done

storm minnow
#

So I realized I did NOT have the absolute latest, had yesterday's build, but same error. So should it work, or do I need to learn to build my own .mpy file?

tulip sleet
#

you also need to replace the libraries that the CLUE library depends on; did you update all the libraries?

storm minnow
#

Yeah, had updated to the one from adafruit-circuitpython-bundle-7.x-mpy-20210522.zip

tulip sleet
#

I mean that the CLUE library also imports these libraries:

import neopixel
import adafruit_apds9960.apds9960
import adafruit_bmp280
import adafruit_lis3mdl
import adafruit_lsm6ds.lsm6ds33
import adafruit_sht31d
#

which in turn may import some other libraries like the adafruit_register library. So did you clean out lib and update them all?

storm minnow
#

Oh, I didn't know it had dependancies

#

Oh, wait, it hadn't actually copied over... I deleted it and copied again, now it prompts for the neopixel library. And then I noticed this window was basically entirely off the screen:

#

Thanks for hiding that, Apple

#

Ok, copied everything over, working perfectly. Thanks for making me think to recheck that it was using the right thing!

lone sandalBOT
silver blaze
#

So, who do I talk to about some docs?
https://circuitpython.readthedocs.io/en/latest/shared-bindings/support_matrix.html
I've landed on this page a few times, trying to "pick" a board based on supported features. I feel it's more practical to check if circuitpython supports module A on board X, because even if the device has the hardware, if circuitpython doesn't support it... well it doesn't do me much good.

While totally functional, I wanted to see what I could do to make that page more awesomer. I don't want to promise anything, and I don't know the capabilities of Sphinx, so I figured I'd start by building the docs locally but I'm running into trouble fresh out the gate.

So far:

  • pulled master from adafruit/circuitpython
  • install dependencies like the docs say:
pip install sphinx
pip install recommonmark
pip install sphinx_rtd_theme
  • run make html
  • install dependencies the docs don't say, isort, black
  • run make install a third time, and get this:
circuitpython-stubs/_bleio/__init__.pyi
circuitpython-stubs/_eve/__init__.pyi
-- truncated for brevity, let me know if useful --
circuitpython-stubs/vectorio/__init__.pyi
circuitpython-stubs/watchdog/__init__.pyi
circuitpython-stubs/wifi/__init__.pyi
circuitpython-stubs/wiznet/__init__.pyi
Parsing .pyi files: 0 failed, 76 passed
Traceback (most recent call last):
  File "/Users/rhatfield/code/github.com/adafruit/circuitpython/tools/extract_pyi.py", line 270, in <module>
    (ok, total) = convert_folder(top_level, stub_directory)
  File "/Users/rhatfield/code/github.com/adafruit/circuitpython/tools/extract_pyi.py", line 170, in convert_folder
    filenames = sorted(os.listdir(top_level))
  • with exit code 2 and no _build directory to be found.

Any ideas?

jaunty juniper
#

it might help, possibly

#

(pip -r requirements.txt)

#

and then there's the issue with click not updating to the right version we keep having, but I don't know if that affects building the documentation (pip install click==7.1.2)

silver blaze
#

OK, well I might make a PR adding python -m pip install -r requirements.txt somewhere useful.

jaunty juniper
#

requirements.txt is a python thing, and it is mentioned in the learn guide, but if you have enhancements for the documentation, please open a PR or an issue

silver blaze
#

So is that one of those habits? pull python repo, run pip -r requirements.txt go about your business?

#

while you're here, does the docs depend on anything built in the binaries? like do I need to build circuitpython to build the docs?

jaunty juniper
#

I don't think so

silver blaze
#

I guess having commands like this in the docs:

 pip install sphinx
 pip install recommonmark
 pip install sphinx_rtd_theme

gave me the false confidence that's all I needed, since it was so low level.

#

why is there an install command anyways when it's already in requirements.txt at a specific version?

jaunty juniper
#

๐Ÿคท

silver blaze
#

haha that's fair.

jaunty juniper
#

I've been contributing and building Circuitpython occasionally since like January, I'm fairly new

silver blaze
#

I've been a software engineer for the better part of 2 decades, in quite a few languages, and I've avoided python ... it feels like I'm a cowboy at a rodeo without my own lasso ... how am I supposed to get those cows?
Meh it's all 1111s and 000s ... I just need to learn the quirks of Python.

#

Installed requirements, and BAZINGA! ... same make html error.

#

installed both requirements-dev.txt from the root and requirements.txt from the docs ... hrrmmm

#

what is ulab?

#

FileNotFoundError: [Errno 2] No such file or directory: 'extmod/ulab/code'

#

interesting, the directory extmod/ulab is there but nothing in it.

jaunty juniper
#

ah

#

did you git submodule sync --quiet --recursive && git submodule update --init ?

silver blaze
#

.... I did not, and why the heck would I do that? that's nowhere in the docs

jaunty juniper
silver blaze
#

ha sorry .... like why isn't that in the repo?

#

also, that learn article, I can't find it referenced in the repo either

#

if your build article is detached from your code like that, you won't have historical references on how to build specific versions ... that's too bad.

jaunty juniper
#

yeah I guess it's not as maintained as the learn guides

silver blaze
#

uggh.... also, while it might look pretty, don't put the bling in command blocks

#

copying this code does me zero good

#

I don't need another step between me and toast

#

.... ๐Ÿ™‚

jaunty juniper
#

oh yeah "copy code" is a trap !

silver blaze
#

+1 for VSCode and multiline select.

#

does learn.adafruit.com have any sort of API?

#

woot! thanks @jaunty juniper got it building

#

now if I could only learn to not hate python...

jaunty juniper
#

learn is an internal tool to adafruit, it can pull from github though (most of the demo code in it is hosted in the learn repo)

#

(the demo code, not the code running the pages)

silver blaze
#

it would be nice if the docs could be versioned in github and pushed to learn.adafruit

#

๐Ÿคทโ€โ™‚๏ธ I'll poke at sphinx for now

jaunty juniper
silver blaze
#

Thanks for the legwork. This looks really "pythony" and possibly not something I'd want to work on. I'm currently working on Typescript for the dayjob, so I wanted to see if I could use some of that but clearly not.

jaunty juniper
#

yeah, for the filter I mostly added a bit of html and a css and js file, sphinx is using a pre-made template and I didn't want to tinker with that too much

silver blaze
#

hrmm, is there a place I could inject some JS?
i have to take off for now, thanks for the help @jaunty juniper

manic glacierBOT
still zephyr
#

at least the TCA9548A

#

thanks

solar whale
#

@still zephyr I do have one , somewhereโ€ฆ Iโ€™ll try to find it and try it on an rp2040 tomorrow.

still zephyr
#

Thanks ๐Ÿ™‚

manic glacierBOT
copper spear
#

Hello, my Name is Pitisukha
I am working with an ARM cortex M3 derivative (HVC 4223F) and would like to use Circuitpython.
As I am quite sure doesn't exist for that chip: are there instructions how to port/adapt it to a new chip? Thanks in advance

manic glacierBOT
tulip sleet
solar whale
#

@still zephyr there does appear to be something odd with the RP2040 I2C at least via the mux?

still zephyr
#

Could not reproduce why

solar whale
#

My favorite kind of bug ๐Ÿ˜‰

still zephyr
#

last night the RP2040 decided that there was not a Sensor, in the address, and not even unplugged the board worked again

#

I amhappy that you found the same thing, that means I am not crazy or too tired to think straight

solar whale
#

Iโ€™ll try these sensors without the much in a little while.

still zephyr
#

Thanks @solar whale

solar whale
#

Glad to help!

storm minnow
#

Not sure if this belongs here? But I get this XML error when trying to download the Rotary Trinkey CP UF2

#

Trying to download from the CP.org page

tulip sleet
storm minnow
#

Ah, ok. To the bucket!

copper spear
tulip sleet
#

micropython would be similar. it was squeezed onto the 16kB RAM micro:bit, but that was a very tight fit

copper spear
tulip sleet
#

sorry! if you are looking for something really small you might be able to port snek: https://sneklang.org/

#

are you stuck with that chip? CircuitPython libraries have support for several motor controllers (I2C, etc.)

#

snek will fit on an arduino uno so it will probably fit

tulip sleet
#

i can copy stuff around on S3. That might be the easiest fix

#

looks like it's just rotary_trinkey

solar whale
#

@still zephyr it looks like the RP2040 issue is related to the tca9548a and not a general I2C issue-

still zephyr
#

I see, wondering why works with the other two boards

storm minnow
tulip sleet
#

i copied and renamed the 6.2.0 version from rotary_trinkey_m0 to adafruit_rotary_trinkey_m0

storm minnow
#

Ah, cool. Confirmed working!

copper spear
tulip sleet
manic glacierBOT
#

Summing up my investigation from the weekend, I'll try to add and make the CP meeting Monday as I think it would be a good in the weeds topic.

  • Read the SS7789 datasheet (and a couple others). Data and commands are treated the same and the maximum frequency is about 15Mhz. Though people online report success at higher frequencies.
  • I slowed commands to 1Mhz and kept data higher, but even at 10Mhz the artifacts still appeared. Tried the inverse as well (1Mhz data and 10Mhz commands) with...
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

I try to add new external SPI flash define, on master branch, it should be add some define sections likes:
#define GD25Q32C {\
.total_size = (1 << 22), /* 4 MiB */ \
.start_up_time_us = 5000, \
.manufacturer_id = 0xc8, \
.memory_type = 0x40, \
.capacity = 0x16, \
.max_clock_speed_mhz = 104, /* if we need 120 then we can turn on high performance mode */ \
.quad_enable_bit_mask = 0x02, \
.has_sector_protection = false, \
` .suppo...

manic glacierBOT
manic glacierBOT
slender iron
manic glacierBOT
manic glacierBOT
abstract pawn
#

Rotary Trinkey seems to have a mistake in the board module pin defs. It only shows ['NEOPIXEL', 'ROTA', 'ROTB', 'SWITCH'] No 'TOUCH' or 'CAP' and ROTA seems to point at the touch pad.

jaunty juniper
jaunty juniper
#

(or use the latest from S3)

abstract pawn
#

Latest from S3 all seem to be 7.0.0 alpha. I guess I can try. Don't remember seeing a 7.0.0 library bundle.

jaunty juniper
abstract pawn
#

Thanks. Got the latest 7.0.0 and pin defs seem good. Haven't tried touch yet but the rotary pins all work.

hollow token
#

much excite for 7.0!

#

:D

manic glacierBOT
manic glacierBOT
manic glacierBOT
ionic elk
#

@slender iron I'm super wiped from early morning travel and vaccine day-after, so I might miss today's meetings

manic glacierBOT
idle owl
idle owl
crimson ferry
still zephyr
#

@slender iron have two minutes?my two questions from friday ๐Ÿ™‚

still zephyr
#

So, first, I see that when importing a libraries it matters if you import the file inside or outside a directory, there is a reason why?

#

this is for memory allocation problems

slender iron
#

it changes the memory requirements?

still zephyr
#

no the same file

slender iron
#

can you give me an example?

still zephyr
#

yes

#

if I import the file like this import dps310

#

no memory allocation problem

#

now if the file is inside a directory named adafruit_dps310 and I do the import like this

#

import adafruit_dps310.dps310

#

the I have memory allocation problems

idle owl
slender iron
#

what is in the __init__.py? I think it is imported first

still zephyr
#

nothing in the init

slender iron
#

hrm, may be tight on memory

#

I think the only extra memory will be the package dictionary

still zephyr
#

ohh i see package dictionary gotcha thanks.. second question ...

#

why import order matters, for example...

#
import adafruit_dps310
import time
import board
#

no memory allocation problems

#

but this

#
import time
import board
import adafruit_dps310
#

memory allocation problem

#

because of the heap size?

slender iron
#

ya, you'll just get a couple more dictionary entries before the large import

#

how big is the allocation that fails?

still zephyr
#

mmm, did not write it down, but for sure I will have more examples this week when I work with the BME280

#

I will write those down

slender iron
#

if they are more than 100 bytes or so then there may be a way to split the memory up so it fits better

still zephyr
#

gotcha, thanks ๐Ÿ™‚

#

I will look into that and report back neokey

slender iron
#

thanks!

modern wing
#

Good afternoon all you wonderful folks -- happily lurking and lurking happily.

slender iron
#

will get started shortly. gonna take a bathroom break

idle owl
#

BRB need water.

thorny jay
#

Lurking, I'll be off-line/driving most of the meeting time. Will try to be back for @errant grail "in the weed" discussion.

lone axle
modern wing
#

CircuitPython on a calculator? Yep, those numbers add up blinka

lone axle
#

We walk you through how to use your favourite circuitPython code in a microPython project. Hot off the press, links and code to follow in the description when we get home from school tomorrow.

00:00 Introduction
00:40 Putting MicroPython onto the Raspberry Pi Pico
01:35 Installing Thonny using the shell
02:47 Running CIrcuitPython and MicroPyth...

โ–ถ Play video
solar whale
#

I noticed that the last lib bundle is 20210522 -- was it just a quiet weekend?

idle owl
#

@trim elm Sommersoft, I'm fairly sure.

onyx hinge
#

๐Ÿ‘‹ on the road home right now

errant grail
#

... and vectorio tests in addition to bitmap.

trim elm
#

@tulip sleet I'm assuming you've already seen this but kmk would be a good starting point. afaik it uses circuitpython

tulip sleet
#

i did look at kmk, it does a simple scan with no FIFO, but has many other user-level features (like hooks before/after keypress or release

#

we want a C native library to do the low-level scanning fast. gamepad is the simplest such, but is not general

trim elm
#

Ah I see

tulip sleet
#

gamepad tells you which buttons were pressed since you last asked (it's latching), so you don't miss any presses

trim elm
#

Yeah, that makes sense that you'd want something faster for doing the scanning and then maybe use circuitpython for higher level stuff

#

Oh that is pretty nice

jaunty juniper
#

that reminds me, gamepad.py in the adafruit_hid examples should be renamed, it clashes with the built-in one

lone axle
#

@trim elm If you're looking for helpers, I'm up for helping out on the move to main branches for libraries.

solar whale
trim elm
#

@lone axle Awesome. That would be great. Our current bottleneck is that it will break pretty much every learn guide link so we've got to figure something out with the website people first

tulip sleet
#

Forgot this in my notes: Verified that @jaunty juniperโ€™s fixes to adafruit-board-toolkit work on an M1 Mac. PR submitted and accepted to mu beta to include the changes.

jaunty juniper
#

it's like every new trinkey released tries to up the previous ones in the tong twister department

idle owl
#

Also I got my first vaccine this morning.

jaunty juniper
#

I'll get mine tomorrow โš•๏ธ

modern wing
#

@idle owl congrats! (and @jaunty juniper!)

fossil gorge
#

Here's hoping that your side effects are negligeable to non-existant @idle owl and @jaunty juniper

lone axle
#

belated hug to the learn guide team. I'm not sure if it was new this week or not, but I just recently noticed the new dark mode and pink button code embed elements. They look great!

modern wing
#

I'm currently recovering from the side effects from a Saturday poke.

idle owl
#

Thanks! I hope so too.

mental nexus
#

@blissful pollen if you are lurking, do you want me to introduce your โ€œweedsโ€ topic?

blissful pollen
fossil gorge
# trim elm <@!382939733107408897> Awesome. That would be great. Our current bottleneck is t...

One possible option - Rename the current branch to "main", then create a branch named "master" or the previous name (in case there's some git guts that is picky about rename & new branch). Then add branch protection so that nobody can push to the "master" branch, then as each guide is updated, delete the old branch name from the repo. Or delete the branch just before updating the guide

tidal kiln
#

yep...wonder if related to other 2040 i2c issue...specific to a sensor...cant remember where...

thorny jay
#

Maybe the fix done in RP2040 I2C is interacting with the mux need.

tidal kiln
thorny jay
#

There was that stuff about short write early in RP2040 integration.

errant grail
trim elm
thorny jay
#

Is there any benefit in disabling displayio auto update?

crimson ferry
#

interesting that Feather M4 (192KB) with 320x240 SPI display is faster than PyPortal (256MB) with 320x240 parallel display

thorny jay
#

So "scope" the I2C and then SPI.

#

@errant grail : Zoltran was also talking about doing integer only computation on the RP2040. Like 16 bits integer to avoid loosing too much. If the library/I2C device is not doing "floating point" because it has to.

errant grail
tidal kiln
#

@solar whale i'll try and take a look at that TCA PR discussion. hadn't seen all that until now. looks like several layers to the story, so will take some time to read and catch up.

solar whale
#

Let me know if I can help.

thorny jay
#

Maybe it should output "scan code" like keyboard, just a "byte" per key that you define in advace (like x,y => int).

errant grail
#

Keypads with LEDs and at least one piezo buzzer, perhaps?

modern wing
#

Thanks everyone!

tulip sleet
#

assume we will want to support rollover, so it might be like an HID report. It could have a FIFO, but we might do that later.

mental nexus
#

Thanks all!

errant grail
#

Thanks!

tulip sleet
#

it would take a bunch of pins or DigitalInOuts (rows and columns)

fossil gorge
errant grail
modern wing
#

No fever for me, but cold + hot chills and serious full body aches. Moderna #2.

fossil gorge
#

Had Pfizer - The first one made me sleepy(er) for a few days. The second one needed the rest of the day and the next one to sleep through

tulip sleet
fossil gorge
#

Moral Concensus is, after getting a vaccine dose, plan on resting that day, and possibly the next on the 2nd dose

modern wing
#

I proactively took the next two business days off --- and was lucky to schedule both on a Saturday.

thorny jay
#

I confirm preparing sleep time is key. Before and after.

modern wing
#

So...four day weekend ๐Ÿคท

thorny jay
#

Avoid vaccine on Friday, so that if you are really sick two days, that is on the company. ๐Ÿ™‚

fossil gorge
#

Also, it was about 25 miles (~40km) away. Not my idea of "fun"

#

But in the grand scheme of things, it was still worthwhile

#

Much less inconvenient than hospitalization

modern wing
#

@fossil gorge That's not too bad....where I'm at, it takes 20-25 miles to get anywhere in the first place. I'm lucky I got one in the closest city to me.

When I was trying a few weeks earlier, everyone was so booked, nearest ones were 2-3 hours away.

blissful pollen
#

I just offered to drive a friend to her second dose, that's about an hour away just in case she's out of it after. But at least it will be done!

fossil gorge
fossil gorge
modern wing
#

@blissful pollen Seriously, you're awesome for offering that.

blissful pollen
#

Thanks, I'm still waiting to hear what Canada is doing with second doses for people who took AZ

storm minnow
#

@blissful pollen You're a great friend ๐Ÿช

modern wing
#

What's up with AZ?

blissful pollen
#

AstraZenica (in case someone thought Arizona ha). But Canada suspended first doses of it based on the rare blood clots, and all those who took it aren't sure what that means for second doses. Doesn't help each province is setting their own made up rules

modern wing
#

Hmm, same here in the states with Johnson & Johnson

#

Most places reinstated it with "the cure isn't worse than the disease" mentality.

fossil gorge
#

Too bad it isn't Arizona, as in the iced tea! Get your dose in a can of it ๐Ÿ™‚

modern wing
#

That made me think of the Dinosaur DNA vials tucked away in a aluminum can from Jurassic Park.

fossil gorge
#

Reminds me I need to call my mom, see if she's heard anything, and which one she had. She's in Montreal

#

Ah yeah, shaving cream and mister "Ah ah ah! You didn't say the magic word!"

#

aka "Newman"... or Wayne Knight if you want to use his actual name!

#

(the actor)

blissful pollen
#

yeah i'm up for whatever second dose i can get

fossil gorge
#

Are things pretty much still all shut down and locked down where you are @blissful pollen?

blissful pollen
#

yup I'm in Manitoba and we're (and still have been) locked down good

storm minnow
#

I want to go to Canada

slender iron
#

Here is the notes document for Tuesdayโ€™s (June 1st) CircuitPython Weekly meeting. It is at the normal time of 11am Pacific / 2pm Eastern here on Discord. Everyone is encouraged to attend! Please add your hug reports and status updates even if youโ€™ll be attending the meeting - itโ€™s super helpful! If you are unable to attend but would still like to include updates, feel free to include them in the notes and weโ€™ll read them off during the meeting. Hope to see you there! <@&356864093652516868> https://docs.google.com/document/d/13v0TziugOYU3FsWjs3_pu1H3IQEKqORbYPE14RIKmb8/edit?usp=sharing

thorny jay
# blissful pollen AstraZenica (in case someone thought Arizona ha). But Canada suspended first dos...

Here (Belgium) AZ is restricted to only some age range (the older one) because the risk benefits are better there. Also EU seems to not negotiate a new contract with AZ. Thanks to bad reputation of AZ, the vaccine is available to age range that would otherwise have waited much longer. People try to cherry pick vaccine in Belgium, but guessing what center does what, refusing the rendez-vous when they know it is AZ. A real mess.

thorny jay
blissful pollen
thorny jay
#

Also playing with the time between dose 1 and dose 2. It was 8 weeks, then 12 weeks, then 8 weeks again.

modern wing
#

Most places here in the states openly disclose which vaccine you're getting -- because of the J&J bad press, there's a real strong mindset of "shopping around for the 'best' vaccine". So to save wasted doses, it's made incredibly clear before registering.

storm minnow
#

Yeah, they were only doing Pfizer in my city, and it was in big bold red letters in the first few things you'd read

thorny jay
# modern wing Most places here in the states openly disclose which vaccine you're getting -- b...

We use J&J for homeless or people likely to forget the second dose. Just because it is one shoot. And it seems there is propaganda and hidden sponsored video that say Pfizer is worst than AZ. Maybe to push Spoutnick. Enough about vaccine talk. Me and my wife are in between dose 1 and 2 of different vaccine. And we hope our 19 year old can get one, because she has travel plan (tennis player) and that will make her live easier.

turbid radish
#

?serverinfo

digital shoreBOT
#
adafruit
Owner

adafruit#3230

Region

us-west

Channel Categories

8

Text Channels

58

Voice Channels

6

Members

29271

Roles

34

manic glacierBOT
#

@tannewt I don't think it's necessarily relevant here but is there a cut and paste error in that code:

https://github.com/adafruit/circuitpython/blob/1a0b4193b7539899a41952769e7b566be7580d6a/ports/esp32s2/common-hal/busio/SPI.c#L360-L363

Is the second esp_ptr_dma_capable(data_out) supposed to be esp_ptr_dma_capable(data_in)?

Ya, looks like a bug.

So on a hunch I forced DMA to not be enabled (in the esp32s2 SPI.C). I bumped the frequency back to 60Mhz and it h...

cobalt grail
#

Ha. The feeling when weblate tells you to translate a string and you realize it's from your own pull request. ๐Ÿ˜›

fossil gorge
manic glacierBOT
still zephyr
slender iron
#

adafruit/circuitpython master is deleted

tulip sleet
#

btw this is great also

idle owl
#

Thanks, Scott.

tulip sleet
#

to have that number in the low hundreds instead of thousands is really heartening

slender iron
#

@tulip sleet it was almost sub-100 ๐Ÿ™‚

storm minnow
#

Scott is magic

slender iron
#

it's not magic

#

just years of practice

storm minnow
#

Same thing :P

manic glacierBOT
solar whale
#

@tidal kiln @still zephyr wow -- I just caught up with my e-mails -- I did not realize so much was going on with the TCA9548a....

tidal kiln
#

it's just one little PR ๐Ÿ™‚

solar whale
#

but a bunch of other issues under discussion.

tidal kiln
#

@solar whale oh yah, i took a look at the other issues while i was there and commented some

solar whale
#

I was just surprised to see you commenting on the other issues as well -- good multitasking skills!

hidden oxide
tidal kiln
#

neat! thanks. hmmm... seems like maybe it's been done? but i'll ask them to try that just to make sure.

tulip sleet
#

i was going to suggest doing erase_flash and then load the .bin directly, but they may have done that already

solar whale
#

@tulip sleet I hope I don't jinx anything, but I have moved back to working on my Linux box and for the past few days have had no crashes when disconnecting boards....

hidden oxide
solar whale
#

I had to do it!

tidal kiln
#

@tulip sleet was thinking that too. you could get both CIRCUITPY folder and COM port showing up and it still hangs up on some flash thing?

#

@solar whale that's the USB freeze thing?

tulip sleet
#

possibly..., but i cannnot think why

hidden oxide
#

Probably not though..

solar whale
#

@tidal kiln - yes -- I have tried all the "usual suspects" esp32s2, rp2040 -- even did a few erase_filesystems() no crashes.

#

Linux has become more tolerant...

hidden oxide
tidal kiln
#

@solar whale i may been a little better off after upgrading to 20.02. but still getting hangs. haven't upgrade pc hw though.

hidden oxide
solar whale
#

@hidden oxide I've had a long history of my linux box freezing and rebooting when I disconnect some CP boards

tidal kiln
#

@tulip sleet how could they flash erase?

tulip sleet
solar whale
#

I have 20.04 on an old Mac Mini

tidal kiln
#

ohh. yah. ok.

tulip sleet
#

esptool.py --chip esp32s2 -p /dev/ttyACM0 -b 460800 erase_flash

hidden oxide
#

I sort of suspected flash, but I thought it could be power draw too on my Mac

tidal kiln
#

@hidden oxide yes. ubuntu. sry. meant 20.04. machine is old surplus hp. and i see issue when using arduino, so not entirely CP related.

hidden oxide
#

Have you tried a powered USB hub?

still zephyr
#

@solar whale @tidal kiln and now.... it is working...

#
Adafruit CircuitPython 6.2.0 on 2021-04-05; Adafruit Feather RP2040 with rp2040
>>> import test_two_sensors
Acceleration: x=-0.220m/s^2 y=0.192m/s^2 z=9.821m/s^2
328.33 Lux
Acceleration: 
#

I just restart my PC...

hidden oxide
still zephyr
#

at this point I think I will need a Cat also...

solar whale
#

๐Ÿ˜ฑ

#

I had it work a few times as well -- but not recently

still zephyr
#

what is going on.. I do not understand

hidden oxide
solar whale
#

@hidden oxide we were commenting on another issue

hidden oxide
solar whale
#

I've had enough fun for tonight -- time for bed ๐Ÿ’ค Good night, all!

still zephyr
#

@solar whale I was testing, to write the issue as mentioned, I ll wait in your findings tomorrow

hidden oxide
#

See y'all! Thanks ๐Ÿ˜€

wintry smelt
#

I missed this live. But hi all! I am just getting into CircuitPython, though I have used Python for over a decade and MicroPython for a few years. Adopting CP because I have bought all the RP2040 products from Adafruit and others!

atomic summit
#

Wow... I just built latest UF2 bootloader for my TinyS2 (cause I forgot to add it to the build workflow for 4.0 - opps) and the copying speedup has shaved 20 seconds off my test jig time!!!! That's insane! Great job @gentle bronze !!!

manic glacierBOT
manic glacierBOT
manic glacierBOT
atomic summit
manic glacierBOT
#

@dhalbert I think the first time is tolerable.

But I'm doing this now, using a GPIO as the development mode button.

import time
import alarm
import board
from digitalio import DigitalInOut, Direction, Pull


_DEBUG = DigitalInOut(board.IO40)
_DEBUG.direction = Direction.INPUT
_DEBUG.pull = Pull.DOWN
if _DEBUG.value:
    time.sleep(10)
else:
    time_alarm = alarm.time.TimeAlarm(monotonic_time=time.monotonic() + 10)
    alarm.exit_and_deep_sleep_until_alarms(time_alarm)...
manic glacierBOT
#

Hi @kevinjwalters, thanks for reaching out. It seems that creating this issue basically caused my time to work on it to evaporate. However, wildfire season is fast approaching, so I'll prob be reprioritizing.

My interest and work to date have been on the UART side. I think I saw on the SparkFun site the UART interface provided more complete data than I2C, tho I haven't confirmed.

I'm a C++ guy, haven't done much w Python, this was a learning project. I have the Sensirion code tweake...

manic glacierBOT
#

I'm certainly familiar with the finite amount of time issue! I saw the SparkFun comment too on https://www.sparkfun.com/products/15103 too (retrieved 25-May-2021):

Sensirion has written drivers for both the UART protocol and I2C. Unfortunately we've found the I2C is limited to only mass concentrations (not number concentrations) using the Arduino platform. So if you plan to use this sensor with an Arduino, use the UART interface. Both interfaces are described in their datasheet.

Re-re...

tulip sleet
jaunty juniper
#

it should be, but they mention adafruit-circuitpython-adafruit_itsybitsy_rp2040-en_US-7.0.0-alpha.2.uf2 which does not have the status LED changes

manic glacierBOT
tulip sleet
manic glacierBOT
#

The power cycling is a real buzzkill.

I've got the TFTFeatherWing35 and a Feather RP2040, running Adafruit CircuitPython 7.0.0-alpha.2-646-g7df5d74d9 on 2021-05-22; Adafruit Feather RP2040 with rp2040.

HX8357 drives the 3.5" TFT display
SMTPE610 touchscreen

Anything that interrupts the busy loop (filesystem update or Ctrl-C) can trigger the failure state.

storm minnow
#

Does anyone know if the setup instructions in the Building CircuitPython learn guide works under the Ubuntu WSL on Windows 10?

tulip sleet
storm minnow
#

Ahh, I see the instructions for that in there now XD thanks

stiff pelican
#

When testing PRs I'm trying to make a script so that I remember to do the same setup each time.

Current procedure is:
git clone <pr-authors-repo>
git checkout <pr-branch>
prtesting

where prtesting is the following script

#! /bin/bash

echo "Creating Python Virtual Environment"
python3 -m venv .env
source .env/bin/activate

[ -e requirements.txt ] && { echo "Installing requirements"; pip install -r requirements.txt; }

echo "Installing generic requirements"
pip install black pylint pre-commit sphinx sphinx_rtd_theme circup

[ -e setup.py ] && { echo "Installing local package in pip"; pip install -e .; }

[ -e .pre-commit-config.yaml ] && { echo "Installing pre-commit"; pre-commit install; pre-commit run --all-files; }

[ -d docs ] && { echo "Generating Docs"; cd docs; sphinx-build -E -W -b html . _build/html; cd ..; }

echo ""
echo "Remember to run:"
echo "source .env/bin/activate"

Am I missing anything?

orchid basinBOT
manic glacierBOT
#

This has been heavily revamped and now says things like

1305392 bytes used,  136400 bytes free in flash firmware space out of 1441792 bytes (1408.0kB).
     27 bytes used,    8165 bytes free in 'RTC Fast Memory' out of 8192 bytes (8.0kB).
   4096 bytes used,    4096 bytes free in 'RTC Slow Memory' out of 8192 bytes (8.0kB).
      0 bytes used,   32768 bytes free in 'Internal SRAM 0' out of 32768 bytes (32.0kB).
  87772 bytes used,  207140 bytes free in 'Internal SRAM 1' out of 29491...
still zephyr
#

@solar whale ๐Ÿ™‚ I swear this one is easy.. no need to give the sensor to the cat neokey ... do you have the PCA9685 breakout?

solar whale
#

@still zephyr Yes - I do have one -- Have you solved the issue?

#

or is this new one?

still zephyr
solar whale
#

OK -- I'll give it a try.

still zephyr
#

Thanks ๐Ÿ™‚

solar whale
#

Any particular behavior I need to verify or only that it runs?

manic glacierBOT
hidden oxide
#

@slender iron Why am I getting this error in the Adafruit GPIO Library: TypeError: argument 1 must be str, not int - GPIO.py, line 278 ? I know what it means, but I don't know if it is a bug in the Module, or if I am just missing something.

solar whale
#

@still zephyr it works for me -- I'll comment in the PR

still zephyr
solar whale
#

Would you like me to merge it?

still zephyr
#

I have just pinged Dylan, to see if she has any objection

solar whale
#

@still zephyr OK -- I'll be offline for a few hours, then hope to get back to the TCA9548A ๐Ÿ˜ฌ

jaunty juniper
stiff pelican
tulip sleet
#

if it has been fixed since the "alpha" build the user is using, yep

#

i missed that they were not using a recent build.

idle owl
idle owl
hidden oxide
# idle owl It looks like you're referring to an Arduino library - this channel is for Circu...

File "/usr/local/lib/python3.7/dist-packages/Adafruit_SSD1306/SSD1306.py", line 288, in init
gpio, spi, i2c_bus, i2c_address, i2c)
File "/usr/local/lib/python3.7/dist-packages/Adafruit_SSD1306/SSD1306.py", line 89, in init
self._gpio.setup(self._rst, GPIO.OUT)
File "/usr/local/lib/python3.7/dist-packages/Adafruit_GPIO/GPIO.py", line 278, in setup
pull_up_down=self._pud_mapping[pull_up_down])
TypeError: argument 1 must be str, not int

tulip sleet
#

[reposting in correct channel:]
@slender iron when you have a chance, if you can re-review these:

#

i am going to keep cancelling the weblate auto PR's Action runs until we run out of immediately pending PR's, since they just generate extra Actions builds that get overridden quickly.

hidden oxide
idle owl
slender iron
slender iron
tulip sleet
#

@stuck elbow When you have time, could I chat with you about a matrix keypad native module i will be working on? It could be similar to gamepad, or it could be fancier (FIFO, up/down events). The "latching" aspect of gamepad is attractive and simple. This could probably subsume gamepad, and possibly also gamepadshift

manic glacierBOT
idle owl
#

@crimson ferry The 404 links should be gone now. Please let me know if you see them again.

stuck elbow
#

@tulip sleet sure, but I don't really have much to add

tulip sleet
#

hi, thanks. Would you say you are quite satisfied with gamepad's semantics, or do you want more (like a fifo)?

#

i am thinking about how to generalize it to include shift register support, but not sure yet (depends on whether there are too many clocking mechanisms)

stuck elbow
#

I'm fine with the kind of latching buffer it has, because I can only do things once per frame anyways, and the frames come faster than humans are able to click buttons

#

if you compare gamepad and gamepadshift, you will note they are very similar

tulip sleet
#

if you were building a keyboard, would you want the same thing? gamepad is really, well, for gaming.

#

yes, so it would be nice to share code and maybe even an api; could be different args to a single constructor

stuck elbow
#

for a keyboard you want to be scanning a matrix

tulip sleet
#

yes, that's the main step up

stuck elbow
#

I do a very similar thing to the gamepad for debouncing, but then I eventually convert it into keyup and keydown function calls

tulip sleet
#

so my thing would support rows and cols, and maybe report back as a maximum n list of keys that went down since the last call. Sort of like an HID keyboard report but without modifiers, just n keycodes. I think we would not do a multibyte bitmap, since it's more work to extract the key info from that

#

you could specify n, so you would get N-key KRO for that choice of N

#

keycodes would be a combo of row and col #

stuck elbow
tulip sleet
#

i will look at that - thanks

stuck elbow
#

or you could just report the whole matrix, as rows bytes with cols bits

tulip sleet
#

do you use the timestamp?

stuck elbow
#

it really depends on at which point you want to make the cut between the library and user code

tulip sleet
#

yes, i agree

stuck elbow
#

no, like with gamepad, I assume that the time between each scan is enough for debouncing

#

I just have a buffer for storing the previous state

tulip sleet
#

how do you decide it's a bounce?

#

(I could study it; but easier to ask you)

stuck elbow
#

if you did this with pin change interrupts, you would need to store the timestamp

#

but then matrix scanning with pin interrupts would be weird

tulip sleet
#

we were not planning to use interrupts

#

yeah

#

the self.debounce[x] checking looks like it needs to be held down for at least two scans??

stuck elbow
#

yes

tulip sleet
#

i will look at this as a good example of a simple matrix scanner. I will also look at qmk, kmk, etc. I did some searching on github and found less than I expected. Everyone is recycling the arduino library, which has callbacks and other stuff we would not have

#

thank you

stuck elbow
#

well, I ultimately also have callbacks, because that was the easiest way to write the hold/tap logic

#

but that's equivalent to processing keyup/keydown events

tulip sleet
#

yes, that can be done at a higher level

manic glacierBOT
idle owl
#

@tulip sleet Reviewed.

tulip sleet
#

thank you!

hidden oxide
slender iron
#

was github actions having trouble earlier? the translate PR has canceled jobs

manic glacierBOT
#

In common_hal_audiopwmio_pwmaudioout_play() we were calling common_hal_audiopwmio_pwmaudioout_get_playing() and common_hal_audiopwmio_pwmaudioout_stop() early on; which means we were accessing the DMA channels before we had set them up by calling audio_dma_setup_playback(). The impact was to stop the DMA for the first PWMAudioOut when setting up the second. In addition, a break statement while checking for a pacing timer was outside the proper braces. Also (perhaps unrelated), a call to audi...

#
[adafruit/circuitpython] New tag created: 6\.3\.0\-rc\.0
orchid basinBOT
ionic elk
#

man, the way the RP2040 team spread the functions they use in their demos across multiple different repos is really frustrating

#

wish they'd just pick pico-extras or pico-playground and scrap the other one

slender iron
#

they do it to make it clear which are well documented

tulip sleet
slender iron
#

and "supported"

#

kk, @tulip sleet . it's going now after I merged

tulip sleet
#

Actions was really bogged down yesterday and PhilB and Limor needed to do some Arduino-related Actions.

#

including this morning

slender iron
#

ya, I'd love to see us move the main repo

#

but we could also optimize things better

#

port specific stuff should only rebuild boards for that port

tulip sleet
#

i agree, not sure how easy the "this port only" builds would be

slender iron
#

micropython does it

tulip sleet
#

we just look for the commit filenames only being in certain port trees, I guess

tulip sleet
#

do you think the ports_<someport>.yml is good too?

slender iron
#

nah, I do like that we block the board builds based on tests

#

looks like the recommendation is just to short circuit jobs

tulip sleet
#

I'm confused, so they did implement the latter link already?

slender iron
#

no, they do it per workflow

#

we'd probably want it per-job

tulip sleet
#

oh, so we do need to filter

slender iron
#

or we could switch to workflows and always build

tulip sleet
#

if you have a clear sense of what to do, I think it could be done fairly quickly. It would certainly save time. Do we lose some advantage being in a non-paid organization? (like support??)

slender iron
#

I can't let myself get distracted

#

I don't think so because they are generous with public repos

tulip sleet
#

MANY links would need to be changed if we moved organizations, though maybe there is forwarding

slender iron
#

I think there is forwarding

#

we could do another repo first

ember iris
#

does anyone have a favorite device/sensor that uses the Register library so I can look at it's use?

still zephyr
ember iris
#

Right now I'm working on adding the voc algorithm to the SGP40, so something in the Sensirion family would be good

still zephyr
#

BEcause if you ask me I love temperature sensors

ember iris
#

Temp sensors work wonderfully as well!

#

Just kind of looking for example of it is use alongside the documentation

still zephyr
#

sensirion.. ok give me three minutes.. you want to add functionality or just to look at them?

#

at the code I mean

#

๐Ÿ™‚

ember iris
#

add functionality--for the voc algorithm you need to first send the temp/humidity data to one of the registers and it seems like a great place to utilize the library

still zephyr
#

right I understand, give me 5 minutes, I take a look..

ember iris
#

Thank you!

still zephyr
# ember iris Thank you!

I take a look in the https://circuitpython.org/contributing/open-issues, there are some open issue, but there are people working on that already or in the process, I did not see anything that pop out. But I have three different sensors, the MPU6050, the LTR390 and the LSM6Ds (normally acelerometer uses registers). What I do normally is that I go to this list, https://github.com/adafruit/Adafruit_CircuitPython_Bundle/blob/master/docs/drivers.rst and compare with the datasheet. But I do not have a list with the ones that Uses Register, other like the CV class (My favorite hehe). But I think it is ok, you need to adapt on how the library was built, sometimes the sues Struct, others use RWbits, others like to use Buffers, and so on..

ember iris
#

Awesome! This should help point me in the right direction, thank you!

still zephyr
#

ping me anytime if you need more information happy to help

ember iris
#

Will do! Thanks again for finding these!

still zephyr
#

you are welcome

storm minnow
#

I'm setting up to do a build of CP, and about to make a disk image for it -- I know I need it to be case-sensitive, but does it matter if it's Mac OS Extended or APFS?

tulip sleet
storm minnow
#

APFS it is!

#

Hmm...

hollow token
# tulip sleet i will look at this as a good example of a simple matrix scanner. I will also lo...

I went a slightly different path but it depends on how fast you want the matrix polled,
eg, https://github.com/Red-M/RedPycoKeeb/blob/master/Firmware/lib/pycokeeb/basekeeb.py#L63-L97 This is using the interrupts on MCP IO expander devices but is 10-16ms (depending on if you use I2C or SPI variants of the chips and you'll need the interrupt pins hooked up and level shifted)
but I moved to a Teensy 4.1 and I dropped the IO expanders which gave me a <1ms response time to scan the matrix via just the IO pins of the Teensy (which I've annoyingly haven't pushed the branch publicly yet)

GitHub

My own custom keyboard with PCB and firmware. Contribute to Red-M/RedPycoKeeb development by creating an account on GitHub.

tulip sleet
hollow token
#

more an example of using the int pins to scan the matrix but yes, so much better without them, the only thing I wish the Teensy had was a 2nd core that I could offload LED and screen updates (they take far too long to do due to the shift register nature of the dotstars and the speed of the SPI screen)

#

but the 600MHz core is so lovely to have just for the cycles to always be under 1ms for a matrix poll

storm minnow
tulip sleet
#

did you do the git clone?

storm minnow
#

Yes

#

Did just like the guide -- clone, cd to where I want it, sync

tulip sleet
#

could you show me the commands before the cd above?

storm minnow
#

first command

tulip sleet
#

you don't cd to where you want it; you cd to where git clone put it

storm minnow
#

ohhh....

tulip sleet
#
cd /Volumes/CP_Build
git clone ...
cd circuitpython
#

you cloned it into your home directory, it looks like

#

just rm -rf that and clone it into the new filesystem

hollow token
#

^ I really wish that git had a flag to then cd into the cloned repo

tulip sleet
#

you could mv it but i'm not sure about the case sensistivity thing

hollow token
#

iirc it has an option to say where to clone into for the repo directory but not to automatically cd to that directory which sucks

storm minnow
#

This is confusing XD

hollow token
#

pwd

#

it'll come back with /home/doctor

storm minnow
#

Ok, yeah, it went into my home directory, but now cloned to where I wanted it cloned, lol

hollow token
#

git clone is relative to $(pwd)

#

unless you override it with a runtime flag to tell git to clone to another path

storm minnow
#

This is the first time I ever cloned something XD

hollow token
#

git clone $REPO_URL [$output_path]

storm minnow
#

It cloned into my desired location when I had the prompt in that directory, lol

hollow token
#

there is man pages for this which is included with git that you can read via git clone --help

olive hedge
#

(that's because a cloned repo is a folder by itself, with all the project files)

storm minnow
#

I feel like my eyes glaze over when I think about git

#

I currently find it mystical XD

olive hedge
#

It takes some times xD, yet practice makes everything better ๐Ÿ™‚

storm minnow
#

I shall master it soonโ„ข๏ธ

#

Ok, it's done with git submodule update --init, so I'm ready to checkout -- I want to build CP 7, so is it 7.0.0? or something different?

#

git checkout 7.0.0?

jaunty juniper
#

no if you just cloned you're already on main

#

7.x is the current main

storm minnow
#

Oh, so do I just git checkout without a number?

jaunty juniper
#

no no it's already checked out when you cloned

storm minnow
#

Ohhhh.... Ok, that wasn't clear from the page I'm looking at XD

blissful pollen
#

if you use git branch you can see what branch you are on

storm minnow
#
  • main
jaunty juniper
#

when you want to bring in the latest once more updates have been pushed to main you can git pull and rerun the submodule updates

storm minnow
#

I need a cheat sheet XD

jaunty juniper
#

git status --short --branch tells you where you are in a simple manner

#

(I aliased it to st)

#

now you follow the rest of the build guide and if you get errors, at some point it will probably be because you need to run pip3 install click==7.1.2, but we'll see then ๐Ÿ˜›

storm minnow
#

lol

#

So... is customizing the build for a particular board after you build?

#

I'm a little confused, it says about "installing required Python packages" but I don't see anywhere about specifying what things you need like if you need digitalio and touch and whatnot

jaunty juniper
#

ah that's something else, first, make sure you can build a normal build for your target board

storm minnow
#

Do I specify a board? Or is it just going to work on all boards if I follow the guide exactly?

jaunty juniper
#

follow the guide

storm minnow
#

Aye cap'n

#

Error :P

jaunty juniper
#

no that's for linux

#

do you have python3 ?

storm minnow
#

squints yes... yes, I was testing you, good job

#

I forget if I installed Python on here >~>

#

I have 2.7.16

jaunty juniper
#

well type python3 and see what happens

storm minnow
#

3.9.5

jaunty juniper
#

great !

#

so you're good, now do the pip3 install and proceed

crimson ferry
#

@jaunty juniper have you had any odd behaviors with the TTGO... like hard crash? also, did you notice some odd modules built in (for example, sharpdisplay)

storm minnow
#

woosh

jaunty juniper
storm minnow
#

Do I need to upgrade and run again? Or no worries?

jaunty juniper
#

nah, pip is like that, it's fine

storm minnow
jaunty juniper
crimson ferry
#

@jaunty juniper yes:```import espidf

print("ESP Total:", espidf.heap_caps_get_total_size())
print("ESP Free:", espidf.heap_caps_get_free_size())
print("ESP Largest:", espidf.heap_caps_get_largest_free_block())```

#

--> Crash into the HardFault_Handler.

storm minnow
#

What do I do about the pre-commit command? I don't think I missed any steps?

jaunty juniper
storm minnow
#

installing!

#

yeet

#

making mpy-cross

jaunty juniper
#

@tulip sleet should pre-commit be added to the requirements-dev.txt ? Or the build guide add pip3 install pre-commit ? It links to the pre-commit guide but that's one more level of depth

storm minnow
#

So I get lots of this....

#

ends like this

#

Is it possible to have collapsing sections in the guides? Or are they intentionally not expanding?

jaunty juniper
#

yeah, I'm not sure why the intalls are collapsed in the intro, might be a mistake

storm minnow
#

I did that

jaunty juniper
#

ah, did you add it to your path ?

storm minnow
#

Uhhh.... I just downloaded it and ran the installer like the guide says

#

.... unless I forgot to actually run the installer

jaunty juniper
#

hmmm does the guide explain that

storm minnow
#

lemme... run it real quick...

#

this is all it has

jaunty juniper
#

maybe the install does it

storm minnow
#

mmmmaybe I had forgotten to run it, lol

#

Now I get...

#

So I have empty preprocessor output, how do I fill that? XD

#

Gah, it's after 10 X.x I need sleep... I'll be around to try more tomorrow

manic glacierBOT
#

Firmware

Adafruit CircuitPython 6.2.0 on 2021-04-05; LILYGO TTGO T8 ESP32-S2 w/Display with ESP32S2

Code/REPL

>>> import gc
>>> gc.mem_free()
8195792
>>> 
>>> import espidf
>>> espidf.heap_caps_get_total_size()
8583106
>>> espidf.heap_caps_get_free_size()
141378
>>> espidf.heap_caps_get_largest_free_block()

Behavior

The espidf.heap_caps_get_largest_free_block() call results in:

Auto-reload is off...
lone sandalBOT
hoary moat
hollow token
#

I used to return HTTP418 to HTTP clients I deemed to be bots, just for giggles

lone sandalBOT
storm minnow
#

Ok, trying to build on my laptop with Ubuntu 20.04 on WSL 2, got to the pre-commit part. I did pip3 install pre-commit, but it still says command not found for pre-commit install

tulip sleet
storm minnow
#

I do not know how to do that XD

#

Absolutely it, realized I had seen these

tulip sleet
#

your .profile automatically adds .local/bin to path if it exists. But you have to source .profile, or just exit the current terminal and start a new one. Try the latter and then echo $PATH and see if it's now in your path

#

.profile includes this:

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
    PATH="$HOME/.local/bin:$PATH"
fi
#

but it hasn't run since you've done the installations, probably

storm minnow
#

So new terminal gives me this result, looks like it's at the front there? but everything seems jumbled together

tulip sleet
#

The different paths are separated by colons. But yes, you are all set now. Try pre-commit install again

storm minnow
#

Thar we go

#

make -C mpy-cross

#

oop XD

#

this is not the terminal

#

hmm, I didn't get that on my Mac

storm minnow
#

I did a google and followed a suggestion to do sudo apt-get install gettext and it worked

tulip sleet
#

yeah, that is here:

storm minnow
#

Ah, I must have missed that XD oop

tulip sleet
#

np, i have missed things before

storm minnow
#

I dunno what the heck I did XD I thought I had done all the setup steps, I think I missed something

tulip sleet
#

that step is in the Ubuntu setup, not the WSL setup (which refers you back to the Ubuntu setup).

#

copy/paste is your friend

storm minnow
#

I often forget I can do that XD

tulip sleet
#

i added some extra language in the text in the screenshot above to say which packages are needed. You are not the first person to miss that, so it's worth emphasizing.

storm minnow
#

I certainly missed doing the ARM toolchain, because I don't remember pulling apart the tarball, lol

#

This is what happens when you do things while working and sleepy

storm minnow
#

Ok, now at this.... I believe this is the same error I got with MacOS

tidal kiln
#

anybody know a way to determine current day light saving on/off in CP? tm_isdst is returning -1

stuck elbow
#

@tidal kiln even large computers struggle with that

#

the database containing this data was a few years ago removed from the python distribution to a separate package, because it was too big

tidal kiln
#

ha! yah. figured as much. not surprised. and no clever hacks? querying via wifi would be ok, if simple.

stuck elbow
#

yeah, that would probably be the most reliable way

tulip sleet
#

you still need to register for a key

tidal kiln
#

thanks. will take a look. YAFAK (yet another free api key)

tulip sleet
#

@atomic summit hi we are doing a small cleanup of unreleased boards from the CircuitPython builds. I see the "Unexpected Maker FeatherS2 Prerelease". I'd assume you want to keep supporting this for those that got it, is that right? Do its pins or other features vary slightly?

onyx hinge
#

I think the intent with that lib is, you set CP's idea of the time to the standard time where you are, and use adjust_dst() to add the 1 hour daylight offset during a portion of the year

ionic elk
#

@tulip sleet are you online?

tulip sleet
#

yup

ionic elk
#

I'm trying to get this PPK2 running and I'm kinda confused by the documentation. Which output wire am I actually rigging to, say, a feather USB pin?

tulip sleet
#

i didn't use it to power USB. I power the battery pins

#

photo coming...

ionic elk
#

hmm, I think my actual problem is I'm not getting the connect tool to put it in "source mode

#

Yeah that's the setup I thought I should have.

#

ok I figured it out something was a button in the UI that I didn't realize was a button.

tulip sleet
#

i feed a battery to to VIN and ground, and send VOUT and ground to the board. I was interested in battery-powered consumption only.

storm minnow
#

So, trying to build CP... what causes "Empty preprocessor output"? I don't se an error in my mpy-cross make

ionic elk
#

@tulip sleet Great, ok. The docs just refer to the setup of an NRF board - I figured that was probably the setup but didn't feel certain enough to try it

#

@storm minnow sounds like you still have path issues related to the toolchain installation

tulip sleet
storm minnow
#

Ah

tulip sleet
#

why are you specifying a BOARD for mpy-cross??

#

i don't think you mean mpy-cross

storm minnow
#

I didn't?

tulip sleet
#

oh, I misread the above, sorry

storm minnow
#

lol

#

So do I need to do make clean BOARD=circuitpython_express?

idle owl
#

@storm minnow Do you mean circuitplayground_express?

#

And yes you include the board when doing make clean.

storm minnow
idle owl
#

I was mostly wondering if that's your issue. Did you type it properly in the command?

storm minnow
#

Yeah, good in the command. Ran make clean without error, building again

#

QSTR updated is all it says, so I feel like that's a good thing XD

#

Oh, some things happening

#

This feels like progress, lol

manic glacierBOT
#

I'd like to request that an additional parameter be added to the GamePadShift API/Module that allows you to define the number of bits to be shifted in. For example, GamePadShift could be used with a Super Nintendo controller if it could be set to shift in 16 bits instead of the default 8:

classgamepadshift.GamePadShift(clock: digitalio.DigitalInOut, data: digitalio.DigitalInOut, latch: digitalio.DigitalInOut, bits: int = 8)

I'd be happy to make the changes myself, but the shared ...

storm minnow
#

Github trying to bury me :P Not sure if this is one error or multiple? No idea what to do

tulip sleet
#

try pip3 install --upgrade click

#

there is an issue about pip3 not doing dependency versions correectly

storm minnow
#

Ok

tulip sleet
#

what does pip3 list |grep click say?

storm minnow
#

Had already run upgrade, but here's both

tulip sleet
#

actually, tell me the above, and then do pip3 install click==7.1.2, which is a known compatible version

#

pip is not doing transitive dependencies correctly, at least for this

storm minnow
#

7.1.2, check

#

So make clean and try again?

manic glacierBOT
storm minnow
#

I have built CircuitPython! :D

#

Confirmed working on my CircuitPlayground Express! Huzzah!

idle owl
#

@slender iron Are the NeoPixels on a board supposed to reset on soft reset? So if I have LED code running, and then change it to something entirely different and save, should the NeoPixels stay on at whatever the last color was, or should they shut off?

manic glacierBOT
#

That's true, and I agree this is a tricky situation. But just playing devils advocate here, I don't think we have existing precedent for a module tying down resources from an unrelated chip feature just to fit the API, either. If that resource was in abundance, I wouldn't worry about it, but there are only 4 timers on an ESP32-S2, and I don't think it would be that out of left field for someone to wonder why their 4 servo robot is conflicting with their IR controller when Arduino and the IDF ...