#circuitpython-dev

1 messages · Page 321 of 1

slender iron
#

not sure why not having "bringing up to date" caused that

mental nexus
#
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.
slender iron
#

ok, nice!

#

are those untracked files?

mental nexus
#

Now I have a bunch of _2 _3 and _4 files.

slender iron
#

in untracked?

#

any files you want to keep?

mental nexus
#

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.

slender iron
#

git clean -d -n

#

will do a dry run to delete them

mental nexus
#

Yep, it said "would remove" on all of these.

slender iron
#

they must be attempted merge remnants

#

k, to do it then git clean -d -f

#

and that should delete them

mental nexus
#
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$ 
slender iron
#

🎉

#

ok, now do one more make translate and commit

#

to clean up the .pot file

#

then push with a --force-with-lease

mental nexus
#

I should git add locale/circuitpython.pot and then git push --force-with-lease?

slender iron
#

add, commit and then push

#

since you aren't rebasing, you need to commit

mental nexus
#
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$ 
slender iron
#

git push --force-with-lease

#

since you are pushing the second rebase

mental nexus
#

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)
slender iron
#

you aren't just adding onto what the remote state is

#

yay! "Files changed 4"

#

much cleaner

onyx hinge
#

If you figure out what program was creating the " 2" " 3" etc files, I'm curious. I haven't seen git itself do that.

mental nexus
#

Wow, there is no way I would have been able to figure out how to resolve that in the proper git way.

ornate breach
#

You don’t know how many times I broke git and had to find weird work arounds

slender iron
#

git's learning curve is a bit harsh

#

but super powerful once you are past it

mental nexus
#

Thanks a lot for your help on this, I took up a lot of your time, I appreciate it.

onyx hinge
#

In 10 years knowing it will start to pay off

slender iron
#

rebase is very powerful

#

np

onyx hinge
#

being a good git explainer is practically a superpower @slender iron

slender iron
#

working on circuitpython has gotten me over the hump myself

onyx hinge
#

I can use it pretty well but I second guess myself when trying to help others I think

ornate breach
#

100+ commits a week with intermittent merge conflicts teaches you a lot about git

onyx hinge
#

helping someone through their first rebase in text mode is 😨

#

by "text mode" meaning on discord in text chat

slender iron
#

I can't help if they are using a UI

#

haha 🙂

ornate breach
#

Haha

slender iron
#

I wish git would drop the special remote and branch names

#

they do more harm then good because special cases add complexity

onyx hinge
#

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)

manic glacierBOT
mental nexus
#

@onyx hinge For the label issues, is it just gradually walking off the screen?

onyx hinge
#

yeah it seems to slowly walk left, in this case

slender iron
#

@onyx hinge yup, I use -o myself. I wish it was required

onyx hinge
#

guessing some kind of rounding is done in a way that accumulates error?

mental nexus
#

Ok, I think it's an integer rounding thing.

ionic elk
#

I'm getting auto-reloads on the ESP32 on every chip start. Is this a known issue?

manic glacierBOT
#

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...
ionic elk
#

@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.

tulip sleet
#

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

slender iron
#

the c call can have two arguments with one null

tulip sleet
#

better idea^^

slender iron
#

it's ok if they vary a little

ionic elk
#

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

tulip sleet
#

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

ionic elk
#

So it'll fail if I attempt to assign internal members for the objects?

tulip sleet
#

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

ionic elk
#

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?

tulip sleet
#

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

ionic elk
#

Oh I see. Makes sense.

solar whale
#

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?

tulip sleet
#

we might have moved some stuff around that would cause that; I don't remember

solar whale
#

I think there might have been a warning someplace... might want to make it more prominent before release....

tulip sleet
#

@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)

silver tapir
#

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?

slender iron
#

@silver tapir almost. you'll need to change it to find the arduino elf file

silver tapir
#

Thanks.

solar whale
#

hmmm - just built main for pyportal titano and it did not wipe the File system... oh well --will keep eye on it...

manic glacierBOT
#

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...

solar whale
#

@tidal kiln cool! your hurricane tracker just popped up a new storm!! Kyle

tidal kiln
#

😱 ...wonders if it's on map yet...goes to check....

solar whale
#

It’s on mine!

tidal kiln
#

oh wow. it's already here! and straight to TS.

solar whale
#

Yes -out of nowhere. Looks like it will go out to sea.

tidal kiln
#

yah. the arrows are useful. neat!

solar whale
#

Yes! Very nice.

atomic summit
#

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.

manic glacierBOT
#

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...

lone axle
#

@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.

mental nexus
#

I think you need a fractional anchor_point such as 0.5,0.5 to create the int roundjng error.

lone axle
#

Thank you

mental nexus
#

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

thorny jay
#

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?

lone axle
#

Ah I got it reproduced now. 0.25 got it for me.

mental nexus
#

Cool. Sorry I didn’t mention that this afternoon

lone axle
#

No worries

silver tapir
#

@slender iron there's still a couple of "diff code" in the branch.

slender iron
#

k, let me look

silver tapir
#

No, re-downloaded and now it's fine. But they appeared after a git pull on last week's repo. Nevermind, thanks.

slender iron
#

np, went through and deleted debug stuff

teal bear
#

hitting the button only blinks the led when I let up

#

so I am not getting it into boot loader ... hmm...

#

maybe not. help.

forest musk
#

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

lone axle
#

do you have anything that seems strange getting printed in the serial console from the CLUE?

forest musk
#

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?

teal bear
#

I have never seen dev/usbxxx be a termian device. try /dev/ttyACM0

solar whale
#

Unless you are on a Mac. Then it is /dev/tty.usbmodemnnnn

onyx hinge
#

@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.

teal bear
#

dfu is what I was expecting. thanks

manic glacierBOT
onyx hinge
#

hmm I wonder if the imx builds can work with the mp_float as C "double"?

tulip sleet
#

@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.

manic glacierBOT
#

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
teal bear
#

oh I see, it is a .bin not .dfu

atomic summit
#

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) ?

stuck elbow
#

@atomic summit there is microcontroller.pin.*

atomic summit
#

but that's not like machine.Pin() right?

stuck elbow
#

not sure what you mean, but you can pass it to DigitalInOut

atomic summit
#

oh, ok, hang on..

#

hmm, how do I use it? I tried this...

stuck elbow
#

same as board.* just the names are more microcontroller-centric

atomic summit
#

microcontroller.pin.D0 because help(microcontroller.pin) shows that as GPIO44

#

but I get...

#

AttributeError:module' object has no attribute 'D0'

stuck elbow
#

it's microcontroller.pin.P44 or something like this, use tab completion

atomic summit
#

oh, I do... microcontroller.pin.GPIO44

stuck elbow
#

right

atomic summit
#

ok, so where does that GPIO list come from ?

stuck elbow
#

same as board.*, only named by the port name

#

it's defined in pins.c in your board definition

thorny jay
#

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?

stuck elbow
#

sleep is for the weak

#

no sleep, more science

atomic summit
#

no sleep, more typos

idle wharf
#

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

thorny jay
#

You mean Sleepless In Seattle?

idle wharf
#

My iphone said I averaged about 5 hours last week...

atomic summit
#

@idle wharf It's /dev/tty.SLABtoUSB or something like that... same as TinyPICO.

idle wharf
#

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

atomic summit
#

do you have the Silabs driver installed?

idle wharf
#
  • tilts head inquisitively *
atomic summit
#

you need to install the CP210x driver

idle wharf
atomic summit
#

That's the ones

idle wharf
#

Hmm.... is the esp32s2's onboard USB the wrong one to flash through? Should I use the external USB on the Saola ?

atomic summit
#

The soala only has the USB on the external CP210x

idle wharf
#

Yeah, but I have it wired up on a breadboard. I think that was the obvious thing... let me try it.

atomic summit
#

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

idle wharf
#

ding ding! That was it 😉

#

Wrong USB port.

atomic summit
#

All good mate 🙂

idle wharf
#

hah

#

Thank you for the help @atomic summit I'm checking sendle every day for my S2Feather

atomic summit
#

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!

idle wharf
#

I think it will get here Today then! yay! Thanks again and yes sorry everyone..

atomic summit
#

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

idle wharf
#

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

solar whale
#

Not sure why , but random was removed recently.

atomic summit
#
__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...

idle wharf
#

They discuss it going away and needing to come back there

atomic summit
#

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..

solar whale
#

“Should work”

#

But there is a note about missing prerequisite

atomic summit
#

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 😉

solar whale
atomic summit
#

both failed 😦

#

make: *** No rule to make target ../../frozen/Adafruit_DotStar', needed by build-unexpectedmaker_feathers2/frozen_mpy'. Stop.

teal bear
#

Adafruit CircuitPython 5.3.1 on 2020-07-13; Feather STM32F405 Express with STM32F405RG ...

#

ImportError: no module named 'neopixel'

solar whale
#

@teal bear did you put the neopixel library in the board? From library bundle?

teal bear
#

nope. I thought it was ... never mind. Ill go look for that

solar whale
#

Only the low-level neopixel_write portion is “built-in”

#

@atomic summit shouldn’t that be Adafruit_CircuitPython_Dotstar ?

teal bear
#

I now have adafruit-circuitpython-bundle-5.x-mpy-20200811/lib/ which had s lot of stuff in it...

atomic summit
#

well, that got a bit further, thanks @solar whale !

#

ok, DotStar is frozen, yay, random didn't work 😦

solar whale
#

@teal bear for neopixels you’ll only need neopixel.mpy

teal bear
#

thanks. missed it looking at all the files

#

yipee. I make it red. I'm a pro.

#

thanks all. now I can sleep.

solar whale
solar whale
#

@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 filesystem

import 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
>>> 

atomic summit
#

@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 🙂

solar whale
#

Yes- agreed -- just wanted to see if it worked -- not sure why it can't be put in for a specific board ....

atomic summit
#

CIRCUITPY_RANDOM = 1 is not overriding it.. so maybe it needs something else, or it's an order of operations issue.

solar whale
#

Even in mpconfigport.mk setting CIRCUITPY_RANDOM = 1 instead of 0 did not work -- Had to comment it out ??

stuck elbow
#

make clear?

solar whale
#

I did make clean

stuck elbow
#

let me guess, it's doing #ifdef CIRCUITPY_RANDOM instead of #if CIRCUITPY_RANDOM

#

you can do #undef I suppose

solar whale
#

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...

crimson ferry
#

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

manic glacierBOT
#

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...

lone axle
#

@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.

onyx hinge
#

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

lone axle
#

Ah I see

onyx hinge
#

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

lone axle
#

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.

onyx hinge
#

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

solar whale
#

@crimson ferry @ionic elk what was wrong with the way random was implemented on the esp32s2? Why was it removed?

crimson ferry
#

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()

manic glacierBOT
lone axle
#

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.

crimson ferry
#

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

crimson ferry
raven canopy
#

@onyx hinge are you using a PAT for the auth?

onyx hinge
#

@raven canopy I don't think there's a way to make the standalone checkling program send the token

lone axle
#

@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.

manic glacierBOT
#

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 ...
lone axle
#

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

raven canopy
#

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.

lone axle
#

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.

raven canopy
#

"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)
lone axle
#

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.

raven canopy
#

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.

lone axle
#

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.

raven canopy
#

haha. hopefully the new UI will help them offer a dark mode.

lone axle
#

Doesn't seem to make a difference, in the preview window at least.

raven canopy
#

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.

lone axle
#

It's so weird too because I cannot spot anything I did in the first one that seems to have made it work. 🧐

crimson ferry
lone axle
manic glacierBOT
#

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.

lone axle
#

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.

manic glacierBOT
teal bear
#

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?

teal bear
#

@idle wharf when I tried to use: ValueError: incompatible .mpy file

idle wharf
#

What version of CircuitPython is running on your board? 5.3? You see that in the REPL when you connect?

teal bear
#

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

idle wharf
#

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

raven canopy
#

Adafruit_Blinka was originally a bridge for using CircuitPython libraries with MicroPython. not sure if it still functions for that purpose though...

idle wharf
#

I linked to the LEDs section for you

teal bear
#

yes, and thanks

idle wharf
lone axle
#

Does anyone happen to know the link of the Repo that contains the pre-loaded demo scripts for several different devices?

teal bear
#

@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.

idle wharf
#

You got it...

teal bear
#

thanks for helping me along

idle wharf
#

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 ?

solar whale
#

the Arduino sketches are often in the board support package examples -- within the IDE.

lone axle
#

Yes! that is the exact one I was thinking of. Thank you!

teal bear
#

isn't it the same for all boards?

lone axle
#

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.

teal bear
#

k - wanted to make sure that code is what I should be trying to get working under MP

idle wharf
#

Hey @teal bear Are you trying to use the CircuitPython Neopixel library in MicroPython?

teal bear
#

kinda. I am trying to figure out what will be the best way to use the neo from MP

tulip sleet
#

@teal bear neopixel is implemented only for ESP8266 and ESP32 in MicroPython

#

CircuitPython has it for all its boards

teal bear
#

@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

tulip sleet
#

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.

manic glacierBOT
teal bear
#

@tulip sleet thanks

manic glacierBOT
onyx hinge
#

@tulip sleet thanks for the merge of that weblate thing, it is fixed as far as weblate is concerned

thorny jay
#

Can someone update the Pinned message with the document for the meeting of the 17th? Thanks

manic glacierBOT
#

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.

onyx hinge
#

@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.

thorny jay
#

Thank you, I try to update the file when I do things of find someone to thanks in the Hug report.

lapis hemlock
#

@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.

onyx hinge
#

you can't really

lapis hemlock
#

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!

onyx hinge
#
#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

lone axle
#

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.
lapis hemlock
#
#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?

crimson ferry
#

@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.

lapis hemlock
#

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.

onyx hinge
#

@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 ..

lapis hemlock
#

I'd sooner suggest you use Python or jinja2 templating to generate the code ..
@onyx hinge 🙃

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

lapis hemlock
#

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.

onyx hinge
#

the nice (?) thing about pixelbuf is how the "image" is 1D

teal bear
#

where is a good place to get help with dfu-util? (my 2 boards suddenly don't show up under --list)

lapis hemlock
#

@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.

onyx hinge
#

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"

lapis hemlock
#

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?

onyx hinge
#

The main question, I think, is how to share (like a memoryview()?) the storage between ulab and pixelbuf

lapis hemlock
#

The pixelbuffer has a pointer somewhere, right? Can't we just grab it?

onyx hinge
#

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?

lapis hemlock
#

But why don't we just hijack the pointer?

atomic summit
#

Hey @slender iron - Any reason I can't override the CIRCUITPY_RANDOM = 0/1 in my board level mpconfiigboard.mk ?

teal bear
#

@onyx hinge yes. 2 STM32F405 boards, 2 boxes: debian, ubuntu

lapis hemlock
#

I mean, we need a function that does that, but your buffer protocol works the same way.

onyx hinge
#

@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

lapis hemlock
onyx hinge
#

@lapis hemlock but that copies the data, rather than creating a view of it, doesn't it? samples = ulab.array(samples_bit[3:])

teal bear
#

@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

onyx hinge
#

@teal bear Oh, I didn't realize it was working but then stopped.

lapis hemlock
#

@onyx hinge I don't know. But if it so, we can fix it.

teal bear
#

omg - I think my jumper is ... open.

onyx hinge
#

@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)

teal bear
#

now the emotional battle ensues: shame or happiness :p

slender iron
#

@atomic summit just turn it on for all of them. it was a misunderstanding to turn it off

onyx hinge
#

@teal bear we all overlook things we shouldn't have, glad you figured it out

atomic summit
#

@slender iron Oh, ok.

slender iron
#

( I don't think it worked because the port level needed to check that it wasn't already defined)

lapis hemlock
#

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.

atomic summit
#

@slender iron Hopefully doing a PR in the next few days for FeatherS2 and ProS2 board files.

onyx hinge
#

@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.

slender iron
#

great! didn't I add one of them already?

lapis hemlock
#

@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.

atomic summit
#

Yes, FeatherS2 (thanks) - but some pins were wrong and I wanted to add more, plus some frozen stuff.

lapis hemlock
#

Even if we make this implicit, i.e., if we allow memoryviews in the constructor, the code has to be written for that case.

onyx hinge
#

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)
lapis hemlock
#

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.

slender iron
#

@atomic summit why frozen stuff?

onyx hinge
#

I agree, this may be something that is not in numpy

lapis hemlock
#

@onyx hinge What you meant here is implemented in the new version.

atomic summit
#

I want to include a helper library like I do on my TinyPICO for onboard hardware like LDO2 control, Lightsensor and APA.

lapis hemlock
#

Look at this: 4D tensor✅ , views ✅ , full, numpy-compatible broadcasting✅

slender iron
#

kk

atomic summit
#

so need to include my module + dotstar etc.

slender iron
#

note that freezing makes it harder to update

atomic summit
#

i know the boards are ram limited, but once PSRAM is working 😉

lapis hemlock
#

@onyx hinge Unfortunately, I have just let the cat out of the bag. I wanted to announce all this on Monday.

onyx hinge
#

hehe I don't think anyone's paying attention anyway

atomic summit
#

why does it make it harder to update? Doesn't the build system just make new builds based on whats in the repo?

onyx hinge
#

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

slender iron
#

@atomic summit updating the frozen library is tied to updating cp. if its just on the FS then you can update it separately

lapis hemlock
#

Great! But I don't want to count my chickens before they are hatched.

atomic summit
#

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.

slender iron
#

why? just so spi isn't used?

#

(we also have bitbangio)

atomic summit
#

I know about 0.1% of CPY atm 😉

slender iron
#

frozen has an advantage of being always available

#

👍

atomic summit
#

It's same same but VERY different to MP

onyx hinge
#

@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.

atomic summit
#

syntactically the same, ecosystem is very different

#

I'm used to doing everything myself in MP land 😉

lapis hemlock
#

@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.

onyx hinge
#

@lapis hemlock I look forward to it. And wish I had more time to play with ulab related projects.

lapis hemlock
#

By the way, what is this heavy traffic on a Saturday afternoon?

onyx hinge
#

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

slender iron
#

@atomic summit ecosystem is our strength 🙂

lapis hemlock
#

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?

atomic summit
#

@slender iron 10000% And I'm SOOOO looking forward to it 🙂

onyx hinge
crimson ferry
#

@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 🙂 )

lapis hemlock
#

@onyx hinge This is really nifty.

crimson ferry
#

oh, I see, TinyPICO-width board

#

is that available anywhere?

onyx hinge
#

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.

atomic summit
#

@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.

crimson ferry
#

"will have" answers my question 😉

atomic summit
#

Not yet, I built my "final prototype" a few days ago, and I'm about to order first production PCBs in a few days.

crimson ferry
#

cool cool

atomic summit
#

And I got CPY up on it last night 🙂

idle wharf
#

I'm about to do that right now. Did you build from Scott's CP\native_wifi branch ?

atomic summit
#

No,he merged that yesterday didn't he?

#

I'm building from main

idle wharf
#

Ok AdaFruit/CP/Main right ?

atomic summit
#

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.

idle wharf
#

Good to know... I planned to buy production boards too. I just wanted to play along and support your work.

atomic summit
#

Cheers! Much appreciated 🙂

#

Finding the readme confusing...so is bitbangio included?

slender iron
#

there is a built in bitbangio

atomic summit
#

ok, same syntax? so I can use these examples?

slender iron
#

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 🙂

atomic summit
#

ok.I'd be using it in I2C mode

slender iron
#

for dotstar?

#

we use spi internally

atomic summit
#

well, meaning it's just data/clk. Or can I use SPI without CS, MISO?

slender iron
#

busio.SPI doesn't manage CS and MISO is optional

#

so I recommend SPI

atomic summit
#

ok. done 🙂

manic glacierBOT
idle wharf
#

@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
atomic summit
#

@idle wharf try /dev/cu.usbmodem01

idle wharf
#

@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.

atomic summit
#

have you tried both boards?

#

We should move this off this channel...

crimson ferry
#

@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.

idle wharf
#

Problem solved, incorrect command parameters. I'll write it all up and share.

atomic summit
#

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.

teal bear
#

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

idle wharf
#

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.

teal bear
#

@idle wharf Saola's USB port (the one ont eh board)

atomic summit
#

@teal bear Do you have the Silabs CP210x drivers installed?

teal bear
#

the what?

atomic summit
#

The Soala uses a CP2102 Serial2URT chip - you need to install drivers for it to show up.

idle wharf
#

@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)

teal bear
#

I dont have a Soala., I was commenting on the misplaced space

#

ont eh <-

manic glacierBOT
idle wharf
#

AH 🙂

#

Typos are my forté

atomic summit
#

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

teal bear
#

no prob.

#

maybe I should try building CP just to see if that exposes something odd

teal bear
#

Adafruit CircuitPython 6.0.0-alpha.2-277-g41be0fdd8 on 2020-08-15; Feather STM32F405 Express with STM32F405RG

#

welp, that worked fine. yay?

teal bear
#

anyone know who or how?

onyx hinge
#

@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

#

my interest was looking at their canbus support, I can't say I used it much.

teal bear
#

the pre-buld in the zip work fine ... doing that .. it uploads but then doesn't work

onyx hinge
#

oh you found a pre-built?

teal bear
#

ha! canbuss is my interest too. It wokrs

onyx hinge
#

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

teal bear
#

there is no SD the prebuilt works without it

onyx hinge
#

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.

teal bear
#

no experience wiht can. a friend picked it and he seems to know what he is talking about :p

#

did you build git master ?

onyx hinge
#

yes at the time it was v1.12-665-g60f5b941e according to git describe

teal bear
#

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

onyx hinge
#

🎊

#

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"

teal bear
#

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

onyx hinge
#

Is circuit/micropython going to be in a controlling role, or in a sensor/switch role? or both?

teal bear
#

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

onyx hinge
#

does the micropython lib look like it's something sensible to build on for your use case?

teal bear
#

we did a quick prof of concept and sent a message between two boards

onyx hinge
#

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

crimson ferry
#

Is there still discussion on increasing pystack for M4? A couple folks seem to be hitting the limit.

onyx hinge
#

@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.

crimson ferry
#

ok, thanks, I've hit it a couple of times with different code sets, but I don't have a MRE at the moment

teal bear
#

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?"

onyx hinge
#

Yeah I think it is extremely not possible to make it behave exactly like before, without being like before.

teal bear
#

does anyone see b9 or c1?

onyx hinge
#

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

#

or close to it

#

goodnight!

teal bear
#

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

lapis hemlock
thorny jay
#

The same author also wrote a fast, low memory jpeg decoder for Arduino. @gilded cradle Do we have jpeg support in displayio?

nimble narwhal
onyx hinge
#

@nimble narwhal ooh, bookmarked

#

@lapis hemlock good find.

crimson ferry
#

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

gilded cradle
#

@thorny jay I don’t believe so.

lone axle
#

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?

solar whale
#

@lone axle I assume you want anything done in the repl.py to be preserved when it returns to the REPL -- which code.py does not do. I think that is the tricky part.

crimson ferry
#

I like the repl.py idea. Safe mode could bypass it. What other edge cases would need handling?

lone axle
#

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
#

@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.

onyx hinge
#

@lone axle I have wished for something similar. standard python has the $PYTHONSTARTUP file for this purpose.

harsh sparrow
#

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

solar whale
harsh sparrow
#

oh i forgot i was in the wrong channel

#

my bad

solar whale
#

no problem

onyx hinge
solar whale
#

does it work under blinka?

#

or over blinka, I guess...

manic glacierBOT
teal bear
#

@onyx hinge I need CAN and Neopixel - do you think it will be easier to port the can module to CP?

onyx hinge
#

@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

teal bear
#

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

thorny jay
#

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

teal bear
#

there are some 4 day gaps, so 5 isn't too far off the (insert statistical term here)

lone axle
#

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.

onyx hinge
#

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

teal bear
#

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?

onyx hinge
#

@raven canopy ^?

teal bear
#

I'm guessing there is no pyb for CP, so that test gets skipped ?

raven canopy
#

@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...

onyx hinge
#

@teal bear that sounds accurate

#

@raven canopy want an issue from me about it?

raven canopy
#

sure

teal bear
#

@onyx hinge shucks. I was hoping there was working CAN code that no one knew about

twin imp
#

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.

lone axle
#

was the previously installed blink written with Circuit Python? or Arduino?

twin imp
#

CP

crimson ferry
#

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

twin imp
#
  1. 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.

lone axle
#

Glad you got it worked out. Hooray that is exciting to hear!

twin imp
#

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.

lone axle
#

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.

manic glacierBOT
thorny jay
#

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)?

crimson ferry
thorny jay
#

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.

upbeat plover
#

what i do wrong in translation? no board passed

#

longer translations then japanese i guess?

tulip sleet
#

@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
upbeat plover
#

thank you used chinese " and not english

tulip sleet
#

that is obscure! 🙂

upbeat plover
#

😋

tulip sleet
#

never mind, I was misled by the Japanese warnings (deleted query about ideographs)

upbeat plover
#

i was too but when i looked at the lines red it was obvious my mistake

onyx hinge
manic glacierBOT
#

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.

onyx hinge
#

@upbeat plover It's new-ish so no worries that you didn't know about it!

manic glacierBOT
#

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?

forest musk
#

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!

manic glacierBOT
tulip sleet
#

@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.

turbid radish
#

?serverinfo

digital shoreBOT
#
adafruit
Owner

adafruit#3230

Region

us-west

Channel Categories

8

Text Channels

54

Voice Channels

6

Members

24631

Roles

34

manic glacierBOT
manic glacierBOT
onyx hinge
#

@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!

tulip sleet
#

@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

onyx hinge
#

@tulip sleet thanks for tackling that! I'm a bit tired out

manic glacierBOT
tulip sleet
#

@slender iron I added miletones to all the un-milestoned issues

manic glacierBOT
hybrid scarab
#

Oh, nice, I broke Adabot

forest musk
#

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.

manic glacierBOT
prime flower
#

@solar whale I'm testing the RFM9x build in a few 🙂

manic glacierBOT
#

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...
#

@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'
manic glacierBOT
#

@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 'ad...
turbid radish
#

?serverinfo

digital shoreBOT
#
adafruit
Owner

adafruit#3230

Region

us-west

Channel Categories

8

Text Channels

54

Voice Channels

6

Members

24629

Roles

34

hybrid scarab
#

24k!

manic glacierBOT
#

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
>>>...
hybrid scarab
#

Well I just sat down and soldered a stacking header to the wrong board

raven canopy
#

@hybrid scarab no worries on Adabot! i'm fairly certain i've broken her more than anyone. 😄

manic glacierBOT
hybrid scarab
#

@raven canopy 😄

onyx hinge
#

@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?

hybrid scarab
onyx hinge
#

I mean, I'm kind of thinking it's worth having an alarm clock about this

raven canopy
#

@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".

onyx hinge
#

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.

hybrid scarab
#

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

lone axle
#

@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.

hybrid scarab
#

Aha

gilded cradle
#

@onyx hinge sure

hybrid scarab
#

Thank you @lone axle - I overlooked the obvious 😆

#

Right! Think I've got that right

onyx hinge
#

@gilded cradle thank you! I filled in "overall" for you

gilded cradle
#

Thanks @onyx hinge. That's good considering I don't even know where to get that info from. Circuitpython.org maybe?

lone axle
#

@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.

onyx hinge
lone axle
#

(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)

hybrid scarab
#

Thank you, I'm going to lurk a few before I start really participating 😄

gilded cradle
#

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

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 🙂

hybrid scarab
#

u u u ultra helpful

onyx hinge
#

monster helpful

surreal knot
#

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?

onyx hinge
#

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.

lone axle
#

Most devices that I would consider to be "an Arduino" are not capable of running Circuit Python though.

tulip sleet
#

Our Feather boards are specifically designed for use with LiPo batteries. They have a charger. They run CircuitPython

surreal knot
#

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

tulip sleet
#

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

surreal knot
#

What would be any advantage of using python on an arduino over the standard c or c++ that's part of the ide?

ionic elk
#

@hybrid scarab I did the exact same thing the first time I got an OLED featherwing. I felt dumb for a whole day.

hybrid scarab
#

@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!

crimson ferry
#

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 😉

bleak tiger
#

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

solar whale
#

@surreal knot It's purely a matter of choice. Some people prefer coding in Python.

ionic elk
#

@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.

surreal knot
#

Thank you all for the help!

ionic elk
#

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.

tulip sleet
#

@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.

modern wing
#

Good afternoon all you wonderful folks -- happily lurking today. I've updated the notes doc to reflect as such. adabot

inland tusk
#

@solar whale I think I lost my pythonista status

onyx hinge
#

@inland tusk here you go

inland tusk
#

thanks

modern wing
#

Loud and clear Jeff!

lapis hemlock
#

yep.

modern wing
#

Yepper

lapis hemlock
#

yeppest

lone axle
#

Thank you 🙂

tidal kiln
#

lurking

hybrid scarab
#

looks at time... 7PM :D

manic glacierBOT
#

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=...

ivory yew
#

👋

hybrid scarab
#

👋

turbid radish
#

Lurking

slender iron
#

brb

lone axle
slender iron
#

back

hybrid scarab
#

Ooo, nice!

lone axle
hybrid scarab
#

Releases tomorrow 😬

lone axle
#
turbid radish
lone axle
ivory yew
#

that is SO cool

turbid radish
hybrid scarab
#

😊

thorny jay
#

Microphone not tested, so if you don't hear me, it mean lurking.

hybrid scarab
#

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 😬

slender iron
#

@hybrid scarab do you need help removing the need for that library?

hybrid scarab
#

What's the preferred thing for examples across boards @slender iron? Comments, or individual examples for each specific supported platform?

slender iron
#

I prefer individual examples

hybrid scarab
#

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!

slender iron
#

but for boards with common busses like SCL and SDA then they can be cross-board

#

🙂

hybrid scarab
#

The pull-up detection on SCL/SDA confused me for a hot minute

#

Then I realised I hadn't even plugged the Enviro+ on.... 🙄

slender iron
#

heh, that'll do it

hybrid scarab
#

Friday streams? 🤔

turbid radish
#

Scott live streams usually on Fridays

slender iron
#

2pm friday pacific

turbid radish
hybrid scarab
#

😄

slender iron
#
  • usually
hybrid scarab
#

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

slender iron
#

if you have specific topics let me know. maybe I can point you to a relevant part of the video

inland tusk
#

I am lurking for status update

slender iron
#

@onyx hinge timecodes please

turbid radish
#

Be sure you read the newsletter for what's happened in the week

slender iron
#

that's what happens when I'm about to eat lunch...

#

gets hangry

hybrid scarab
#

@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

slender iron
#

👍

#

you may want to start from the start then

#

though one video is mostly I2C vs SPI vs UART

lone axle
#

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.

ionic elk
#

@mental nexus pics of your board?

#

we should put it in the docs

mental nexus
thorny jay
#

Is there going to be a mix of MIT + GPLv3 ?

#

LGPL.

ionic elk
prime flower
#

I really like this pdf, kmatch

lapis hemlock
#

@mental nexus are you listening?

thorny jay
#

Chess?

#

If chess fit into a bootsector, it should be possible on a CP MCU.

manic glacierBOT
silver tapir
#

lurking

mental nexus
#

@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.

lapis hemlock
#

Yes, I understand that, but at that time you also said that you would need views. More on this in the weeds.

mental nexus
#

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.

bleak tiger
#

I’ve been looking into bitmap manipulation too, the numpy example I’ve looked at uses np.meshgrid() is there an equivalent in ulab?

hybrid scarab
#

just idly throws a bunch of non-prefixed constants into a library with really long names 😆

bleak tiger
#

Don’t fully understand what it does yet!

lapis hemlock
#

@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.

mental nexus
#

Interesting.

hybrid scarab
#

Raspberry Pi HATs on a feather ... like Breakout Garden? 🤔

lapis hemlock
tulip sleet
thorny jay
bleak tiger
#

Ha, like the silk screen!

hybrid scarab
#

Haha, that's the sort of thing we silk onto protos 😆

#

(And sometimes final boards)

lapis hemlock
thorny jay
tulip sleet
#

no idea about the memory consumption

thorny jay
#

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.

mental nexus
#

🚀

hybrid scarab
#

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 😄

ionic elk
frosty prairie
#

OK, can anyone update me on micropython vs pycopy vs circuitpython + all dramas?

slender iron
#

What do you want to know?

#

CircuitPython is a beginner focussed fork of MicroPython

frosty prairie
#

Cicuitpython only supports SAMD? Micropython supports more?

turbid radish
#

@idle owl, sorry, this will be a large one too due to the MicroPython PR. I rearranged things a bit as a result.

slender iron
#

CircuitPython was originally started to add SAMD support. We now support many MCU families and 100+ boards

idle owl
#

@turbid radish No need to apologise. It's what we do.

manic glacierBOT
frosty prairie
#

I've read somewhere that cicuitpython project forked the upstream because of some quarrels...what were those issues?

ionic elk
#

@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.

tulip sleet
#

@frosty prairie SAMD21, SAMD51, nRF52, STM32<many>, i.MX RT10xx, Sony Spresnse

thorny jay
#

@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.

ionic elk
#

@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.

frosty prairie
#

@tulip sleet STM32F103? (Bluepill) and what about ESPs?

ionic elk
#

@frosty prairie STM32F103 is coming, but no bluepill, it's too small. Circuitpython can't fit on 128kb, needs 256 minimum

turbid radish
#

ESP32-S2

lone axle
#

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.

ionic elk
#

ESP32 lacks native USB which is considered a central part of Circuitpython (one of the priority differences from Micropython)

tulip sleet
#

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

thorny jay
#

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.

idle wharf
#

@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. 💚

manic glacierBOT
#

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_...
thorny jay
#

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.

slender iron
#

💯

#

configurable apis means that support documentation and tutorials will vary and confuse people

lapis hemlock
#

That's right.

thorny jay
#

Of course the documentation will match the piece that have been enabled or not...

lapis hemlock
#

I forgot to point that out.

hybrid scarab
#

Thanks all!

mental nexus
#

@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.

silver tapir
lapis hemlock
#

@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.

mental nexus
#

If I have an open issue on ulab I’ll go revisit it.

slender iron
thorny jay
#

@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.

hybrid scarab
#

Ooh yes actually trying the PM25 was next on my TODO list

thorny jay
#

I don't use them anymore... because I follow the meeting most of the time.

#

And read the notes live.

hybrid scarab
#

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.

thorny jay
#

It was my idea... if it is not in use, maybe we can remove it.

hybrid scarab
#

Digging the hot, hot pink teeshirt @slender iron

slender iron
#

thanks! I like wearing it on stream 🙂

thorny jay
#

@hybrid scarab the M0 you may want focus on text only example. Those could be the xxx_simpletest.py

hybrid scarab
#

Presumably all your whites being dyed a distressing shade of noncommittal pink is worth it 😆

thorny jay
#

Because they must be simple.

hybrid scarab
#

I'm not against having subfolders for each supported MCU and an additional dir for "contrib" or something

slender iron
#

I try to keep the pink shirt with colors. did have the pink issue with a big red beach towel once though

thorny jay
#

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".

slender iron
#

I don't like using comments because it assume people 1) read them and 2) know how to uncomment

thorny jay
#

This is how it is done in many libraries, and explained in learn guide.

hybrid scarab
#

The downside of multiple code examples is the sheer brunt of duplication

thorny jay
#

It is that or duplicating for each and every hardware (like displayio for non native screen).

hybrid scarab
#

It's a you're-damned-either-way sort of scenario

thorny jay
#

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.

hybrid scarab
#

I'd probably contrive something like a single example with pre-processing macros that p.... ahaha

slender iron
#

it's ok if the main code is simple

hybrid scarab
#

We have some examples- at least at the Enviro+ level- that are quite complicated, but then complicity sometimes begets board specitivity

slender iron
#

separate examples is an approach I took with eink stuff

thorny jay
#

@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?

hybrid scarab
#

You can also ask the board version and act accordingly

thorny jay
#

ask?

hybrid scarab
#

Basically what feather_pins does

slender iron
#

@thorny jay I'd just change the example. otherwise you won't actually save memory

thorny jay
#

Yeah, but that might break the learn guide and other people code.

slender iron
#

yup

hybrid scarab
thorny jay
#

But I could not find the right way, then I gave up.

hybrid scarab
#

Unfortunately board names are quite long!

slender iron
#

I never understood that library

#

board itself is board specific

hybrid scarab
#

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

thorny jay
#

"I was trying to say from X import Y as Z"

hybrid scarab
#

@slender iron I was pretty hands off with this first take on Feather stuff, so I never quite understood the reasoning behind it either

thorny jay
#

If a put 3 X 3 Y and 3 Z my message is eaten.

slender iron
#

any large chunks of code you copy between examples probably should live in a library anyway 🙂

hybrid scarab
#

Got an example of it not working @thorny jay?

#

@slender iron ha!

slender iron
#

(this is why we have board level libraries that do init for you)

thorny jay
#

@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.

silver tapir
#

@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?

slender iron
#

here to start maybe?

thorny jay
idle owl
#

@solar whale You around?

silver tapir
#

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" (...)

hybrid scarab
#

Ha "CleanFlight" and "BetaFlight", are some awesome tongue-in-cheek project names once you know their origin 😆 @slender iron

#

Missed opportunity for "SensiblePython"

slender iron
#

@silver tapir I think the memory print is just for debugging

#

not sure why you don't get usb

hybrid scarab
#

@half sedge I'm going to have to try running your code 'cos I can't see anything wrong at a glance

onyx hinge
#

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!

hybrid scarab
#

You don't still have adafruit_is31fl3731.mpy in lib when testing, do you?

thorny jay
#

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.

hybrid scarab
#

Ah!

thorny jay
#

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, ...

hybrid scarab
#

I hate that you can't submodule a class and avoid that extra level of indirection

slender iron
silver tapir
#

@slender iron I do if I change the firmware built from main, so I know I haven't messed up the cable or fs.

thorny jay
#

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.

hybrid scarab
#

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

thorny jay
#

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.

slender iron
#

@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

silver tapir
#

Will do. Just so that I can copy paste the full log in case there is something there.

slender iron
#

kk, thanks!

silver tapir
#

For now, I'll test the Pull[In/Out] stuff...

thorny jay
#

@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.

hybrid scarab
#

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

thorny jay
#

@hybrid scarab I'll also try to document the memory saving of splitting that way. I did not even check.

hybrid scarab
#

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

manic glacierBOT
hybrid scarab
#

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

thorny jay
#

Yes, that is what Scott suggested too... Have an IS31FL3731 library and then other library for each and every board that use that chip.

slender iron
#

I think separate repos are easier to find

thorny jay
#

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.

hybrid scarab
#

That's true- harder to maintain, but our burden is high maintenance cost in exchange for user-accessibility

#

CookieCutter is fun... /me hides

thorny jay
#

I am not the one that started to add more board to this library, I just followed the trend.

hybrid scarab
#

It's not wrong per se

slender iron
#

Adding things to existing libraries is a constant struggle for me. it's easier to do

#

but harder to find over the long term

silver tapir
#

@slender iron I don't see how to add issues to your repo. Let me know if you need any debugging or testing.

hybrid scarab
#

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 😆

slender iron
#

I agree with that

hybrid scarab
#

I write a lot of bad libraries so I tend to be predisposed toward junking them and writing new ones