#circuitpython-dev
1 messages · Page 321 of 1
iMac-86:circuitpython margaret$ git rebase --continue
[detached HEAD b1fce9e93] Deleted trailing whitespace
3 files changed, 9 insertions(+), 10 deletions(-)
Successfully rebased and updated refs/heads/bitmap_v2.
ok, nice!
the other thing I noticed was these: https://github.com/adafruit/circuitpython/pull/3275/files#diff-3a65a9fb4971bd39987270bca1a48b7cR382
are those untracked files?
Now I have a bunch of _2 _3 and _4 files.
Untracked files:
(use "git add <file>..." to include in what will be committed)
ports/atmel-samd/asf4_conf/same54/hpl_dac_config 2.h
ports/atmel-samd/asf4_conf/same54/hpl_gclk_config 2.h
ports/atmel-samd/asf4_conf/same54/hpl_mclk_config 2.h
ports/atmel-samd/asf4_conf/same54/hpl_nvmctrl_config 2.h
and a whole lot more.
I don't know where these came from.
Yep, it said "would remove" on all of these.
they must be attempted merge remnants
k, to do it then git clean -d -f
and that should delete them
iMac-86:circuitpython margaret$ git status
On branch bitmap_v2
Your branch and 'origin/bitmap_v2' have diverged,
and have 3 and 5 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
nothing to commit, working tree clean
iMac-86:circuitpython margaret$
🎉
ok, now do one more make translate and commit
to clean up the .pot file
then push with a --force-with-lease
I should git add locale/circuitpython.pot and then git push --force-with-lease?
iMac-86:circuitpython margaret$ git add locale/circuitpython.pot
iMac-86:circuitpython margaret$ git commit -m "Cleaning up with tannewt's help and adding the translation file"
[bitmap_v2 0c1768010] Cleaning up with tannewt's help and adding the translation file
1 file changed, 2 insertions(+), 26 deletions(-)
iMac-86:circuitpython margaret$ git push
To https://github.com/kmatch98/circuitpython.git
! [rejected] bitmap_v2 -> bitmap_v2 (non-fast-forward)
error: failed to push some refs to 'https://github.com/kmatch98/circuitpython.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
iMac-86:circuitpython margaret$
Thanks, sorry about that....
iMac-86:circuitpython margaret$ git push --force-with-lease
Enumerating objects: 32, done.
Counting objects: 100% (32/32), done.
Delta compression using up to 4 threads
Compressing objects: 100% (23/23), done.
Writing objects: 100% (23/23), 4.43 KiB | 1.48 MiB/s, done.
Total 23 (delta 18), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (18/18), completed with 9 local objects.
To https://github.com/kmatch98/circuitpython.git
+ b89005610...0c1768010 bitmap_v2 -> bitmap_v2 (forced update)
you aren't just adding onto what the remote state is
yay! "Files changed 4"
much cleaner
If you figure out what program was creating the " 2" " 3" etc files, I'm curious. I haven't seen git itself do that.
Wow, there is no way I would have been able to figure out how to resolve that in the proper git way.
You don’t know how many times I broke git and had to find weird work arounds
Thanks a lot for your help on this, I took up a lot of your time, I appreciate it.
In 10 years knowing it will start to pay off
being a good git explainer is practically a superpower @slender iron
working on circuitpython has gotten me over the hump myself
I can use it pretty well but I second guess myself when trying to help others I think
100+ commits a week with intermittent merge conflicts teaches you a lot about git
helping someone through their first rebase in text mode is 😨
by "text mode" meaning on discord in text chat
Haha
I wish git would drop the special remote and branch names
they do more harm then good because special cases add complexity
yeah. If it matters to you, you can use a name in place of origin via: git clone -o <remote-name> and have been able to for some time. And git init has just recently got a flag to specify the name instead of a hard-coded default.
(Still, I hope virtually everyone settles on main)
Thanks for cleaning up the PR! Just a couple other comments.
{MP_QSTR_x1, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0} },
{MP_QSTR_y1, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0} },
Right now x1 and y1 won't work, they'll always be 0.
int16_t x1 = args[ARG_x1].u_int;
int16_t y1 = args[ARG_y1].u_int;
int16_t x2, y2;
Please ensure the max values are exclusive below and comment they are here.
@onyx hinge For the label issues, is it just gradually walking off the screen?
yeah it seems to slowly walk left, in this case
@onyx hinge yup, I use -o myself. I wish it was required
guessing some kind of rounding is done in a way that accumulates error?
Ok, I think it's an integer rounding thing.
I'm getting auto-reloads on the ESP32 on every chip start. Is this a known issue?
I updated my test code.py to verify the correct operation of x1 and y1 variables (see last blit command).
import displayio
bmap_group = displayio.Group(max_size=2) # Create a group for displaying
bitmap1=displayio.Bitmap(50, 50, 4)
bitmap2=displayio.Bitmap(50, 50, 4)
bitmap3=displayio.Bitmap(50, 50, 4)
bitmap4=displayio.Bitmap(10, 10, 4)
bitmap5=displayio.Bitmap(10, 10, 8)
bitmap6=displayio.Bitmap(100,100,4)
palette=displayio.Palette(4)
palette[0]=0x000000
pal...
@tulip sleet if I want to expand the PulseOut API, how do I disguise the fact that common_hal_pulseio_pulseout_construct has different parameters? I can't overload it in C.
I'm editing shared-bindings - I can check what the first parameter is, see if it's a PWMOut or Pin, and then parse the parameters differently... but without a preprocessor flag I don't see how I can call the common_hal construct functions.
you can make two constructs (construct_with_pin, construct_with_pwmout) and just call the appropriate one, or pass the arg as an mp_obj_t for now and have the common_hal figure it out.
I was thinking you were worrying about the parameter names in Python, which is a bit more of an issue: (since someone might give hte param name: pin=, pwmout=. Maybe the arg name will need to change later)
there will need to be two constructs for each and every port
the c call can have two arguments with one null
better idea^^
it's ok if they vary a little
Hmmm. What I was also thinking is I can make a pulseio_pwmout_obj_t *fakePWM in the shared-bindings function, give it only the pin and frequency information, and pass that. Then in the ESP32-S2 port, if the incoming PWM object doesn't have NULL for it's peripheral handle members, I warn the user
or just outright throw a not implemented exception asking them to use Pin and Frequency
shared-bindings is not allowed to look inside the object fields, since they vary per port. It would be easier to do the two args as scott suggested
the two args would go away in 7.0.0 when we deprecate passing a PWMOut
So it'll fail if I attempt to assign internal members for the objects?
it won't fail, but the convention is not to allow that. You need to use common_hal routines to look inside an object from shared-bindings (except for like the type field)
the fields may be quite different between two ports
Right yeah I see it would cause compile errors on other ports
Ok, extra parameters it is.
And I guess the first parameter needs to be a void pointer that gets casted into the other ones, right?
scott suggests having tow params: one is a pulseio_pwmout_obj_t, and the other is a pin_obj_t. One must be NULL and the other must not be
Oh I see. Makes sense.
FYI -- just did a fresh build of main and loaded it on to a PyPortal. It did a fresh install of the File System (wiped it). Is that expected?
we might have moved some stuff around that would cause that; I don't remember
I think there might have been a warning someplace... might want to make it more prominent before release....
@ionic elk alternatively you could have two construct routines and have the pin one call call the pwomout one after constructing a pwmout. But on ESP32S2 the pwmout one would throw an error (because you don't wnat to bother to implement it with a pwmout)
With the ESP32-S2 there are this backtraces that circuitpython generates, there a tool to analyze them.
If someone gets an error from arduino, could they use the same tool to decode the backtrace?
@silver tapir almost. you'll need to change it to find the arduino elf file
Thanks.
hmmm - just built main for pyportal titano and it did not wipe the File system... oh well --will keep eye on it...
Implemented in #3232
This PR adds the PulseOut and PulseIn IR transmission and reception modules to the ESP32-S2 port. Unlike other ports, which transmit pulse trains using timers and PWMOut carrier objects, the ESP32-S2 has a dedicated pulse train peripheral, the "RMT", which is capable of both sending and receiving pulses with and without carrier modulation.
Because of this, PulseOut does not require a PWMOut object, which uses an entirely different peripheral, the LEDC PWM controller. Thus, the API for Puls...
@tidal kiln cool! your hurricane tracker just popped up a new storm!! Kyle
😱 ...wonders if it's on map yet...goes to check....
It’s on mine!
oh wow. it's already here! and straight to TS.
Yes -out of nowhere. Looks like it will go out to sea.
yah. the arrows are useful. neat!
Yes! Very nice.
Hey folks, anyone here managed to get esp32s2 building? I'm getting this issue:
reedsolo==1.5.3```
I'm running export.sh from the included esp-idf folder in the s2 ports folder.
I did a .install.sh and it did some stuff and BOOM, killed my terminal session... prob something to do with the venv in venv issue with the IDF.
But it seems to be building now
almost 😦
File "/Users/seon/circuitpython/ports/esp32s2/esp-idf/tools/ldgen/ldgen.py", line 158, in <module>
main()
File "/Users/seon/circuitpython/ports/esp32s2/esp-idf/tools/ldgen/ldgen.py", line 116, in main
sections_infos.add_sections_info(dump)
File "/Users/seon/circuitpython/ports/esp32s2/esp-idf/tools/ldgen/generation.py", line 594, in add_sections_info
raise ParseException("Parsing sections info for library " + sections_info_dump.name + " failed. " + p.message)
pyparsing.ParseException: Parsing sections info for library /Users/seon/circuitpython/ports/esp32s2/build-unexpectedmaker_feathers2/esp-idf/esp-idf/xtensa/libxtensa.a failed. (at char 0), (line:1, col:1)
ninja: build stopped: subcommand failed.
make: *** [esp-idf-stamp] Error 1```
this file doesn't exist...
/Users/seon/circuitpython/ports/esp32s2/build-unexpectedmaker_feathers2/esp-idf/esp-idf/xtensa/libxtensa.a failed
there is no /xtensa/ folder at all
Ok, a CLEAN and re-build fixed it.. clearly the failed "requirements" issue earlier left it in a weird state.
So, this issue has been narrowed down to the code in spim_xfer() in ports/nrf/nrfx/drivers/src/nrfx_spim.c
It can be resolved by un-commenting the line
#define NRFX_SPIM3_NRF52840_ANOMALY_198_WORKAROUND_ENABLED 1
in nrfx_config.h. However, there is a comment that says un-commenting that line breaks BLE.
@dhalbert - do you know if that comment is correct? If it is, what options do we have for building with -O2? I did find that
I could surround spim_xfer() with #pragmas to set -Os opti...
@onyx hinge or @mental nexus if either of get a moment I could use a nudge in the right direction on how to reproduce that label issue. I've tried some sample code like this:
text = "Hello world"
font = bitmap_font.load_font("fonts/Helvetica-Bold-16.bdf")
text_area = label.Label(font, text=text*5)
text_area.anchor_point = (0,0)
text_area.anchored_position = (50, 10)
board.DISPLAY.show(text_area)
i = 0
while True:
time.sleep(0.1)
if i % 2 == 0:
text_area.text = "Hello world {}".format(i)
else:
text_area.text = "Hello {}".format(i)
i += 1
and I'm not noticing any odd behavior. Tried both builtin font and bdf, didn't see a difference.
I think you need a fractional anchor_point such as 0.5,0.5 to create the int roundjng error.
Thank you
I think that the getter and setter for anchored position are causing the rounding issue. Somehow the rounding isn’t symmetric between the getter and setter.
Maybe symmetric isn’t the right word, maybe inverses is correct
I might bring this "In the Weed" for next meeting... but here is my story+questions:
I was testing PM25 on M4 and I could not read a byte from UART.
However the same code with same library was OK on M0, nRF52840, STM32.
I was comming to ask for help, but wanted to triple check I was with the latest firmware/library.
That is where I discovered that I had put "ItsyBitsy M4 firmware" on a "Feather M4 Express".
Uploading the right firmware fixed my problem...
BEFORE: Adafruit CircuitPython 6.0.0-alpha.2 on 2020-07-23; Adafruit ItsyBitsy M4 Express with samd51g19
AFTER: Adafruit CircuitPython 6.0.0-alpha.2 on 2020-07-23; Adafruit Feather M4 Express with samd51j19
Questions:
(1) What is different between samd51g19 and samd51j19 that would trigger that?
(2) Could this "loading the firmware from the wrong board" be avoided some check in the software?
Ah I got it reproduced now. 0.25 got it for me.
Cool. Sorry I didn’t mention that this afternoon
No worries
@slender iron there's still a couple of "diff code" in the branch.
k, let me look
No, re-downloaded and now it's fine. But they appeared after a git pull on last week's repo. Nevermind, thanks.
np, went through and deleted debug stuff
I have this board, that is like but not the same as https://circuitpython.org/board/feather_stm32f405_express/
hitting the button only blinks the led when I let up
so I am not getting it into boot loader ... hmm...
I think I need to do https://learn.adafruit.com/welcome-to-circuitpython/non-uf2-installation
maybe not. help.
hi, newbie here. TL;DR: What's the best way to debug BLE on Clue ?
Long: Clue + CircuitPython 6-alpha. I'm using the Keyboard HID-over-GATT BLE example. It works on Linux and Android. It connects, pairs, and sends keys Ok. However, when I connect it with another stack (BTStack in particular) it connects, it pairs, but doesn't send any key. From BTStack side, I'm requesting "boot mode" events... but not sure whether the BLE stack in CircuitPytyhon supports it... what's the best way to debug CircuitPython? thanks
do you have anything that seems strange getting printed in the serial console from the CLUE?
aha... I guess what I was looking for was that "use the console"... I guess I just need to connect a terminal the the /dev/USBXXX, correct?
I have never seen dev/usbxxx be a termian device. try /dev/ttyACM0
Unless you are on a Mac. Then it is /dev/tty.usbmodemnnnn
@teal bear to load CircuitPython on that board you need to use a method called DFU. It involves connecting the "B0" pin to "3V3" when starting, and then running a special program on your computer. https://learn.adafruit.com/adafruit-stm32f405-feather-express/dfu-bootloader-details
@teal bear The board colors have been more variable than usual lately due to COVID related supply chain problems, I wouldn't worry about the green vs blue "silk" difference.
dfu is what I was expecting. thanks
Yes, that comment is correct. The other workaround for the SPIM3 hardware bug is to give SPIM3 its own reserved 8kB block of RAM. I thought I had done that, but I made a mistake in the RAM layout, and need to fix #3147. When I do that, we can try -O2 again.
hmm I wonder if the imx builds can work with the mp_float as C "double"?
@forest musk boot mode HID devices are not currently supported
@thorny jay Most pins vary per board, so board.TX and board.RX will map to different actual chip pins on different boards.
The bootloader could check for CPU type mis-match. It could also look at some particular indicator in the UF2 file to see that, say, a USB PID matches the one the bootloader is using (they would not be the same but they are from the same family). Or we could make up some id scheme.
This does not protect against the wrong bootloader being put on the board. We've had that issue too. That could also be sanity-checked based on CPU type or the bootloader being updated.
Addendum: I wrote that comment, and also pointed to the explanation:
// NOTE: THIS WORKAROUND CAUSES BLE CODE TO CRASH.
// It doesn't work with the SoftDevice.
// See https://devzone.nordicsemi.com/f/nordic-q-a/33982/sdk-15-software-crash-during-spi-session
// Turn on nrfx supported workarounds for errata in Rev1 of nRF52840
#ifdef NRF52840_XXAA
// #define NRFX_SPIM3_NRF52840_ANOMALY_198_WORKAROUND_ENABLED 1
#endif
I can dfu micropython: https://dpaste.org/9UaS
CP is erroring https://dpaste.org/NyAm
oh I see, it is a .bin not .dfu
Hi folks. Is there a way to use digitalio.DigitalInOut() with a GPIO number? Rather than just a board.X reference?
like pin = digitalio.DigitalInOut(44) ?
@atomic summit there is microcontroller.pin.*
but that's not like machine.Pin() right?
not sure what you mean, but you can pass it to DigitalInOut
same as board.* just the names are more microcontroller-centric
microcontroller.pin.D0 because help(microcontroller.pin) shows that as GPIO44
but I get...
AttributeError:module' object has no attribute 'D0'
it's microcontroller.pin.P44 or something like this, use tab completion
oh, I do... microcontroller.pin.GPIO44
right
ok, so where does that GPIO list come from ?
same as board.*, only named by the port name
it's defined in pins.c in your board definition
Just wondering, @stuck elbow is on my side of the world, so it would be morning and @atomic summit is "Down Under" that would be evening... where Adafruit is sleeping?
no sleep, more typos
Awake in Seattle... and stuck.
I built CP6.0 esp32s2 port for the espressif_saola_1_wrover
I'm trying to flash it using espytool, but it won't connect....
The Saola has CP5.4 on it...
I have not played around with my saola in a while and I feel like I'm missing something obvious... any suggestions ?
my espytool command is
esptool.py --chip esp32s2 --port /dev/tty.usbmodem14101 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 4MB 0x0000 build-espressif_saola_1_wrover/firmware.bin
You mean Sleepless In Seattle?
My iphone said I averaged about 5 hours last week...
@idle wharf It's /dev/tty.SLABtoUSB or something like that... same as TinyPICO.
Hmmm I don't see that.
crw-rw-rw- 1 root wheel 18, 4 Aug 15 00:48 /dev/tty.Bluetooth-Incoming-Port
crw-rw-rw- 1 root wheel 18, 6 Aug 15 00:48 /dev/tty.JAMBOXbyJawbone-SPPDev
crw-rw-rw- 1 root wheel 18, 2 Aug 15 00:48 /dev/tty.JabraEliteActive65t-SPP
crw-rw-rw- 1 root wheel 18, 0 Aug 15 00:48 /dev/tty.JabraEvolve75-SPPDev
crw-rw-rw- 1 root wheel 18, 8 Aug 15 01:01 /dev/tty.usbmodem14101
and I can connect to the SAola on using screen /dev/tty.usbmodem14101
do you have the Silabs driver installed?
- tilts head inquisitively *
you need to install the CP210x driver
The CP210x USB to UART Bridge Virtual COM Port (VCP) drivers are required for device operation as a Virtual COM Port to facilitate host communication with CP210x products. These devices can also interface to a host using the direct access driver.
That's the ones
Hmm.... is the esp32s2's onboard USB the wrong one to flash through? Should I use the external USB on the Saola ?
The soala only has the USB on the external CP210x
Yeah, but I have it wired up on a breadboard. I think that was the obvious thing... let me try it.
you need to connect a USB port via pins to IO 19 & 20 to get to the internal D+ and D-
oh, maybe lead with all of that ? 🙂
and I think you are supposed to use /dev/cu.usbmodemXXX
All good mate 🙂
hah
Thank you for the help @atomic summit I'm checking sendle every day for my S2Feather
It's not gotten to you yet?
Arrived at USPS Regional Facility
SEATTLE WA NETWORK DISTRIBUTION CENTER ```
don't check sendle. use the local tracking number with USPS. - but this is off topic, sorry folks!
I think it will get here Today then! yay! Thanks again and yes sorry everyone..
I just built CPY firmware with my FeatherS2 board... and there is no random module - this morning built it and there was a random module. Any ideas?
Only thing changed was I added some pins and fixed some others
Adafruit CircuitPython 6.0.0-alpha.2-274-gc1cc97042 on 2020-08-15; FeatherS2 with ESP32S2
>>> import random
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'random'```
>>> ```
time works fine
as does board and microcontroller
this is latest from main pulled 30mins ago
Not the same board but since I just built it I'll mention it is there on the Saola 1 w/Wrover.
Adafruit CircuitPython 6.0.0-alpha.1-120-g12edb57aa on 2020-08-15; Saola 1 w/Wrover with ESP32S2
>>> help("modules")
__main__ digitalio micropython terminalio
array displayio os time
bitbangio fontio random usb_hid
board gc storage vectorio
builtins io struct
busio math supervisor
collections microcontroller sys
Not sure why , but random was removed recently.
__main__ collections math storage
_os digitalio microcontroller struct
_pixelbuf displayio micropython supervisor
_time errno neopixel_write sys
array fontio os terminalio
bitbangio framebufferio pulseio time
board gamepad re touchio
builtins gc sdcardio usb_hid
busio io sharpdisplay vectorio
Plus any modules on the filesystem
>>> ```
yup, no random anymore...
yeah, weird... I get it's not a true RTG but it's better than NO RTG 😦
can I just put CIRCUITPY_RANDOM = 1 in my board definition?
trying it now..
yeahI saw that... not sure what the prereq for Random would be.
also trying to include frozen modules in the build as well
this could go horribly wrong 😉

both failed 😦
make: *** No rule to make target ../../frozen/Adafruit_DotStar', needed by build-unexpectedmaker_feathers2/frozen_mpy'. Stop.
Adafruit CircuitPython 5.3.1 on 2020-07-13; Feather STM32F405 Express with STM32F405RG ...
ImportError: no module named 'neopixel'
@teal bear did you put the neopixel library in the board? From library bundle?
nope. I thought it was ... never mind. Ill go look for that
Only the low-level neopixel_write portion is “built-in”
@atomic summit shouldn’t that be Adafruit_CircuitPython_Dotstar ?
I now have adafruit-circuitpython-bundle-5.x-mpy-20200811/lib/ which had s lot of stuff in it...
well, that got a bit further, thanks @solar whale !
ok, DotStar is frozen, yay, random didn't work 😦
@teal bear for neopixels you’ll only need neopixel.mpy
thanks. missed it looking at all the files
yipee. I make it red. I'm a pro.
thanks all. now I can sleep.
@atomic summit I suppose this is the problem https://github.com/adafruit/circuitpython/blob/main/ports/esp32s2/common-hal/os/__init__.c#L59 but that is not new -- so may not be relevant
it was removed as part of this PR .. but I don't see any discussion of why or what changed https://github.com/adafruit/circuitpython/pull/3232
@atomic summit making this change - comment out line in mpconfigport.mk ```diff --git a/ports/esp32s2/mpconfigport.mk b/ports/esp32s2/mpconfigport.mk
index a7873aa46..7de5b2e03 100644
--- a/ports/esp32s2/mpconfigport.mk
+++ b/ports/esp32s2/mpconfigport.mk
@@ -25,7 +25,7 @@ CIRCUITPY_COUNTIO = 0
These modules are implemented in shared-module/ - they can be included in
any port once their prerequisites in common-hal are complete.
-CIRCUITPY_RANDOM = 0 # Requires OS
+#CIRCUITPY_RANDOM = 0 # Requires OS
CIRCUITPY_USB_MIDI = 0 # Requires USB
CIRCUITPY_ULAB = 0 # No requirements, but takes extra flash
puts it back in -- no idea if it is useful but it is there Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 6.0.0-alpha.2-273-g98469322b-dirty on 2020-08-15; Saola 1 w/Wrover with ESP32S2
help('modules')
main digitalio micropython supervisor
_os displayio neopixel_write sys
_pixelbuf errno os terminalio
_time fontio pulseio time
array framebufferio random touchio
bitbangio gamepad re usb_hid
board gc sdcardio vectorio
builtins io sharpdisplay
busio math storage
collections microcontroller struct
Plus any modules on the filesystemimport random
dir(random)
['class', 'name', 'choice', 'getrandbits', 'randint', 'random', 'randrange', 'seed', 'uniform']
0.167682
>>> random.random()
0.679858
>>> random.random()
0.317636
>>> random.random()
0.86331
>>> random.random()
0.911
>>>
@solar whale yeah, I don't want to do that, as that changes it for all S2 boards. I tried overriding that in my own mpconfigboard but it didn't work. I'll chat to @slender iron about it tomorrow 🙂
Yes- agreed -- just wanted to see if it worked -- not sure why it can't be put in for a specific board ....
CIRCUITPY_RANDOM = 1 is not overriding it.. so maybe it needs something else, or it's an order of operations issue.
Even in mpconfigport.mk setting CIRCUITPY_RANDOM = 1 instead of 0 did not work -- Had to comment it out ??
make clear?
I did make clean
let me guess, it's doing #ifdef CIRCUITPY_RANDOM instead of #if CIRCUITPY_RANDOM
you can do #undef I suppose
The mysteries of make... before messing with it too much - it would be good to understand why it was removed... and why it is set up as it is...
for now I did a simple very-pseudo random def using a sensor as a source of entropy (time was the only built-in, and that's clearly fraught) o_O
Fixes #3250 (@DavePutz, please test, thanks)
Fixes #3147
Fixes #2946
#3250: I believe this error is caused by #3147, which notes that the SPIM3 buffer is misplaced. To put it in its own 8kB region, the SoftDevice RAM area had to shrink from 64kB to 56kB. This was done by shrinking BLEIO_HVN_TX_QUEUE_SIZE from 9 to 5. The number of connections did not need to be reduced from its present 5.
For nRF52833, the special SPIM3 buffer is not necessary, because the SPIM3 peripheral does no...
@onyx hinge if by "manually" checking links in the readme's you mean that you are having to individually run it against each Repo URL... I have some tweaked adabot scripts that I used to find broken discord links a little bit back. Those might be able to automate your 404 link search I think if you are interested.
it's semi-automated, really. I pull the list of all repos I want to look at from github, and then run checklinks on each one. But I wasn't careful about rate-limiting so I got a lot of Error: 429 too many requests and it's incomplete
Ah I see
I'm not sure how to get a rendered README through the github API, and a HTML file is what my link checking program needs
Ah, mine was just looking for a specific link so I was able to just treat it as a string and use contains. Sounds like you've got what my scripts covered already. With regards to the HTML vs raw readme text. Maybe you could hit the live page on github.com for the readme file instead of pulling it through the API. Let the github front end handle the RST -> HTML rendering
The page would contain other links (assuming you can't limit it to a certain section or div or something). But hopefully all of them will be live and active so won't trip the link checker.
Right, that's what I'm doing, but it got 429'd
I was running on all adafruit repos .. I'm going to try again with just circuitpython+blinka repos and a lower rate
@crimson ferry @ionic elk what was wrong with the way random was implemented on the esp32s2? Why was it removed?
not sure, I think it's b/c the intention is to use the esp32s2 hardware RNG, but that hasn't been implemented yet esp_random()
These keep in when translators don't carefully check (or are unaware of) the meaning of %q .. weblate offers automatic translations with this consistently wrong.
I need to embrace the f"string {something}" syntax. I tend to autopilot "string {}".format(something) but I do think the former is nicer to read.
i've been meaning to do the same, but I cut-and-paste so much other parts of code it tends to propagate my old habits
@lone axle did you get simple image download and set working? I got stuck (hang) on .set_background, I wonder if it's related to https://github.com/adafruit/circuitpython/issues/3259
@onyx hinge are you using a PAT for the auth?
@raven canopy I don't think there's a way to make the standalone checkling program send the token
@crimson ferry I didn't get it working. I ended up getting my PyPortal into a seemingly "stuck" state somehow after the first few attempts. I spent a while trying out various different basic fetch text examples and could not successfully get anything from the network any more.
weblate said
There has been a merge failure in the repository
First, rewinding head to replay your work on top of it...
Applying: Translated using Weblate (Dutch)
Using index info to reconstruct a base tree...
M locale/nl.po
Falling back to patching base and 3-way merge...
Auto-merging locale/nl.po
CONFLICT (content): Merge conflict in locale/nl.po
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 ...
I do think I figured out that it needs to be passed in a url and an image_url (or whatever the param name is) even though in my case It's basically going to be ignoring url
Jeff, ohhh. is it checklink that is rate limiting? (jumping into a conversation brings lack of context...) i had a late night, so not fully awake yet, but i'm available to rubber duck if you want.
Is there some special "trick" to github comment formatting to get it to onebox a code permlink? With one permalink that I put in the comment it got a nice pretty box. But for some others they are showing that they will stay as link in the preview.
"onebox" meaning the float box with the preview pops up when you hover?
you could force an inline code block. i do that sometimes.
[`foo#L45`](https://github.com/foo/bar/baz.file#L45)
This type of thing:
In the write editor side I don't have any special syntax:
I did try like yours above and I end up with foo#L45 linkified pointing to the right line of code. Which is definitely better than he full link like it was showing before.
ahh. i've seen that show up like once in a comment i've done, so i don't know if there is a way to force it.
Apologies also if this winds up being something caused by my dark plugin. I just installed this the other night when I was looking at some stuff late and blinded by githubs white background.
haha. hopefully the new UI will help them offer a dark mode.
@lone axle maybe remove the https://github.com/ from the link? https://docs.github.com/en/github/writing-on-github/autolinked-references-and-urls
Doesn't seem to make a difference, in the preview window at least.
womp womp. it might still happen with the full submittal. not sure if the preview goes through a full parse like a page load. preview has had issues in the past, iirc.
No dice
It's so weird too because I cannot spot anything I did in the first one that seems to have made it work. 🧐
I had two show up differently in the same Github thread, but I can't see any difference in how the raw comment is formatted https://github.com/adafruit/Adafruit_CircuitPython_PyPortal/issues/51
@onyx hinge if you end up having a moment sometime I'd be curious to know if the code from this PR resolves the label getting moved around unintentionally in your project. https://github.com/adafruit/Adafruit_CircuitPython_Display_Text/pull/83
I started looking into this a couple days ago.
It looks like it could be as simple as adding the formats directive to .readthedocs.yml.
However, Sphinx is refusing to build with LaTeX since the Jinja doesn't get parsed in shared-bindings/support_matrix.rst. The HTML version processes the Jinja via docs/rstjinja.py, so I'm trying to debug my way through adding the LaTeX version to do the same.
Closing, fixed by PR #3281. Tested OK with a Clue and Circuitplayground Bluefruit with an attached Gizmo display.
Closing, fixed by PR #3281. Tested OK with a Clue and Circuitplayground Bluefruit with attached Gizmo display.
@DavePutz Thanks for testing!
My PyPortal does seem to be happier today. I've managed a few successful text GETs in a row. Did not even change the code any from yesterday when it was failing. Am going to chalk it up to 👻 in my WIFI.
@DavePutz tested and this fixes #3247 and #3250. -- thanks!
Feather STM32F405 - dfu-util... adafruit-circuitpython-feather_stm32f405_express-en_US-5.3.1.bin ... import neopixel ... led lights up, good.
micropython_1.9.4_Feather_STM32F405.zip ... where do I find the neopixel module?
You can also find the individual list here https://circuitpython.readthedocs.io/projects/bundle/en/latest/drivers.html
@idle wharf when I tried to use: ValueError: incompatible .mpy file
What version of CircuitPython is running on your board? 5.3? You see that in the REPL when you connect?
no CP - that worked. now micropython_1.9.4_Feather_STM32F405
MicroPython v1.11-387-ga069340c1-dirty on 2019-10-03; Feather STM32F405 with STM32F405RG
Ah... CP is not MP. So you can't use CP libraries in MP
I didn't know there was a MP build for the Feathers... I'll have to let someone else jump in
It is this board ?https://www.adafruit.com/product/4382
Adafruit_Blinka was originally a bridge for using CircuitPython libraries with MicroPython. not sure if it still functions for that purpose though...
@teal bear when I need a MicrpPython library, I start here https://awesome-micropython.com/#leds
A curated list of MicroPython libraries, frameworks, software and resources.
I linked to the LEDs section for you
yes, and thanks
one more link... in the Awesome MP I added some other ways to find libraries and you can see that here https://awesome-micropython.com/#libraries
Does anyone happen to know the link of the Repo that contains the pre-loaded demo scripts for several different devices?
@idle wharf I'm catching on. the neopixel module hasn't been done for ... this, board. or chip? not sure what words to use here.
or more correctly, a MP version hasn't. CP has.
You got it...
thanks for helping me along
No worries. We all help and learn from each other. 🙂
Has anyone else built CP6 for the Saola from Scott's fork and the native_wifi branch? If so, when you flashed and plugged into the Native USB did you see the CircuitPy drive mount ?
@lone axle there are some here https://github.com/adafruit/circuitpython-default-files
the Arduino sketches are often in the board support package examples -- within the IDE.
Yes! that is the exact one I was thinking of. Thank you!
https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel/blob/master/neopixel.py#L75 Example for Circuit Playground Express:
isn't it the same for all boards?
I think the main thing that could change is the pin that is being used, the example is using board.NEOPIXEL and some devices may not have that. Or you just might be trying to play with external neopixels instead of built-in ones.
The number of pixels as well actually
Circuit Playground has 10, which is what the example code is set to. Lots of devices have only 1, and some devices have other amounts.
k - wanted to make sure that code is what I should be trying to get working under MP
Hey @teal bear Are you trying to use the CircuitPython Neopixel library in MicroPython?
kinda. I am trying to figure out what will be the best way to use the neo from MP
@teal bear neopixel is implemented only for ESP8266 and ESP32 in MicroPython
CircuitPython has it for all its boards
@tulip sleet I am guessing I will be the one to implement it. or port? copy and tweak digitalio may be all I need to do
you could copy how we do it (low-level bitbanging, or, on nRF52, we use PWM). ESP32 has special-purpose hw that is ideal for it). See the low-level neopixel_write module in ports/*/common-hal/neopixel_write
making digitalio calls may be too slow
The nRF boards use PWM (much more memory hungry) because turning off interrupts like neopixel_write does is not good for BLE timing.
Fixes #3171. Event handler is set to null before it's removed. Thanks @kevinjwalters for spotting this.
@tulip sleet thanks
Translations update from Weblate for CircuitPython/main.
In the original post, are the "New behavior" and "Original behavior" results supposed to be different? They look the same, to me, but maybe I'm missing something.
I would be reluctant to change the behavior of number parsing across different boards, since it may affect various programs. So I'm not sure this is worth the savings, sadly.
In the original post, are the "New behavior" and "Original behavior" results supposed to be different? They look the same, to me, but maybe I'm missing something.
I would be reluctant to change the behavior of number parsing across different boards, since it may affect various programs. So I'm not sure this is worth the savings, sadly.
@tulip sleet thanks for the merge of that weblate thing, it is fixed as far as weblate is concerned
Can someone update the Pinned message with the document for the meeting of the 17th? Thanks
The original and new behavior are close enough over those arbitrary tests I did that the numbers print the same. However, there are differences, as evidenced by the changed parsing of the value float(1e7)
I agree with your unease and so you should feel free to close this up, but I may dredge it up again the next time we face space pressure on M0. I'm not sure how soon that will happen again.
@thorny jay I'll do that very shortly -- thanks for mentioning it
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/1xHKfmNXfpgzDF1Y8goyEo1mVSl-f99Pc-RLm9k2L1Mg/edit?usp=sharing
Extra reminder: if you plan to speak during the meeting, please ask in the channel to be made a member of the "Circuitpythonistas" role. This will also get you 2-3 Discord mentions per week, mostly reminders about the meetings.
Thank you, I try to update the file when I do things of find someone to thanks in the Hug report.
@onyx hinge Jeff, do you happen to know how to add #if/#endif statements to a multiline macro? Here is an example: https://github.com/v923z/micropython-ulab/blob/a0396df9b66592838395e13202e93db00f63191d/code/numerical/numerical.h#L65, and since the gist of the 1, 2, 3, and 4-dimensional cases is the same, I would like to do it like this:https://github.com/v923z/micropython-ulab/blob/a0396df9b66592838395e13202e93db00f63191d/code/ndarray.c#L398.
you can't really
boost::preprocessor has a way to sort of emulate it that you might be able to disentangle https://www.boost.org/doc/libs/1_74_0/libs/preprocessor/doc/ref/if.html
I think I will just live with the present implementation for the time being. This is more like a style issue than anything else. It could have shortened the macros, but doesn't really change anything.
Thanks anyway!
#define IIF_I(cond, t, ...) IIF_##cond(t, __VA_ARGS__)
#define IIF_0(t, ...) __VA_ARGS__
#define IIF_1(t, ...) t
#define ULAB_MAX_DIMS_1 1
#define ULAB_MAX_DIMS_2 1
#define ULAB_MAX_DIMS_3 1
#define ULAB_MAX_DIMS_4 0
#define RUN_SUM() \
handle_1_dim \
IIF(ULAB_MAX_DIMS_2, handle_2_dim \
IIF(ULAB_MAX_DIMS_3, handle_3_dim \
IIF(ULAB_MAX_DIMS_4, handle_4_dim \
)))
RUN_SUM()
the cond argument to IIF has to be a macro that expands to exactly 0 or 1
and for example with those settings the RUN_SUM expands to: handle_1_dim handle_2_dim handle_3_dim
a second expression for else is also available: ``` IIF(ULAB_MAX_DIMS_2, handle_2_dim
IIF(ULAB_MAX_DIMS_3, handle_3_dim
IIF(ULAB_MAX_DIMS_4, handle_4_dim, no_4_dim
), no_3_dim),
no_2_dim)
that can be fixed if you never need "else"
but this sort of thing is terrible and I'm only giving you answers that are unpalatable because it makes me feel clever for a moment
is it still intended that we could show a bitmap directly like display.show(bitmap) as is mentioned at the top of this guide page? https://learn.adafruit.com/circuitpython-display-support-using-displayio/tilegrid-and-group
it results in this for me:
code.py output:
Traceback (most recent call last):
File "code.py", line 36, in <module>
ValueError: Must be a Group subclass.
#define IIF_I(cond, t, ...) IIF_##cond(t, __VA_ARGS__) #define IIF_0(t, ...) __VA_ARGS__ #define IIF_1(t, ...) t #define ULAB_MAX_DIMS_1 1 #define ULAB_MAX_DIMS_2 1 #define ULAB_MAX_DIMS_3 1 #define ULAB_MAX_DIMS_4 0 #define RUN_SUM() \ handle_1_dim \ IIF(ULAB_MAX_DIMS_2, handle_2_dim \ IIF(ULAB_MAX_DIMS_3, handle_3_dim \ IIF(ULAB_MAX_DIMS_4, handle_4_dim \ ))) RUN_SUM()
@onyx hinge I think this wouldn't work. I might be wrong, though. The problem is that in the example that I gave (ndarray_print), the conditions are at the head, and tail of the function, symmetrically nested. Your example works with linear structures only, doesn't it?
@lone axle If I read that paragraph right, it's an example of what could work in theory, but really needs more. Maybe it could b clarified.
I also agree with the implied statement that debugging such constructs is, quote @onyx hinge "worse than disease territory" 😉
We shouldn't probably get too hung up on this issue. I can write out the loops for now, and if we don't like it, we can always tidy them up.
@lapis hemlock you could have two sets of IIFs at the beginning and the end .. but I don't really recommend going this way "for production". I'd sooner suggest you use Python or jinja2 templating to generate the code ..
I'd sooner suggest you use Python or jinja2 templating to generate the code ..
@onyx hinge 🙃
@lapis hemlock On a totally other topic, awesome things might result if you and @ruby atlas found a time to figure out how to apply ulab to pixelbufs .. If there was a way to operate on them as ulab arrays (e.g., an N pixel RGB strip is uint8 3xN) we might speed up some animation stuff even further.
I didn't try to figure it out yet, but if only a ulab array and pixelbuf could share the same underlying storage
I have contact with openmv, they want the same. I need about a week to clean up the 4D code, and once it's done, I would really like to explore the image-processing options.
the nice (?) thing about pixelbuf is how the "image" is 1D
where is a good place to get help with dfu-util? (my 2 boards suddenly don't show up under --list)
@onyx hinge Perhaps I misunderstood the question. Or the statement. Or both.
openmv want to work with W x H x 3 arrays, with the option of converting RGB565, or binary images directly to ulab tensors.
Yes, I understand/agree that for processing of "2D" images with R, G, B as components you need 3 dims. pixelbuf is for addressable pixels and is generally thought of as 1D, so the ulab array would be N x 3, not W x H x 3, so it can be done "today"
OK, so you just need some extra function that does the magic, but you wouldn't even need to change anything in the structure of ulab. Is it so?
The main question, I think, is how to share (like a memoryview()?) the storage between ulab and pixelbuf
The pixelbuffer has a pointer somewhere, right? Can't we just grab it?
If it's something that's memoryview()able can I make a ulab array that is a view (not a copy) of it?
@teal bear linux?
But why don't we just hijack the pointer?
Hey @slender iron - Any reason I can't override the CIRCUITPY_RANDOM = 0/1 in my board level mpconfiigboard.mk ?
@onyx hinge yes. 2 STM32F405 boards, 2 boxes: debian, ubuntu
@onyx hinge https://github.com/v923z/micropython-ulab/blob/fd0751144e0ce2b71f46e693893a3b9a11123a28/code/ndarray.c#L189 has o->items. We just have to insert the pointer there.
I mean, we need a function that does that, but your buffer protocol works the same way.
@teal bear The first two things I'd make sure of are whether the device has really enumerated as a DFU device to Linux, and then whether the permissions of the /dev files are appropriate. Check what lines, if any, in lsusb are new after you plug in the device with the B0 jumper in place. You should get a new line and hopefully it will say something about DFU or at least ST
second thing easiest way to check would be to "sudo dfu-util" which largely eliminates permissions problems but is not necessarily the BEST solution. If "sudo dfu-util" works then you can pursue the problem of enabling your user to access the device by using udev rules
@onyx hinge To quote a classic, lines 70-78 is what you need: https://learn.adafruit.com/ulab-crunch-numbers-fast-with-circuitpython/fft-example-waterfall-spectrum-analyzer
@lapis hemlock but that copies the data, rather than creating a view of it, doesn't it? samples = ulab.array(samples_bit[3:])
@onyx hinge here is working from before (it was handy in a tab and now the tail of dmesg and sudo dfu-util https://dpaste.org/tK67
@teal bear Oh, I didn't realize it was working but then stopped.
@onyx hinge I don't know. But if it so, we can fix it.
omg - I think my jumper is ... open.
@teal bear that would explain it for sure
I'm imagining that creating a view could be explicit .. ulab.memoryview(obj, *, dtype=uint8_t, start=0, end=None, shape=None)
now the emotional battle ensues: shame or happiness :p
@atomic summit just turn it on for all of them. it was a misunderstanding to turn it off
@teal bear we all overlook things we shouldn't have, glad you figured it out
@slender iron Oh, ok.
( I don't think it worked because the port level needed to check that it wasn't already defined)
I'm imagining that creating a view could be explicit ..
ulab.memoryview(obj, *, dtype=uint8_t, start=0, end=None, shape=None)
@onyx hinge I think this is pretty simple. The question is, whether you want to have it in the "old" version, or we should defer it till the "new" one is ready for prime time.
@slender iron Hopefully doing a PR in the next few days for FeatherS2 and ProS2 board files.
@lapis hemlock I think it can wait until the right time. You have other priorities right now and I am not likely to have the time to work on it. however maybe @ruby atlas would, if you thought that adding ulab.memoryview sounds OK and he thought this would enable his use case.
great! didn't I add one of them already?
@lapis hemlock I think it can wait until the right time. You have other priorities right now and I am not likely to have the time to work on it. however maybe @ruby atlas would, if you thought that adding ulab.memoryview sounds OK and he thought this would enable his use case.
@onyx hinge This wouldn't be wasted time, because the new version would still need this kind of function.
Yes, FeatherS2 (thanks) - but some pins were wrong and I wanted to add more, plus some frozen stuff.
Even if we make this implicit, i.e., if we allow memoryviews in the constructor, the code has to be written for that case.
OK, I assume they'll notice it in their mentions and feel free to ask one of us if more details are needed
and then the code in that guide you linked could probably get a few microseconds faster 🙂 since it would not create one-or-maybe-two copies of the data
I would expect that like list(x) makes a copy of the list, that ulab.array creates a copy of its argument in the usual case. Am I mistaken?
>>> v = ulab.array(u)
>>> u[0] = 99
>>> v
array([1.0, 2.0, 3.0], dtype=float)
This is true, but here you want to access the memory directly, specificly, this is a segment that can be written to by other processes.
I think, this case is not covered in numpy.
@atomic summit why frozen stuff?
I agree, this may be something that is not in numpy
@onyx hinge What you meant here is implemented in the new version.
I want to include a helper library like I do on my TinyPICO for onboard hardware like LDO2 control, Lightsensor and APA.
Look at this: 4D tensor✅ , views ✅ , full, numpy-compatible broadcasting✅
kk
so need to include my module + dotstar etc.
note that freezing makes it harder to update
i know the boards are ram limited, but once PSRAM is working 😉
@onyx hinge Unfortunately, I have just let the cat out of the bag. I wanted to announce all this on Monday.
hehe I don't think anyone's paying attention anyway
why does it make it harder to update? Doesn't the build system just make new builds based on whats in the repo?
if you ever want to shout it from the rooftops, though, we can get you mentioned in the newsletter and/or on the adafruit blog
@atomic summit updating the frozen library is tied to updating cp. if its just on the FS then you can update it separately
Great! But I don't want to count my chickens before they are hatched.
Sure, but I can't see anything I am doing needing a seperate update. I'll probably add my own direct bit banging for onboard APA into my own helper anyway like I did for TP and not even use the dotstar lib.
but I'm time poor atm.
I know about 0.1% of CPY atm 😉
It's same same but VERY different to MP
@lapis hemlock assuming it is ready on the schedule you hope for, you can contact one of us with some copy to add to the following week's newsletter.
syntactically the same, ecosystem is very different
I'm used to doing everything myself in MP land 😉
@lapis hemlock assuming it is ready on the schedule you hope for, you can contact one of us with some copy to add to the following week's newsletter.
@onyx hinge OK, will do.
@lapis hemlock I look forward to it. And wish I had more time to play with ulab related projects.
By the way, what is this heavy traffic on a Saturday afternoon?
I dunno, I had intended to take the weekend off but I happened to be sitting at my computer waiting for a 3D print to finish
@atomic summit ecosystem is our strength 🙂
I dunno, I had intended to take the weekend off but I happened to be sitting at my computer waiting for a 3D print to finish
@onyx hinge Do you care to show off?
@slender iron 10000% And I'm SOOOO looking forward to it 🙂
It's someone else's design but it sounded cool. waiting for it to release from the build platform now ...https://hackaday.com/2020/08/14/single-piece-3d-printed-pcb-vise/
@atomic summit What's the difference between Feather and Pro... website makes it sound like the same thing "FeatherS2 - ESP32-S2 - Pre-Release
Introducing the FeatherS2 (Pre-Release) - The PRO ESP32-S2 based development board in a Feather format!" (mine is supposed to arrive today 🙂 )
@onyx hinge This is really nifty.
Its capacity is only 1/3 of the overall width minus a bit, that is the first trade-off that is obvious now that it's in my hand. The printing technique really did work, though.
@crimson ferry ProS2 has more IO broken out (but is smaller), has onboard ESD protection, is TinyPICO compatible (first 10 pins on each side) so can use TinyPICO shields/add-ons and will have castellations as well as header pins, so can be soldered to a PCB.
"will have" answers my question 😉
Not yet, I built my "final prototype" a few days ago, and I'm about to order first production PCBs in a few days.
cool cool
I build and test my final ESP32-S2 ProS2 prototype board... does it work? Let's find out :)
#ESP32-S2 #PCBAssembly #Build
[ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ]
If you'd like to support me on my journ...
And I got CPY up on it last night 🙂
I'm about to do that right now. Did you build from Scott's CP\native_wifi branch ?
Ok AdaFruit/CP/Main right ?
yes
I did change 2 pins (SCL, SDA) on my final boards to 9,8 instead of 38,33 -just a heads-up.
Current board definition in CPY is correct for the pre-release boards.
Good to know... I planned to buy production boards too. I just wanted to play along and support your work.
Cheers! Much appreciated 🙂
@slender iron looking at...
https://github.com/adafruit/Adafruit_CircuitPython_BitbangIO
Finding the readme confusing...so is bitbangio included?
there is a built in bitbangio
ok, same syntax? so I can use these examples?
is should be the same syntax as busio.SPI so you can use it interchangeably. however, busio may have evolved slightly
and we should fix it 🙂
ok.I'd be using it in I2C mode
well, meaning it's just data/clk. Or can I use SPI without CS, MISO?
ok. done 🙂
bitbank just released a really fast jpeg decoder that can target microcontrollers (and Linux)
https://github.com/bitbank2/JPEGDEC
Is there a preferred way how JPEG support should be implemented? As in the interface it should follow.
Copying the bitmap interface doesn't sound viable. You wouldn't want to construct a new JPEG on device f.e.
Should fix #3261.
Does this also need to be backported?
@atomic summit Ok, I'm doing something wrong. Built with no errors.
Held down BOOT + RESET, released RESET, released BOOT.
I see the board in /dev...
Flash command
esptool.py --chip esp32s2 --port /dev/tty.usbmodem01 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 4MB 0x0000 build-unexpectedmaker_feathers2/firmware.bin
Result:
esptool.py v3.0-dev
Serial port /dev/tty.usbmodem01
Connecting...
Chip is ESP32-S2
Features: WiFi
Crystal is 40MHz
MAC: 7c:df:a1:00:8c:2e
Uploading stub...
A fatal error occurred: Timed out waiting for packet header
@idle wharf try /dev/cu.usbmodem01
@atomic summit Same result. I also tried the nighty build to be sure it wasn't my build and it had the same result as well.
I reset between and re-initialized the boot loader each time
I'm on a Mac I should mention
I'm basically copying the command I used with the Saola so those parameters may be incorrect.
@idle wharf Usually when I see something like /dev/tty.usbmodem01, it's a phantom. Are you on macOS? The ESP32-S2 (Saola) usually presents (when it's showing up) as /dev/tty.SLAB_USBtoUART** for the connector, and /dev/tty.usbmodem7CAC3B00753D1 (MAC address) for the native. But I do lose them frequently, and CIRCUITPY goes away a lot too, even though my code is still running.
Although sometimes the connector USB will show up with a repeatable unique alphanumeric (not hex) string in the name.
Problem solved, incorrect command parameters. I'll write it all up and share.
I added a note on what was missing in this gist:
basically, to use the internal USB(CDC) you need to add --no-stub to the esptool args, or esptool will sit waiting for a different response and never continue.
also OT, but no one is in #mp - I build both master and stable, no errors, dfu... no errors, reset, no usb device shows up. https://dpaste.org/KU2S
I updated my ESP32-S2-CircuitPython-Getting-Started gist (link above) to include Seon's notes and my own how to build CP for ESP32-S2. It now covers both the Espressif boards and the FeatherS2, let me know if there are any errors.
@idle wharf Saola's USB port (the one ont eh board)
@teal bear Do you have the Silabs CP210x drivers installed?
the what?
The Soala uses a CP2102 Serial2URT chip - you need to install drivers for it to show up.
@teal bear Also, If you have not wired up another USB port, then with the Saola you're using the external USB (not the ESP32-S2 native USB)
Ok I cleared up the Docs issue and now it’s failing for some of the M0-style builds. I suspect this is because of the added function.
Oh... you wrote "also OT, but no one is in #mp - I build both master and stable, no errors, dfu... no errors, reset, no usb device shows up. "
so I connected dots that were not supposed to be connected, sorry
Adafruit CircuitPython 6.0.0-alpha.2-277-g41be0fdd8 on 2020-08-15; Feather STM32F405 Express with STM32F405RG
welp, that worked fine. yay?
https://learnadafruit.com/adafruit-stm32f405-feather-express/micropython-setup "MicroPython 1.9.4 build we crafted"
anyone know who or how?
@teal bear I happened to build it the other day .. there did not seem to be pre-built bins.
if you clone micropython and build in ports/stm make BOARD=ADAFRUIT_F405_EXPRESS you get build-ADAFRUIT_F405_EXPRESS/firmware.dfu which can be uploaded with dfu-util
built from micropython at v1.12-665-g60f5b941e
my interest was looking at their canbus support, I can't say I used it much.
the pre-buld in the zip work fine ... doing that .. it uploads but then doesn't work
oh you found a pre-built?
ha! canbuss is my interest too. It wokrs
did you insert an SD card? It uses the SD, not the (Q)SPI flash, as the filesystem.
that page mentions it but it's an easy sentence to miss
there is no SD the prebuilt works without it
that is the big green box on https://learn.adafruit.com/adafruit-stm32f405-feather-express/micropython-setup
ah I didn't download that one, I built my own. if I recall correctly; this was yesterday after all
I initially had trouble when I built my own because I dfu-util'd the wrong file with the wrong flags. Then I uploaded one via swd and it worked, then I figured out what I'd done wrong and dfu-util'd the .dfu file
the .hex and .bin files would be accepted by dfu-util but give a non-working board after upload
also remember to undo the B0 jumper before resetting or you just get DFU again
Do you have experience with CAN? I don't, so I've been studying other implementations like micropython's, to get a sense of what needs to be in an API.
no experience wiht can. a friend picked it and he seems to know what he is talking about :p
did you build git master ?
yes at the time it was v1.12-665-g60f5b941e according to git describe
micropython/ports/stm32$ dfu-util -a 0 -D ./build-ADAFRUIT_F405_EXPRESS/firmware.dfu
that look like the right flags ?
yes!!!
MicroPython v1.12 on 2020-08-15; Adafruit Feather STM32F405 with STM32F405RG
🎊
What's your goal with CAN? Mine's not very good, it's "design and probably implement an API for CAN". Having a motivated example in mind would be good. Seems like there's "local networking" and "interacting with something else, like a car" and "interacting with expensive stuff no two hobbyists own"
automation control. switch or sensor on this board sends a message and some other board does something useful, like fire an actuator
right now my goal is to have an "I'm ready!" light :p
Is circuit/micropython going to be in a controlling role, or in a sensor/switch role? or both?
both
MP will be polling the switches/sensors, and when some .. criteria? is met send a can message
the poling/criteria and "fire the actuator" will be mostly python with some hopefully simple IO modules
does the micropython lib look like it's something sensible to build on for your use case?
we did a quick prof of concept and sent a message between two boards
it's relatively small, which is nice. not many functions involved. however, the rxcallback doesn't fit the ways we thinking about things in CircuitPython, so we'd omit it or make it .. different
Is there still discussion on increasing pystack for M4? A couple folks seem to be hitting the limit.
@crimson ferry there does not seem to be an open issue about it in the circuitpython github. I don't know whether it's remained on tannewt's radar.
I would recomend creating an issue, otherwise things get forgotten. Links to "this worked before pystack and does not work after, due to running out of resource" accounts are very useful, particularly if there's enough there for us to reproduce it and check whether we've actually fixed it.
ok, thanks, I've hit it a couple of times with different code sets, but I don't have a MRE at the moment
https://forum.micropython.org/ " you can see several micropython boards in the background of the header image. What is the name of the I/O port between B9 and C1?"
Yeah I think it is extremely not possible to make it behave exactly like before, without being like before.
does anyone see b9 or c1?
https://pyboard.org/wp-content/uploads/2019/01/PYBv1_1-1024x768.jpg assuming those are pyb(oard)s there is a B9 but I don't see a C1. There's a C7 nearby, and B8 is between them. Is this a captcha or something? Do I pass?
oh there's a C1 on the bottom pins
but it's nowhere near B9
B9 C0 C1
in the photo
if that's a captcha, it is extremely hostile and I'd ragequit the process unfinished
this spot @teal bear
or close to it
goodnight!
lol -yeah, im not sure I want to report the problem I had building/flashing :p
it is to create an account o nthat forum
@onyx hinge The ndarray accepts the buffer keyword argument. https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html I think, this is what you are after. It would be really useful, and shouldn't be too hard to implement.
Maybe this SPI speed upgrade on the CLUE is something @tulip sleet or @slender iron know about? I remember some discussion about this... But not the final result. https://twitter.com/fast_code_r_us/status/1294678466680496135?s=19
Has anyone successfully got the 32Mhz SPI mode working on the Clue? If so, that paired with my AnimatedGIF lib should run quite well on that display. https://t.co/9LA1r0G8Lo
The same author also wrote a fast, low memory jpeg decoder for Arduino. @gilded cradle Do we have jpeg support in displayio?
Here is the JPEG thing: https://github.com/bitbank2/JPEGDEC
@onyx hinge another good use case for CAN could by Tinymovr which is a brushless motor controller targeted mostly at robotics... https://backyardrobotics.eu/2020/04/19/tinymovr-an-integrated-brushless-motor-controller/
Is this worth an issue, or just tell people "don't do that"? It can be set beyond data sheet max, up to OverflowError: overflow converting long int to machine word. ```Adafruit CircuitPython 5.3.1 on 2020-07-13; Adafruit ItsyBitsy M4 Express with samd51g19
import board
import busio
import microcontroller
uart = busio.UART(board.TX, board.RX, baudrate=microcontroller.cpu.frequency)
uart.baudrate
120000000
@thorny jay I don’t believe so.
Would it possible, and if so what would be involved to attempt to make it so if I have a file called repl.py it will get imported automatically whenever a REPL session begins? Would need a custom build of Circuit Python I assume?
I like the repl.py idea. Safe mode could bypass it. What other edge cases would need handling?
I think I would want it to execute it again each time you enter the REPL
The first idea for it was to turn down the brightness (or off entirely) the white status LED when in REPL on some devices.
but doing some other stuff could be handy too like initialize some hardware that I know is attached, that way I'm ready to start putting in code that uses it right away.
One potential issue I thought of with it is if someone includes a "main loop" they could get confused about why they are never getting into the REPL.
@thorny jay I don’t believe so.
@gilded cradle By checking on twitter, the author already discussed with @slender iron . The author does not know CP and/or have no time and @slender iron does not have time for that at the moment.
@lone axle I have wished for something similar. standard python has the $PYTHONSTARTUP file for this purpose.
has anyone here tried to make a music player with an rpi0? ik those digital players are outdated today and any modern phone can do the job but i think this would be a fun project
@harsh sparrow would this be better in #help-with-linux-sbcs
no problem
https://learn.adafruit.com/pygamer-mp3-player-with-circuitpython we have an mp3 player though 🙂
Unfortunately there's a full flash: Build bdmicro_vina_m0 for ja took 54.75s and failed
@onyx hinge I need CAN and Neopixel - do you think it will be easier to port the can module to CP?
@teal bear I don't have a definite timeline for any of my work, and I can also tell you for sure that our eventual API will not 100% match MP
I was planning on doing one of those today
in both cases I have stable working code. so not a lot R&D, just grinding through ... im not 100% sure what
Do you know the frequency of library bundle update? The last one seems to be from 2020-08-11 and we are the 2020-08-16. So either it is broken, or there was no new release of any library since 5 days? https://circuitpython.org/libraries
there are some 4 day gaps, so 5 isn't too far off the (insert statistical term here)
I think it's possible that there haven't been any releases in that many days. There definitely are some today though so if it doesn't happen tonight then there may be an issue with it.
Releases if the bundle are intended to occur when individual contained libraries have had tagged releases. This does not happen in any particular schedule. The new release check is intended to occur daily and happens by script
grep -A 2 deprecated circuitpython/ports/stm/st_driver/STM32F4xx_HAL_Driver/Src/Legacy/stm32f4xx_hal_can.c
(#) This HAL CAN driver is deprecated, it contains some CAN Tx/Rx FIFO management limitations.
Another HAL CAN driver version has been designed with new API's, to fix these limitations.
it seems there is already 2 CAN drivers in CP?
https://github.com/adafruit/adabot/runs/989713183?check_suite_focus=true that said, if this is the automated task, it's failing.
@raven canopy ^?
https://github.com/adafruit/circuitpython/blob/main/tests/pyb/can.py#L2 from pyb import CAN
I'm guessing there is no pyb for CP, so that test gets skipped ?
@onyx hinge that is the task. looks like the Adafruit bundle is updating just fine, but the Community bundle is failing a GitHub API call for some reason...
sure
@onyx hinge shucks. I was hoping there was working CAN code that no one knew about
Previous Metro M0 good connection and programable with Mu. on Mac Catalina (not new) . Now the board is not recognized. The board is running a previously installed blink, but it does not show on Finder or on terminal /dev/tty.* search.
was the previously installed blink written with Circuit Python? or Arduino?
CP
reset button just puts it back in the same state? if so, next thing I'd check is for a known good USB data-capable cable, then if that's good see if you can double-click the reset button to get to the bootloader
- yes, one click on reset back to initial state. 2. I have changed cables and am using one that is proven data capable. 3. double click reset: neopixel is solid green, red led slow fade. I erased the previous .uf2 file and replaced it with an updated .uf2. NOW I can recognize the CP drive. THANKS
This was nerve wracking because I am getting ready to do CP with the M0 this year instead of straight Arduino with some Middle and High school students. I feel better now.
Glad you got it worked out. Hooray that is exciting to hear!
I need to make sure the M0 will be as fool proof as the Arduino. Kids can always find ways to make a glitch in class.
If there is any way to upgrade to M4 devices those will end up having a higher ceiling.
M0 can still do plenty but will start to run out of memory quicker as you add on sensors or other hardware devices.
I have been playing with accessing the CLUE sensor from a Raspberry Pi, and I could read all of them with Blinka, CP driver and the right wiring. But I was interested in displaying on the screen.
Do you know if (on the CLUE) the SPI bus of the display is the same as the one exposed on the micro:bit connector?
Or is there a way to bridge from an SPI bus to another (maybe with some arduino code)?
For the record, this is what I use to connect the CLUE on the Pi: https://bigl.es/monday-micro-bit-microbit-x-raspberry-pi/
@thorny jay Looks like a separate SPI is used for the TFT https://learn.adafruit.com/assets/87877
Thanks, that explains... Now I need a piece of Arduino code that is slave on the external bus and master on the internal screen bus.
what i do wrong in translation? no board passed
longer translations then japanese i guess?
@upbeat plover no I think it's typos in your translation file. You can look at the raw logs and search for "error" or "fatal":
2020-08-16T23:47:02.9370591Z ../../locale/zh_Latn_pinyin.po:1340:2: syntax error
2020-08-16T23:47:02.9370945Z ../../locale/zh_Latn_pinyin.po:1340: keyword "Ch" unknown
2020-08-16T23:47:02.9371266Z ../../locale/zh_Latn_pinyin.po:1341: keyword "z" unknown
2020-08-16T23:47:02.9371606Z ../../locale/zh_Latn_pinyin.po:1342: keyword "g" unknown
thank you used chinese " and not english
that is obscure! 🙂
😋
never mind, I was misled by the Japanese warnings (deleted query about ideographs)
i was too but when i looked at the lines red it was obvious my mistake
@upbeat plover Have you considered using our weblate system for maintaining transmissions? It would have saved you from this particular trouble. https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/
This gets rid of two classes of message that we know exist and do not represent a problem to be dealt with at this point:
Note: compression increased length 'USB Busy' 8 9
Font missing character: 見 35211
This removes a lot of noise from the logs and helps contributors find the relevant messages when builds fail.
I very much agree about lowering the noise level! Thanks.
Another thing we see a lot in the build are --progress messages on git fetches/clones, etc. I wonder if it's worth changing those to --no-progress. --progress is specified explicitly, because maybe at one time it was helpful, but I'm not sure if it is useful now.
This computation was wrong, or did you fix it? I wonder if it's just worth commenting this out, so it could be revived for compression testing later.
Ditto about commenting out. Eventually we might want to find the missing characters?
@upbeat plover It's new-ish so no worries that you didn't know about it!
I think the computation is misleading. See the individual commit message for more info on my findings.
Thanks. You write a lot of interesting stuff in commit messages, but I never see that, unless I happen to click on the individual commit. I think that's a deficiency of GitHub that it doesn't make these visible or even give a hint of their existence (or am I missing something). I have tended to write notes like that in the PR instead of in the commit. Where I used to work we didn't use GitHub, so I wrote them in the commit. What do you think? Maybe copy them into the original PR comment?
I am a firm believer in "delete, don't comment out", but if you feel strongly I'll do as you suggest.
I added a commit to silence the clone of the raspberry pi toolchain, used to build mpy-cross.static-raspbian.
BLE cannot pair, possible regression (?). Using CLUE + master branch (hash 7604114b471917828ea6839b66623c564bb95c50). Using CircuitPython 6-alpha2 works Ok. master cannot pair. Connects works Ok, but when I send the pair-request CLUE does not answer back (no relevant logs). @tulip sleet any idea? thanks!
This is a simple thing to restore. I was thinking more about the computations in the (incorrect) "too long" message.
Thank you for removing these annoyances!
Thanks! We are now using Weblate to help manage the translation process. Take a look at https://hosted.weblate.org/engage/circuitpython/. @jepler (@Jeff E. on discord) set this up and could help you if you have any quesionts.
Unfortunately there's a full flash:
Build bdmicro_vina_m0 for ja took 54.75s and failed
I'll re-run this to see if the latest merge is better. This is a bit mysterious because the board is quite similar to other M0 Express boards.
@forest musk That is odd. But assuming you are using, say, a phone, forget the CLUE on the phone side. Also, turn Bluetooth off and on, on the phone. You can also clear all the bonding data on the CLUE side by doing this is in the REPL.
>>> import _bleio
>>> _bleio.adapter.erase_bonding()
if those don't work, I'll look more closely.
OK, I'll close this for now, but we'll keep it in one of our numerous back pockets.
?serverinfo
@jepler @v923z Did you see this?
Fixes #3263 in a simple way, adding a static robots.txt file. The stable version specified in the robots.txt needs to be updated when it changes; it's currently 5.3.x. The robots.txt could generated automatically, though I'm not sure how off the bat.
@half sedge https://github.com/adafruit/CircuitPython_Community_Bundle/releases/tag/20200817 the community bundle has now been released. There was a bug preventing it from happening, as you surmised. thanks for raising the issue; you may want to thank sommersoft for fixing it!
@onyx hinge I'm working on squeezing the bdmicro_vina_m0. It's too big by 176 bytes. metro M0 Express JA does fit, but by only 36 bytes. the vina has a few extra pins, etc., so that's probably it
@tulip sleet thanks for tackling that! I'm a bit tired out
How will this affect URLs on circuitpython.readthedocs.io such as https://circuitpython.readthedocs.io/projects/display_text/en/latest/ -- will search engines still be permitted to index them? The way I read it, they would be forbidden.
Unfortunately there's a full flash:
Build bdmicro_vina_m0 for ja took 54.75s and failedI'll re-run this to see if the latest merge is better. This is a bit mysterious because the board is quite similar to other M0 Express boards.
Metro M0 Express JA fits by only 36 bytes. The vina has a few extra pins. That explains it.
I did a merge to update things. Ok to merge after CI is happy.
@slender iron I added miletones to all the un-milestoned issues
How will this affect URLs on circuitpython.readthedocs.io such as https://circuitpython.readthedocs.io/projects/display_text/en/latest/ -- will search engines still be permitted to index them? The way I read it, they would be forbidden.
Good point: I mistakenly thought those were under another URL. I'll add a prefix to robots.txt.
Oh, nice, I broke Adabot
if those don't work, I'll look more closely.
@tulip sleet thanks. I'll try again later today... If it doesn't work I'll file a bug with all the steps to reproduce it.
This needs a lot more thought. Converting to draft. https://circuitpython.readthedocs.io/projects, for instance, is not a searchable top-level point.
I think that the sub-project pages will be allowed via the Allow: /*/latest/, after reviewing the syntax for robots.txt and using an online tester.

Probably worth getting this in, and seeing the result after a couple days. Google's documentation does say not to rely on robots.txt and use meta tags instead. It may end up being a multi-pronged approach.
@solar whale I'm testing the RFM9x build in a few 🙂
The Cholesky decomposition has been in ulab since 0.37 (sometime in March). The adafruit repository points to https://github.com/v923z/micropython-ulab/tree/11a7ecff6d76a02644ff23a734b792afaa615e44, which is 0.54, and contains the function in question: https://github.com/v923z/micropython-ulab/blob/11a7ecff6d76a02644ff23a734b792afaa615e44/code/linalg/linalg.c#L93.
I don't know how this problem could have crept in.
@kevin-tracy Do you import the linalg sub-module?
from ula...
@jepler Ping if you want to polish this off: two minor fixes to address.
@jerryneedell Ok, I checked out the branch and built the uf2. Had to delete default images folder to fit the simpletest code.py for the RFM9x.
Importing adafruit_rfm9x at the REPL throws the following ImportError
Adafruit CircuitPython 6.0.0-alpha.2-295-g5cf41c0d1 on 2020-08-17; Adafruit Feather M0 RFM9x with samd21g18
>>> import adafruit_rfm9x
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'adafruit_rfm9x'
@kevin-tracy https://github.com/v923z/micropython-ulab/pull/170 fixes the issue. This was a problem even in micropytho-ulab, but since no one used the function, no one complained. Sorry for the trouble.
@dhalbert @jepler Can you update your pointer on the adafruit side? I can generate a release tag, if you want that.
@jerryneedell Ok, I checked out the branch and built the
uf2. Had to delete defaultimagesfolder to fit the simpletestcode.pyfor the RFM9x.Importing
adafruit_rfm9xat the REPL throws the followingImportErrorAdafruit CircuitPython 6.0.0-alpha.2-295-g5cf41c0d1 on 2020-08-17; Adafruit Feather M0 RFM9x with samd21g18 >>> import adafruit_rfm9x Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: no module named 'ad...
?serverinfo
24k!
When I factored out "allocate_display_bus" I introduced a bug where the code checked if the display was allocated, not the bus. Correct the in-use check.
works for me
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 6.0.0-alpha.2-175-g5f60bec85 on 2020-08-17; Adafruit Feather M0 RFM9x with samd21g18
>>>
>>> import adafruit_rfm9x
>>>
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 6.0.0-alpha.2-175-g5f60bec85 on 2020-08-17; Adafruit Feather M0 RFM9x with samd21g18
>>>...
Well I just sat down and soldered a stacking header to the wrong board
@hybrid scarab no worries on Adabot! i'm fairly certain i've broken her more than anyone. 😄
CMSIS provides __RBIT for this purpose, across compilers but specific to ARM. Hypothetically, conditionally include "cmsis_compiler.h", then
STATIC uint8_t bitrev(uint8_t n) {
#ifdef __arm__
return __RBIT(n) >> 24;
#else
uint8_t r = 0;
for(int i=0;i<8;i++) r |= ((n>>i) & 1)<<(7-i);
return r;
#endif
}
saves 48 bytes.
@raven canopy 😄
@raven canopy hypothetically, do you think it would be worth the time to make alerts when circuitpython's submodules have new releases, similar but not quite what adabot does for the bundles?
deep sigh
I mean, I'm kind of thinking it's worth having an alarm clock about this
@onyx hinge probably worth it. i wonder if there is some git incantation that could just be dropped in build.yml as a simple "just so you're aware".
I dunno, I'd look at how the bundle checks work or ask somebody who knows it
@gilded cradle can you take notes in the meeting today? If not, let me know and I'll find somebody else.
P.S. where's it documented how to raise hug reports? 😆
Specifically if text-only and would like a shout-out given on my behalf, I should clarify
@hybrid scarab see the pinned message in this channel. The basic process for text only is to open the google doc linked in that message and insert your name into the list in the hug report section (alphabetically) and then add hug reports under your name.
Aha
@onyx hinge sure
Thank you @lone axle - I overlooked the obvious 😆
Right! Think I've got that right
@gilded cradle thank you! I filled in "overall" for you
Thanks @onyx hinge. That's good considering I don't even know where to get that info from. Circuitpython.org maybe?
@hybrid scarab no worries. It does look like you've got it right to me as well. You can go ahead and add (text-only) or (lurking) next to your name as well that way the one running the meeting will know to read them for you instead of calling you up to read them on the mic.
@gilded cradle the generated text is plopped in with "reports" https://adafruit-circuit-python.s3.amazonaws.com/adabot/bin/reports/circuitpython_library_report_20200817.txt but then there's the narrative to add .. that second part is what I meant
(unless you are planning to join us on the mic, in which case you will need to get the circuitpythonistas role added to your user)
Thank you, I'm going to lurk a few before I start really participating 😄
Ok, well, I didn't even know the reports existed. 😄
Oh, I get what you mean by the narrative. Thanks for adding that too @onyx hinge
<@&356864093652516868> The weekly meeting is in about 70 minutes. Hope to see you all in the voice channel. Just a reminder, it's super helpful if you can add your status updates and hug reports to the document https://docs.google.com/document/d/1xHKfmNXfpgzDF1Y8goyEo1mVSl-f99Pc-RLm9k2L1Mg/edit?usp=sharing -- it's super helpful. So is letting us know if you'll be text only or "lurking" (just listening in). See you soon!
it's super super helpful helpful, I can't be emphatic enough 🙂
u u u ultra helpful
monster helpful
Is it possible to run python on an arduino when it's not connected to a pc? or is it only possible to run python while connected to a pc?
You would need to provide power, such as from a 5V USB power bank or on boards with the appropriate connector, from a Li-po battery pack or 3 "AA" or "AAA" batteries. But yes, in general CircuitPython programs will run whether or not they are connected to a PC via USB.
Most devices that I would consider to be "an Arduino" are not capable of running Circuit Python though.
Our Feather boards are specifically designed for use with LiPo batteries. They have a charger. They run CircuitPython
if i have a lipo battery, wouldn't i need a voltage regulator to ensure no more than 5V is transferred to arduino? i prefer python, but it sounds like a headache to use python for an arduino
a standard Arduino doesn't have enough flash or RAM to run Python. We are using 3.7V batteries, and 3.3V processors. There is a regulator o nthe board. You could also use a USB power pack and power things through the USB port
What would be any advantage of using python on an arduino over the standard c or c++ that's part of the ide?
@hybrid scarab I did the exact same thing the first time I got an OLED featherwing. I felt dumb for a whole day.
@ionic elk at least I had the benefit of already feeling dumb, no amount of soldering skill can stop you diligently soldering the wrong things together!
I prefer to claim that I did it on purpose, for better physical protection, for access to more pin sockets, and as a glare shield 😉
Look on the positive side, you can jumper from any of those female headers without putting the feather on a breadboard. Works well with jumper to stemma cables
@surreal knot It's purely a matter of choice. Some people prefer coding in Python.
@surreal knot in general I use Circuitpython for ideas that I want to test out really fast and easily. Since you don't have to compile circuitpython and run code just by saving it, it's a really quick way to iterate on something like a display, or a new breakout/circuit that you want to toy with, or a bunch of tweaks of a math algorithm with something you made, etc.
But as soon as my project starts needing optimization for power, or requires interrupts, I switch right to C.
Thank you all for the help!
Also, Arduino is kind of a vague term these days because there are so many versions now. Running an interpreter of any kind on an Uno or any of the 10+ year old atmel chips is not really going to be practical, they are very slow compared to the new ARM chips.
@surreal knot if you only have a standard Arduino now, check out snek (#snek channel): https://sneklang.org/. It's a tiny Python-esque language. However, its hardware APIs are quite different from CircuitPython.
Good afternoon all you wonderful folks -- happily lurking today. I've updated the notes doc to reflect as such. 
@solar whale I think I lost my pythonista status
@inland tusk here you go
thanks
Loud and clear Jeff!
yep.
Yepper
yeppest
Thank you 🙂
lurking
looks at time... 7PM :D
Excellent work so far; one issue, using circuitpython 5 on the Sparkfun SAMD51 Thing Plus
appears to be an issue with this build; makes the examples posted online and in the docs confusing for I2C.
Using "board.I2C" the SDA labeled and schematic defined pin is being used as SCL. and SCL is being use as SDA.
Using "busio.I2C" works as expected. when you define SDA and SCL as board.SDA and board.SCL and the applicable bus lines are run as SDA and SCL.(i.e. busio.I2C(scl=board.SCL, sda=...
👋
👋
Lurking
brb
back
Ooo, nice!
Releases tomorrow 😬
Demo of the CircuitPython_CLUE_Cutebot GitHub repository. This repository was renamed to match my other repositories naming format.
It a higher-level library that allows Adafruit's CLUE and ElecFreak's micro:bit Smart Cutebot to communicate while maintaining all the functiona...
Send your newsletter/project/news tips to me on Twitter at @anne_engineer or put in a PR at https://github.com/adafruit/circuitpython-weekly-newsletter/tree/gh-pages/_drafts
Project Repo
https://github.com/markwinap/Pycom-SH1107-I2C-John-Conway-Game-of-Life
Git : https://github.com/markwinap
Twitter: https://twitter.com/markwinap
YouTube: https://www.youtube.com/channel/UCCsi...
Linkedin : https://linkedin.com/in/marcodmartinez/
that is SO cool
Send your newsletter/project/news tips to me on Twitter at @anne_engineer or put in a PR at https://github.com/adafruit/circuitpython-weekly-newsletter/tree/gh-pages/_drafts
😊
Microphone not tested, so if you don't hear me, it mean lurking.
Actually set up and tested the MICS6814 lib today, and smooshed up an example
Made me realise how difficult Pimoroni_Physical_Feather_Pins makes identifying which underlying pins are actually being used 😬
@hybrid scarab do you need help removing the need for that library?
What's the preferred thing for examples across boards @slender iron? Comments, or individual examples for each specific supported platform?
I prefer individual examples
I think I can get to grips with it, just want to follow best practise this time 😆
Laying all the groundwork first, lib by lib!
The pull-up detection on SCL/SDA confused me for a hot minute
Then I realised I hadn't even plugged the Enviro+ on.... 🙄
heh, that'll do it
Friday streams? 🤔
Scott live streams usually on Fridays
2pm friday pacific
😄
- usually
Oooh, backlog to watch!
Thank you
This kind of stuff is helpful for getting an idea of the big picture, I have a lot of catching up to do
if you have specific topics let me know. maybe I can point you to a relevant part of the video
I am lurking for status update
@onyx hinge timecodes please
Be sure you read the newsletter for what's happened in the week
@slender iron I think half the problem now is that I don't know what I don't know, so I'm just immersing myself in the ecosystem and hoping I pick up something I'll find useful later
👍
you may want to start from the start then
though one video is mostly I2C vs SPI vs UART
Doh, this one slipped my mind. Belated Hug report to both Kattni and Jeff as well. But definitely appreciate both of you helping to get my discord permissions straightened out.
Some "evidence boards" of my attempt to understand the connection between CircuitPython and C.
@mental nexus needs more pepe silvia
I really like this pdf, kmatch
@mental nexus are you listening?
side note on this. Both the Adafruit Motorkit and ServoKit Library uses board.I2C instead of busio.I2C if i2c is None. As such, this breaks the motorkit/servokit library examples unless you specifically define the i2c and pass it accordingly.
lurking
@lapis hemlock Definitely listening. I don’t fully understand all the capabilities of ulab and how to connect it to other data structures. My question several weeks ago was whether it is possible to connect ulab to process bitmaps.
Yes, I understand that, but at that time you also said that you would need views. More on this in the weeds.
Hmmm. Not sure that was me or maybe I don’t understand what a “view” is. I’ll see what I can understand from the weeds discussion.
I’ve been looking into bitmap manipulation too, the numpy example I’ve looked at uses np.meshgrid() is there an equivalent in ulab?
just idly throws a bunch of non-prefixed constants into a library with really long names 😆
Don’t fully understand what it does yet!
@mental nexus Views don't return a copy of an array, they simply return a pointer. The upshot is that other processes can modify your data.
Interesting.
Raspberry Pi HATs on a feather ... like Breakout Garden? 🤔
@mental nexus https://www.w3schools.com/python/numpy_copy_vs_view.asp
@thorny jay A tiny python chess program: https://codegolf.stackexchange.com/questions/45179/smallest-chess-program
a better one: https://github.com/thomasahle/sunfish, still. Looks like it would fit, no problem
Ha, like the silk screen!
@thorny jay A tiny python chess program: https://codegolf.stackexchange.com/questions/45179/smallest-chess-program
a better one: https://github.com/thomasahle/sunfish, still. Looks like it would fit, no problem
@tulip sleet these don't even require tensors of rank 3.
@thorny jay A tiny python chess program: https://codegolf.stackexchange.com/questions/45179/smallest-chess-program
a better one: https://github.com/thomasahle/sunfish, still. Looks like it would fit, no problem
@tulip sleet So now we need a Chess for PyPortal (using the touch screen) or on the PyGamer using the joystic... I would love that (but not doing it).
no idea about the memory consumption
Haha, that's the sort of thing we silk onto protos 😆
@hybrid scarab Not my board, this is just the first gerber file I send for making... and to make sure I sended to the same company as the author.
🚀
Nonetheless a really handy board I could use to slap a breakout garden on a feather so I don't have to faff with Stemma wiring 😄
OK, can anyone update me on micropython vs pycopy vs circuitpython + all dramas?
Cicuitpython only supports SAMD? Micropython supports more?
@idle owl, sorry, this will be a large one too due to the MicroPython PR. I rearranged things a bit as a result.
CircuitPython was originally started to add SAMD support. We now support many MCU families and 100+ boards
@turbid radish No need to apologise. It's what we do.
This is a placeholder issue. I don't have a minimal reproducible example, but alpha-2 breaks my main IoT application with pystack exhausted. 6.0.0-1 and prior are fine. The code makes it through all of the setup, including displayio and esp32spi, but it seems the HTTP GET triggers the error. The library refactoring underway may well help.
I've read somewhere that cicuitpython project forked the upstream because of some quarrels...what were those issues?
@frosty prairie we have some differences in high level priorities from Micropython. We emphasize API compatibility between different MCU families a lot more, for one. Micropython focuses more on speed in some cases.
@frosty prairie If you check Deep Dive video from @slender iron he explain the origin of the fork much better than anything I could read before.
@frosty prairie As far as I know there was some friction between PFalcon and Damian resulting in Pycopy. But that drama hasn't had much to do with Circuitpython.
@tulip sleet STM32F103? (Bluepill) and what about ESPs?
@frosty prairie STM32F103 is coming, but no bluepill, it's too small. Circuitpython can't fit on 128kb, needs 256 minimum
ESP32-S2
Support is being worked on for the new ESP32-S2 but the "plain" ESP32 is not supported by Circuit Python directly.
It can be used as a wifi co-processor though. As in on the PyPortal and some other devices.
ESP32 lacks native USB which is considered a central part of Circuitpython (one of the priority differences from Micropython)
we dropped support for chips that don't support USB directly. a CircuitPython impl needs to provide a visible CIRCUITPY drive
we are a "friendly" fork; we are in regular touch with the MicroPython folks
image-processing, is it "only" working on two dimentional array? Or is it more?
@hybrid scarab I have two unsoldered FeatherCap... because I had to order 3.
@frosty prairie I'm relatively new to this world as well and I looked into this. The main things IMHO are: CP is targeted at making it easy. The same code works across boards. Things beginners would struggle with are hidden (interrupts). MicroPython is targeted at embedded programming completeness so if that means board to board you have to relearn a bit, so be it. Pycopy seems to have more of a focus on making things small which means the language feels more "raw" or lower level, IMO.
And yes, in this past deep dive (link above) Scott describes really well which lined up with my own previous research.
Oh and CP has this community. 💚
Full trace:
Traceback (most recent call last):
File "code.py", line 1336, in <module>
File "code.py", line 532, in http_get
File "adafruit_esp32spi/adafruit_esp32spi_wifimanager.py", line 202, in get
File "adafruit_requests.py", line 291, in get
File "adafruit_requests.py", line 182, in request
File "adafruit_esp32spi/adafruit_esp32spi_socket.py", line 42, in getaddrinfo
File "adafruit_esp32spi/adafruit_esp32spi.py", line 604, in get_host_by_name
File "adafruit_...
I wanted to port Pimoroni Unicorn HAT HD to CircuitPython. But the first thing pimoroni driver does is to use numpy and make a big array. So I gave up. But sure I don't need numpy, it is just an array.
💯
configurable apis means that support documentation and tutorials will vary and confuse people
That's right.
Of course the documentation will match the piece that have been enabled or not...
I forgot to point that out.
Thanks all!
@lapis hemlock thanks for keeping my bitmap issue in mind! After I dug in I realized bitmaps are more complicated than I thought (different color depths) and bits per pixel.

@lapis hemlock thanks for keeping my bitmap issue in mind! After I dug in I realized bitmaps are more complicated than I thought (different color depths).
@mental nexus No problem.
If I have an open issue on ulab I’ll go revisit it.
here is the "how circuitpython came to be" bit from last week's deep dive: https://youtu.be/574I1r-yNEk?t=688
Plan is to recap work Scott did this week getting socket going for HTTP and HTTPS requests and discuss the memory struggles it brings up. Visit the Adafruit shop online - http://www.adafruit.com
LIVE CHAT IS HERE! http://adafru.it/d...
@hybrid scarab Anything in particular you would like me to look at for EnviroPlus? I am done with the PM25, but you could review my PR and see if you can use it. If you test and confirm it work for you, it might be easier for the formal reviewer.
Ooh yes actually trying the PM25 was next on my TODO list
I don't use them anymore... because I follow the meeting most of the time.
And read the notes live.
I've just finished and added an example for mics6814, it seems to work for me- a test of that would be helpful. I also presumably need to do examples for the M0 and possibly some other supported board.
It was my idea... if it is not in use, maybe we can remove it.
Digging the hot, hot pink teeshirt @slender iron
thanks! I like wearing it on stream 🙂
@hybrid scarab the M0 you may want focus on text only example. Those could be the xxx_simpletest.py
Presumably all your whites being dyed a distressing shade of noncommittal pink is worth it 😆
Because they must be simple.
I'm not against having subfolders for each supported MCU and an additional dir for "contrib" or something
I try to keep the pink shirt with colors. did have the pink issue with a big red beach towel once though
Usually, the example file would work for one board, and have commented out pin allocation for other board. It would say "uncomment next 4 lines if you use nRF52 board".
I don't like using comments because it assume people 1) read them and 2) know how to uncomment
This is how it is done in many libraries, and explained in learn guide.
The downside of multiple code examples is the sheer brunt of duplication
It is that or duplicating for each and every hardware (like displayio for non native screen).
It's a you're-damned-either-way sort of scenario
If you want to make ready to use example for a few board, then I would suggest some macro processing to generate all the variant from a master file. Something like M4.
I'd probably contrive something like a single example with pre-processing macros that p.... ahaha
it's ok if the main code is simple
We have some examples- at least at the Enviro+ level- that are quite complicated, but then complicity sometimes begets board specitivity
separate examples is an approach I took with eink stuff
@slender iron I made the split into various file (library to package?) but this break all the import from example... is there a trick to make that change not break the API?
You can also ask the board version and act accordingly
ask?
Basically what feather_pins does
@thorny jay I'd just change the example. otherwise you won't actually save memory
Yeah, but that might break the learn guide and other people code.
yup
But I could not find the right way, then I gave up.
Unfortunately board names are quite long!
I do agree with @slender iron regarding comments though- they're likely to be overlooked, they're also quite noisy and make examples look messy up-top
"I was trying to say from X import Y as Z"
@slender iron I was pretty hands off with this first take on Feather stuff, so I never quite understood the reasoning behind it either
If a put 3 X 3 Y and 3 Z my message is eaten.
any large chunks of code you copy between examples probably should live in a library anyway 🙂
(this is why we have board level libraries that do init for you)
@hybrid scarab This is where I "encountred" the problem: https://github.com/adafruit/Adafruit_CircuitPython_IS31FL3731/pull/32 and I could not figure out the proper way to do the import. It's a mix with folder, so using "." notation to specify the file, and the class name, and how to later use that in the code.
I am so confused with "import" that I gave up once I had working code.
@slender iron btw, I'm testing friday's wifi code and I'm having some problems. Since there is not PR yet, where should be a good places to paste the errors? github issue?
here to start maybe?
@hybrid scarab and I made this: https://github.com/adafruit/Adafruit_CircuitPython_PM25/pull/8 for the particul sensor... and there again, to use the new way the library is structured, you need to adapt the import.
@solar whale You around?
Ok, so I don't get a usb filesystem nor the native serial. When I connect to the serial from the programmer I get:
E (635) memory: memory init
After that, 3 times "cp wifi: reset" + "Heap summary for capabilities" (...)
Ha "CleanFlight" and "BetaFlight", are some awesome tongue-in-cheek project names once you know their origin 😆 @slender iron
Missed opportunity for "SensiblePython"
@silver tapir I think the memory print is just for debugging
not sure why you don't get usb
@half sedge I'm going to have to try running your code 'cos I can't see anything wrong at a glance
Hello <@&356864093652516868> -- it hasn't even been an hour but I miss you already. Here are the notes for next week's meeting: https://docs.google.com/document/d/107jDI0oM4DuBHe4GuAPO_i5bVhOH-HDi1Q8YbNSjbak/edit?usp=sharing It will be at the normal time (1PM US "Eastern" time) on Monday, August 24. 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!
You don't still have adafruit_is31fl3731.mpy in lib when testing, do you?
No I remove everything, the whole lib folder, and create one with just my code. It was working, but I was trying to find the proper way to "import" and "use" so that the example "before" and "after" are the most similar.
Ah!
Here I only tested with the LedShim and the ScrollPhatHD. Because those are the only board I have.
So my workflow is to create a "HIDE" folder. Move everything there, the lib folder, the *.py files, ...
I hate that you can't submodule a class and avoid that extra level of indirection
@uncut nexus do you want review rights? that way you could review https://github.com/adafruit/circuitpython/pull/3281#issuecomment-674420858
@slender iron I do if I change the firmware built from main, so I know I haven't messed up the cable or fs.
Then I put all the example in the root, create a main.py that import the example I want to test (and have all the other import with comment) and I put the library in the lib folder, but as *.py file (or in the library folder with init.py and the other files.
That way I know I only have my code present. If some base library are needed, I use the *.mpy.
But yeah from x.y import y as z is really wordy
Possible solution would be to rename all the classes to Matrix so the default is not to alias them
Once it works on one board, I copy everything over to another board and double check there. Uncommenting in my main one example at a time.
@silver tapir I'll look later. I'm going through email now. you can file issues on my repo if you want a place to track it
Will do. Just so that I can copy paste the full log in case there is something there.
kk, thanks!
For now, I'll test the Pull[In/Out] stuff...
@hybrid scarab I'll see what reviewer say about the code. But I will not change from library to package until I know I am doing things the right way. Also I was wondering if I should do the Scroll pHAT (the original version that is not produced anymore now that the HD exist). But I don't if there exist a lot of those.
I haven't heard from anyone with a Scroll pHAT for a while- though it was hugely popular at the time and one of the busiest GitHub repos in its day
@hybrid scarab I'll also try to document the memory saving of splitting that way. I did not even check.
This is the sort of scenario where I would- these days- create libraries that depend on this one and just have the individual product names
I believe the latest version off main will work ok. Mind trying that? We just need to release it.
It's a tiny, almost silly amount of code to put in a separate library... but on the flip side, that doesn't really cost us anything
Yes, that is what Scott suggested too... Have an IS31FL3731 library and then other library for each and every board that use that chip.
I think separate repos are easier to find
For me, that mean trying to understand the cutty cutter(?) and how to build a library from scratch... @slender iron if you can comment on this issue: https://github.com/adafruit/Adafruit_CircuitPython_IS31FL3731/issues/27 . I have a working PR, but with everything in that same existing library.
That's true- harder to maintain, but our burden is high maintenance cost in exchange for user-accessibility
CookieCutter is fun... /me hides
I am not the one that started to add more board to this library, I just followed the trend.
It's not wrong per se
Adding things to existing libraries is a constant struggle for me. it's easier to do
but harder to find over the long term
@slender iron I don't see how to add issues to your repo. Let me know if you need any debugging or testing.
I just- and I have no place to say this- don't think we should be afraid to tear something apart and replace it completely if it fits 😆
I agree with that
I write a lot of bad libraries so I tend to be predisposed toward junking them and writing new ones