#circuitpython-dev
1 messages · Page 313 of 1
our impls do
I have a map of reserved pin/timer instances. But I don't have a general manager, that's what I'm writing right now
so just take a gander at the atmel and nrf and see if they are worth cribbing from. ... do you have an answer for @half sedge ? Maybe just "not yet"
@ionic elk taking your example of rgbmatrix .. in fact, rgbmatrix uses a lot of pins. Don't the others? Maybe when requesting a timer you can say "and here is a pin I'm going to squat on, so maybe see if I can have that one"?
@tulip sleet yeah I'm looking at your stuff and Scott's right now, along with micropython. I don't think it'll be an exact fit but it's good to know the gist
@tulip sleet I am going to use time.monotonic() rather than time.time()
Maybe that works.
@onyx hinge that's a good idea, starting the search for timers within pins that the module itself is preventing from being used for PWM
Ok well lots of stuff to try here, thanks @tulip sleet @onyx hinge
you're welcome
@tulip sleet It works with time.monotonic() as the usage was a loop with a timeout like explained at the end here: https://learn.adafruit.com/arduino-to-circuitpython/time
@half sedge I'm assuming we just haven't yet implemented an RTC API on at least some STM32 chips. I know that some have real date/time clocks built in.
I am trying to use the FeatherWingEnviroPlus from Pimoroni on my STM32. And Pimoroni code is very not CircuitPython minded as it is their first FeatherWing. That will keep me busy for some time I guess.
No RTC on STM32 yet yeah
Fine for me, I solved that even if the solution is a bit monotonic. 🙂
Now I fixed their particul sensor that use the same kind of code.
@trim elm and anyone else that may be interested: I've got the very basics of the layout system code pushed into a repo now: https://github.com/FoamyGuy/circuitpython_display_layouts I need to read up on the cookie cutter system a bit and probably make a new repo eventually. But for now the library code and a basic example are in the repo.
It's likely bit rough around the edges. I don't have a lot of experience designing class based APIs in python, there is surely some room for improvement.
I am very open to feedback on the JSON structure and language in particular as well. It's better change names and structure of it early on now before there is any layout code out there to get broken I think
@slender iron there are some deprecation renaming things we could do for 6.0.0 that are already 6.0.0 milestone issues: https://github.com/adafruit/circuitpython/issues?q=is%3Aopen+is%3Aissue+milestone%3A6.0.0: 3007, 2853 2082
@half sedge Is time.monotonic_ns() available on the board you are using? That's better as it doesn't suffer from reduced sub-second precision over time.
@simple pulsar I will give this a try, however I would need something that works both on CP board, but also on Raspberry Pi. Those library I try to fix are from Pimoroni, so to be accepted change need to be portable.
It is just a timeout active loop. It will never last long and precision is not an issue I believe.
@half sedge it's long uptime that messes up time.monotonic() - I wrote about it in https://learn.adafruit.com/clue-sensor-plotter-circuitpython/time-in-circuitpython
@lone axle Awesome! I'll try to take a look at it later tonight
@onyx hinge just did a github merge for the above pr
@slender iron oh, had it gotten conflicts or something? thank you
yup, np
Looks great! Thank you!
I wouldn't object to it but think having timestamp is enough too. Go ahead and follow up with another PR if you'd like to.
Looks great! Thank you!
(I'm caught up on email and PRs)
Looks good!
Is this all ready or does it need submodule samd-peripherals updated?
This might just be general how-to, but since it is also ESP32-S2 I’ll ask here.
I have my ESP32S2 WROVER mounted on a breadboard with a USB-C breakout (PN 4090). I get header to header connectivity (i.e. from the pins on the boards) from D- to 19 and D+ to 20, but when I plug in to my MacBook, I do not see a USB Drive mount nor do I see a serial device at /dev/tty.*
When I plug in the WROVER on the non-native USB, it does mount and I can use screen and see CP load.
I swear this worked the first time I plugged in to the native USB via the breakout and never again. I've tried with the ESP32S2 Beta build and the June 23 build and another nightly build as well. All the same.
Is there something finicky about my setup or something else I'm missing entirely?
This isn't an urgent thing, I just want to figure it out. 😉 tx!
I posted this earlier, but everyone was mid conversation. I should have waited for a lull... any thoughts on if is this a general issue with USB breakout boards, or something specific to ESP32S2 or the WROVER?
@idle wharf I had some weirdness early on with the CIRCUITPY drive unmounting and remounting repeatedly https://discordapp.com/channels/327254708534116352/327298996332658690/714651598831222865, but I haven't seen it since. I have same the connections you describe but with the micro-USB breakout, with breakout ground to board ground.
I think I cleared it up by erasing before flashing, something I'd been lazy about with standard ESP32 boards (Arduino IDE, or NINA firmware).
Hmm I do erase and I have GND to GND.
Is erase a complete wipe? Nothing is left behind?
I'm not sure of the process. Do you see any evidence of a connection with system_profiler SPUSBDataType?
I actually power mine from the onboard USB connector, and just use data and ground on the native via the breakout (monitoring both with separate screens), but I can't see why that would make any difference.
I assume the red LED is on.
OK, that's an interesting idea the power. I'm going to try that.
🎉 @crimson ferry That was it! Power from the onboard USB and then D-, D+ and GND on the native usb.
Thank you !
Great you have it working now! I’ll play around tomorrow, checked the schematic and not sure why it would behave like that.
I got back into the not working state. I think if you don't eject.
I'll try some test and save my notes for a more reasonable hour. 'night !
@idle wharf Just so you know, I've had it working fine powered both from onboard and external USB. I've also had them plugged in at the same time as I have a shottky diode protecting reverse current.
One difference is my external is a usb-mini-b, not usb-c.
Yeah now it works off the breakout just fine. I can unplug and plugin without ejecting. I think eventually it make OSx unhappy and it stops recognizing until a reboot.
Anyway.. its working great for a very early build on a devboard. thanks Mark !
I verified that the asf4 and peripherals submodule commits are within the circuitpython and master branches of those repos respectively.
I'm excited to have that PR merged
@tannewt after your merge of main the CI passed. What's left?
I discussed with Hierophect on Discord about how to "de-nest" the code for configuring SPI objects on STM, because the problems with one nesting level per pin becomes unmanageable with the up to 10 pins of SDIO.
This code demonstrates the concept we discussed. When run with Kattni's hw_spi_test program, it prints the same combinations before and after this PR.
The SCK pin is always required. Loop over all possibilities of the SCK pin. When we are considering a particular item in the ...
I'll try testing this on the F7 and H7 when I get a moment, since those have extra cases of peripheral redundancy that need to be accounted for.
This has grown and is really multiple different topics. We need to split it up into multiple PRs. Our priority list becomes:
- SPI SD card in core, supporting all platforms
- SAM D5x/E5x SDIO
- STM SDIO
(that's not to say we wouldn't love someone to pick up #3 before I get a chance to! It's still the only reasonable way to use the SD card on the STM32F405 Feather. The main thing that needs completion on STM32F405 is handling of pin assignments, instead of ignoring them as now...
@tannewt @dhalbert your comment on the above would be very welcome.
[based on @tannewt 's review before merging main]
Translations update from Weblate for CircuitPython/main.
I just got distracted and didn't merge. Now it needs a merge again.
I'll rebase it and rerequest your review.
GitHub is still showing merge conflicts.
@slender iron @tulip sleet just an FYI for now -- still looking into this -- I put together one of Scotts saola-feather adapters and have been testing it -- It seem to be working fine with one possible issue - twice I have had my linux box hang up when I disconneced the USB (in the feather side) from my system., I had to powercycle the linux box to recover. In both cases I had not actually ejected the CIRCUITPY drive. It does not happen every time - I'm just curious if you have run into this with your saola's either with or without the feather adaptor.
I haven't seen it on mac
I've had this box lock up before when connecting/disconnecting boards - I though it was a bootloader issue but maybe not ... I'll keep working with it to see if i can track it down...
FYI, I put something in the forums mainly to see if anyone else has come across this: Adafruit Forums: Garbled exception on code.py reload and broken serial consol.
Hello, I hope you can support stm32f103rx, can you help me, or do you have relevant information, try to build it, but it is not successful
@slender iron @tulip sleet just an FYI for now -- still looking into this -- I put together one of Scotts saola-feather adapters and have been testing it -- It seem to be working fine with one possible issue - twice I have had my linux box hang up when I disconneced the USB (in the feather side) from my system., I had to powercycle the linux box to recover. In both cases I had not actually ejected the CIRCUITPY drive. It does not happen every time - I'm just curious if you have run into this with your saola's either with or without the feather adaptor.
@solar whale This might be exactly what I've seen with the WROVER. Let me know if I can supply more info from my MacBook Air which is lightly spec'd.
@solar whale As I mentioned in the past, I have been having a lot of trouble with linux kernel crashes when I reset a board (it was specially an nRF52 at the time). I interposed a generic USB2 hub in between the host and the board, and the problems stopped. I still have that kernel bug report in about this, but the hub seems to be a workaround.
Merge conflicts resolved again, I had rebased against an older main ref by accident.
@solar whale @tulip sleet on what kernel versions did the lockup happen?
I'm on 5.4.0 (ubuntu 20.04) and been testing a saola on the feather usb side and had no problems yet.
@silver tapir I'm on same 5.4.0 20.04 -- I don't se anything indicative of a USB issue in the dmesg logs at the time fo the hang. I'm waiting for a backup to finish before I start plugging/unplugging again. I need to take my dog for a walk now - but will see if I can clarify this more when I get back.
I'll try to see if I can replicate it with some hardware I have here.
@solar whale Also, what cpy version? Nightly-ish?
yes -- built this morning -- I think it is one commit behind
Same here. Thanks for info.
One other piece of information -- the 2 hangs occurred with a saola-wroom unit. I switched to a wrover, but have only tried it once -- then the backup started ....
Ok, I only have some saola-wrover.
gotta go -- dog is pacing ....
Sure, np.
Hi @dahanzimin, I think it'll be possible for some of that line. The smallest chip we support currently is the SAMD21 which has 256k flash and 32k ram. We don't support any smaller than that because it limits the modules we can include and the code that can be loaded.
It looks TinyUSB already supports the F1 so it shouldn't be too hard to get going. What is the compilation error that you get?
Our discord is a faster way to get help: https://adafru.it/discord
ok, we're officially working on 6.x
we can deprecate things in master
/ remove them
\o/
@silver tapir See https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1871143. I have not tried with an ESP32S2 board, but have seen the problem with SAMD21 and nRF52840, so I think it may be some kind of generic timing problem. I tested kernels way back in time and up to the latest 5.7, so this is a long-standing issue. It does not seem to happen on certain USB hardware on the motherboard.
@tulip sleet @ionic elk going to chat sdcard api in CircuitPython video channel shortly
my audio's not working argh
Thank you @tulip sleet , will take a look at it.
Discussion with @tannewt
- go ahead with this approach
- make sure that the case of background callbacks becoming invalid during GC heap reset
Which modules to do next
- the rest of audio (it's "the hardest")
- displayio second
- anything that has open issues about it not working in main
[we ended up switching to a direct call because we had trouble with my audio in the voice channels]
@slender iron I don't see a pin for next monday's meeting notes
does SPI already work on the ESP32-S2?
I think that Scott got it working to some extent yesterday and showed an example on Show & Tell last night. But I'm not certain whether it is fully working or if his code is available online anywhere yet.
In the demo it seemed that a screen and a temp sensor or something like that were hooked up and working.
looks promising, I haven't tried it yet: https://github.com/tannewt/circuitpython/commits/esp32s2_busio
neat, imma give it a test
@onyx hinge on my todo list
@crude blaze I only tested TX. let me know if RX works 🙂
oh I was gonna test a display, no RX sorry 🙂
k, that's what I tested too
@tidal kiln Is there any reason why BNO055's UART mode has 100ms time.sleeps? (https://github.com/adafruit/Adafruit_CircuitPython_BNO055/blob/master/adafruit_bno055.py#L395)
maybe needed before instantly doing the subsequent read? to give it time to send everything...
could maybe done fancier? like loop/read/check amount read/break?
something like:
while self._uart.in_waiting < 2:
pass
maybe?
@trim elm ask them what they did maybe?
https://github.com/adafruit/Adafruit_CircuitPython_BNO055/issues/48
@tidal kiln What's the blocking/timeout behaviour for the read method here?
@tidal kiln Ok
@simple pulsar does this have it?
https://circuitpython.readthedocs.io/en/5.0.x/shared-bindings/busio/UART.html
so...could maybe specify the number of bytes in read also?
@trim elm i think what's there is pretty hackish, so good chance it could be optimized better, but would want to test whatever changes to make sure
Yeah
From data sheet it sounds like there's a curious mix of update rates on the sensors to on defaults
Not saying library configured it this way, but it's on page 28: https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bno055-ds000.pdf
@slender iron I get a bunch of error: "MICROPY_NLR_SETJMP" redefined errors when building your branch with make -C mpy-cross anything I gotta do beforehand, change some compiler flags?
I just removed -werror for now
What system are you building on? I haven't seen this on amd64 linux.
WSL with Ubuntu 18.04
that's what our CI runs, so you can see all the steps it performs in .github/workflows/build.yml (well, wsl is not involved, but it should not be relevant either)
yea I wouldn't suspect anything be different in WSL except for some driver stuff
what line number is MICROPY_NLR_SETJMP error on?
(I didn't look whether for some reason this area of code is changed in tannewt's branch, assuming not)
../py/nlr.h:63:0 and ../py/nlr.h:39:0
produced a bazillion warnings it being redefined over and over again
huh those line numbers don't match up for me. the content I have (again, at the main branch of adafruit/circuitpython) is ``` 39 // A lot of nlr-related things need different treatment on Windows
63 #define MICROPY_NLR_NUM_REGS (10 + 6)
oh nvm I think his master is just out of date? I forgot to switch to the esp32-s2 branch beforehand
aha that could be it, commit from 2019 ?
yea
aha glad you figured it out
ugh yea all fine in esp32s2_busio, not being on the right branch is way more often the core issue for me than I would like it to be 😄
(sorry I was in a meeting)
no worries all good
Here is the notes document for Monday’s CircuitPython Weekly meeting. It is at the normal time of 11am Pacific / 2pm Eastern here on Discord. Everyone is encouraged to attend! Please add your hug reports and status updates even if you’ll be attending the meeting - it’s super helpful! If you are unable to attend but would still like to include updates, feel free to include them in the notes and we’ll read them off during the meeting. Hope to see you there! <@&356864093652516868> https://docs.google.com/document/d/1P9jItrwitljf_oKBBXYs92uRks99zoFmye2YEzAj2lE/edit?usp=sharing
gotta get those hug reports in before I forget 'em!
interesting little widget, not sure if it brings much to the table where circuitpython is concerned. Maybe our nRF boards could learn to talk to it, I suppose. https://www.nordicsemi.com/Software-and-tools/Prototyping-platforms/Nordic-Thingy-52/GetStarted#infotabs
hm I might be missing something still
I get CMake Error: The source directory "/mnt/f/circuitpython/ports/esp32s2/build-espressif_saola_1_wrover/esp-idf" does not appear to contain CMakeLists.txt.
which does make sense build-espressif_saola_1_wrover/esp-idf is empty. Is there a step that copies or symlink the idf from ports/esp32s2/esp-idf that fails for me?
idf is there and I ran their setup and env script, seems to be setup correctly
fails at https://github.com/tannewt/circuitpython/blob/esp32s2_busio/ports/esp32s2/Makefile#L216
not sure why
like does it expect to already be there or would cmake do this at this point?
ok -DCMAKE_TOOLCHAIN_FILE=$IDF_PATH/tools/cmake/toolchain-esp32s2.cmake is missing the () around IDF_PATH but that doesn't change anything
ports/esp32s2
hrm, that is correct
the full thing: IDF_PATH=/mnt/f/circuitpython/ports/esp32s2/esp-idf cmake -S . -B build-espressif_saola_1_wrover/esp-idf -DSDKCONFIG=build-espressif_saola_1_wrover/esp-idf/sdkconfig -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;boards/espressif_saola_1_wrover/sdkconfig" -DCMAKE_TOOLCHAIN_FILE=/mnt/f/circuitpython/ports/esp32s2/esp-idf/tools/cmake/toolchain-esp32s2.cmake -DIDF_TARGET=esp32s2 -GNinja CMake Error: The source directory "/mnt/f/circuitpython/ports/esp32s2/build-espressif_saola_1_wrover/esp-idf" does not appear to contain CMakeLists.txt.
Is there a way for eval() in circuitpython to use the optional parameters builtins and locals that are available in python 3? https://docs.python.org/3/library/functions.html#eval
that's the full command from running make?
yea thats what it outputs when running make BOARD=espressif_saola_1_wrover V=2
hrm, what OS are you on?
Ubuntu 18.04 in WSL
hrm
can try again on the laptop in native 18.04 but doubt it makes a difference?
says version 3.10.2
I'm on 3.16.2
lemme run an upgrade, maybe stuff is just very outdated I dont often spin up WSL
hm no change
I was running into problems with the STM32 non-volatile memory build which leaves almost no room for the user program. It's enough space for a simple LED program, but not enough for anything more complex.
Since the user program memory must be made up of 16k sectors, the NVM block needed to move to the first 64k sector. This reduces the space for the python runtime (firmware), however, everything seems to fit okay.
I've been running this on the latest ThunderPack boards and it works well.
ok interesting, I manually upgraded cmake to 3.16.8 and now it works 🙂
maybe add a check for the version in the makefile?
probably a fair few people who will run into this who are staying on 18.04 for a while longer
I will check it out when I got it running
now failing at linking unfortunately
oh I didn't know cmake got a built-in command for version check, thats nice
Earliest tested version that compiles.
Failed with version 3.10
Just as another data point; using adafruit_irremote on a CircuitPlayground Express (as the example at https://learn.adafruit.com/remote-control-tree-ornament-with-circuit-playground-express/code-the-circuit-playground-express shows) experiences the same issues. It works using CP 5.3, but fails using the current beta 5.4.0-beta1.
It seems like a timing issue introduced in 5.4. @tannewt , is there anything I could look at or try here?
@idle wharf Do you mind if I link to your gist page about the esp32s2? I'd like to add an image and a bit of info to the CPY web page about the saola.
@silver tapir If its helpful to others please do
https://gist.github.com/askpatrickw/0a276c7e2d4f54e442b2cb6eaa0d32ea
I thought that the IDF came with its own copy of cmake. from build.yml: $IDF_PATH/tools/idf_tools.py --non-interactive install cmake
that version of cmake is probably added to the environment of the build shell with source $IDF_PATH/export.sh shortly thereafter
cmake is /usr/bin/cmake
jepler@babs:~/src/circuitpython/ports/esp32s2$ source esp-idf/export.sh
...
jepler@babs:~/src/circuitpython/ports/esp32s2$ type cmake
cmake is /home/jepler/.espressif/tools/cmake/3.16.4/bin/cmake
It would be awesome if someone took the time to move the relevant steps into the documentation, because knowing to check what github build.yml does is a bit obtuse
'night
It's likely an issue with the new reference clock. ticks_ms doesn't run anymore so a separate timer is needed for higher resolution. It'd be great if you could double check my math on it. I may have also messed up the interrupt. Not exactly sure. Thanks!
First step, and initial RTD test, of #3022. Obviously, will need to be accomplished with 2.x, 4.x, 5.x, and main after this one is ironed out.
I didn't include the JavaScript to close the message. I can try to work out how to do that with the RTD builds, but its hard to test local builds (the message doesn't pop up locally).
Will this require a 3.x release to kick RTD?
https://pastebin.com/mERy1UNi
@crude blaze welp deleting the build folder and building again did the trick \o/
@tannewt Thank you very much. We have tried to build F103 in stm32f405, and found the underlying St_ There are many drivers that don't correspond to each other, and there are too many modifications. I don't know the circuit Python architecture very well, and my ability is limited. Help me!
@slender iron how are you flashing the s2? I'm using esptool directly but I think I'm doing something wrong, the native USB device is never recognized after flashing.
The native USB device is on different pins (19, 20)
D- is on 19 , D+ is on 20
@crude blaze is that what you are asking about for the S2?
@crude blaze This is an excellent guide for starting with the S2. Need a proper version of esptool... it's all covered here.
https://gist.github.com/askpatrickw/0a276c7e2d4f54e442b2cb6eaa0d32ea
A CI build failed building mpy_cross with:
make: Entering directory '/home/runner/work/circuitpython/circuitpython/mpy-cross'
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
QSTR updated
../supervisor/shared/translate.c:34:10: fatal error: genhdr/compression.generated.h: No such file or directory
#include "genhdr/compression.generated.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [build/supe...
@solar whale yes thanks I got that hooked up :)
@silver tapir awesome thanks been looking for something like that!
@crude blaze Oh, don't mind me... the guide was done by @idle wharf.
And it is a great start for the S2.
hm seems I'm doing all the same stuff
odd
official builds also fail so I guess it gotta be upload related
What command fails?
or I still somehow have the wiring wrong after quadruple checking it
oh just cpy in general 🙂
doesnt boot up after flashing
@crude blaze So, for uploading with esptool you use the built-in usb port.
sure uploading works fine
After flash is working, then you have to build or buy a usb cable, and connect directly to the pins in the guide.
but the native usb port does not come up as a device after that
(gnd, 5v, 19 and 20, disconnecting the other build-in usb)
did you power cycle or reset after flashing?
I did power cycle yes
@crude blaze in the case of the cable I was using, the colors white and green where backwards, so I tried reversing them.
The ones that go to pin 19 and 20.
in case I'm just brain dead today
there was an erro on the Adafruit product page, but it has been fixed
@dahanzimin there are significant changes between the F4 and F1 series in ST's provided HAL APIs, even more so than between the F4 and F7/H7 in many cases.
While I understand the appeal of running Circuitpython on a chip as pervasive as the F103, I think you would ultimately find the experience to frustratingly limited - the number of lines of code you'd be able to support on 20k of RAM would be pretty small. You might have more success with Micropython, which does support the F103 and op...
is there maybe a known issue with windows and tinyusb on the esp?
@crude blaze Do you get the serial port but not the storage drive?
complete malfunction, no usb enumeration at all
This is fine as a temporary fix before I get to #3059
what I would expect from an empty chip or a crashed firmware
oh no way
it is windows
works just fine on my ubuntu laptop
cool! problem solved --- 😉
ok not fine, I can't write to the drive :D
but at least the drive shows up
@crude blaze For windows there is a driver upgrade needed, but for the build-in usb... not for the cpy one.
oh weird, now after power cycling it doesn't show anymore
I have not owned or used windows since w95, so can't confirm :þ
either some physical defect or just still a bug in tinyusb
my main goal was to upload the version I built from scotts branch, now I put the 5.4.0 build from S3 on it
tyr the latest build from S3 https://adafruit-circuit-python.s3.amazonaws.com/index.html?prefix=bin/espressif_saola_1_wrover/en_US/
Should be 6.0.0-alpha0 now.
@hierophect It should be the popularity and cost performance of STM32F103. At present, 103re is selected. It has 512k / 64K memory. It is worth trying circuit Python and trying to promote circuit Python in China. Thank you!
so it was atleast partially the breadboard, hooked up to wires directly it at least shows up in linux consistently
though the msc drive is not writable
repl works fine though
@crude blaze What happens if you format the storage with the repl?
import storage
storage.erase_filesystem()
Using the Saola-1 Wroom devkit and running CircuitPython 6.0 alpha or 5.4.0 beta or really any CPY version that I tried I can't get the device to enumerate on Windows. On a Ubuntu 18.04 machine it shows up as a MSC drive and I can connect to REPL.
On Windows I just get an error that the USB device malfunctioned.
I would assume that this is an issue with TinyUSB and not CPY but I wanted to open it her in case it is not. I have not verified if TinyUSB standalone would work.
@hathach
good point I will try that
@crude blaze I just tried that on min and I had to power cycle after doing it. Came back OK
so for you it works on windows @solar whale ?
also could you say in the issue whether it's windows 10 version 2004 or 1909?
no -- not on windows - that was on a Mac
@tulip sleet ah right sorry
it probably doesn't make a diff, but i've had BLE issues on 2004 vs 1909, and so there could conceivably be USB diffs too
oh for sure, I've been working with Windows in an exhibition context long enough to suspect every windows update to cause havoc 😄
on Ubuntu Linux I also did the erase -- had to push RESET afterwards.
That is different than other boards
yep format did the trick 🙂
@solar whale doing storage.erase_filesystem() is how I have been reproducing that Linux kernel crash (with M0 and nrf)
so all working on linux
ruh roh 😉 worked once for me....
@tulip sleet wait what, erasing the cpy filsystem caused a kernel panic? 😄
@hierophect It should be the popularity and cost performance of STM32F103. At present, 103re is selected. It has 512k / 64K memory. It is worth trying circuit Python and trying to promote circuit Python in China. Thank you!
Ah, my mistake, I misread and thought you meant the F103x8 series used on the Bluepill type boards. Well, I can't say the Adafruit sponsored team will be able to pick up the project since we're focusing on new chip lines (i.MX series, ESP32S2) but I don't think there'...
ayup, and sometimes just a reset will do it, though not as often: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1871143
I don't see that STM32F103's micropython is a good official or other supported project. Thank you. Can you recommend it? Thank you. I hope the circuit Python is better
@crude blaze I have experienced several lockups of my Linux box when disconnecting the USB cable -- be careful out there.
@solar whale so you have seen it just on disconnect and not reconnect? Do you think the USB connection might have been bouncing?
It doesn't happen on Scott's AMD Linux box, but he is usually using Mac. I see it on a conventional Intel desktop chipset, but can't reproduce on a laptop chipset. Seems to be driver realted
possibly -- and i don't reacall it happening before I started using the feather adaptor --- I need to test that more -- it's a painful test.
but that is interesting to hear, that might actually explain an issue I have with a project where I get the weirdest kernel panics that seem to disappear when the USB devices are not connected
might just be a loose connection
i tried bisecting the kernel, but I've gone way back in time and up to the latest 5.7, and I can still make it happen
odd thing is that dmesg log shows nothing -- appears to be a sudden hang -- so a connection issue may be likely.
i set up kdump and have stack traces in that bug report
@tulip sleet are you sure its intel chipsets then? on mobile its usually just intel chipsets but on desktop motherboards you will very often find another vendor chipset being responsible for a large portion of the ports
besides the intel one that comes with the main chipset
it's possible; it happens a lot on my Dell Optiplex 7010; I can look up the USB hw; I haven't tested extensively on the laptop. It's a Dell Latitude 5250, also Intel
OK -- just killed my linux box on a board without the feather adapter -- glad to have cleared that up 😉
also @solar whale, you have seen it on RPi too, right?
tokk 4 pulg/unplug cycles
ASmedia is usually very often used as a secondary host controller
did it crash on unplug or plug?
@crude blaze is it easy to id the usb hw? is it in /proc somewhere?
it should show up in lspci to check if one is present at all
0:00.0 Host bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09)
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation 7 Series/C216 Chipset Family MEI Controller #1 (rev 04)
00:16.3 Serial controller: Intel Corporation 7 Series/C210 Series Chipset Family KT Controller (rev 04)
00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (Lewisville) (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller (rev 04)
00:1d.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation Q77 Express Chipset LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 7 Series/C210 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 7 Series/C216 Chipset Family SMBus Controller (rev 04)
it also tells you the pci port number which I think you can then use to backtrace a usb port to its host controller
well that looks like all intel 🙂
ah interesting that the server chipset, maybe that makes a difference
it is an old business desktop; it's not a Xeon processor, it's an i5-3475S
usb host controller would still be the server one though, I could imagine that they differ driver wise
do you have any entree into the kernel dev folks who might look at this? I got a little bit of dialog in the bug with Kai-Heng Feng, but I think I mainly need to attract the attention of the right person
I don't know anyone personally working on the kernel. I would give twitter a try there, usually you get connected with the right folks pretty quickly
tnx, I will poke around
if you write a tweet ping me, I have a lot of followers who work on linux stuff who might again be connected
FYI mine looks similar to Dans ```00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation 7 Series/C216 Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 7 Series/C216 Chipset Family PCI Express Root Port 1 (rev c4)
00:1c.1 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 (rev c4)
00:1c.2 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 3 (rev c4)
00:1d.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #1 (rev 04)
oh wat mac mini uses server chipsets, thats so weird 😄
at least they did in 2012
Hi there!
I have a short question. I am using circuitpython & ulab very often. I noticed that the ulab used in circuitpython is 4 months old. I was wondering if the circuit-python ulab will be updated anytime soon to match the micropython-ulab, since I need to use some of the recent developments from ulab (specifically the newly added sosfilt function, which is much needed in DSP applications)
Thanks in advance.
Hi! We would love community help staying up to date with ulab.
Right now, there are a couple of steps to doing this:
- Actually update the ulab submodule in
extmod/ulab - Update our ulab documentation in
shared-bindings/ulab - Build and test, especially that new and changed functionality is working
- Create a PR (pull request)
- Work through any problems identified during the PR process
If you have the technical expertise to do this, we would love to see a pull request fr...
If you don't have the technical expertise to do this yet but would like to learn, we would love to help you grow, so feel free to ask us about it here or on discord in #circuitpython.
fyi, my current busio branch has an assert failure that kills usb pretty soon after it is started. probably only applies to spi displays though
I tried it with official releases too, same behaviour
I just had to chuckle at my own inconsistency, adding all of these strings in one PR. ```+msgid "Buffer length is must be a multiple of 512"
+msgid "Buffer length must be a multiple of 512"
+msgid "Buffer must be a multiple of 512 bytes"
@tannewt @dhalbert I think this is ready for another round of review. The initial description of the PR has been heavily updated to reflect the current state of this branch.
Looks good! It doesn't require a release RTD follows the branch.
@ionic elk how would you like to see stm32f1 support added? sounds like they may be interested if you give enough direction
This is working for me now on the 3.x live page. Looks great! Thank you sommersoft.

@slender iron my impression is more that they are requesting it as a feature, but I'm happy to provide more guidance if you want. F1 support would require making a new family profile in mpconfigport.mk and then moving through the basic modules to test and adapt where necessary.
also all of the linker files, changes to the makefile, startup links, etc
If you'd like, I could knock out the obscure basics in probably an hour or two and get digitalIO going, and then leave Busio and all the other stuff up to someone else.
@ionic elk I'd rather you start to sketch out the steps for them to try. I think the chinese community is finally trying circuitpython and I'd love to get them more involved in development.
I get that but I worry the time to outline all the steps might take an equivalent amount of time to just doing it
because it's so spread out at the start, there's a lot of different stuff to modify
But if your primary goal is encouraging involvement than I can do a todo list up on github
#3059 Looks like a great approach to this! Let me know if I can help.
A couple minor things.
Does this mean it is enabled by default?
Oops, should be disabled (or removed, if you prefer)
@PTS93 can you verify that it work with bare metal example from tinyusb here
https://github.com/hathach/tinyusb/tree/master/examples/device/cdc_msc_freertos
just run idf.py build flash
I'm interviewing CircuitPythonista @ivory yew later today, hope folks can join in.
@ionic elk making a list is more helpful for future folks
More info on the ESP32S2\USB Wrover
Mac sees it, but its not mounting (might not be the right word)
https://gist.github.com/askpatrickw/a970d067644553aae2016d5b50b3c6a6
I'm around and free this afternoon and can run other tools, try things if that is helpful.
Commit 4e8de3c554024d3ac89e9ee77b958a6932a64bec to switch to autoapi changed the path to as far as I can tell all of the docs from
https://circuitpython.readthedocs.io/en/latest/shared-bindings/busio/I2C.html#busio.I2C to
https://circuitpython.readthedocs.io/en/latest/autoapi/busio/index.html#busio.I2C
This broke all of the links to core classes from libs, as well as the 'latest' link from the non-latest versions, as well as the links to the non-latest versions from latest
this was supposed to be improved by #3031 , did I miss the mark?
@idle wharf what version are you building?
That is a nightly build
Is it possible that the transition to the "main" branch means that "latest" is not reflecting the newest changes to "main"?
Ya, it wasn't updated. RTD has a default branch setting too. I've triggered a new latest build.
@slender iron for backporting RTD for v4 and v5, what are the target branches?
for v4, i've done 4.x, but not sure if i should target 4.1.x.
for v5, there is no 5.x. only 5.[1,2,3].x. is v5 still pointing to main?
please don't tell me it's all of the above. please. 🙏
4.x and 5.0.x
The redirects aren't working on readthedocs:
WARNING:root:The 'sphinxcontib-redirects' plugin is only supported by the 'html' builder. Skipping...
https://readthedocs.org/api/v2/build/11338560.txt
The build is invoked with the argument -b readthedocs and not -b html. The redirects-builder checks for exactly the html builder. https://github.com/readthedocs/readthedocs-sphinx-ext/blob/master/readthedocs_ext/readthedocs.py#L316 https://github.com/adafruit/circuitpython/blob/main/...
@dahanzimin You're right, on closer inspection they don't have direct support for a board using a F103. I had assumed they did because their drivers reference the F1 and account HAL differences for it. I'd have to dig around more to find out why they did that without any actual F1 boards on their support list.
If you or anyone else is interested in setting this up, this would be the general Todo List based on what it took to add the F7 and H7.
- [ ] Create a family category in `mpconf...
@slender iron how hard to you think it'd be to grab the basics of ports/ and shared-bindings/ and just make a regular old C api out of it?
seems kinda tempting to me for some personal projects. It'd be nice to access my own STM32 code and I've got a couple projects that cant use python for speed reasons.
@ionic elk my advice on that...even though it's your code you want to use...if you're not using Python...then I'd 100% use Zephyr, I think it's very mature for STM32.
I mean zephyr and stm32duino both are pretty mature but I did not find zephyr to be that easy to get into. Very big learning curve.
Hmm, yeah I could agree...but I really think it's worth it. There is a ton of great samples and drivers available.
Plus it was hard for me to tell how much they actually implement, vs you just using the HAL? And I saw barely any drivers for external devices which is a HUGE timesaver for me
And I don't need any RTOS features
I would recommend you give it another shot. I love CPY, but I really think Zephyr is much more suited when you want to use c.
I'll try giving it a spin with ExpressionEngine and see how helpful it is for the SPI DMA stuff I need to do for that
I know a lot of people who use libopencm3 too.
But ultimately I still think it'd be kind of fun to be able to take a project you've developed in Circuitpython and then move it more or less one to one into C
@ionic elk I think it's a neat idea but think the exceptions could be tricky to handle
only some of the common_hal apis return error codes rather than raise
Yeah I'd probably just have a python script that goes in and deletes or replaces those
peripherals is the boundary that I didn't want micropython to influence
probably a big management script that'd convert the whole circuitpython codebase down into usable parts
@slender iron on that note do you think it'd be worthwhile to go through peripherals and remove explicit references to circuitpython/micropython?
no, I don't think it's worth doing actively. just something to keep in mind when working on it
ok
Does circuit python have support for advanced BLE features like multiperipheral/swapping centrals?
I am curious if it is okay to use eval within a library with a method like this to validate the input before passing it to eval() or if it is something that should just be avoided entirely.
def is_safe(self, the_str):
print()
_safe_characters = "0123456789-+/*"
for character in the_str:
if character not in _safe_characters:
return False
return True
# ...
if self.is_safe(user_input_str):
return int(eval(user_input_str))
@lone axle i'm always really wary of using evals...
But that said, eval has uses. can you do what you need with regexes?
I am trying to solve some basic math equation essentially. It will have input like "160/2-42/2"
hmm, yah, eval after sanitization might be your best bet, rather than writing a mini language.
It can be a fun exercise to write a parser, but not if it's not what you are interested in doing, and maybe not within the constraints of CircuitPython
@lone axle make sure to catch divide by zero, etc.
Thank you. I will add that.
I may eventually dive deep enough to write the parser for the math part of it. In some ways it's being used within a parser as is. becuase the real input can start out something more like: "DISPLAY_WIDTH/2-WIDTH/2" and the appropriate values get swapped in before it makes it to the eval call.
I suspect it would take me a while to come up with one that works correctly at present time though.
I did find some CPython ones to study though when I looked into it last night
Ok this is odd. Now that I formatted the CPY drive in Linux through the REPL it now shows up on Windows too. Maybe that was the issue that the FAT device was not properly formatted and windows is picky there? Or I'm having an issue with the connector here. It was picky with Linux too when I used a breadboard for the native USB.
@crimson palm not sure what you are asking exactly. as a central we do support multiple peripherals
The Sphinx failure here was fixed in branch 5.3.x. Should I pull all of that into here, or pin to Sphinx<3.x?
Thanks @slender iron. Sorry for not being clear. I want my nrf chip to act as peripheral to multiple centrals. This is what I am referring to: https://jimmywongiot.com/2020/01/14/ble-hid-multiple-peripherl-example-on-nordic-nrf52-series/
This is all in C++ but I'd like to know if circuit python can handle it
I thiiiiink that would work
I believe we have it set to handle multiple connections
Great, thank you! Is there any way you could point me to the CPy library I should be using to manage multiple connections? @slender iron
@crimson palm someone else asked me this question a few days ago; were you that person? They couldn't get multiple centrals to work.
Oh interesting! No that wasn't me
Did you come to any conclusions with them? I can search the discord if need be
@crimson palm I think I found it, but I think the person was trying it in our Arduino BLE library, not CircuitPython. Here's an issue, that might have come from that discussion: https://github.com/adafruit/Adafruit_nRF52_Arduino/issues/517. I'm beginning to remember some more details, let me keep searching
aha, here it is: https://forums.adafruit.com/viewtopic.php?f=57&t=165263
Thank you very much @tulip sleet! So according to this there is no way to have this functionality on the feather atm, is that right?
The Arduino implementation is not the same as the CircuitPython implementation. No one has tried it in CircuitPython, as far as I know. I am not sure if two centrals can initiate a connection based on the same advertisement, or whether you need to start a second round of advertising. We did not have the multiple central model in mind when we were coding, so it's possible it would not work, but it might work by accident.
just try advertising, and don't stop advertising until you get all the connections you want. or keep checking how many connections you have
as tannewt mentioned, we allow multiple connections
Alrighty, I'll give it a shot and let you know what I find. Thanks again!
I added a board image, and guide by askpatrick.
Minor change to the README to fix a deprecated option on bundle.
@idle wharf ⏫
So a new release has come and there is still just a *.bin file and no *.uf2 file.
Any ideas?
A comment and a question/concern. I only reviewed through the end of i2c.
Do I2C objects live on the GC heap? If so, and if (when) an I2C object is made long-lived, this internal pointer will point at the non-long-lived version and lead to memory corruption.
I've had something like this locally for some time.
It's more verbose in the Makefile, but if you write it like this, you can specify parallelism (e.g., make -j8 if you have an 8-core CPU) and get faster builds. However, as the output of various commands is interleaved, it can also make failures harder to interpret. On the whole, I like faster:
one-of-each: one-of-each-1
one-of-each-1: all-source
$(MAKE) -C ports/atmel-samd BOARD=trinket_m0
one-of-each: one-of-each-2...
@hierophect @tannewt Thank you very much for your help. Welcome to China. We are committed to promoting circuit python
@slender iron How did it go with SPI after the stream?
Hey @tulip sleet just following up our discussion from a month ago (or longer) about USB HID report descriptors. I have it all ready to go, except I am having difficulties with finding where usb_hid.devices is located within CircuitPython + what it contains. I can see it has four devices in it, however, not my custom ones. Any one know how I can hack this up ? 😄
Just to clarify... this is what I am talking about. I want to add in extra devices.
It appears to only have Keyboard, Mouse, Consumer and Gamepad in it
@crimson palm someone else asked me this question a few days ago; were you that person? They couldn't get multiple centrals to work.
@tulip sleet That must have been me. I have something that does USB Keyboard IN and USB Keyboard OUT + BLE Keyboard OUT. https://twitter.com/DavidGlaude/status/1264245116664938497 . I later made a dual mouse emulator that jiggle the mouse on two computer, one in USB and the other in BLE. Right now it draw little 8 side circle on both computer to avoid that they fall asleep. I wanted to have that ItsyBitsy BLE be a BLE mouse to two computer simultaneously (or maybe as many as possible). This is to help teleworking and avoid losing the VPN or the VDI. I want to be able to connect to this BLE device and have the computer never go to sleep without beeing an annoyance (micro mouse movement every second are OK. I have refactored my BLE+USB code, but did not try Danh suggestion yet.
Duplicating a USB keyboard to USB and BLE with @CircuitPython from @adafruit
USB keyboard is connected (OTG) to a Trinked M0 running KBDADVUARTUSBH from @gdsports1
Trinked UART connected to nRF52840, every HID code is transmitted to USB and BLE.
Source: https://t.co/3hreWiD...
I took a closer look at my bread board. Turns out I chose the exact point where the breadboard had a short which caused D- to short to VBUS. It's an intermittent short and I guess Linux was more tolerant to that.

I checked that for all the following URLs, going from "5.0.x" to "latest" gives a working link:
https://circuitpython.readthedocs.io/en/5.0.x/shared-bindings/
https://circuitpython.readthedocs.io/en/5.0.x/shared-bindings/support_matrix.html
https://circuitpython.readthedocs.io/en/5.0.x/shared-bindings/_bleio/__init__.html
https://circuitpython.readthedocs.io/en/5.0.x/shared-bindings/_bleio/Address.html
https://circuitpython.readthedocs.io/en/5.0.x/shared-bindings/audiomp3/__init__.html
...
@mental nexus I think a recentish change to Adafruit_CircuitPython_Display_Text has broken one of my applications and possibly more. When you have a moment, could you take a look at https://forums.adafruit.com/viewtopic.php?f=60&t=166798 - I'll mention @lone axle too in case he's working in this library at the moment.
I can look into it in a bit. I think the background bmp fixed baxkground colors for custom fonts
Not sure why it would effect max glyphs. Perhaps that is just passing through to group size
The backgroud has "stolen" the last character so you now need max_glyphs of 6 if you want to (later) show a string of 5 characters.
BTW, to return to previous discussion I have recent libs and I do see anchor_point changes taking immediate effect.
Yep, max_glyphs is getting passed through to max_size of the Group __init__()
and it looks like the case where text was included in the constructor accounts for the extra 1 needed by the background. But the case where text is absent and max_glyphs is used instead doesn't account for the extra 1 that I can see.
Going to make some ☕ . I'll try tweaking it to account for the extra 1 in that case.
@simple pulsar I have a branch here now that fixes it: https://github.com/FoamyGuy/Adafruit_CircuitPython_Display_Text/tree/fix_max_glyphs however I've only done minimal testing, and am still poking around a bit.
Still seems good after some more testing. I've created a PR for it here: https://github.com/adafruit/Adafruit_CircuitPython_Display_Text/pull/56 if you have a chance to test it out please leave feedback there.
Issue was originally raised here: https://forums.adafruit.com/viewtopic.php?f=60&t=166798
This change will always include +1 to the value it passes for max_size to the super class Group. Th...
waves guess which one is the next library I want to use? 😄 https://github.com/adafruit/Adafruit_CircuitPython_MCP230xx/pull/28 (will likely follow-up with another one for MCP23016 if I get that working)
Can we back this up to 3.13? That is the version installed on Raspberry Pi's running Raspbian Buster -- I just tried it and it built OK.
The version of CMake required for the esp32s2 build was set to >=3.16 but Raspberry Pi's running Raspbian Buster are currently using CMake v3.13 so the esp32s2 build fails.
I tried setting the required version to >=3.13 and it build OK.
Is there any objection to reverting this to 3.13
It was set to 3.16 by PR #3072
The version of cmake SHOULD be the one installed when you use the esp-idf setup process, and it should always be 3.16.
$IDF_PATH/tools/idf_tools.py --non-interactive install cmake
source $IDF_PATH/export.sh
After these commands, which are used during the github actions build process, the required version of cmake should be available AND placed first on the path. If this is not the case, it should probably be pursued as a bug upstream at esp-idf.
$IDF_PATH/tools/idf_too...
Or is it the case that this is literally the only thing preventing the build from working? If so, maybe a workaround should be used. But it might break at any moment if they add features provided by the version of cmake that they provide for normal desktop systems.
sorry -- I added the label by accident -- how do I get rid of it?
The version of cmake SHOULD be the one installed when you use the esp-idf setup process, and it should always be 3.16.
$IDF_PATH/tools/idf_tools.py --non-interactive install cmake source $IDF_PATH/export.shAfter these commands, which are used during the github actions build process, the required version of cmake should be available AND placed first on the path. If this is not the case, it should probably be pursued as a bug upstream at esp-idf.
...
These commands (among others) are run during the normal github build process for esp32s2, they are in .github/workflows/build.yml:
$IDF_PATH/tools/idf_tools.py --non-interactive install cmake
source $IDF_PATH/export.sh
IDF_PATH has been set to the full path of the esp-idf directory inside ports/esp32s2.
However, running that on a pi (I tried on a pi 4) gives the error message I showed:
ERROR: tool cmake does not have versions compatible with platform linux-armel
...
These commands (among others) are run during the normal github build process for esp32s2, they are in .github/workflows/build.yml:
$IDF_PATH/tools/idf_tools.py --non-interactive install cmake source $IDF_PATH/export.shIDF_PATH has been set to the full path of the esp-idf directory inside ports/esp32s2.
However, running that on a pi (I tried on a pi 4) gives the error message I showed:
ERROR: tool cmake does not have versions compatible wi...
@tulip sleet @crimson palm I have pushed my code into a Gist: https://gist.github.com/dglaude/a765ee9fe0aea6dc0f6298a8a734c2bb
If you figure out what to change to turn the USB mouse into a second BLE mode... don't hesitate. I'll make a few try but not sure if will work.
This not a big deal -- I have a workaround I can use and I guess no one else uses a Pi -- feel free to close until it becomes a problem for someone. I only use the Pi as a "backup"
In the EDP-IDF instructions cmake is installed as a prerequisite using "apt-get make" so on the Pi it get version 3.13.4. I "could" download and build 3.16, but since 3.1.3 works OK it seemed simple to just use it.
the notes in #3072 only indicated that it had to be above 3.10 for some reason -- it looked like 3.16 was an arbitrary choice.
Every CMakeLists.txt in esp-idf that has a version line says CMakeLists.txt:cmake_minimum_required(VERSION 3.5) so maybe we should back ours down. I don't know where a requirement for 3.10 or 3.16 comes from.
cmake_minimum_required(VERSION 3.5)
- ``cmake_minimum_required(VERSION 3.5)`` tells CMake the minimum version that is required to build the project. ESP-IDF is designed to work with CMake 3.5 or newer. This line must be the first line in the CMakeLists.txt file.
especially since they document this as being the case.
does the actions / CI system always take the latest verison of pylint? or do we upgrade specifically at certain times?
run: |
pip install --force-reinstall pylint black==19.10b0 Sphinx sphinx-rtd-theme
``` Adafruit_CircuitPython_NTP uses latest during the github build
I assume the most canonical thing would be to look at what cookiecutter makes
yes, pylint installs mirror latest. Kattni didn't want it pinned, like it was before, since it was a "herculean" effort to update it when the major version changed.
Ah, gotcha. Is there any prescribed way of dealing with new checks that come up with new versions? occasianally I run across PRs with pylint issues on parts of the code that weren't touched by the PR.
disclaimer: that's how i remember the decision. i could very well be mis-remembering.
personally, i'd probably handle them as a reviewer and push the updates. unless it forces some larger changes...then i'd just start the conversation.
@raven canopy unrelated to that but since you're here 😄. I am looking into setting up RosiePi, I found a few different repos related to it. Is this the place I should be working from to get my setup started? https://github.com/physaCI/RosiePi_Ansible
that's the one. i think its current. let me check real quick.
@crimson palm I have updated my Gist with a BLE+BLE version of my mouse jiggling. It is just a proof of concept, the code is not bullet proof, but it possible to advertise again after the first connection. So it can be periferal to a first central and periferal to a second one. But you can only advertise one thing at a time. @tulip sleet I might have found a bug (or it is my code) but the "mouse2" also get the HID event I try to send to "mouse1". It is not an issue for my usecase, but maybe you should have a look.
while i hide my giddiness...
Okay cool ty (re: the pylint changes) In this case I lucked out a bit because I finally had it happen on one of my own PRs and I dug enough to realize it was seemingly caused by differnet versions.
Some things about how WE invoke cmake do require something newer than 3.5 There is some confusion about -S and -B flags specified in the order we use, but more importantly 3.5 does not know about Ninja files.
However, since esp-idf says 3.5, we can set it to the minimum of what we require and what they require. So why not go ahead and pull request to change it to 3.10, or 3.12, whatever makes more sense with you. If we won't continually verify 3.10 compatibility, specifying somethin...
Ok, I’ll put one in for 3.13 -won’t be until tomorrow though.
@lone axle current version there should still work. i haven't pushed the "new" pytest-based versions up to the org repos. also, my fork of circuitpython is the only one that has the GitHub App installed...
i'd also have to set you up with a physaCI token, but that's easy. 😉
Okay cool. I am not very familiar with lots of the tools in use so it may take me a bit to get there. But I'm going to work on getting it set up tonight and tomorrow.
sounds good. ask any question(s) you have. the README is up-to-date, aside from pointers to some of the stuff i'm leaving to individuals (firewall, etc...)
the Ansible script takes care of everything that RosiePi needs.
i'll try and get the org repos up to current tonight.
Finally jumped into this. This is a draft I settled on, with manually putting in some info into _data/file.json. Wording and layout could probably be better, but again...not my forte. I chose the coloring to further highlight what is available in stable compared to unstable (if differences occur).

Currently working on hooking `docs/shared_bindings_...
@raven canopy looks great
thanks. its rather minimal. 😄
and blindly fighting with the Sassy CSS stuff was...fun. hehe
Thanks for the updates @thorny jay! I’ll have a gander.
@
Thanks for the updates @thorny jay! I’ll have a gander.
@crimson palm Place keep me in the loop, I am sure better code is possible.
@raven canopy it seems that the ubuntu image link has died. I was able to download an image that I think is the right one from here: https://ubuntu.com/download/raspberry-pi
'''Adafruit CircuitPython 5.4.0-beta.1 on 2020-06-08; Feather STM32F405 Express with STM32F405RG
import time
time.time()
Traceback (most recent call last):
File "", line 1, in
RuntimeError: RTC is not supported on this board'''
@lone axle ahh. looks like i left of the s in /releases. 🤦
i should probably point to the "new" page though now, since they're RPi certified now.
Ah, I see. I stepped away for some other things and it took a while to write and confirm the image. But its booting now. First time using anything but raspbian for me
@thorny jay Thank you! Glad to see that multiple centrals are possible. I do know you can only have one advertisement going at a time. The double HID may be due to an internal assumption about global HID, or it may be due to multiple duplicate services not being handled properly.
fixes #3084
Raspberry Pi Raspbian Buster uses CMake v 3.13.4 - this allows building esp32s2 on Raspberry Pi.
Tested on Raspberry Pi 4 B +
Trivial question for CLUE / TFT Gizmo serial console display on LCD. Is it possible to change the text colour on this?
@dahanzimin please let us know if you have any more questions - we would love to add more STM support :)
@simple pulsar no, there is no facility included to change the text color of the console.
Pros & Cons of enabling uheap.info in CP builds?
@crimson ferry We took out uheap and ustack to save space, when we were SAMD21 only. We used them mostly for debugging. They could be restructured to be smaller, maybe, and we'd probably rename them.
.incoming_packet_length was added after 5.3.0, so unless we have another 5.x stable release, and then change the libraries, we can't drop .packet_size and have the libraries be backwards compatible without conditional code. We could defer this to 7.0.0, or put in conditional code.
The Adafruit libraries that use .packet_size now are:
https://github.com/adafruit/Adafruit_CircuitPython_BLE_Adafruit
https://github.com/adafruit/Adafruit_CircuitPython_BLE_iBBQ
https://github.com/adafru...
To make this transition smooth, we should add an alternate name for all, change all the libraries, and then remove all(). So we may need to defer removing all until 7.0.0.
match_all is probably a good alternate name.
@simple pulsar I've got a PR now that I think will solve the issue with with anchored_position for scaled labels: https://github.com/adafruit/Adafruit_CircuitPython_Display_Text/pull/57
@lone axle cool, just in the middle of something, will have a look later
@onyx hinge I had no need for this, I was just thinking of a retro green phosphor look picture from a CLUE
@tulip sleet could I ask you for a couple of pull request reviews on the mcp230xx library? 😇
@topaz quest I am not familiar with the library; I assigned the reviews to CircuitPythonLibrarians. cater is the most familiar, I think.
Thanks!
^^ looks largely sphinx/doc related maybe? i'm not very familiar with the SPDX thing. but someone else in the CPLib group may be.
The REUSE changes are pretty much part of https://github.com/adafruit/circuitpython/issues/2887 -- I'm updating the libraries as I find myself sending pull requests 😅
@simple pulsar You can print to a scrolling box with colored text, e.g., fontx, fonty = terminalio.FONT.get_bounding_box() term_palette = displayio.Palette(2) term_palette[0] = 0x000000 term_palette[1] = 0x00ff00 logbox = displayio.TileGrid(terminalio.FONT.bitmap, x=0, y=0, width=board.DISPLAY.width//fontx, height=board.DISPLAY.height//fonty, tile_width=fontx, tile_height=fonty, pixel_shader=term_palette) splash.append(logbox) logterm = terminalio.Terminal(logbox, terminalio.FONT) print("Testing...", file=logterm, end='\r\n')
@crimson ferry Looks interesting, I'll have a play with it, if there's a way of redirecting/tee'ing stdout to logterm that would kind of do it.
@crimson ferry What is splash ?
@simple pulsar That's the name of the top-level group
common in displayio examples and tutorials, e.g., splash = displayio.Group(max_size=10)
There was some discussion of that https://discordapp.com/channels/327254708534116352/537365702651150357/708750754445262948 It may be possible to always use file= in print statements, and just switch up the file as needed to keep it abstract, not positive since I haven't tried it
@raven canopy I think I am ready for an PhysaCI access key. The ansible process finished while I was out but it seems everything completed successfully 🎉
@simple pulsar print("Testing...", file=sys.stdout) is implied by print("Testing..."), so with some abstraction on what file= gets assigned, maybe you can achieve what you're after
This is just blew (LCD shows safe mode) up at the import of ble code so probably nothing to do with ble stuff. One difference here is I have refreshed libraries and I no longer have the adafruit_clue.
Adafruit CircuitPython 5.3.0 on 2020-04-29; Adafruit CLUE nRF52840 Express with nRF52840
>>>
>>>
>>>
>>>
>>>
>>> import board
>>> from displayio import Group
>>> import displayio
>>> from audiocore import WaveFile
>>> from adafruit_clue import clue
Traceback (most recent c...
I don't know if these end up contiguous but it seemed worht a shot. Something clearly isn't healthy but there's no massive splat into spare1 and spare2.
@jepler Do you know for your case if you were looping?
Adafruit CircuitPython 5.3.0 on 2020-04-29; Adafruit CLUE nRF52840 Express with nRF52840
>>>
>>> import board
>>> import displayio
>>> from audiocore import WaveFile
>>> from adafruit_clue import clue
Traceback (most recent call last):
File "<stdin>", line 1, in <m...
@tidal kiln turns out I was wrong about the 16-bit atomic access — that works, too. And pretty much the same way as in '17. So I just implemented that, and included DigitalInOut that I didn't implement earlier.
Probably related to the buffer size, if I use 512 which is the equivalent of the what's allocated in the code (2*256) then it seems robust, admittedly form one quick test. This makes some sense as this is exercising less used/tested code, perhaps?
Adafruit CircuitPython 5.3.0 on 2020-04-29; Adafruit CLUE nRF52840 Express with nRF52840
>>>
>>>
>>>
>>> import board
>>> from displayio import Group
>>> import displayio
>>> from audiocore import WaveFile
>>> import gc
>>> gc.col...
First google hit for "circuitpython wavefile" is https://circuitpython.readthedocs.io/en/3.x/shared-bindings/audioio/WaveFile.html which is 3.x and it has a nice message with link for 5.x docs but that 404s. This feels very familiar...
@simple pulsar that box is generated by ReadTheDocs, and it looks like its just changing the version part of the URL. with the switch to using AutoAPI and the stubs to generate docs, the URLs aren't the same in 5.x and beyond.
@simple pulsar we now have a file of redirects, you could add the renamed (to audiocore) pages to it. I'd be happy to look over the pull request if you tag me
Each line is a from and a to, the from ends in rst because that's the extension of the doc source
Using a bytearray(512) is good in my application too which plays a lot of samples including a few looping ones.
Is there any trick or anything needed to try building circuitpython on raspberry pi? I think I made it through the setup process correctly but I am getting this error:
pi@raspberrypi:~/circuitpython/ports/atmel-samd $ make BOARD=metro_m4_express
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
/home/pi/bin/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc: 1: /home/pi/bin/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc:ELF: not found
/home/pi/bin/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc: 1: /home/pi/bin/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc: Syntax error: Unterminated quoted string
make: *** [../../py/mkrules.mk:82: build-metro_m4_express/genhdr/qstr.i.last] Error 123
make: *** Deleting file 'build-metro_m4_express/genhdr/qstr.i.last'
@lone axle @simple pulsar thanks for the updates on label for the max_glyphs update. Sorry but have been a bit out of pocket with a new puppy that we just welcomed into our home. Yikes I forgot about puppy behavior, so much biting! I think her name should be Sharky. Anyway I read through the PR and looks like it got approved/merged. Thanks for the work on fixing this!
Hooray! new puppy!
And I haven’t forgotten the updates on sparkline. That’s still in my queue.
I'm going to work on adding your TextMap to may new layout system soon
@lone axle @solar whale has been interested in this as well, maybe they have some tips.
@lone axle I am able to build on my Pi. Not sure what is wrong for you.
How did you install the arm toolchain?
Off for sleep now. Let me know if you are still having problems and I’ll try to help tomorrow. It’s been awhile since I set it up on the Pi.
Fixes #426
Example of page render here: https://github.com/adafruit/circuitpython-org/issues/426#issuecomment-650640474
@jwcooper, please let me know if my CSS edits aren't correct. I've never used Sass before, so I took a guess...
Updates to _data/files.json were "manual" for this PR, but the release PRs from the core repo should include future changes. See .
Allows circuitpython-org #426 to be updated with each release.
-
Docs verified locally, and built correctly with changes to
shared_bindings_matrix.py. -
Changes to
build_board_info.pywere used to generate info that was manually merged into_data/files.jsonin circuitpython-org #493. I'm fairly confident they will work in the CI when the release Action is run. Its...
well, i thought the docs built fine. wonder if i made a change after testing. so close... 🤔
yep. still had the failure point short-circuited when i tested. 🤦
Added Circuitpython Board support for Seeed's Wio Terminal.
@lone axle On your Pi are you running Raspian or is this your Ubuntu Pi ? -- I am using Raspian.
also -- I built my own set of the arm toolchain locally for Raspbian since the package manager installed an older version -- only takes 8 hours to build on a Pi 4 😉 -- Raspbian may have upgrade by now, I have not looked recently but it looks like it still installs the older version (2018) by default (using apt-get) -- I see you are using 2019-q4 but curious where you got it for the RPi?
Let me know If you want a tarball of the toolchain I built.
I'm writing a circuitpython library for an EEPROM chip. Do libraries typically prevent users from doing incorrect things(e.g. writing beyond memory bounds) or is this something the user is supposed to handle?
@solar whale I am using Raspbian at the moment though I noticed the guide pages all seem to mention Ubuntu. I wondered if the difference could the cause of my issues. Glad to hear it's been done on raspbian. I downloaded the toolchain from the direct link in the guide here: https://learn.adafruit.com/building-circuitpython/linux#install-build-tools-on-ubuntu-2986713-2
That toolchain will not work on your Raspberry pi, -- try entering arm-none-eabi-gcc -v and see if it reports an error executing the program
Ahh, yep it seems that it does:
-bash: /home/pi/bin/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc: cannot execute binary file: Exec format error
right -- it's the wrong architecture
Ah.... now I see X86_64 clear as day in the name of the one I downloaded from that page before. Not sure why I ever expected it to work.
A couple minor things.
I only had stylistic comments. It looks good but I have not tested it. Are we going to rewrite adafruit_sdcard to be a thin wrapper around this for now, or just deprecate it?
Translations update from Weblate for CircuitPython/main.
@wtuemura Thank you for your contribution to CircuitPython!
I frequently use directory names that are NOT "circuitpython" for my circuitpython clones. For instance, a tree which I never put my own changes in I call cp-pristine. Won't this code work improperly in these cases?
Alternative: Use the predefined variable __file__ in the shared_bindings_matrix module, since it is at a fixed location relative to the circuitpython source tree:
def get_circuitpython_root_dir():
p = pathlib.Path(__file__).resolve()
return p.parent.pa...
That seems to have done the trick. Thanks @solar whale
Create build-metro_m4_express/firmware.uf2
python3 ../../tools/uf2/utils/uf2conv.py -b 0x4000 -c -o build-metro_m4_express/firmware.uf2 build-metro_m4_express/firmware.bin
Converting to uf2, output size: 758784, start address: 0x4000
Wrote 758784 bytes to build-metro_m4_express/firmware.uf2
@kevinjwalters Is use of the second argument of WaveFile (the optional buffer) required in order to trigger this problem?
Good point on different clone names all together! And I've seen this incantation before...totally forgot about it. Thanks @jepler!
@jepler Yes, second arg makes it go haywire from what I have observed. But passing in a bytearray(512) (note length) is ok so far in my application...
@ladyada Thank you very much. Yes, STM32F103 family, very good cost performance, more suitable for promotion and universal education, not much ability to modify St_ Drive, very distressed
@jepler Thank you!
I'm finishing up the revision for the git man pages, I'll get back to your project latter. 😉
@lone axle just to check -- did you have to do anything else other than untar as I described? I wanted to make sure I had not skipped a step.
@solar whale There was not anything else. I ended up running the tar slightly differently to match more closely how it's done in the learn guide:
tar -C /home/pi/bin/gcc-arm-none-eabi-9-2019-q4-major --strip-components=1 -xaf gcc-arm-none-eabi-9-2019-q4-major-armv7l-linux.tar.bz2
Great! good to know. Glad it is working.
?serverinfo
Thanks @deshipu. The article above points to an OSHWA resolution: https://www.oshwa.org/a-resolution-to-redefine-spi-signal-names
The essence is (qouting)
New signal names:
- SDO – Serial Data Out. An output signal on a device where data is sent out to another SPI device.
- SDI – Serial Data In. An input signal on a device where data is received from another SPI device.
- CS – Chip Select. Activated by the controller to initiate communication with a given peripheral.
- COPI (con...
@prime cove yeah libraries should try and raise exceptions on incorrect use
@dhalbert is there something else I need to do here to get this up on the website? It should have gone up with the release.
@slender iron Thanks! This is my first time really writing anything in circuitpython. Once I get things tidied up a bit, is this a good place to find someone to give me some feedback on the library? If not, where should I ask?
Yup! Here is good and the community bundle is a good place to share it
Dear @lone axle and @solar whale, beeing able to build CP on a Raspberry Pi would be really great. I'll give it a try using the guide and the exchange here. I don't have a Linux server always up, nor a powerfull machine where I can spawn a VM but I have Pi4 that I can keep running or quickly boot. This is for me the equivalent of a VM. I don't care if it is slow, it cannot be slower than when I was compiling the Linux kernel on a 386sx. It's easy to dedicate a USB key or a microSD for that particular use and boot on that whenever I need to build CP. Right now I have limited myself to library stuff that I can do in Python, but I am sure there is fun on the C side.
I did end up getting a successful build once I got the correct gcc. I've never build Circuit Python directly on a nice PC, but anecdotally the build on the Raspberry Pi seemed pretty comparable in time taken to when I build using a VM in my laptop.
I may end up going back through the process another time and trying to document every step in a readme.md somewhere. I could see myself referencing back to that if I do make it.
Jerry's link to the gcc saved me a ton of setup time before I would have been able to make the build.
That would be great.
We didn't make a new release yet, we just tagged 6.0.0-alpha.0, but there was no release.
.uf2 artifacts for the meowbit started showing up as of June 17: https://adafruit-circuit-python.s3.amazonaws.com/index.html?prefix=bin/meowbit_v121/en_US/
But there hasn't been a commit to https://github.com/adafruit/circuitpython-org/blob/master/_data/files.json since June 8, when the last 5.4.0 beta was released.
I'll check during the meeting today whether 6.0.0-something is imminent. If not ...
@thorny jay I had to build the arm GCC toolset locally -- send me your e-mail address in a DM and I will provide you access to it
or you can build it -- only take 8 hours on a Pi 4
on Ubuntu Server, firmware compiles take around 6-9 minutes for me. RPi 4 is a little quicker than a 3B+. booting from SSD didn't speed it up as much as i thought it would, but haven't booted the 4 from SSD yet.
i also need to test -j[2,3,4] on the RPi 4. j2 helped a little on the 3B+ for me.
While the SSD surely help and the USB3 also, it is more for reliablilty compare to SD card than for anything else. Also space from the SSD is great.
yep. in my context, the SSD reliability is the driving factor. the speed will just be a perk. 😄
each board build only lake about 3 minutes on the P4
i wonder if its the Raspbian/32-bit improvements over the Ubuntu/64-bit "shimming". i've read reports of 64-bit operations taking a bit longer vs 32-bit.
@slender iron Do you expect to release 6.0-beta.0 this week?
It may be alpha if we don't do all of the API changes
Yes of some sort
Thank you.
to start the messaging of 6.x
Hello, all! The CircuitPython Weekly is in about 40 minutes. Please add your Hug Reports and Status updates to the notes document, even if you'll be attending - it's super helpful! Talk to you all soon! <@&356864093652516868> https://docs.google.com/document/d/1P9jItrwitljf_oKBBXYs92uRks99zoFmye2YEzAj2lE/edit#
Good afternoon all you wonderful folks -- happily lurking today 🙂
much louder though, I'd bring it down a touch
Lurking
Thanks, @onyx hinge
lurking
OK, thanks
On Mon, Jun 29, 2020 at 11:51 AM Dan Halbert notifications@github.com
wrote:
We didn't make a new release yet, we just tagged 6.0.0-alpha.0, but there
was no release..uf2 artifacts for the meowbit started showing up as of June 17:
https://adafruit-circuit-python.s3.amazonaws.com/index.html?prefix=bin/meowbit_v121/en_US/But there hasn't been a commit to
https://github.com/adafruit/circuitpython-org/blob/master/_data/files.json
since June 8, when the last 5.4....
It is the distant future. The year 2000
lurking today
text only today
👋
Same core issue as #3077
While on this page:
https://circuitpython.readthedocs.io/en/latest/shared-bindings/board/
The "5.0" version link points to
https://circuitpython.readthedocs.io/en/5.0.x/shared-bindings/board/index.html
which does not exist. The actual URL is
https://circuitpython.readthedocs.io/en/5.0.x/shared-bindings/board/__init__.html
To be explicit about the scope of this issue, I won't consider it fixed until all known broken links that resulted from the autodoc...
@idle owl @slender iron @onyx hinge I may have to cut out during about 2:30 - 2:45 for some non-work tech help thing; I'll ask to delay or be early if my turn is coming around. Should be back 2:45 or earlier if that happens.
Thanks for filing a fresh github issue, even though it's the same underlying problem. The way github treats linked pull requests & issues, combined with the way that I don't know how to "do a test" to make sure everthing is fixed, means we may end up spending a lot of small integers while working on this problem.
@ionic elk same! the thunder is wild
are you in western ma @ionic elk
poor doggos are freaking out 🐶 😱 ⛈️
yeah
I was trying to heat up some soup in the kitchen and they were trying to literally lie down on my feet
I am lurking
@viral minnow Are you lurking today?
lurkin' today ✌🏽
@idle owl no I can talk
@summer dagger will you be participating in the meeting today?
👍
@viral minnow I'm moving your notes into alphabetical order. Thanks for adding them!
@onyx hinge thanks Jeff, first time doing this 🙂
https://bigl.es/monday-microcontroller-adafruit-clue/ https://twitter.com/biglesp/status/1277617828128886789
New #mondaymicrocontroller blog post!
This time I take a look @adafruit CLUE board and show how you can use it with #CircuitPython
https://t.co/hhP0Zki2by
https://twitter.com/PlusPlusInt/status/1263934246818926592 https://drive.google.com/file/d/11VC9ARay88x7QFD1vQ5pbqDHNuNcoAaf/view https://makecode.microbit.org/24284-48283-61869-95629
@anne_engineer @adafruit @microbit_edu @Dan_Halbert Hi. Code for CLUE is available here: https://t.co/izfcY52nhy and micro:bit project is here: https://t.co/9KcifcGz1A. I'm still learning so CLUE part can probably be optimized. If I'll find some time, I'll make simple library...
https://twitter.com/wildestpixel/status/1277225856025452545?s=20 https://www.adafruit.com/product/4500 https://www.adafruit.com/product/4264 https://io.adafruit.com/
Do you feel like you just don't have a CLUE? Well, we can help with that - get a CLUE here at Adafruit by picking up this sensor-packed development board. We wanted to build some ...
Give your Feather project a lift with the Adafruit AirLift FeatherWing - a FeatherWing that lets you use the powerful ESP32 as a WiFi co-processor. You probably have your favorite Feather ...
Adafruit IO is the easiest way to get your projects onto the Internet of Things!
https://www.twitch.tv/videos/662502114 https://twitter.com/nnja https://winterbloom.com/ https://twitter.com/theavalkyrie
▪️Developer
▪️Pythonista 💜🐍
▪️PSF Director
▪️Speaker
▪️@frontendmasters author
▪️@recursecenter alum
▪️Opinions my own
▪️Advocacy at microsoft
▪️she/her
12046
25374
yay @ivory yew !
Welcome back to Instagram. Sign in to check out what your friends, family & interests have been capturing & sharing around the world.
https://www.hackster.io/sridhar-rajagopal/international-space-station-tracker-6afdca https://blog.adafruit.com/2020/06/26/international-space-station-tracker-raspberry_pi-piday-raspberrypi/
Track the ISS' current location & trajectory using a Raspberry Pi, ePaper Display, ProtoStax Enclosure and Python. By Sridhar Rajagopal.
pretty!
Have a Python on hardware related project or post to share? Submit it to the Python for Microcontrollers newsletter! https://github.com/adafruit/circuitpython-weekly-newsletter/blob/gh-pages/_drafts/2020-06-30-draft.md
oh man. those protostax enclosures are nice. i've been looking for similar for RosiePi...
User wtuemura on github is another new contributor; probably their pull request wasn't merged by the time the stats were generated this week
i really need to track that -1 result down... 😄
off by one errors are no big deal 🙂
The PCF8591 is a single-chip, single-supply low-power 8-bit CMOS data acquisition device
@finite vine are you just listening in (aka lurking?)
@gilded cradle should we add the blinka displayio and _bleio libraries to the Blinka status now?
yeah just listening
Alabama, Arizona, Colorado, Delaware, Oklahoma Check electioncal.us for deadlines by Today! (June 29th).
Regarding moderation -- I hope no one gets the wrong idea. Things are actually going pretty well.
We've mentioned it before, in a community of over 21k -- a tremendous majority are awesome folks. It's just a handful of isolated incidents that need attention.
We always want to say -- thank you for being really good everyone 🙂
thach too
See more clips of Limor's AMA: https://www.youtube.com/playlist?list=PLbNbddgD-XxFawIe9lOIIOBI6YoH8L0Km
This AMA with Limor Fried, Creator and Adafruit CEO, streamed live on June 25, 2020.
Hack Club’s website: https://hackclub.com
Follow us on Twitter: https://twitter.com/ha...
they were here to hear their hug report
I wanted to try saying my Hug report, but the hangup button is next to the mute button.
I'll try my other report. 🙂
@thorny jay noted
@uncut nexus are you looking at the pulseio issue?
@solar whale did you say it's a radio feather?
adalogger
ah. ok. nvm.
@viral minnow I mightve missed this, do you work for RAKWireless? I have a RAK5010 for testing if you want. Excited to see support for rak hardware.
@solar whale I notice you're not muted, though I don't hear anything from you
@prime flower Yes I joined RAKwireless this month 🙂 RAK5010 is working really well I'll send a PR to support it this week.
@viral minnow congrats! I like the super-thin antenna they include with their boards 🙂
@solar whale What was the exact hardware combination that was problematic? I think those SD card slots have card physically present pins, could those be involved?
feather_m4-express. 2.4inch TFT feaherwing, adalogger featherwing -- jumpers are set -- both readers are acceesible but the circumstances are very inconsistent.
hey 👋 (just listening in)
+1 that's an awesome scrolling sign. Brings back memories of programming an old high school LED sign, carefully over an infrared controller every week. This looks a 1,000x nicer, and a lot easier to program I'd reckon 🙂
@idle owl please skip me; impt phone call
those pastel patch cables are glorious! 😄
That's a nice photo 🙂
@ivory yew good luck with your move.
thanks!

it's so stressful
same
indeed.
whats up with everybody seems to be moving
just the thought of packing up my workshop gives me shivers
undersstood
oh that's rad!
looks at workshop
thinks about packing it up and moving
nope. I can't do it. my neurons just segfaulted considering it.
@errant grail My make noise 0 coast does that
@errant grail please keep me posted on that!
@ivory yew will do. Hopefully will have a breakthrough today or tomorrow.
@ivory yew I'm moving 35min away, across the country would be stressful indeed! I hope it goes well.
@prime flower I'm gonna try to hire a full service mover to just do it
I moved across a courtyard and it was stressful
paying someone to move stuff is worth it
ooooh, neato
@thorny jay re: computer falling asleep, I use Caffeine for macOS.
@thorny jay re: computer falling asleep, I use Caffeine for macOS.
@prime flower One of those computer is corporate where I cannot install anything... a surface that had only one USB plug (now I have the docking station) so BLE was interesting. My other computer is Thinkpad with only two USB still working, so there BLE permit me to plug a mouse and a CP board.
Of course I could use two BLE CP board... but then it is not fun.
Regarding MacOS caffeine, be aware it's been forked -- this below link has an updated version that plays nicely with Catalina and Mojave.
TIL, thanks mr certainly.
@ionic elk is that H7 you are talking about is STM32H7 (like on that Maximite I was talking about)?
@ionic elk if you end up with time this week, we should get you going on esp32-s2
STM32H7 yeah. Right now we support the H743, which is used on the OpenMV and some other high performance boards
I haven't seen the maxemite but if it's available online I can grab one and add support.
looks like the maximite is 743 too
uses this dev board: https://www.waveshare.com/coreh743i.htm
CoreH743I, STM32 STM32H743IIT6 MCU core board
@slender iron I'll start reading the docs for the ESP32 and put some notes together if I have time
Is there something in particular you'd like help with so I can focus on it?
what's this actual maxemite thing, does somebody have a link?
pulseio?
are the F743i and F743zi essentially the same? STM's models number confuse me at a certain point. 😄
@slender iron @idle owl I'm back
@raven canopy for ST, the letters that come after the line number dictate the flash/ram combo and the package size
@tulip sleet Jeff read your status update. You'll be up for in the weeds.
STM32H7 yeah. Right now we support the H743, which is used on the OpenMV and some other high performance boards
@ionic elk Maximite is using this: https://www.waveshare.com/coreh743i.htm
CoreH743I, STM32 STM32H743IIT6 MCU core board
@raven canopy I assume you mean the H7, here's the grid: https://www.st.com/en/microcontrollers-microprocessors/stm32h743-753.html
i did yes. haha. see...confuses me. lol
I wonder if you could enable both CS lines at the same time
I guess that's bad because then they both drive MISO
@raven canopy the exact naming scheme for STM32s is this: for the H743ZI, H7 is the family name (high performance M7/M4 combo chip tier), 743 is the line number (these can seem kind of random but have certain trends across families), Z is the package type (100pin LQFP, always uses this letter across all families) and I is the RAM/Flash combo (which are arbitrary per chip line)
sdcards are cheap 🙂
@thorny jay what is the actual Maximite tho?
its a retro computer
so is it emulated on the H7?
Unplug and replug or press reset button?
wikipedia says it was pic based
"The Colour Maximite 2 is a small self contained computer inspired by the home computers of the early 80's such as the Tandy TRS-80, Commodore 64 and Apple II."
@thorny jay what is the actual Maximite tho?
@ionic elk This explain better than me: https://www.youtube.com/watch?v=lzrX72aB7zg
I've coded BASIC since I was 5 : C64 then QBASIC then VB - so when a sub-100USD boot-to-BASIC touting 16-bit graphics appeared, I decided to build one (aka 5) from beta plans. Anyone who struggled with QBASIC on a 386 or AMOS on an Amiga and just wished it was faster (without ...
I have Linux eric 5.2.0-0.bpo.3-amd64 #1 SMP Debian 5.2.17-1~bpo10+1 (2019-09-30) x86_64 GNU/Linux and it actually hasn't happened in awhile
wikipedia says it was pic based
@ionic elk new version just out now and based on STM32.
@thorny jay USB host and VGA support is probably the toughest part
@slender iron should I get the whole computer or just the core chip?
off waveshare
or waveshare via amazon
Device is an Adafruit microcontroller board running https://github.com/adafruit/circuitpython, using the TinyUSB USB stack: https://github.com/hathach/tinyusb.
Device presents a composite USB device that includes MSC, CDC, HID, and MIDI
Device was commanded to forcibly reform...
I don't think it's urgent. the 743 should already be supported
USB host and VGA will be a non-trivial amount of work
tru
Does this crash only happen on Pis?
no
@thorny jay USB host and VGA support is probably the toughest part
@slender iron Right now I was just interested in reusing the board if I get bored by Maximite 2. But of course, if it is possible to replace their "Basic" software by Circuit Python... then this is a Circuit Python computer !!!
no, it also happens on x64
I've tried kernels from 4.10 to 5.7; they all have the bug
@thorny jay I'd love to support USB host and VGA but it isn't a priority
USB host... again.
could that info be in the lib?
@tulip sleet So isn't just me having the problem.
When I wrote the plotter for the clue I noticed there was no (standard) way on the APIs for finding min/max for sensors
@thorny jay if you have the actual H7 part, I can add board level support without having it on hand, if you're available to test.
@inland tusk no, a number of people using Linux on various platforms have been bitten by it
@ionic elk I order the stuf... (it's in back order)!
I just reurned 18.04 to avoid it
i was getting this on 18.04 also
It was intermitent for me in 18.04
@tidal kiln yes, I meant that the sensor properties would be part of the sensor library design much like universally calling sensor.temperature in a temperature sensor lib.
For sensor ranges, the abs_min / abs_max values in here are me either looking at data sheet, looking at library code, getting values from testing, or guessing: https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/master/CLUE_Sensor_Plotter/plot_source.py#L342-L378
e.g., sensor.min_temperature = -40; .max_temperature = 100; .temperature_resolution = 1/256; ?
we could release 5.3.1 with the new names
@onyx hinge yeah, but min_value instead of min_sensorType since it'd need to be across all sensor types (ref: https://learn.adafruit.com/using-the-adafruit-unified-sensor-driver?view=all#sensor-t-sensor-details-161325-18)
@prime flower but say you have an AHT20 (?) and it has .humidity and .temperature .. it then needs 2 sets of min/max/resolution right?
@raven canopy random neuron firing: can we help people in getting "main" branch when they use cookiecutter, or is initializing git distinct from running cookiecutter so that's not possible?
yeah, ICs with multiple sensors are tough in that case..
@tulip sleet for eventual removal of API, maybe just throw in a Deprecation Warning print, based on versioning? not sure how far they'll propagate beyond library dev...
@prime flower sort of reminds me of "transducer electronic data sheets" (something i ran into in a previous life)
👍
I spend a lot of time downloading the bundle and updating my board... then I get a mix of old and new, so I update things.
And the picture in learn guide help to know what is a file *.mpy and a folder.
@raven canopy random neuron firing: can we help people in getting "main" branch when they use cookiecutter, or is initializing git distinct from running cookiecutter so that's not possible?
@onyx hinge honestly, i don't remember if cookie init's the git. however, the adafruit repository on github should be separate.
🎁 ⬆️
Thank you all!
thanks!
bye
thanks
@slender iron - would you have a few minutes for a phone call regarding the pulseio issue for CP5.4 on M0s?
I just had to setup a new Mac this past week while I was out -- my old one got a bloated battery and had to be retired. And I feel your pain @idle owl -- after seven years, I forgot how to setup all the little tweaks and quirks in the OS and my workflows...
@uncut nexus sure! will discord work?
well, there's likely to be a lot of back-n-forth
@modern wing Exactly. It's like moving into a new house except you only have some of your stuff, and there's a bunch of stuff already there.
we can do voice over discord
And the worst part, you don't really know what stuff you used to have.
ok - how to do that?
I usually end up throwing my old hard drive into an external enclosure and the first 6 months of using the new PC I end up pulling it out a few times a week to check on something or copy some old thing over
Dog is desperate -- better go now -- have a good week 👋
@lone axle I hear ya, I was doing last minute referencing while doing the final battery discharge -- while backing up preference files. Having a package manager is such a relief for bulk installs too.
If anyone has time, I'd appreciate some feedback on this EEPROM library. I'm new to circuitpython so if anyone has any suggestions on best practices or general functionality for this that'd be great: https://gist.github.com/AdamCummick/a7d752840efbdc61b8873bbfee3ac56e
Random displayio question, am I allowed to stick None in a displayio Group half way through a list? I'm using "allowed" in the sense of the other non-None elements will still display properly.
I can try this, of course and just see what happens...
@solar whale http://elm-chan.org/docs/mmc/mmc_e.html#spiinit "Initialization Procedure for SPI Mode"
After a power-up sequence, MMC/SDC enters its native operating mode. To put it SPI mode, follwing procedure must be performed as shown in this flow.
Hi all, new here. I have a question regarding CircuitPython and particle products. I have a Particle Argon that I can convert over but I was wondering if anyone knows if doing so gets me wifi with that board? I’m going to connect it to a mqtt server and that board does have a built in wifi chip cause it’s accessible via particles code.
@placid stirrup I am not 100% certain because I don't have any of the particle devices myself. I believe the deal is that if you use Circuit Python on the particle Argon at this time you cannot make use of the built-in wifi. At present time if you want to use wifi I think you would need to use an AirLift featherwing or other ESP32 breakout device with NINA firmware to act as a co-processor.
Even though the argon device has builtin wifi, I think Circuit Python does not have support for using it.
Ok thanks for the answer 🙂
Oh wow my sound was so bad on the recording really bizarre, sounded like the wrong sample rate
@viral minnow yeah it sounded odd to me but I could understand you so I went ahead with things. If you would like to do a mic check between now and the next meeting, just let us know.
@onyx hinge thanks and yes please when you have a chance, I think I had the wrong sound input source selected here.
@lone axle three possibilities for capturing images from displayio: 1, there is a method on Display to get the content of one screen line, and a library can make a bmp file out of it. I don't have the link handy. 2, if you settle for small displays perhaps framebufferio can help. 3, you could do it on the blinka implementation which might have additional options for capturing output
@viral minnow I could hop back on the voice chat now if you don't mind the sound of a 3d printer in the background
@lone axle @placid stirrup I think the issue is that the ESP32 on the Argon doesn't have the right pins exposed to use ESP32SPI and the NINA firmware. I believe some folks have used the AT command protocol with that firmware, but I don't think that's really supported anymore.
Oohh Neat! Thank you! I like the idea of using Blinka so the images can get stored on the Pi and I don't have worry about transfering them anywhere.
I have a tiny bit of experience with Pillow, I may be able to figure out how to get it to save out a file.
Looks good! Thank you. Ignoring the travis failure since this changes to CP source.
Looks good here too! Thank you!
Let's use 5.3.x. I'll enable it in readthedocs.
Fine with me @jerryneedell
Let's use 5.3.x. I'll enable it in readthedocs.
Sounds good to me. I'll spin up a new PR...
@prime cove Looking at it now. I'd probably just implement __get__ and __set__ rather than having read and write as well.
You probably want __len__ as well if you know the length
What would you guys say is the go to device that has wifi built in? Is it that little m4?
Ideally, it'd be a drop in replacement for nvm
@placid stirrup right now the airlift line
I'm actively working on ESP32-S2 which will be a good option soon.
Awesome I’ll look into those
@slender iron Thanks! Is it just a semantic thing then? I.e. I should change"read" to "_read" and remove it from the example?
Mqtt is implemented in CircuitPython correct? I think I saw the library.
Are there any issues with it to be aware of?
@prime cove ya, a style thing. Basically, having one way to do something means more consistency in the code that uses it. By mimicing an existing API, it's easy to swap your object in as well.
another python style thing is separating words in names with _ rather than caps
glad i didn't delete that folder yet... 😄
@tulip sleet what was the 64 bit math thing that you fixed to save code size a while back?
the topic has come up on the embedded.fm slack
oh. i remember exactly where to find that (since i caused one)
here's the comments. let me try and find the PR/other notes: https://github.com/adafruit/circuitpython/blob/main/ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c#L104
thanks @raven canopy !
@slender iron Made those changes, thanks for the help!
np!
@slender iron also see https://github.com/adafruit/circuitpython/issues/342 and https://github.com/adafruit/circuitpython/pull/343
similar issue
but a little trickier to fix
thanks!
Disabled is fine. I just didn't want it on by default.
Thank you for this! Folks will be excited for the speedups!
Thank you Scott!
Thank you!
looks like my busio change has some boards to fix still. will do that now
@cater anything blocking https://github.com/adafruit/Adafruit_CircuitPython_MCP230xx/pull/28 ? This one I expected to be mostly uncontroversial since it's the same as the ones I sent for ESP32SPI and IRRemote
@onyx hinge @ivory yew Holy cow! With ulab, I was able to reduce the automatic Eurorack cable discovery process latency from 15.8ms to unmeasurable (using time_monotonic())! Code is much simpler as well. Going to set this aside for a couple of hours and see if it's really true when I return. Thank you @onyx hinge for the incredibly helpful learning guide! UPDATE: after averaging 1000 iterations, it looks like the latency is 0.876ms, well under my 1.0ms target. Special thanks to @lapis hemlock, as well.
poll_pin.value = False # set polling voltage to 0v (high impedance)
inputs = ulab.array(read_inputs()) # read inputs before testing
poll_phase_one = ulab.array(inputs < 1000) # create no-cable mask
poll_pin.value = True # set polling voltage to 5v
poll_phase_two = ulab.array((read_inputs() * poll_phase_one) > 20000) # mask with first test results then check for polling voltage change
return poll_phase_two, inputs # return with result mask and raw data
nice!
@onyx hinge Thank again for the ideas. I have successfully saved a screenshot with Blinka displayio!
Thank you! I'll merge this.
Do you want to support the display at start up? Check out the PyPortal for an example. That way folks don't need to initialize the display themselves and output will show immediately on the screen. Feel free to open an issue or join Discord for help with that. Thanks!
Oops, I didn't see the tests failed. You'll want to add the board here: https://github.com/adafruit/circuitpython/blob/main/.github/workflows/build.yml#L242
That way it'll be built every commit and automatically released. Thanks!
@lapis hemlock ^^^ see what cgrover says above
Hi @tannewt
I have added wio terminal here, not sure what is missing: https://github.com/ansonhe97/circuitpython/blob/main/.github/workflows/build.yml#L243
For now, I have not seen an example with circuitpython using SPI LCD yet, may be you have some reference? That would be very helpful :D
Hi @tannewt
I have added wio terminal here, not sure what is missing: https://github.com/ansonhe97/circuitpython/blob/main/.github/workflows/build.yml#L243
The check is picky and wants it sorted. So wio before xiao.
For now, I have not seen an example with circuitpython using SPI LCD yet, may be you have some reference? That would be very helpful :D
Here is a SPI example: https://github.com/adafruit/circuitpython/blob/main/ports/atmel-samd/boards/pygamer/board.c#L73 What display IC controls the display? We may already have a board with the correct init sequence.
Thank you! I'll merge this.
Do you want to support the display at start up? Check out the PyPortal for an example. That way folks don't need to initialize the display themselves and output will show immediately on the screen. Feel free to open an issue or join Discord for help with that. Thanks!
Our LCD is ILI9341, any luck? :)
Also there is a new CI error, what exactly is this and how can i fix this?
I don't think we have a board with it natively. I didn't do a great job documenting it in the board.c. The init sequence is here though: https://github.com/adafruit/Adafruit_CircuitPython_ILI9341/blob/master/adafruit_ili9341.py#L72
You'll just need to convert is to a C array.
For now, can we simply use this driver:https://github.com/adafruit/Adafruit_CircuitPython_ILI9341 (will also test with wio terminal), may be we can add it later?
For now, can we simply use this driver:https://github.com/adafruit/Adafruit_CircuitPython_ILI9341 (will also test with wio terminal), may be we can add it later?
Will circuitpython add the NFC, BLE5.0 and MESH for NRF52840 ?
We have no plans for NFC or Mesh. We support some aspects of BLE 5.0, including extended advertising.
@onyx hinge some interesting developments to ponder over your morning coffee --First, sdcardio is working well on my feather_m4_express! I have been workin on the strange SDCard issue I found yesterday - no difference using sdcardio BUT I found that is is only an issue with the TFT featherwing -- It does not happen with an SDCard breakout board replacing the TFT. It is related to the specific HW config of the TFT featherwing. The plot thickens...
@solar whale I have not used feather wing but have a TFT Gizmo on a CPB nowadays. That has some interesting characteristics for the screen being active. CircuitPython "remembers" the screen has been used and it stays active after that as a serial console. Is that the same on the TFT feather wing?
The local copy of elf headers is needed for the MAC systems which miss the ELF headers. This solves the issue: https://github.com/adafruit/circuitpython/issues/2713
@simple pulsar yes. It behaves the same
There are a couple sites where I'm concerned about storing pointers to CircuitPython objects into other structures. If the CircuitPython objects are relocated because they are "long lived", these other pointers will be wrong, and lead to memory corruption.
Another internal pointer, how is this going to play with moving to the long-lived heap?
uart_read_bytes can return -1 for errors https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/uart.html#_CPPv415uart_read_bytes11uart_port_tP7uint8_t8uint32_t10TickType_t
if it does, the adjustments of total_read, etc., just below are incorrect.
It's not clear when/why this function could error
Hey quick question, can I use an 8266EX to add wifi to a board?
Like to another board which doesn't have it
@placid stirrup sort-of -- as in this guide https://learn.adafruit.com/adding-a-wifi-co-processor-to-circuitpython-esp8266-esp32 you can use the AT firmware via UART -- like on the Argon, but it is not the recommended path. using and ESP32 board via SPI will work much better -- for example -- with your Argon, you can add an "airlift" https://www.adafruit.com/product/4264
@placid stirrup another option I have used is to put Micropython on the ESP8266 for WiFi access and pass data via UART from a CircuitPython board -- then have the ESP8266 handle the WiFi.
MicroPython supports Wifi on the ESP8266 and ESP32
Hmm
Ok, sounds good. Maybe I'll just look at getting the airlift m4 and be done with it. I can implement my little project on the Argon now but I so want to use python to do this instead
What's in jepler/circuitpython@sdio-stm32-broken-rename
It compiles but is not recently tested and hard-codes the bus specs of the stm32f405 feather.
hey @lone axle do you remember the settings you used to get the bitmaps to work with imageload? I'm thinking it could be worthwhile to add a few sentences in the README explaining what types of bitmaps do and don't work, and the ways to export those sorts of bitmaps in GIMP, photoshop if you have it, and using CLI tools.
@trim elm Indexed BMP files are what is supported currently I believe. There is a page in this guide I made recently that covers the process of converting and editing them with GIMP: https://learn.adafruit.com/creating-your-first-tilemap-game-with-circuitpython/indexed-bmp-graphics
Oh, great. I'll just put a link to that in the README
@trim elm The one gotcha with the recent update to imageload is that BMP image files with negative heights are only supported on builds with longint enabled. Builds without longint can only render positive height BMPs.
Ah
I never knew negative height existed to be honest. If I understand correctly I think it's used to flip the contents before showing or something like that.
I'm not sure how to actually create a negative height BMP though. I just tested on the one supplied in the original PR that added it.
I just remembered that I have a raspberry pi 2 sitting somewhere, hows circuitpython on one of those? I know it's kind of a different animal than what circuitpython is intended for
@placid stirrup CP does not run per say on the RPI but you can use most of the CP libraries via the "Blinka" interface https://learn.adafruit.com/circuitpython-on-raspberrypi-linux
The file elf32.h is already in spresense-exported-sdk/nuttx/include/elf32.h is there a way to use that file instead of adding a copy?
Alright, I'll stop bugging you guys and read up on this. Thanks for all the help
No worries -- Keep asking questions
@placid stirrup Using the CP libraries on your Raspberry Pi will work well. And you get to code in Python!
Do the networking libraries work via blinka/raspbian? Gotta get that MQTT connection 🙂
you use the standard RPi libraries for that -- use "blinka" to talk to the sensors.
or am I misunderstanding?
Well what I'd like to accomplish is to have the MQTT client directly in the control code cause I want it to talk to the actual control program. It's all good I need to read up on this, maybe I'm thinking about it wrong. In something like the particle firmware you create everything is part of the control program, the control program calls the mqtt agent to publish/subscribe and as such push and pull data in and out of the program itself. I'm not familiar with how actually having a general purpose OS underneath complicates the matters
I'll poke around and see what the internet has to say
But ya, I want to do this all in python if I can
Good luck and feel free to come back with more questions. There are many options!
Huh no special antistatic foam for these guys
where did you get them, My WROOMs and WROVERs from Digikey and Mouser were in antistatic foam.
What boards are those?
ep32s2 saola development kits
I see built in wifi 🙂
yes and native USB (ESP32 does not have that) but no BLE
There is support in CircuitPython for the ESP32S2, not the ESP32 -- it is still a "work in progress" WiFi is not supported, yet....
can we just skip to the end where we get a chip with wifi, bluetooth, HS USB, 500MHz and costs under a dollar plz
and enough GPIOs to not need an MCP230xx 😛
@ionic elk Powered by a built-in perpetual motion machine?
I'm fine waiting for 7.0.0.
Translations update from Weblate for CircuitPython/main.
I plan on doing a 6.0.0 pre-release this week. (Probably Thursday or Friday.)
Yup! Will merge this now and a follow PR can add native display support. Testing from CircuitPython first is a good idea.
Enjoy!
@solar whale the saolas were from mouser
@onyx hinge @ivory yew Holy cow! With
ulab, I was able to reduce the automatic Eurorack cable discovery process latency from 15.8ms to unmeasurable (usingtime_monotonic())!
@errant grail, @onyx hinge Great, but how does it work? The cable discovery process, that is. The question is not entirely academic: if I knew what is going on, we could, perhaps, shave off a couple of microseconds here and there.
@lapis hemlock @onyx hinge @ivory yew t’s a two-phase process that can detect a connected plug regardless of its signal condition. It uses a TS-with-switch jack and a single digital output polling pin.
The test first sets the polling voltage to high impedance. If nothing is connected, it’ll measure zero volts. If it sees any other voltage than zero, it knows a cable is connected.
However, a connected cable may have zero volts on it, so a second test is needed. The polling voltage is raised to 5v (almost any voltage above the noise threshold would work). If the measured voltage jumps from 0v (in the first test) to 5v, then we know for certain that no cable is connected. If it stayed at zero volts, the logic concludes that a cable is plugged into the jack.
I suspect that the actual polling pulse is very short, probably 100us or so. Going to scope it today.
Getting the detection latency of the code to 1ms or less means that it should work okay with CV signals < 1kHz. Need to confirm that assumption.
@errant grail But where do you need to crunch numbers? Do you filter (convolve) your analogue signals to beat the noise?
@lapis hemlock Nothing that sophisticated. I needed fast array processing to create masks for each test phase followed by a logical comparison of the test phase results.
def poll_inputs(): # determine if cable is attached to jack
poll_pin.value = False # set polling voltage to 0v (high impedance)
inputs = ulab.array(read_inputs()) # read input array before testing
poll_phase_one = ulab.array(inputs < 1000) # create no-cable mask
poll_pin.value = True # set polling voltage to 5v
# mask with first test results then check for poll voltage change
poll_phase_two = ulab.array((read_inputs() * poll_phase_one) > 20000)
return poll_phase_two, inputs # return with result mask and raw data```
I tried setting dtype to uint16 for the values, but the floating default turned out to be the fastest.
With a bit of work, we could make this run faster. The problem is this poll_phase_one = ulab.array(inputs < 1000). inputs < 1000 returns a list of Trues/Falses, and then converts it to an array. That is a bit expensive. An update is in the works, where I treat Boolean arrays properly. I won't commit to a deadline, but it shouldn't be long before I can release that.
Another thought: we might want to implement any, and all for arrays. That would allow masking, instead of having to evaluate (read_inputs() * poll_phase_one) > 20000.
Yeah, boolean would be nice, but I'm pretty darn happy as-is!
I think I meant where, or something similar.
Yeah, boolean would be nice, but I'm pretty darn happy as-is!
@errant grail A couple of weeks ago, the moderator bot deleted one of my comments with d.a.r.n. Odd.
I haven't done much more with ulab than scratch the surface, but I can see some great possibilties for it.
It is always a bit fulfilling to see what people do with your code. I definitely haven't thought of such an application.
Interesting. Didn't realize the bot wouldn't like it.
I can help understand what the bot is doing if it ever moderates you when it shouldn't
@lapis hemlock In this case, ulab is more akin to the way I design hardware -- doing things in parallel whenever possible. Since I'm more hardware-oriented, it was nice to have something that matched that approach.
I can help understand what the bot is doing if it ever moderates you when it shouldn't
@slender iron I wasn't offended by the bot's pulling my comment. I understand that it is a bit borderline, when you do something similar to knitting🙃
Probably depends on the location, too.
@slender iron Can't be too smart since it didn't pick up on you calling it dumb. 😉
exactly 😉