#circuitpython-dev
1 messages ยท Page 373 of 1
also @tulip sleet you have time to take another look at the sleep API updates again? They're all set to go I think
yes, I should be able to. I was looking for unreviewed PR's this morning, but I may have missed them.
Thanks! - That was a logic error from my recent revisions.
Thanks for taking this on!
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...
I found a repo on GitHub(https://github.com/ZuluSpl0it/micropython-raspberrypi) that ports MicroPython to the Pi 0. It seems to work, but how would I go about changing it to CircuitPython?
are you talking about the boochow repo? its probably better as a reference
Oops! Wrong link, let me edit
@crude blaze has been thinking about circuitpython on rpi too
The boochow repo is out-of-date. The one I have in my post seems to work better
Tested final change on MagTag. LEDs are acting as expected - purple, three yellow blinks on startup, and blinking three yellows when in safe mode.
ah, I haven't seen that one
I found it in the PRs; it's just a fork
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...
https://www.youtube.com/watch?v=5zq8RHXVdSI&list=PLjF7R1fz_OOXBHlu9msoXq2jQN4JpCk8A&index=53&t=3604s
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 ...
Thanks!
I think this is where I start esp32-s2: https://youtu.be/DjC53UXKN7k?t=797
Join Scott as he starts the ESP32-S2 port of CircuitPython.
Adafruit Industries, Essential service and business: Critical Manufacturing, NYC โ Executive Order 202.6
https://adafruit.com/covid
How to place an essential, COVID-19 related order at Adafruit
https://adafruit.com/covidorders
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...
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
AWESOME THANK YOU :DDDD
No problem ^_^
IT WORKS THANK YOU

oh man that was driving me nuts, it was making me regret moving to big sur
thank god for pb
what a champ
I was having that happen on my High Sierra machine
I don't remember them sticking around on high sierra?
Maybe mine is weird? I have sticky notifications on my Catalina machine too
Some are sticky, some aren't
i mean terrible design by apple in any case
Yeah, it should stick around for a bit, then hide where I can find it
oh nice I was not aware about that
Pi4 has a couple changes to the peripherals but nothing drastic
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...
Just added purchase links for Unexpected maker TinyS2 and updated links for FeatherS2
Thanks! Now I need to find a way to get rid of the tons of CP devices listed in the Network system preferences pane.
Oof
can't even multi-select in that list to delete
I'm not familiar enough with the Apple Dark Arts to know what to do for that
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...
well that didn't work
$ networksetup -removenetworkservice MagTag
You cannot remove MagTag because there aren't any other network services on MagTag.
ok now I need to make a script that edits /Library/Preferences/SystemConfiguration/preferences.plist
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
When pushed to mpy, code comments are stripped--so I can be verbose in them and not worry about space, right?
right
I'm guessing that is CIRCUITPY_ERRNO? Setting that to 0 in mpconfigport.mk I still get that thrown
there may be a micropy version
want to try that ? https://gist.github.com/Neradoc/0923ac2a5ca82f492a55d412d3a0a906
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)
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...
Cool, that lgtm. I only had a couple after manually purging. I'm on Big Sur, already allowed python to do actual stuff, but apparently not everything has a device name: interface = service['Interface']['DeviceName'] KeyError: 'DeviceName'but try: ... except: fixes that ๐
I'll reboot in a few weeks and see if it sticks (re: comments in the code)
I made a repo, I might have other tools to help use Circuitpython on mac to put in it in the future https://github.com/Neradoc/macos-likes-circuitpython
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.)
Matches the test I did and after a couple days I have seen no graphic glitches on my FunHouse. I'd like to get someone else to look at it to approve since I was also involved in fixing this.
Thanks @gamblor21. Also donโt have the hardware so it will be good if someone else can run it on their FunHouse board.
We can PR them after this one is merged, but there are 2 more boards that need their MICROPY_HW_LED_[RGB] changed to CIRCUITPY_RGB_STATUS_[RGB]:
- pimoroni_tiny2040 (also
CIRCUITPY_RGB_STATUS_INVERTED_PWM) - pimoroni_picosystem (probably inverted too ?)
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...
I ran this on a Funhouse and it does appear to eliminate the "glitches"
before

after
.
Here's a Thing that we can add - its a bit more effort
when setting the window/address/command for the TFT - it should be at 1 MHz max - but when sending data, it can be much faster. it would require a kwarg for different frequency however would allow us very fast display updates.
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...
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
>>>
...
@slender iron Do you need that tested on more than the Itsy RP2040? Safe mode works as expected there.
@dhalbert The version you linked still crashes into the hardfault handler for me with that code in code.py. My lib directory was also empty already.
Tested safe mode on ItsyBitsy, it now works properly. LEDs are intermittently flashing yellow as expected. Flashing on startup was also as expected.
I think there are two things to improve:
- [ ] Make refresh check for ctrl-c when it's waiting for busy to complete.
- [ ] Make the busy wait time out with the refresh time if the busy pin hasn't indicated completion.
Looks like you need to run pre-commit locally to fix formatting issues. Instructions for pre-commit are here: https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/check-your-code
Reproduced! Thanks. It has to be in code.py, so it's timing-related. I think this may be a race condition between fetching usb_hid.devices and USB setup.
@dhalbert The original example has a time.sleep(1) to "avoid race conditions on some machines". But it still fails with that in there. FYI.
Good find! Thanks for the fix!
I think there is already a command/data flag that could be used for this?
ohh apologies, I missed the step for manually running. will do that now
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.
I entered Hello World! into a MacOS terminal, and it returned, The number is 23.
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
good question ๐ค
It's from https://github.com/adafruit/circuitpython/blob/main/shared-bindings/ipaddress/__init__.c#L0
I think it's intended to mean an actual int as opposed to bytes([a,b,c,d]) ?
I don't know
all good. we'll get more testing with 7.x releases
Agreed. Looking forward to it.
I tried this in Python terminal, Linux terminal, Windows Command Prompt and PowerShell, and none of them have this :O special Apple thing!
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.
ยฏ_(ใ)_/ยฏ
Some of the best discoveries in history have been accidental XD
๐ฎ 23 was my student class number last year of school. @idle owl question, what should I do with my own old PRs?
Re-tag CircuitPythonLibrarians. Or me. Or if it's on a lib that has an active participant, tag them to see if they can test it.
This message turned up in my weblate flow: Only raw int or string supported for ip. Are there other types of int's in CP or what is the purpose of the raw prefix?
https://github.com/adafruit/circuitpython/blob/main/shared-bindings/ipaddress/__init__.c#L94
unsigned?
the original message was Only raw int supported for ip I just added strings without thinking what raw int means
Unclear to me, it uses mp_obj_get_int_maybe to check.
do ips accepts hex or binary?
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
It accepts a string, but ony if ipaddress_parse_ipv4address is happy with it.
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
Found no info on the PicoSystem pwm LED, let's assume it's inverted too until further notice.
Removed the word 'raw' from the error message 'Only int or string supported for ip' saving a whopping 4 bytes while also making the error clearer.
OK, just hoping I didn't screw up the pull request. I am a GIT newbie. ๐ฌ
You included all of the submodules. You need to only include the file in which you changed the error message.
So really close!
I'll leave a review.
Thanks for submitting this! You need to not include all of the frozen submodule updates in your PR. Only include the file(s) in which you changed the error message.
Argh.
They're sneaky.
Yeah, never used submodules before. Will have a look later then.
you git rebase main and git submodule sync --quiet --recursive; git submodule update --init and that should clear the things up
Oh, how very very logical. And intuitive. ๐ (Thanks)
unless git does git thing
and make translate and like git push -f fork or something
I made a gitsubupdate alias ๐
Same
Yeah, I just made a pull from adafruit remote, changed one line and did a git add .
maybe it should be a post-pull action
I guess the add . added stuff I wasn't aware of.
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)
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. ๐
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.
@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
Hmm yeah. I'd say PR it and file a new issue?
yeah, i will simplify it
Yeah.
Fixes #4791.
The specialized gc routine in usb_hid was not collecting the pointers properly. It was missing the report buffers. So that storage was double-allocated.
You need to not include all of the frozen submodule updates in your PR.
I think they are actually downgrades ("downdates"?). @bergdahl, try
git submodule sync --quiet --recursive && git submodule update --init' to update the frozen submodules so they are in sync with main. You may need to merge from upstream.
@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.
something is wrong at the moment, so don't worry about it
Ok. Also a valid option.
it was working and then it stopped workign ๐ฆ
Aw.
I talked to @kmatch98 and I am going to take a look at a new PR with the baud rate change. I will update the issue as well.
If a short term fix is required this PR would still be a good idea.
As referenced in PR #4793 I will take a look at an API change to allow separate data and command baud rates for the displays.
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
here is ok. there may not be enough ram/flash for what you want to do
oh okay, i put the shell output in the #help-with-projects channel
do you know where the stack size is defined where i could change it specifically for this branch?
figured it out and it built but it didn't end up working out. Thanks for the help Dan ๐
@still zephyr back now
I believe this may be closed soon, since: #4772 passed the review.
@tannewt is it okay if I close this PR and submit again? I think I set stuff up wrong on my desktop for github when I was forking so it's giving me some problems when I'm trying to commit the updated pre-commit files
No problem closing this and opening a new one. The numbers are free.
Fixes #4778.
If there were too many HID devices specified, an exception was thrown, but the bad number of devices was still remembered.
Also renamed hid_devices_num to num_hid_devices, which is clearer.
Unrelated to the issue here, there's a strange address
0x08(device?) in there which appears on first query and not afterwards. I've got it attached to a Pimoroni Enviro+ FeatherWing which has an LTR-559 (0x23) and BME280 (0x76) and nothing else AFAIK...
Bring this up in another issue if you think it's a CircuitPython issue. But it might be some I2C device issue.
@idle owl this https://learn.adafruit.com/circuitpython comes up as a choice in the learn guides, but it's 404
It turns out this is another manifestation of the bug in #4791, which should be fixed by #4798.
I tested the sample code above and it does not crash with #4798 applied.
This should be fixed by the recent MicroPython mereges from upstream.
Could you show a screenshot or whatever that points to that link? That "guide" is just some pages in progess; the title should not be visible. Thanks.
Thanks -- I have notified the right people
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
Can I, someone incredibly new to CircuitPython, possibly help test CP 7? Or do I need to actually know what I'm doing?
it's not too bad. you could use it
I just wasn't sure if I could provide input of any value as a beginner XD
Giving it a go!
New PR to fix local GitHub config issues and running pre-commit. Adding CircuitPython support for the Arduino Nano RP2040 Connect. Have tested all digital and analog I/O, I2C, onboard LSM6DSOX. Uses the AT25SF128A external flash.
@ZodiusInfuser Do you have details on the RGB LEDs on these boards?
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๏ผ
I don't understand the changes in the circuitpython.pot file, so I think I messed it up even more now?
Well. I'll just give up and start from scratch.
Removed the word 'raw' from error message 'raw int' for shared/ipaddress.
I made a new pull request instead, so closing this.
@dhalbert Yes, both boards have a common anode RGB LED, so pins need to be active low.
Do the config changes proposed here allow for that? I am unclear why the pin defines were changed from #define MICROPY_HW_LED_G (&pin_GPIO13) to #define CIRCUITPY_RGB_STATUS_G (&pin_GPIO13)
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 ...
Are you talking about waiting for USB? Is there any way to shut it down? Because I don't need USB in mass production, it is only used in development mode.
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...
That's great. Thank you very much.
You're welcome. Closing for now.
Maybe I just need to set CIRCUITPY_USB_CONNECTED_SLEEP_DELAY to 0
If I want audiomixer on the Feather RP2040 do I just need to build a custom .UF2?
It should be in the latest RP2040 builds... I built it for all RP2040s
I didn't see it on https://circuitpython.readthedocs.io/en/6.2.x/shared-bindings/support_matrix.html. I don't get the actual hardware until Monday.
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:...
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 ๐
I honestly cannot remember which version I got it in for now.
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?
The MPY format changed and they're not automatically being built yet (as far as I know). I just got the source python bundle and copied that. Takes more space for now but works
Or you can get the mpy compiler working
no they are
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
and it's adafruit-circuitpython-bundle-7.x-mpy-20210522.zip from https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/tag/20210522 you want
Oh thanks, I see them now. Never thought to look there (or looked too hard)
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")
On the #adafruit-github-feed would it be possible to get notifications from githubstatus.com when they do incident notifications. They have a webhook and an Atom/RSS feed.
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?
Thanks, I set this up.
Updated RP2040 Pico to 7.0.0 alpha, libraries from the 7.x bundle. All ๐.
Wow, that was quick! You're on fire!
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...
well, it was easy, and if I do it right away, then it's done
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?
you also need to replace the libraries that the CLUE library depends on; did you update all the libraries?
Yeah, had updated to the one from adafruit-circuitpython-bundle-7.x-mpy-20210522.zip
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?
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!
LGTM; too bad about the confusing pin naming
yeah its wierd because some analog pins are routed thru the esp32!
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 installa 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
2and no_builddirectory to be found.
Any ideas?
this looks useful, just ran make doctest
output in gist, too long for msg https://gist.github.com/ryanhatfield/58fb69f8a0a07d274c65130c682cbb50
there is requirements-dev.txt and docs/requirements.txt
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)
Hmm I missed those in the contributing.md and the docs/readme.md files ... and by missed, I mean it's not there ๐ is that a python thing? I don't code in python often.
ahh I seee https://pip.pypa.io/en/stable/user_guide/
OK, well I might make a PR adding python -m pip install -r requirements.txt somewhere useful.
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
I don't know if building the docs is mentioned though https://learn.adafruit.com/building-circuitpython
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?
I don't think so
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?
๐คท
haha that's fair.
I've been contributing and building Circuitpython occasionally since like January, I'm fairly new
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.
ah
did you git submodule sync --quiet --recursive && git submodule update --init ?
.... I did not, and why the heck would I do that? that's nowhere in the docs
the reference is: https://learn.adafruit.com/building-circuitpython/build-circuitpython
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.
yeah I guess it's not as maintained as the learn guides
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
.... ๐
oh yeah "copy code" is a trap !
+1 for VSCode and multiline select.
does learn.adafruit.com have any sort of API?
like, can we use Github actions to build the docs and push to learn.adafruit.com?
woot! thanks @jaunty juniper got it building
now if I could only learn to not hate python...
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)
it would be nice if the docs could be versioned in github and pushed to learn.adafruit
๐คทโโ๏ธ I'll poke at sphinx for now
you mentioned the matrix, the "files changed tab" in these would show which files are involved in it:
The page: https://github.com/adafruit/circuitpython/pull/4617
How the list is generated: https://github.com/adafruit/circuitpython/pull/4539
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.
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
hrmm, is there a place I could inject some JS?
i have to take off for now, thanks for the help @jaunty juniper
microcontroller.reset() works for me if I use the .bin, but not if TinyUF2 is present.
@solar whale ๐ if you have time, could you take a look at this pull, I want a second opinion on the RP2040 if you have these sensors thanks
https://github.com/adafruit/Adafruit_CircuitPython_TCA9548A/pull/32
at least the TCA9548A
thanks
@still zephyr I do have one , somewhereโฆ Iโll try to find it and try it on an rp2040 tomorrow.
Thanks ๐
Yeah the code was tested on the Tiny2040, it blinks as expected from #4743
The defines were changed from CP_RGB_STATUS_G to CIRCUITPY_RGB_STATUS_G in it. I can't find any reference to MICROPY_HW_LED_G in Circuitpython (which explains why it wasn't updated with the others).
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
Update the ValueError: Incompatible .mpy file section for the upcoming 6 to 7 transition.
Update comment in mp_raw_code_save so that it matches the code.
Hi - looking at the datsheet for this chip (TDK motor controller) I see that the RAM and flash are very minimal, and are unfortunately much smaller than CircuitPython requires. The smallest chips we can use have 32kB RAM and 256kB flash. The HVC 4223F seems to only have 2kB RAM and 32kB flash.
@still zephyr there does appear to be something odd with the RP2040 I2C at least via the mux?
yes, I am not sure what, but yes, I have the same issues as you, sometimes I have to reset, unplugged and then it worked, and then after it did not
Could not reproduce why
My favorite kind of bug ๐
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
Iโll try these sensors without the much in a little while.
Thanks @solar whale
Glad to help!
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
some of the trinkeys don't actually have 6.2.0 releases, but for some reason they showed up in circuitpython.org. We should fix that (by hand, probably).
Ah, ok. To the bucket!
Thanks a lot, @danh !
Thats quite what I wanted to know
I know it is a circuitpython forum, but for micropython I guess it is similar
micropython would be similar. it was squeezed onto the 16kB RAM micro:bit, but that was a very tight fit
Thank you very much, @danh
So I'll skip the idea and follow another approach
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
ah that's because they were renamed
i can copy stuff around on S3. That might be the easiest fix
looks like it's just rotary_trinkey
@still zephyr it looks like the RP2040 issue is related to the tca9548a and not a general I2C issue-
I see, wondering why works with the other two boards
Yeah, when I went to the Slider page it didn't have the big download button
ok, fixed!
i copied and renamed the 6.2.0 version from rotary_trinkey_m0 to adafruit_rotary_trinkey_m0
Ah, cool. Confirmed working!
That's the MCU from our Company, yes - there will be a successor in a new technology, but I doubt, if ressources will be enough..
snek seems to be really cool
yes, snek might work nicely for simple control programs for your chip
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...
@gamblor21 For 3 can that easily be done to another non-ESP32S2 chip using short wires with same size data to see if it arrives ok? I.e. send data burst and receive and checksum it on other chip, repeat (with a pause) for many tests looking for rx errors or wrong checksums. A logic analyser capture would be useful but sounds a bit fiddly physically to obtain?
There are some cryptic notes in the IDF documents about the SPI settings. There is one function that is supposed to evaluate whether the frequency can be met https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-reference/peripherals/spi_master.html#_CPPv418spi_get_freq_limitbi
This function to configure the SPI speed has a [cryptic me...
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 has been running flawlessly for almost 30 minutes, a lot longer then ever before without artifacts.
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...
The master branch is defunct. We do develop on main now. Also, information about flash chips is now stored in a separate datafile. See
https://github.com/adafruit/nvm.raw
and
https://github.com/adafruit/nvm.toml
We happy to entertain pull requests to those repos.
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.
Note that the USB sleep shouldn't happen when waking from deep sleep. It should only happen on power on. It's a bug if any delay occurs when waking up.
I've argued for this but it hasn't stuck yet. CircuitPython's docs are from github
@gamblor21 Awesome. I replicated your results on my Saola Wrover demo board. I build a "non-DMA-SPI" version using CircuitPython 6.3.x. It's run for a few minutes so far with no glitches. I'll run it overnight and report if I see anything in the morning.
I hacked the SPI.c file in the ports/esp32s2/common-hal/busio file to turn off DMA for the
I edited the function `common_hal...
The delay is happening when exit_and_deep_sleep() is called (which then throws an invisible special excepiton), not on wakeup.
I had the same problem for the past few days but it worked a few hours ago.
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.
I think that's fixed in latest, https://github.com/adafruit/circuitpython/blob/main/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/pins.c and is coming to 6.3.0
by the way you can get the 6.3 PR build from the artifacts scrolling down on https://github.com/adafruit/circuitpython/actions/runs/847449597 it's not released yet because some testing was needed since it's a big cherry picking of a bunch of things
(or use the latest from S3)
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.
Thanks. Got the latest 7.0.0 and pin defs seem good. Haven't tried touch yet but the rotary pins all work.
@tannewt I don't think it's necessarily relevant here but is there a cut and paste error in that code:
Is second esp_ptr_dma_capable(data_out) supposed to be esp_ptr_dma_capable(data_in)?
In the comments in https://github.com/micropython/micropython/pull/5033 you can see how MicroPython does this for read_u16() but I believe that was a fresh implementation, i.e. no impact to existing code/users.
Ran overnight with the hack above and screen looks correct. I suspect this will be an โin the weedsโ at todayโs CircuitPython call to discuss on which way to go with the associated PR.
@slender iron I'm super wiped from early morning travel and vaccine day-after, so I might miss today's meetings
The essence of what MicroPython is doing is this:
// Scale raw reading to 16 bit value using a Taylor expansion (for 8 <= bits <= 16)
uint32_t u16 = raw << (16 - adc_bit_width) | raw >> (2 * adc_bit_width - 16);
We can fix this in 7.0.0 or on another major version. Breaking changes are allowed on those boundaries.
We're looking into it (if Dan didn't already tell you). It's an internal thing that somehow ended up available externally.
It takes time. You eventually come to terms with it. ๐
https://learn.adafruit.com/search?q=airlift also has a 404 link on it, is the fix global, or should I point out if I find more?
@slender iron have two minutes?my two questions from friday ๐
Ok, take it easy!
Yup, I'm around
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
it changes the memory requirements?
no the same file
can you give me an example?
yes
for example dps310.py
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
That is the exact same issue. So the fix should resolve it. I'll let Learn know.
what is in the __init__.py? I think it is imported first
nothing in the init
hrm, may be tight on memory
I think the only extra memory will be the package dictionary
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?
ya, you'll just get a couple more dictionary entries before the large import
how big is the allocation that fails?
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
if they are more than 100 bytes or so then there may be a way to split the memory up so it fits better
thanks!
Good afternoon all you wonderful folks -- happily lurking and lurking happily.
will get started shortly. gonna take a bathroom break
BRB need water.
Lurking, I'll be off-line/driving most of the meeting time. Will try to be back for @errant grail "in the weed" discussion.
CircuitPython on a calculator? Yep, those numbers add up 
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...
Downloads
MicroPython with Pimoroni Libs (945KB) - https://github.com/pimoroni/pimoroni-pico/releases/download/v0.2.1/pimoroni-pico-v0.2.1-micropython-v1.15.uf2
MicroPython with Pimoroni Libs + Ad...
With the upcoming #CircuitPython 7.x, you'll be able to selectively disable the many USB devices it creates (e.g. CIRCUITPY drive & USB serial). This QT Py example disables everything but USB HID, unless you touch the QT Py's TX & RX pins when plugging in https://t.co/a87WpzE0yg
We've wanted to have something that plugs into a USB A port and provides a QT port for a while. But since we want it to support any and all QT boards, we need more RAM and storage than the SAMD21 can provide. We probably cannot buy any SAMD51's for like a year - but RP2040 is a good option! Lots of RAM and we stuck an 8MB flash on there. The ide...
Liz submitted a PR to add support for the Nano RP2040 to CircuitPython and we thought to try it out! So far so good, the digital pins all toggle right and we were able to see the built in LSM6DSOX chip on the I2C port. We have a driver for this IMU so hey, why not wire up a quick demo? We have an external OLED wired up on the same I2C bus, readi...
I noticed that the last lib bundle is 20210522 -- was it just a quiet weekend?
@trim elm Sommersoft, I'm fairly sure.
๐ on the road home right now
@tulip sleet I'm assuming you've already seen this but kmk would be a good starting point. afaik it uses circuitpython
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
Ah I see
gamepad tells you which buttons were pressed since you last asked (it's latching), so you don't miss any presses
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
that reminds me, gamepad.py in the adafruit_hid examples should be renamed, it clashes with the built-in one
@trim elm If you're looking for helpers, I'm up for helping out on the move to main branches for libraries.
@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
good point; that was meant to be temporary, but it shouldn't block the builtin one
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.
it's like every new trinkey released tries to up the previous ones in the tong twister department
Also I got my first vaccine this morning.
I'll get mine tomorrow โ๏ธ
@idle owl congrats! (and @jaunty juniper!)
Here's hoping that your side effects are negligeable to non-existant @idle owl and @jaunty juniper
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!
I'm currently recovering from the side effects from a Saturday poke.
Thanks! I hope so too.
@blissful pollen if you are lurking, do you want me to introduce your โweedsโ topic?
I'll unmute for that, was eating lunch before
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
yep...wonder if related to other 2040 i2c issue...specific to a sensor...cant remember where...
Maybe the fix done in RP2040 I2C is interacting with the mux need.
There was that stuff about short write early in RP2040 integration.
@tulip sleet while you're here: https://github.com/adafruit/Adafruit_Board_Toolkit/pull/7
Not sure if the library name or the links are wrong
Is there any benefit in disabling displayio auto update?
interesting that Feather M4 (192KB) with 320x240 SPI display is faster than PyPortal (256MB) with 320x240 parallel display
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.
The PyPortal implementation uses additional displayio Button (touch) elements to replace the hardware buttons of the M4. That probably slows the display updates.
@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.
Let me know if I can help.
Maybe it should output "scan code" like keyboard, just a "byte" per key that you define in advace (like x,y => int).
Keypads with LEDs and at least one piezo buzzer, perhaps?
Thanks everyone!
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.
Thanks all!
Thanks!
LEDs and buzzers etc would be separate from this. This is only for reporting presses
it would take a bunch of pins or DigitalInOuts (rows and columns)
Would we want to support functionality like PS/2, where we signal a key down and a key up event?
That's what I figured. Just keeping my hidden agenda unhidden.
No fever for me, but cold + hot chills and serious full body aches. Moderna #2.
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
HID reports just have "currently pressed" down info, not press and release events, but they can be generated from this. However, it could also be primitive.
Moral Concensus is, after getting a vaccine dose, plan on resting that day, and possibly the next on the 2nd dose
I proactively took the next two business days off --- and was lucky to schedule both on a Saturday.
I confirm preparing sleep time is key. Before and after.
So...four day weekend ๐คท
Avoid vaccine on Friday, so that if you are really sick two days, that is on the company. ๐
Nice. Wish I could have scheduled mine. It was a county program, so it was "show up here at this time with your QR code and your ID"
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
@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.
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!
Yikes! That's not quite "I'm gonna go grab a coffee" range!
That's awesome of you @blissful pollen!
@blissful pollen Seriously, you're awesome for offering that.
Thanks, I'm still waiting to hear what Canada is doing with second doses for people who took AZ
@blissful pollen You're a great friend ๐ช
What's up with AZ?
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
Hmm, same here in the states with Johnson & Johnson
Most places reinstated it with "the cure isn't worse than the disease" mentality.
Too bad it isn't Arizona, as in the iced tea! Get your dose in a can of it ๐
That made me think of the Dinosaur DNA vials tucked away in a aluminum can from Jurassic Park.
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)
yeah i'm up for whatever second dose i can get
Are things pretty much still all shut down and locked down where you are @blissful pollen?
yup I'm in Manitoba and we're (and still have been) locked down good
I want to go to Canada
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
CircuitPython Weekly for 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 me...
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.
In EU (or UK), they were investigating if after dose 1 of AZ we can take a dose of another one.
They are doing a study here as well on changing doses, not sure if I will qualify but I signed up
Also playing with the time between dose 1 and dose 2. It was 8 weeks, then 12 weeks, then 8 weeks again.
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.
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
Thanks
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.
I don't think it should delay then because ticks should continue counting while sleeping: https://github.com/adafruit/circuitpython/blob/main/main.c#L427
We need to delay the first time because we don't know whether to fake or real deep sleep. @duanhongyi Are you talking about just the first time?
?serverinfo
@ZodiusInfuser I'm not sure they worked as-is. I think this will make it work.
Looks good to me! Thank you!
@tannewt I don't think it's necessarily relevant here but is there a cut and paste error in that code:
Is the second
esp_ptr_dma_capable(data_out)supposed to beesp_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...
Ha. The feeling when weblate tells you to translate a string and you realize it's from your own pull request. ๐
Thanks! Looks like it needs a merge.
This doesn't appear to have anything to do with #4800 so I'm reopening.
@dhalbert I believe you meant to link another issue for closure.
It was supported on CircuitPython for a long time, but we never added it to Blinka until now.
The Monday feeling when you can't think of how to translate it! ๐คฆ
Thanks! Looks like it needs a merge.
just copy paste the previous translation without the raw part ๐
adafruit/circuitpython master is deleted
btw this is great also
Thanks, Scott.
to have that number in the low hundreds instead of thousands is really heartening
@tulip sleet it was almost sub-100 ๐
Scott is magic
Same thing :P
Is the matrix multiplication issue fixed for circuitpython?
@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....
it's just one little PR ๐
but a bunch of other issues under discussion.
anyone seen CIRCUITPY folder show up and COM port show up but then not be accessible via serial?
https://forums.adafruit.com/viewtopic.php?f=60&t=179290
this is with two magtags, where one works as expected.
@solar whale oh yah, i took a look at the other issues while i was there and commented some
I was just surprised to see you commenting on the other issues as well -- good multitasking skills!
I have a few times.
I just rebooted the PC and it fixed it for me....๐
neat! thanks. hmmm... seems like maybe it's been done? but i'll ask them to try that just to make sure.
i was going to suggest doing erase_flash and then load the .bin directly, but they may have done that already
You're welcome. Anytime!
That also works...
@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....
You know they won't work now....๐
I had to do it!
@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?
possibly..., but i cannnot think why
Maybe because of bootloader??
Probably not though..
@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...
Yeah, Linux usually works
@solar whale i may been a little better off after upgrading to 20.02. but still getting hangs. haven't upgrade pc hw though.
20.02 Ubuntu?? On what machine??
@hidden oxide I've had a long history of my linux box freezing and rebooting when I disconnect some CP boards
@tulip sleet how could they flash erase?
there's an esptool.py command
I have 20.04 on an old Mac Mini
ohh. yah. ok.
esptool.py --chip esp32s2 -p /dev/ttyACM0 -b 460800 erase_flash
Hmmmm... I have trouble with that on my Mac, but not Linux. It only happens to me on Linux with Arduinos and 1 time with a MagTag, but not normally
I sort of suspected flash, but I thought it could be power draw too on my Mac
@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.
OK. I am using 20.04 too (not now to write this, but for CP) and I know it was power draw at least once...
Have you tried a powered USB hub?
Yes, just one little PR, I think we learn a lot because of this ๐
@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...
I agree
at this point I think I will need a Cat also...
what is going on.. I do not understand
We're trying to figure out why our computers crash/freeze when we plug in CP/Arduino boards
@hidden oxide we were commenting on another issue
oh sorry, sorry I was talking about this ...https://github.com/adafruit/Adafruit_CircuitPython_TCA9548A/pull/32
Mmm, sorry, my bad ๐ฌ
I've had enough fun for tonight -- time for bed ๐ค Good night, all!
@solar whale I was testing, to write the issue as mentioned, I ll wait in your findings tomorrow
Good night
See y'all! Thanks ๐
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!
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 !!!
@amitkrbhuyan we believe it is fixed in the current stable release, 6.2.0.
Welcome
Is or will usb_cdc be supported on nRF52840 devices (i.e. Particle Xenon)?
Well, there's always a catch it seems... I'm getting a high rate of failure to re-mount after flashing 6.2.0 CP uf2 when using tinyuf2 v4.0 - re-mounts as [unnamed] device on my Mac and wont mount at al on the test jig.
If I erase_flash on them and re-do it with tinyuf2 v3.0 it works.
I'll add an issue in github later tonight.
@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)...
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...
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...
@idle owl @slender iron is the "NEOPIXEL_POWER in use" on Itsy RP2040 problem fixed already? We have a user in https://forums.adafruit.com/posting.php?mode=reply&f=60&t=179632 who is encountering this.
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
This is ready for re-review. I just fixed the merge conflict and clarified a comment.
Thanks, I will point to a newer one.
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.
Does anyone know if the setup instructions in the Building CircuitPython learn guide works under the Ubuntu WSL on Windows 10?
There are specific instructions for WSL. It's best to use the latest WSL (WSL 2, not WSL 1). It worked the last time I tried it but that was a while ago. You may need to install some extra packages, but it should just work, because it's Ubuntu.
Ahh, I see the instructions for that in there now XD thanks
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?
Images automagically compressed by Calibre's image-actions โจ
Compression reduced images by <strong>68%</strong>, saving <strong>13.72 MB</strong>.
| Filename | Before | After | Improvement | Visual comparison |
|---|---|---|---|---|
| <code>assets/images/boards/large/adafruit_feather_esp32s2_nopsram.jpg</code> | 205.42 KB | 55.83 KB | -72.8% | [View diff](/adafruit/cir... |
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...
@solar whale ๐ I swear this one is easy.. no need to give the sensor to the cat
... do you have the PCA9685 breakout?
No this is just to test an example, https://github.com/adafruit/Adafruit_CircuitPython_PCA9685/pull/36, if tests are good we could merge @solar whale
OK -- I'll give it a try.
Thanks ๐
Any particular behavior I need to verify or only that it runs?
The last thing I plan to add to this before rc.0 will be a fix for RP2040 slow crystal oscillator startup, which is dependent on https://github.com/adafruit/pico-sdk/pull/4/
@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.
@still zephyr it works for me -- I'll comment in the PR
Thanks for testing ๐
Would you like me to merge it?
I have just pinged Dylan, to see if she has any objection
@still zephyr OK -- I'll be offline for a few hours, then hope to get back to the TCA9548A ๐ฌ
LOL ๐ฑ
- toss in a
git submodule sync --quiet --recursive && git submodule update --init - it's
requirements-dev.txtfor Circuitpython core (anddocs/requirements.txt) - maybe a
pip install click==7.1.2for the core, it's a reoccurring problem - I use the github command:
gh repo clone adafruit/circuitpythonandgh pr ckeckout <PR number>
Thanks. There's some nice suggestions there. I can probably parameterize the prtesting script so that I call prtesting <circuitpython-repo-name> <pr-number> and do it all in one.
It amazes me how often I forget to cd into the cloned folder before trying to checkout.
Looks like you got this sorted?
if it has been fixed since the "alpha" build the user is using, yep
i missed that they were not using a recent build.
It looks like you're referring to an Arduino library - this channel is for CircuitPython development discussion. You'd get better assistance in #help-with-arduino or #help-with-projects.
Yah that would do it. Good that it's sorted.
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
[reposting in correct channel:]
@slender iron when you have a chance, if you can re-review these:
- https://github.com/adafruit/circuitpython/pull/4798, that is a critical fix for dynamic HID
- https://github.com/adafruit/pico-sdk/pull/4 lengthen xosc startup. When this is in I will make a PR to main to include it, and also include it in https://github.com/adafruit/circuitpython/pull/4757, which is the 6.3.x branch. Then I will have you or someone re-review #4757, and then I can make a 6.3.0-rc.0. thanks
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.
I'll move to #help-with-circuitpython
Ok, I'll reply there. I have a couple of questions, but admittedly, not any answers.
I have no idea. I haven't ever worked with the GPIO library
Yup, will do today. Haven't gotten to my email yet
@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
I am not sure there is a simple algorithm that both works reliably and does not have a dead spot when reversing. @nmorse, how do you think we should proceed on this and #3875?
@crimson ferry The 404 links should be gone now. Please let me know if you see them again.
@tulip sleet sure, but I don't really have much to add
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)
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
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
for a keyboard you want to be scanning a matrix
yes, that's the main step up
I do a very similar thing to the gamepad for debouncing, but then I eventually convert it into keyup and keydown function calls
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 #
i will look at that - thanks
or you could just report the whole matrix, as rows bytes with cols bits
do you use the timestamp?
it really depends on at which point you want to make the cut between the library and user code
yes, i agree
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
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
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??
yes
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
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
yes, that can be done at a higher level
This is ready to try as a release candidate. I just need a review and then I will make a release.
@tulip sleet Reviewed.
thank you!
OK. I was just wondering..
was github actions having trouble earlier? the translate PR has canceled jobs
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...
Automated website update for release 6.3.0-rc.0 by Blinka.
New boards:
- huntercat_nfc
- bdmicro_vina_d51_pcb7
- adafruit_slide_trinkey_m0
- adafruit_proxlight_trinkey_m0
- adafruit_neokey_trinkey_m0
- artisense_rd00
- aramcon2_badge
- sparkfun_micromod_rp2040
- pimoroni_picolipo_16mb
- adafruit_qt2040_trinkey
- pimoroni_picolipo_4mb
- arduino_nano_rp2040_connect
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
they do it to make it clear which are well documented
I canceled the translate jobs because it was just going to be triggered again after the latest set of PRs. I thought we'd wait until the imminent PR's were all merged
Actions was really bogged down yesterday and PhilB and Limor needed to do some Arduino-related Actions.
including this morning
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
i agree, not sure how easy the "this port only" builds would be
micropython does it
we just look for the commit filenames only being in certain port trees, I guess
do you think the ports_<someport>.yml is good too?
nah, I do like that we block the board builds based on tests
@cilerlerย , Currently, in the commits object of the github context, there indeed is not a property (like push_paths as you mentioned) to list the changed files or paths on the push. Using the git-diff command indeed can get the list of the changed files. I tried to set the list as an environment variable (or an output parameter) to be used in ...
looks like the recommendation is just to short circuit jobs
I'm confused, so they did implement the latter link already?
oh, so we do need to filter
or we could switch to workflows and always build
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??)
I can't let myself get distracted
I don't think so because they are generous with public repos
MANY links would need to be changed if we moved organizations, though maybe there is forwarding
does anyone have a favorite device/sensor that uses the Register library so I can look at it's use?
What do you like to measure?
Right now I'm working on adding the voc algorithm to the SGP40, so something in the Sensirion family would be good
BEcause if you ask me I love temperature sensors
Temp sensors work wonderfully as well!
Just kind of looking for example of it is use alongside the documentation
sensirion.. ok give me three minutes.. you want to add functionality or just to look at them?
at the code I mean
๐
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
right I understand, give me 5 minutes, I take a look..
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..
Awesome! This should help point me in the right direction, thank you!
ping me anytime if you need more information happy to help
Will do! Thanks again for finding these!
you are welcome
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?
APFS is newer, and better for SSD's https://www.howtogeek.com/331042/whats-the-difference-between-apfs-macos-extended-hfs-and-exfat/
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)
๐ if you have the pins to avoid the expanders, go for it. the tradition of using an Arduino Pro Micro with expanders is strictly a tradition
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
Trying to get ready to build CP for the first time, but I'm getting this error -- following this, it doesn't say anything about setting a directory to be a git repository? https://learn.adafruit.com/building-circuitpython/build-circuitpython
did you do the git clone?
could you show me the commands before the cd above?
first command
you don't cd to where you want it; you cd to where git clone put it
ohhh....
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
^ I really wish that git had a flag to then cd into the cloned repo
you could mv it but i'm not sure about the case sensistivity thing
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
This is confusing XD
Ok, yeah, it went into my home directory, but now cloned to where I wanted it cloned, lol
git clone is relative to $(pwd)
unless you override it with a runtime flag to tell git to clone to another path
This is the first time I ever cloned something XD
git clone $REPO_URL [$output_path]
It cloned into my desired location when I had the prompt in that directory, lol
there is man pages for this which is included with git that you can read via git clone --help
(that's because a cloned repo is a folder by itself, with all the project files)
I feel like my eyes glaze over when I think about git
I currently find it mystical XD
It takes some times xD, yet practice makes everything better ๐
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?
Oh, so do I just git checkout without a number?
no no it's already checked out when you cloned
Ohhhh.... Ok, that wasn't clear from the page I'm looking at XD
if you use git branch you can see what branch you are on
- main
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
I need a cheat sheet XD
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 ๐
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
ah that's something else, first, make sure you can build a normal build for your target board
Do I specify a board? Or is it just going to work on all boards if I follow the guide exactly?
follow the guide
squints yes... yes, I was testing you, good job
I forget if I installed Python on here >~>
I have 2.7.16
well type python3 and see what happens
3.9.5
@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)
woosh
I don't use it much currently, I think there are issues I need to investigate, but the one I can remember is the ipaddress bug I fixed a few days ago
Do I need to upgrade and run again? Or no worries?
nah, pip is like that, it's fine
I have a note that says I had "MemoryError" with the TTGO using requests, in ways I didn't have with the FeatherS2
@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.
What do I do about the pre-commit command? I don't think I missed any steps?
pip3 install pre-commit then
@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
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?
ah https://learn.adafruit.com/building-circuitpython/macos "install the ARM toolchain"
yeah, I'm not sure why the intalls are collapsed in the intro, might be a mistake
I did that
ah, did you add it to your path ?
Uhhh.... I just downloaded it and ran the installer like the guide says
.... unless I forgot to actually run the installer
hmmm does the guide explain that
maybe the install does it
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
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...
This eveningโs distraction: https://datatracker.ietf.org/doc/html/rfc2324#ref-COKE
Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) (RFC )
I used to return HTTP418 to HTTP clients I deemed to be bots, just for giggles
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
probably it's not in your path. Add /home/doctor/.local/bin to your PATH. If you don't know how to do that we can talk about it.
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
So new terminal gives me this result, looks like it's at the front there? but everything seems jumbled together
The different paths are separated by colons. But yes, you are all set now. Try pre-commit install again
Thar we go
make -C mpy-cross
oop XD
this is not the terminal
hmm, I didn't get that on my Mac
I did a google and followed a suggestion to do sudo apt-get install gettext and it worked
yeah, that is here:
Ah, I must have missed that XD oop
np, i have missed things before
I dunno what the heck I did XD I thought I had done all the setup steps, I think I missed something
that step is in the Ubuntu setup, not the WSL setup (which refers you back to the Ubuntu setup).
copy/paste is your friend
I often forget I can do that XD
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.

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
Ok, now at this.... I believe this is the same error I got with MacOS
anybody know a way to determine current day light saving on/off in CP? tm_isdst is returning -1
@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
ha! yah. figured as much. not surprised. and no clever hacks? querying via wifi would be ok, if simple.
yeah, that would probably be the most reliable way
@tidal kiln there seem to be a bunch of limited-free-use servers available https://timezonedb.com https://timezonapi.io, etc.
you still need to register for a key
thanks. will take a look. YAFAK (yet another free api key)
@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?
@tidal kiln https://github.com/CedarGroveStudios/Unit_Converter/blob/master/cedargrove_unit_converter/chronos.py has some code but it's specific to US / north american time zones as far as I am aware, it doesn't cover world time zones
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
you can also use the tzinfo_examples with adafruit_datetime https://docs.python.org/3/library/datetime.html#datetime.tzinfo.fromutc
@tulip sleet are you online?
yup
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?
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.
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.
So, trying to build CP... what causes "Empty preprocessor output"? I don't se an error in my mpy-cross make
@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
do a make clean first and try again. You may have some partially built stuff due to previous errors
Ah
I didn't?
oh, I misread the above, sorry
@storm minnow Do you mean circuitplayground_express?
And yes you include the board when doing make clean.
yes XD brain scrambles
I was mostly wondering if that's your issue. Did you type it properly in the command?
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
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 ...
This came up here from @flameeyes https://flameeyes.blog/2021/05/25/whats-up-with-circuitpython-in-2021/
I think we should either switch to the (pin, ...) API fully or switch ESP32-S2 to the pwmout version. Having a mix of both is the root problem. The latter is much simpler and would cost a timer but I think is fine. I think we should switch the S2 to PWMOut for 7.x.
Github trying to bury me :P Not sure if this is one error or multiple? No idea what to do
try pip3 install --upgrade click
there is an issue about pip3 not doing dependency versions correectly
Ok
what does pip3 list |grep click say?
Had already run upgrade, but here's both
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
I still vote for switching entirely to a pin API, since the timers on the ESP32-S2 are so limited, and I don't like the idea of our API implying a very different internal process than what's actually happening.
Our API abstracts away the internals deliberately so that code works across ports. This is an example where we didn't do that and it caused non-portable code.
I have built CircuitPython! :D
Confirmed working on my CircuitPlayground Express! Huzzah!
@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?
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 ...