#circuitpython-dev

1 messages · Page 1 of 1 (latest)

manic glacierBOT
onyx hinge
#

@tulip sleet which would work better for you, ~11AM ET or ~2PM ET?

tulip sleet
#

11 is fine

onyx hinge
#

OK, I should have most of my working knowledge back in my head ~75 minutes from now.

tidal kiln
tulip sleet
#

there is a bitbang impl in the library, but i kind of remember I couldn't get it to work properly

onyx hinge
#

@tulip sleet I'm in one of the voice channels if you're available

tulip sleet
#

sure, one minute

onyx hinge
#

wow it looks dark in here from the camera

manic glacierBOT
manic glacierBOT
#

The code to blink the LED via PIO is rather intense for a new learner like the ones CircuitPython is catering to:

https://github.com/micropython/micropython/tree/master/ports/rp2#pio-blinky

So I don't know if it's possible, but it sounds like there are two cases (Arduino Nano Connect and Pi Pico W) where this is probably desirable. Seems like board-specific code (in ports?) is a big part of what CircuitPython is doing to abstract away these complexities for new learners? I'm new to l...

onyx hinge
#

@tulip sleet did you find the "super never reset pin" stuff?

#

ah static const uint64_t pin_mask_reset_forbidden =

tulip sleet
onyx hinge
#

I'm thinking that it needs a set of definitions for the PICO (like feather v2), WROOM (feather v1) and WROVER, which will all be slightly different?

tulip sleet
#

or it could be conditionalized based on the sdkconfig settings (CONFIG_ESP_PSRAM... or whatever)

#

I would rather not get back into the WROOM vs WROVER module specification. I successfully removed that. It was wrong on a lot of boards

onyx hinge
#

OK I don't know what to do then. These two screenshots are from the wrover pdf and it seems to show that GPIO6..11 are used for the SPI flash. That's different than the PICO, isn't it?

manic glacierBOT
#

The code to blink the LED via PIO is rather intense for a new learner like the ones CircuitPython is catering to:

PIO for that is not going to work for the LED on the Pico W either, since it assumes a direct pin connection. The blinking has to be handled by the firmware on the wifi module, and corresponding software on the Pico side. So we have to make a duck-typing implementation of DigitalInOut for that "pin". And use of that "pin" for other purposes that it doesn't support, like inp...

#

Adding this as a draft because there are a number of unresolved problems. However, the repl comes up and the internal filesystem can be read on a feather esp32 "v1"

  • [ ] The pin reset stuff needs to be scrutinized, so that it can be right for feather v1 and v2 and for future esp32 boards. without reintroducing the wroom/wrover(/pico) distinction, which @dhalbert thinks was unhelpful and error-prone
  • [ ] need to determine why turning off spiram support breaks it. ("spiram enabled but op...
jaunty juniper
tulip sleet
#

@onyx hinge I wonder if turning off PSRAM completely changes something in the generated bootloader or expected partition table such that the partition table is invalid for the uf2? Maybe if we erased completely and loaded the .bin ??

#

hmm, no I think you were loading the bin anyway, but did you erase completely beforehand?

onyx hinge
#

no I don't generally do a full erase.

#

but "make flash" does replace/update the bootloader

#

it seems clear that the flash WORKS since the code can execute, it's something else spooky

#

but now I'm working on other thing 🙂

manic glacierBOT
#

Thank you for your patience. I apologize for my ignorance. I'm on day 2 of looking at python on these type of boards and most of that was spent fighting with building Mu locally so I could fix an annoying bug (can't seem to get it to build on my M1 MBP for some reason).

Yah, "LED" seemed like an easy of use definition - thanks for pointing me to the MicroPython code.

Interesting to read the pico sdk source that points down into a cyw43-driver project that doesn't provide source for th...

#

Thank you for your patience. I apologize for my ignorance. I'm on day 2 of looking at python on these type of boards and most of that was spent fighting with building Mu locally so I could fix an annoying bug (can't seem to get it to build on my M1 MBP for some reason).

It's a known bug on the Mu side with changing from PyQT5 to 6 in Mu's requirements. I had the same issue last weekend.

manic glacierBOT
manic glacierBOT
haughty ledge
#

Is it possible to run circuitpython on an ESP-WROOM-32 chip? I found a few different things online, but one of them recommended running some .sh scripts in the ports/espressif folder but the files aren't present

jaunty juniper
rough folio
#

Are there any library standards or designs for things with many many bitflags

#

the tmc2209 driver has 24 registers and some of them read out pretty complex bitflag sequences

#

for personal use I'm happy to just build and parse the ones I need but it got me wondering what would be needed to accept it into community libs

#

for example

manic glacierBOT
manic glacierBOT
tame creek
tulip sleet
rough folio
#

Suppose I should have mentioned it's UART but this should inspire some design, thanks @tulip sleet

#

Though I'm not too sure how applicable these designs are hmm

manic glacierBOT
#

IMG_8158

Almost everything working on Core 2, including the LCD, speaker, the green LED, vibration motor, internal I2C, and the grove connector.

The LCD on this device is an ili9342c, which is similar to ili9341 but has a few extra initialization commands.

The power management chip on this device is in charge of almost everything, even the green LED, the buttons and the vibration mo...

hidden rain
#

In order to create a new CPy module, written in C/C++ and compiled with CPy API, must I download the entire CIrcuitPython Repo (or fork thereof) and compile it, OR Do i merely use CookieCutter to create the Git Environment (etc) and just build only the module (which would of course require some CPy dependencies. ??? I know its a noobie question, but floating in a sea of info and not sure which direction to swim....

stuck elbow
hidden rain
#

Would it be best to fork the repo and then copy or just copy to my local. I do not intend on sumitting the entire fork back, merely the module extension.

stuck elbow
#

there is currently no way to have a module separate from the rest of the code, right now you would have to make it part of the main code, and make it disabled with a #define by default, and only enable it in the board definitions you want

hidden rain
#

I think CPy libraries (written in C/C++) are separate, since you can add the ones you want/need...

stuck elbow
#

they are enabled/disabled with variables in the board definition, but the source code is all in the main repository

hidden rain
#

So when I add a library to lib, its merely turning on the API?

stuck elbow
#

no, those are libraries written in python

#

the ones written in C are always built-in

#

sometimes a library might have a python part and a C part – like the stage and _stage in the example I linked

hidden rain
#

I guess that makes sense. The entire object code has to be there or it would require dynamic linking...

#

OK. So should I fork the entire repo for myself and then copy, or worry about all that another day.

stuck elbow
#

the workflow is generally: you fork the whole repo, clone it to your computer, make changes, compile, test, etc. then push it back to the forked repo, and make a pull request to the main repository

#

there might be some changes requested to conform to the structure of the other modules, but generally if it's disabled by default, getting it merged is not a problem

hidden rain
#

Ok. I read that somewhere. But I read so much my head is swimming with multiple things. Just got the build environment up on Vbox Ubuntu. may have gotten confused. Thanks for the clarification...

#

Now...on to forking...

stuck elbow
#

yeah, and it's not helped by the fact that micropython has several ways of doing external C modules

#

but circuitpython didn't use that

hidden rain
#

Glad you were around.. I hate waiting for all the regular experts on the weekend....I'll be back ...most likely when I fail to compile the repo

#

copt

#

y

stuck elbow
#

there is a learn guide on building

hidden rain
#

I have it.. along with 20 other links...i'm so impatient

stuck elbow
#

aren't we all

hidden rain
#

cheers!

stuck elbow
#

@lone axle in September I will be giving my talk about game development in CircuitPython again, do you have anything you would like me to mention in it?

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.0.0-alpha.1-57-gc105ec913-dirty on 2022-07-17; Raspberry Pi Pico with rp2040

Code/REPL

stepper_program = adafruit_pioasm.Program("""set pins, 0b00""")

sm = StateMachine(stepper_program.assembled, frequency=2000)

Behavior

Throws ValueError: init length must be 2-64

Description

init should be optional- and is, on cirpy 7, but it appears to have had validation added that expects it to not b...

manic glacierBOT
midnight ember
#

Aren’t triple quotes a way to comment out large sections of code? Why are they valid there?

rough folio
#

no, they're multiline strings

#

python doesn't have multiline comments

ornate breach
#

You can do multiline comments, there is just a very specific way to do it

rough folio
#

yeah this says python doesn't have multiline comments lol

ornate breach
#

No it doesn’t

#

Scroll down

rough folio
#

that's a multiline string optimization
but it's still a multiline string

#

if you parsed the ast or something you'd get a multiline string

#

cpython (wisely) just optimizes them away
it does the same thing if you were to just drop a 2 in there

#

but you wouldn't call 2 a comment

#

or, for example- ```
a = 2+2 """ the start of my multiline
comment"""

throws a syntax error
#

would you do this? no, not really- but it's still not a multiline comment

ornate breach
#

You’re not doing it right

#

Read the article

#

The syntax is very specific

rough folio
#

wot

ornate breach
#

Read the article

rough folio
#

I did
there is no specific syntax here

#

all it is is cpython optimizing orphaned strings away

#

"""x""" alone on an empty line would get optimized away as well

ornate breach
#

def add_stuff(a, b):
    result = a + b
    """
    Now we return the result, wee!
    Hurray! I'm so excited I can't contain
    my joy to just one or two lines!
    """
    return result```
#

Example from the article of block comment

rough folio
#
>>> def x(y):
    x = 2+y
    3
    """abcd"""

    
>>> dis.dis(x)
  2           0 LOAD_CONST               1 (2)
              2 LOAD_FAST                0 (y)
              4 BINARY_ADD
              6 STORE_FAST               1 (x)

  4           8 LOAD_CONST               0 (None)
             10 RETURN_VALUE```
#

is 3 a comment

ornate breach
#

It parses

rough folio
#

it literally is

ornate breach
#

Removing false statements

rough folio
#
>>> c = '''
def x(y):
    x = 2+y
    3
    """abcd"""
    # a comment
    """
    words
    """
'''
>>> print(ast.dump(ast.parse(c, mode='exec'), indent=4))
Module(
    body=[
        FunctionDef(
            name='x',
            args=arguments(
                posonlyargs=[],
                args=[
                    arg(arg='y')],
                kwonlyargs=[],
                kw_defaults=[],
                defaults=[]),
            body=[
                Assign(
                    targets=[
                        Name(id='x', ctx=Store())],
                    value=BinOp(
                        left=Constant(value=2),
                        op=Add(),
                        right=Name(id='y', ctx=Load()))),
                Expr(
                    value=Constant(value=3)),
                Expr(
                    value=Constant(value='abcd')),
                Expr(
                    value=Constant(value='\n\twords\n\t'))],
            decorator_list=[])],
    type_ignores=[])
>>> ```
#

notice how the comments are removed

#

but the multiline string literals are not comments

#

I can't imagine a scenario in which you couldn't use multiline strings as comments excluding accidentally docstringing but they're still not comments

ornate breach
#

I mean, people do use them for block comments right wrong or indifferent

rough folio
ornate breach
#

Also Python creator endorsed multi line literals as comments

#

“Python tip: You can use multi-line strings as multi-line comments. Unless used as docstrings, they generate no code! :-)” (Source)

rough folio
#

I found out recently groovy which is some java fork thing has both multiline strings and a cool syntax-method to handle indents in multiline strings

#

which are largely a disaster in python

ornate breach
#

To be fair, Python was a mess for… a long time

rough folio
#

oh actually textwrap.dedent doesn't have the behavior I thought it did

#

problem ofc being how

def x():
  """multiline
string"""

is how you have to write it out if you don't want "multiline\n string"

#

groovy solves this via

  """multiline
    |string""".something()```
ornate breach
#

Interesting

#

I haven’t touched Java… in like 2 years lol

rough folio
#

but python has


  x = """multiline
     string"""
  x = textwrap.dedent(x)
#

yeah I've just taken over the jenkins pipelines at work so I've had to get familiar with it

ornate breach
#

Eh.. I dislike Jenkins. Jenkinsfiles are not really intuitive

#

Once you know how to use them, great. Learning them is another story

rough folio
#

their newish declarative pipelines are relatively akin to the yaml thing everyone else is doing

ornate breach
#

Yeah, I’m unfortunately familiar lol

rough folio
#

but it still has some very obtuse syntax and you need to dip into script blocks

#

and then blue ocean doesn't display a bunch of things correctly and really it's been a whole thing

ornate breach
#

Yeah.. anyway not too get the dev chat off topic, should probably move this to #general-tech

rough folio
#

Lel
probably

lone sandalBOT
orchid basinBOT
orchid basinBOT
manic glacierBOT
#

CORS (Cross Origin Resource Sharing) has the browser do a "preflight" unauthenticated request using OPTIONS before it sends authenticated requests. This PR makes the web workflow respond to OPTIONS requests for /fs/ and /cp/ urls regardless of the authentication.

ok_hosts are tested ignoring the port.
"127.0.0.1" is added to the list to share a little bit of code.
"localhost" is added to the list.

Host compar...

hidden rain
#

I have a build environment and have built the latest vanilla build and loaded it successfully. Now I would like to create a test API in my private build to make sure I have the process and technique down. Any suggestions or guidance on this 'next' step?

onyx hinge
hidden rain
#

Good starting point! I think I'll try to create a Fibonacci API, very basic, easy to test. This will ensure I have the process down before moving to the more complicated feature. Thanks!

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

I don't think the _origin_ok method does what one might expect. From my earlier testing it seems the "origin" passed in isn't the source of the request but rather the token (mdns name, dhcp name, ip address, etc) used to reach the microcontroller. So I really don't think there's much value in validating it against the hostname returned from common_hal_mdns_server_get_hostname. If the origin variable is some random hostname the traffic won't reach the microcontroller anyway. The same goes for ...

manic glacierBOT
#

Origin is the cause of the request sent from the client.
It is what is in the address bar of the browser when the page makes a request to the server.

  • If you are on the page of the workflow, say http://cpy-123456.local, the ajax requests (fetch in javascript) will have that address as Origin.
  • If you are on http://code.circuitpython.org, the requests will have that address as origin.
  • When I run a page on my own computer that is on 127.0.0.1 and does a fetch to the microcontrolle...
manic glacierBOT
#

Thanks for the explanation, your first example is what I had seen and led me to the conclusion that target would have been a better name than origin, however I did not understand the fetch behavior. My experience thus far has been simply accessing the microcontroller presented workflow page and the "origin" in that case has always been the address or logical representation (dns, dhcp) of the microcontroller, I guess because the microcontroller is hosting the javascript that is actually perfor...

manic glacierBOT
manic glacierBOT
willow totem
#

Stumbled upon this while searching to see if anyone has done an SSL server. Very interesting reading thanks @viscid pine, especially the further dns-rebinding attack and reliable webRTC ip leak (wifi password theft via B&O Speakers). An oldy but a goody 🙂

manic glacierBOT
#

In the raw REPL, all usual output (such as echoing back characters) is stopped. This should probably include the status bar, since otherwise there's no way for a GUI like Thonny to differentiate between output from the code it executes remotely, vs the status bar changing.

(This is separate from whether the regular friendly repl's status bar updates will confuse Thonny; in that case, it'll be up to Thonny to show or suppress the status bar updates as appropriate)

Note: I only compile-te...

subtle marsh
#

how i create a ap local host with a pico w?

jaunty juniper
subtle marsh
#

😦

#

there is no lib like wifi?

#

i can illtal that module?

jaunty juniper
#

you can program with the pico SDK or Micropython to use the the wifi module

subtle marsh
#

yeah but micropython

#

i did't see any ducky there

#

i have programed in mricro

#

a remote control with request

jaunty juniper
#

or use an ESP32-S2 board like the QT PY ESP32S2

subtle marsh
#

i cant buy anything now

#

but i cant install wifi module?

#

if i buy a sd card module i can put libs in there?

jaunty juniper
#

the wifi module of the pico is not supported in Circuitpython yet

subtle marsh
#

ok

#

and if i buy a sd module i can put lib there and use?

lone axle
stuck elbow
jaunty juniper
lone axle
#

Oh neat, this is the only one I've seen so far. It's definitely got some clunkyness that took some getting used to. I ended up using the JSON exported format from it for the CircuitPython library.

stuck elbow
radiant trench
#

Does anyone know of any good guides for how to contribute code to the CP repo? I'm not an expert (have some basic git knowledge) in these things. I assume I have to create a branch and then do a pull/merge request? If I have the right terminology I can probably google it 😄

#

@slender iron do you have any recommendations for hardware if I want to test web workflow? I'm guessing the Feather S2 or S3 would be a solid bet?

lone axle
# radiant trench <@252717193496756235> do you have any recommendations for hardware if I want to ...

I have used the Feather ESP32-S2 TFT https://www.adafruit.com/product/5300 the built-in display is quite nice because it shows the IP address to access the device from the browser with.

radiant trench
#

That would be a nice one for sure, looks like I can get it in the UK via PiHut (currently in the airport and forgot my hardware and will be stuck in the UK for two weeks so I need something to play with!)

manic glacierBOT
proven garnet
#

@idle owl I'm good to support those adabot changes if you're down to do them today/tonight. I'm out for a week starting Saturday but expect to see anything not working as soon as the job to update the website runs so 9:15 am Tuesday 😁

radiant trench
#

Hardware will probably be a couple of days, but I'm going to need some advice on how to build libraries and stuff from my local repo.

idle owl
tulip sleet
proven garnet
#

And add them to the CircuitPython website

idle owl
onyx hinge
#

@idle owl do you know if there's a fritzing for the 128x32 OLED with Stemma QT? I only see ```./parts/Adafruit 128x32 Pi OLED.fzpz
./parts/Adafruit OLED Monochrome 128x32 I2C.fzpz

onyx hinge
#

dang.

#

adding it is not a road I want to go down alone

idle owl
#

Liz or I would do it.

tidal kiln
#

./parts/Adafruit OLED Monochrome 128x32 I2C.fzpz ?

idle owl
#

So it's not STEMMA.

onyx hinge
#

any good way to fake it?

idle owl
tidal kiln
#

yah...doesn't look like the stemma connector is done up in the fritz

blissful pollen
idle owl
tidal kiln
#

./parts/Adafruit OLED Monochrome 0.91in I2C with STEMMA QT.fzpz maybe?

idle owl
# onyx hinge any good way to fake it?

You would drag wires out of the STEMMA connector on your board, make sure they are, on the opposite end, in the proper order so if a STEMMA connector was present, it would be accurate. Make them disappear under the display part.

#

I'll make it.

#

This is silly.

#

If something about it turns out to be bonkers complicated, we'll fake it.

#

But it should take me 20 minutes.

proven garnet
# idle owl Oh right, ok. Yeah. Please send me links again so I don't have to dig. Thanks!
GitHub

Uses a version of the code I made for tools/ to better check the RTD docs build status and GitHub Actions CI status. Hooks into adabot the same way as all the other checks so circuitpython.org get...

onyx hinge
#

@idle owl really appreciate it, thank you!

tidal kiln
#

is it that one?

idle owl
#

Um...

#

No.

#

It's. close

#

Wait

#

yes.

#

No idea what the black thing is

#

but there you go

#

STEMMA connector included.

#

Good sleuthing, @tidal kiln!

tidal kiln
#

it's the oled ribbon connector 🙂

idle owl
#

Ohhhhhhhh

#

uff. Should have been grey. lol.

#

Anyway. @onyx hinge There you go!

#

@tidal kiln What's it named?

#

Because I didn't see it when searching.

onyx hinge
#

yay

#

what is the filename?

proven garnet
tidal kiln
idle owl
onyx hinge
#

yay

#

and the wires end up going straight because it's a top connector to a bottom connector? I was confused for a sec

onyx hinge
#

@idle owl sniff test?

idle owl
#

You're not connected to the other leg of your button

onyx hinge
#

oops

idle owl
#

Send me the fzpz file, and let me show you how I'd do it. Easier for me to do that than to try to explain.

#

OR fzz file, whatever it saves as.

onyx hinge
#

OK -- I corrected the button & moved the kb2040 to the same spot so all its connections turned green

#

I'm going to be AFK a bit to eat before the meeting, this can wait for the afternoon if it's better for you.

#

thanks for being willing to help me with this stuff I don't know well though

gilded cradle
#

@tulip sleet it looks like you're running the meeting according to the meeting notes doc. I have a dr. appt and I've added my notes, but will likely be late to the meeting.

idle owl
tulip sleet
gilded cradle
wanton latch
#

Hi guys. I'm the author and maintainer of tio. I see that tio is starting to gain some popularity in your community. If you have encountered any issues using tio feel free to let me know and I will try fix it. Thanks.
https://github.com/tio/tio

GitHub

A simple serial device I/O tool. Contribute to tio/tio development by creating an account on GitHub.

wanton latch
#

@idle owl Thanks.

random junco
#

@wanton latch I just installed it this weekend and becoming a big fan, thanks for tio!

wanton latch
#

@random junco Thanks. I'm glad you like it.

stuck elbow
wanton latch
#

Thanks. I'm just trying to create a simpler but modern alternative to the old serial clients we all know and love.

stuck elbow
#

@idle owl did you mean to put that in hug reports?

jaunty juniper
#

I love tio but I changed the shortcut to ctrl-A on mine, easier to type with one hand with my small hands 😛

wanton latch
#

Also, make my own daily work easier ha ha

idle owl
#

Thank you.

wanton latch
#

@jaunty juniper At least now it is configurable 😉

stuck elbow
#

old habits die hard

idle owl
#

@wanton latch It's all I use now. I haven't run into a single issue yet, or anything that trips me up. I used screen before that, and everything that annoyed me about screen is not present in tio.

jaunty juniper
#

ah I need to update then, amazing 👍

wanton latch
#

@idle owl Fun fact, I created tio exactly because I used to be a screen user but then I became a tmux (screen alternative) user and it started to seem a bit silly to start screen in a tmux session. tmux + tio is my recommendation 😉

idle owl
wanton latch
#

he he

stuck elbow
#

tmux is evil

jaunty juniper
#

you know I just want a good serial tool that lets me scroll back up on my own term(s) ! 😉

wanton latch
#

Yeah, if you only used to use screen for serial access then you will happily live on without tmux 🙂

stuck elbow
#

also, lilo was better than grub

wanton latch
#

@idle owl Warning, if you start using tmux you will never turn back. It is so easy for terminal management.

stuck elbow
#

ctrl-a space is pretty much built-in into my hands

wanton latch
#

@jaunty juniper Exactly, tio does not do any buffer management. That is left for whatever terminal (gnome-terminal, tilix, kterm, etc.) you use.

#

@stuck elbow ctrl-b q is your friend in tmux 😉

stuck elbow
idle owl
#

I read that as ctrl+bbq.

wanton latch
#

@idle owl Mmmm BBQ!

#

This is why tmux is soooo good!

#

finger licking good!

stuck elbow
#

the scroll mode sucks, though

wanton latch
#

Don't know what to tell ya. Yes, tmux uses different keys. One just have to get used to that.

lone axle
onyx hinge
#

@wanton latch I love tio, it's nice to see you drop in!

#

I haven't looked at the latest updates, but one "would be cool" that I considered at one time is if you could pass in a quoted wildcard to tio and it would expand the wildcard each time it looked for a device. This would be nice if I had a bunch of boards that differed by serial number and used /dev/serial/by-id

wanton latch
#

@onyx hinge Thanks. I stumbled across this community because someone hinted me this video:
https://www.youtube.com/watch?v=gAs45AOycrg

#circuitpythonparsec
Check out 'tio' the Serial IO tool for any operating system that makes it painless to debug your microcontroller, even when resetting or power cycling your board.
https://github.com/tio/tio
To learn about CircuitPython: https://circuitpython.org

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

---------------------...

▶ Play video
#

@onyx hinge I think the shell completion kind of supports that.

onyx hinge
#

<@&356864093652516868> We'll be having the weekly meeting in about 1 hour, so it's a great time to add your notes to https://docs.google.com/document/d/174YocaomvHHy4OktyspTOISd3ynNpG6PWtLDBT4hd2c/edit?usp=sharing -- see you in the voice channel at 2PM ET.

slender iron
#

@wanton latch any thoughts about adding websocket support?

onyx hinge
slender iron
#

(and thanks for tio!)

#

@radiant trench you all set with hardware? I'm just online now

wanton latch
#

@slender iron That could be done. I recently added network support so it could become an extension of that.

slender iron
#

nice! so network is something like telnet?

wanton latch
#

@slender iron Exactly, if you see the man page there is an example how to connect using e.g. nc.

slender iron
#

👍

wanton latch
#

This way you can share your tty or use it for interactive scripting etc. Very flexible.

slender iron
#

I've added websocket support to circuitpython so it is available from the browser as well

wanton latch
#

@slender iron Do you have en example of the web page output somewhere?

onyx hinge
slender iron
wanton latch
#

@onyx hinge What I mean is, if you start writing tio /dev/se... it will quickly autocomplete to /dev/serial/by-id/ and from there you can quickly autocomplete to your boards id filenames

slender iron
stuck elbow
onyx hinge
#

@wanton latch do you have any interest in seeing github actions added to tio, so that the branches are tested to compile over some set of platforms? It's free for public github projects, and I've implemented github actions for a number of projects in the past.

wanton latch
#

@onyx hinge Right now we simply do circleci for one platform.

low sentinel
#

til about tio
I cannot wait to use this - I was looking for basically exactly this a few years ago. Thank you! ♥️

#

an rc file? I am not worthy of this luxury

wanton latch
#

@slender iron I can see this feature working in the future: tio --socket ws:1234 /dev/ttyUSB3

#

I'm putting it on the todo list.

#

@low sentinel Great, because tio have been looking for you too! 😉

slender iron
#

(web sockets are weird because they start as http and then onto a websocket specific protocol)

wanton latch
#

@low sentinel Oh yeah, I'm very happy about the recently added configuration file support. It is so flexible, especially if you have different boards and want custom serial configurations for each. Simple but very useful.

#

@slender iron My tio command will simply host the tty I/O via websocket protocol on port 1234

#

Then you can connect any way you want.

slender iron
#

ah! that's the opposite of what I'm talking about

#

using tio to connect to a websocket from a cp device

wanton latch
#

No no no, sorry. That will never happen. Tio is a serial client, it's sole purpose is to connect to serial devices. From there it can forward I/O to file or network sockets and maybe websocket in the future. For what you want you use a different tool like websocat.

#

I mean, a tool can do too much 😉

slender iron
#

It's good to know the bounds of what you want to do. 🙂

#

100%

trim elm
jaunty juniper
#

@slender iron speaking of web workflow, what do you think of webdav support ?

slender iron
#

@jaunty juniper I saw your issue but haven't circled back to it yet. I need to re-look at webdav to understand how much more code it'd be.

#

I didn't realize there was broad support for it

jaunty juniper
#

yeah it's a few more commands than GET/PUT but we can probably ignore some of them

slender iron
#

I'm worried about the space for it but would be open to adding it if we could figure it out

onyx hinge
tulip sleet
idle owl
#

But, exactly what Dan said, too.

onyx hinge
#

OK. One photo I need to re-do anyway, I had something extra stuck in for no good reason

manic glacierBOT
idle owl
#

Jerry!

solar whale
#

👋

modern wing
#

[happily lurking 🙂 ]

blissful pollen
#

Cannot attend today 😦

idle owl
#

Foamyguy.

radiant trench
slender iron
#

great!

turbid radish
#

😊

lone axle
modern wing
#

Progressive Field in Cleveland, OH has a capacity 34,788.

So we can fill that entire stadium 100%, while needing a little bit more space. 🏟️

slender iron
#

probably blues wireless

idle owl
#

Yes it's Blues

onyx hinge
#

@slender iron where do creation IDs "come from"?

slender iron
#

I made them up

#

so there are repos to allocate "creator ids"

onyx hinge
#

so we get to allocate the numbers however we like? do they need to not collide with USB VID/PIDs that are allocated?

slender iron
#

and then the creators manage the "creation ids"

#

ya, it is defined as a superset of USB VID/PID

#

I had grand plans to use the creation ids for open fpga peripherals too

onyx hinge
#

Nabaztag (Armenian for "hare", նապաստակ (napastak)) is a Wi-Fi enabled ambient electronic device in the shape of a rabbit, invented by Rafi Haladjian and Olivier Mével, and manufactured by the company Violet. Nabaztag was designed to be a "smart object" comparable to those manufactured by Ambient Devices; it can connect to the Internet (to downl...

#

looks like something N&P could make a 3d printable version of. I think they haven't been made for a decade

thorny jay
#
Instructables

Nabaztag:tag : Installation De La Carte TagTagTag Pour Nabaztag:tag / Installing the TagTagTag Board on Your Nabaztag:tag: (see below for English version)Bienvenue et merci de participer à la resurection des Nabaztag !Ce tutoriel concerne les lapins V2, c'est-à-dire les Nabaztag:tag (et non Nabaztag). Pour reconnaitre un Nabaztag:tag, c'est simp...

stuck elbow
#

btw, you can tag projects on pypi with micropyton tag

#

or you can ask them to add a circuitpython tag

gilded cradle
#

@tulip sleet I'm back and can read my status updates

idle owl
stuck elbow
#

oh, sorry then

idle owl
#

No worries! Thanks for thinking of it.

#

They're tagged with CP and MP.

slender iron
mental nexus
#

Drywall…ugh

slender iron
onyx hinge
#

@lone axle @mental nexus do y'all have a datasheet for this dot clock display? I am wondering what the datasheet says about refresh rate & clocking, for the partricular display you're using.

lone axle
#

oh, nice. This is definitely more in depth

mental nexus
#

Was lucky to find this on “panelook.com”, thanks to madbodger for connecting me to that website.

onyx hinge
#
    return 250;
}
#

the equivalent of this

onyx hinge
onyx hinge
#
def refresh(self, *, target_frames_per_second: Optional[int] = None, minimum_frames_per_second: int = 0) → bool```
mental nexus
#

Thanks for the clarifications, makes a lot more sense now.

onyx hinge
#

Thanks Dan! Lovely to catch up with you all.

thorny jay
#

Longest meeting in a long time. 🙂 Thank you all.

mental nexus
#

Thanks all!👋

stuck elbow
#

thanks

modern wing
#

Thanks everyone!

gilded cradle
#

thanks

ember iris
#

thanks all!

manic glacierBOT
#

Re-tested CircuitPlayground Express with the latest changes. Size now looks much better, the increase was 148 bytes and performance was on a par with main. I built some boards with CIRCUITPY_FULL_BUILD = 0 (itsybitsy_m0, metro_m0_express, and qtpy_m0) and all saw reduced code sizes. The difference with CircuitPlayground Express looks to be due to it being a full build. An itsybitsy_nrf52840_express build (which is also a full build) was 208 bytes larger.

lone axle
#

Thanks everyone 👋

modern wing
#

Now time for lunch 🙂

solar whale
#

Thanks -- have a great week all!

blissful pollen
#

I'm sad I have been missing most of the meetings lately. Sadly working does give me money to spend on electronics

manic glacierBOT
onyx hinge
#

oops I took off my headphones but forgot to leave the voice channel

#

I hope my mic was off 🙂

mental nexus
#

@lone axle what Scott mentioned about pulling dotclockdisplay and putting it down in the ports/Espressif…. Rather than figuring out the tree to make that work, this is one of the hacks I used to “just get it to work” and left this to deal with later. One related example I know of is ParallelDisplay module where a lot of ports raise “NotImplemented”.

#

Can’t remember if I included this in the ToDo list on the issue.

lone axle
#

I've made a note to work on moving it over. I'll look into that one to find the necessary fallback for other ports.

jaunty juniper
#

oh Adafruit_CircuitPython_Pixelbuf doesn't have the same signature as the builtin

slender iron
#

other ports shouldn't try to build it

#

@gilded cradle going to eat lunch now. 1pm work for you?

manic glacierBOT
idle owl
#

@inland tusk I disconnected you from the voice channel to avoid any surprises.

radiant trench
# thorny jay Longest meeting in a long time. 🙂 Thank you all.

I actually posted a reply in this group as the meeting started (you can see it on the YouTube reply) and I was able to join for the last couple of minutes of the call. In the middle I flew from the Netherlands to the U.K. AND drove from the airport to our family home 😂

tulip sleet
#

Here is the notes document for next 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>

Welcome to the CircuitPython Weekly meeting notes! Feel free to add your Hug Reports and Status Updates early. During the meeting, we go through them as a round robin sorted by username. If you can’t make the meeting and would still like to participate, add your notes with a “(missing meeting)” after your username and we’ll read them off for you.

Add any longer-form discussion topics or general questions you have to the “In the weeds” section.

Thanks! We hope to see you in the meeting!
https://docs.google.com/document/d/1NX3NLArhourMkBpuPxREEFkv1-wVkLUJixBwGvU-eKY/edit?usp=sharing

radiant trench
tulip sleet
#

how long was that flight 🙂

radiant trench
#

Did the voice chat go on a little longer after the official call ended?

tulip sleet
#

nope

radiant trench
#

That’s really weird then because the overall journey was about 2 hours

#

I mean I know the U.K. is an hour behind Europe but I don’t think that’s how any of that works 😂

unique python
#

are meetings usually streamed on Youtube? I thought it was only the voice channel..

lone axle
#

There is an intro section that happens before the recording begins. If you listened live at the beginning you may have heard that but it won't be in the recorded version.

tulip sleet
#

not streamed, just recorded and then posted

lone axle
tulip sleet
#

the meeting started at 1800 UTC and ended before 1900 UTC

unique python
#

I see... thank you both! I'll try to listen some time!

hidden rain
#

I have my build environment for the rp2040, the Simple 42 template and mymodule/myclass renamed (both fibonacci). From CPy, I would like to call an interface to establish the fibonacci class instance, then call an interface to calculate N values, retrieving the sequence of values. This is merely a dry run to see that I have the process down (prep for ADC-DMA). Any advice on how to augment the template (api) to achieve this goal or otherwise?

tulip sleet
hidden rain
#

So other than renaming mymodule and myclass in files in shared-module and shared-bindings folders, the real implemetation is in common-hal. OK. So far I built the latest (vanilla) build and tested the UF2 on my Pico. You guys have made things very straight forward....

manic glacierBOT
slender iron
#

@hidden rain implementation is in shared-module for port-agnostic implementations or common-hal of a particular port

hidden rain
#

I suppose since I am ultimately creating an ADC-DMA module it might only be available for DMA enabled boards and each may have independent implementations. I'm only going after the RP2040 for now.

#

Will attempt to keep API generic enough for others.

slender iron
#

yup, those modules are generally shared-bindings and common-hal then

manic glacierBOT
hidden rain
#

ok, Ill check back when the compile fails or the API fails... Everything so far is straight forward, but I'm sure I will run into the rough soon enough.

tulip sleet
#

you could make the routine return some dummy values for now, just to make sure the linkage is working

slender iron
#

@tulip sleet should we publish the "other chip families" page in the deep sleep guide?

hidden rain
#

404 error

slender iron
#

ya, 404 for folks who aren't authors

#

we should publish it though 🙂

tulip sleet
#

I have no idea how accurate it is

#

I guess we could publish it and wait for complaints 🙂

#

Does the RP2040 info make sense to you?

slender iron
#

let me read over it

#

did lucian write it?

#

ya, the rp2040 looks ok to me

#

using the cp bluefruit doesn't do the nrf52 justice

tulip sleet
#

yes, I think Lucian wrote it

#

i don't remember why it wasn't published at the tim

slender iron
#

I think it could be neat

#

but it should say the exact setup and CP version used

#

may be worth including pics/diagrams of using ppk2

#

¯_(ツ)_/¯

tulip sleet
slender iron
#

yup

manic glacierBOT
#

Yeah it needs some good low-level sleuthing, and Dan's right that doing a thorough comparison of the sdkconfig with a "known good one" (could be arduino or micropython) would be a good idea

That said, I didn't expect this thing to bootloop for you, since it worked for me on a 4MB flash / no psram Feather ESP32. Having (A) a legible picture of the metal enclosure of the ESP32 module from your Feather and (B) any output that is shown on the TX pin of the module (at 115200 baud) might be help...

crimson ferry
#

Probably answered long ago, but... There is no explicit wifi disconnect(). You can disconnect by using either wifi.radio.enabled = False or wifi.radio.stop_station(). The .enabled property will affect any current Station or AP. start/stop``_station()' and start/stop``_ap()can be used independently of.enabledto change whether a device "mode" is a Station, AP, both, (or none). i.e., Station and AP can be started and stopped when wifi is enabled or disabled, and "mode" will survive an.enable = False. This gives a lot of useful flexibility in adjusting the mode (and various other wifi.radio.` properties), whether or not wifi is active. /cc: @jaunty juniper

onyx hinge
#

@crimson ferry Thanks. I think the question became moot but I appreciate the detailed answer.

#

I wanted a way to simulate some of the things that happened to wifi when the interpreter reset, but I worked around the problem with just a few more CP rebuilds than I might have needed otherwise.

manic glacierBOT
#

Hey, how about Webdav ?
I don't know much about it, except that it uses http. It would be nice to have some minimal implementation of it, if that doesn't require too many additions. That would allow accessing the files with a file manager application like Cyberduck, and use editors like VSCode, PyCharm, etc. maybe even mount as a drive on the computer (and run circup, why not).

Please open a separate issue for it. I think it'd be good to have a list of clients we want to support. That...

manic glacierBOT
#

Can it be spoofed from a browser? My hope was to make it harder for malicious websites to get local CP info. I don't care about custom HTTP request clients.

Maybe not, I'll admit I don't know much about that aspect of browser security, I think it's meant to protect against malicious pages that run a in a regular browser, so it's probably a good thing to have. But for example I can't share a demo of the installer by putting it on my website, one would have to download and run it from 127....

#

(apologies, was traveling on vacation and taking a break from email)

@Billy-Bogardus https://github.com/Billy-Bogardus - like Scott, I don't
use a fancy/graphical IDE; I tend to work from the command-line, and do my
editing in Emacs. emacs does have a system called "etags", where you can
feed it a bunch of code, and it sort of semi-parses it, and creates a
database of where various symbols appear to be defined. Then you can do
things like point at a symbol and give commands like "take m...

slender iron
#

whoa 1441792 bytes used, 0 bytes free in flash firmware space out of 1441792 bytes (1408.0kB).

manic glacierBOT
#

It would be nice to support some native clients in the web workflow.
Since we already have a web server, we could add (some of) the Webdav extensions to it.
That would allow accessing the files with a file manager application like Cyberduck, even mount as a drive on the computer (and run circup, why not). This in turn allows editing the code with our editor/IDE of choice, some of them might even directly support webdav.

It might not be necessary to support all of the commands, the [nginx...

lone sandalBOT
tulip sleet
slender iron
#

reminds me "googlewhacking" where you got one result

#

unfortunately that 0 is without my change...

tulip sleet
#

I made a build be -Os instead of -O2. can't remember which one, very recent. Really helped a lot

slender iron
#

ya, s3_tft

tulip sleet
#

bingo

slender iron
#

I did it for s3_4mb just now

manic glacierBOT
#

If by "Terminal" you mean the mac terminal program / command window, I don't have a mac to test on. I only tried xfce4, a standard-ish terminal on Linux, based on the list of ANSI escape codes at https://en.wikipedia.org/wiki/ANSI_escape_code#CSI_(Control_Sequence_Introducer)_sequences (though I was reading a different reference the wikipedia codes match)

If it's not widely compatible then we can just close this up, I'm not a terminal expert.

manic glacierBOT
manic glacierBOT
#

This shows up over the the usb serial, I didn't see any output on the rx/tx pins.

 rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
 invalid header: 0xffffffff
 invalid header: 0xffffffff
 invalid header: 0xffffffff
 invalid header: 0xffffffff
 invalid header: 0xffffffff
 invalid header: 0xffffffff
 invalid header: 0xffffffff
 ets Jul 29 2019 12:21:46

![IMG_20220725_205925802](https://user-images.githubusercontent.com/29083569/180900262-0...

manic glacierBOT
#

The failure to boot with the "invalid header" messages is something I've seen before but I remember when or what fixed it for me.

can you erase the whole flash with esptool erase_flash and then flash it again?

what flash line are you using? It should be similar to

esptool.py --chip esp32 -p $(PATH) --before=default_reset --after=no_reset --baud 921600 write_flash --flash_mode dio --flash_freq 40m --flash_size 4MB 0x0000 build-adafruit_feather_esp32_v1/firmware.bin

Flashi...

manic glacierBOT
#

The latest build is working much better on the Feather ESP32-S2, If the REPL is displaying the message Press any key to enter the REPL. Use CTRL-D to reload. the web workflow seems to work fine. :1st_place_medal:

However, if I'm at the >>> REPL prompt or a python program is running the workflow is unresponsive.

Flash I/O no longer has any impact on moving the web workflow forward, however it seems that if the circuitpython code performs internet requests the workflow will move forwar...

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
viscid pine
#

whoever made the terminal title customized, nice work!

warm stump
#

https://github.com/TheMindVirus/macropad/tree/archive/sketches/StopwatchTimer - needed something to take both Formula Technic lap times and Raspberry Pi boot times
supervisor.disable_autoreload() works for when you save the file but not when you press Ctrl-D in PuTTY or when there's a USB host error which happened a few times during testing
another name suggestion for Bells, "Icicles"...like Atmel-ICE and plenty of frozen modules...

midnight ember
#

I think tannewt was talking about adding more display info to the titlebar during the weekly meeting. As long as you know which device is on which IP it's a great way to say more with less about the device identifier.

manic glacierBOT
slender iron
#

@jaunty juniper want me to finish your extensions PR? it's hitting a bunch of conflicts as people add more boards

jaunty juniper
#

ah, I'll look into it

stuck elbow
#

so, I don't suppose there is a stream version of zlib.zlib_decompress hidden somewhere, is there?

#

because it looks like we could add PNG file support really easily

manic glacierBOT
stuck elbow
#

or am I missing something?

tulip sleet
stuck elbow
#

oh well, I will try with just bytes, should work for small images

tidal kiln
#

@idle owl (not urgent) please ping me when you got a sec to help out with a new CP lib setup thing

tidal kiln
#

hey! just looking to bring in a brand new library.

#

haven't done one in a while, so want to check process.

#

it's living in personal repo for now

#

could just transfer it over? or other?

idle owl
#

@tidal kiln I'm assuming you used cookiecutter to generate it?

tidal kiln
#

yep

idle owl
#

Then, yes, you should be able to transfer it directly to Adafruit org. If you have issues, transfer it to me and I'll transfer it to Adafruit. Can't remember who had that issue before or why, but it was a thing at some point.

tidal kiln
#

transferring....what teams need access? CP and CP libs?

idle owl
#

CPLibians only.

#

Write access.

tidal kiln
manic glacierBOT
tidal kiln
#

oops. forgot to merge the dev branch first.

devout jolt
#

I'm playing with the web workflow on ESP32C3, from current main branch. Is the serial REPL supposed to be janky/laggy? Seems to freeze up regularly. I was able to get it up enough to write a .env file and am now in the web interface, with web-based serial REPL but USB TTY serial REPL connects but doesn't respond

stuck elbow
#

can be further improved, of course

devout jolt
jaunty juniper
#

it doesn't happen when there's a dedicated serial chip

orchid basinBOT
manic glacierBOT
idle wharf
idle owl
#

@tulip sleet When you suggested adding the ESP32-xx purple LED to the CircuitPython Installation page (along with the install UF2 bootloader page)? You called it "CircuitPython Quickstart", and I don't see any pages called that. There is certainly not a template called that.

tulip sleet
idle owl
#

Oh, I never would have found that.

#

OK.

tulip sleet
#

is that non-standard?

idle owl
#

No, it's standard, but I was looking at page titles, not headers.

tulip sleet
#

I tried to edit it, and saw it was a template. I looked at the section header by mistake, sorry

idle owl
#

I'll add another template area to the templates because including it hard-coded into the template would be confusing for other boards.

#

On it.

tulip sleet
#

I did this Google search to find it because I couldnt remember:

site:learn.adafruit.com "circuitpython quickstart" "esp32"
idle owl
#

Ah nice

#

@tulip sleet "For this board, tap reset and wait for the LED to turn purple, then tap reset again." Good enough?

#

I want it to be vague enough about the board to be a copy paste job.

tulip sleet
idle owl
#

Ok

tulip sleet
#

"tap reset again while the LED is still purple" or "before it changes again" or something

idle owl
#

"For this board, tap reset and wait for the LED to turn purple, and while the LED is STILL purple, tap reset again. If you wait too long, the board will show up as CIRCUITPY again."

#

How's that?

#

OR "and as soon as it turns purple, tap reset again"

tulip sleet
#

I said it wrong, if you wait too long before resetting, it will just reset again

idle owl
#

ok

tulip sleet
#

you can just leave out the "if you wait too long" sentence

idle owl
#

"For this board, tap reset and wait for the LED to turn purple, and as soon as it turns purple, tap reset again. The second tap needs to happen while the LED is still purple."

tulip sleet
#

sounds good

idle owl
#

Thanks.

#

@tulip sleet It doesn't fit on the "Install UF2 Bootloader" page, or the Factory Reset Page. Both use the ROM bootloader. Which does not involve the LED.

tulip sleet
idle owl
#

Hmm.

#

I see.

#

It's not used in the actual pages though.

tulip sleet
#

similar casual reference to double-clicking on Factory Reset page

idle owl
#

Actual instructions I mean

#

It's simply explaining what you're missing and going to replace.

#

I mean, I can add it, but it doesn't feel like it makes sense.

tulip sleet
idle owl
#

That doesn't make sense.

#

To install the UF2 bootloader you go into the ROM bootloader.

tulip sleet
#

hmm, yeah, it's actually wrong

idle owl
#

Which is not the UF2 bootloader.

#

I'll reply and close the issue.

tulip sleet
#

they meant click reset again

jaunty juniper
idle owl
#

Wait, not sure about the UART stuff kmatch was talking about.

#

Every board guide tells you.

tulip sleet
jaunty juniper
#

yes, but the page where you download the files don't

jaunty juniper
#

I think that's what they meant: it says how to install the UF2 bootloader, not how to use it

idle owl
#

I'm unassigning myself though.

orchid basinBOT
tulip sleet
#

np - my tagging of your was to get the guides fixed up (since we don't have guide issues)

idle owl
#

Yep got it

tulip sleet
#

on boards without an RGB status LED, is it just a slow double-click. Any attention to be paid to the mono-color LED?

idle owl
#

Don't know about other boards.

manic glacierBOT
slender iron
#

@onyx hinge I think I sorted out the responsiveness issue

idle owl
#

@tulip sleet Why wouldn't A2 on the SAMD51 support servo PWM? It returned "all timers for this pin are in use", there's only the servo code in code.py. I had them switch to D4, and now the servo works fine.

tulip sleet
idle owl
#

Only one servo

tulip sleet
#

each pin only supports a few timers

#

hmm, maybe there are NO timers on that pin. I'll look

tulip sleet
#

on the Feather M4?

idle owl
#

Yes

#

brb.

#

Back

tulip sleet
#

testing ...

idle owl
#

Thank you

tulip sleet
#

@idle owl A2 is not a pin that can be used for PWMOut. I tested with CPy 5.0.0, so I'm pretty sure this has always be true. That pin only has one internal timer that can be used, and it can't actually be used for Reasons.

#

there are other pins with similar issues

idle owl
#

The pinouts page does not indicate that at all.

#

Is it a CircuitPython thing?

tulip sleet
#

i'm not sure, there's a comment:

// NOTE(tannewt): TC wave out 0 is commented out because the first channel is
// used to vary the 16 bit timer's frequency.

It's not actually commented out, but it doesn't work. I have to remember what is going on here. It is probably CPy-specific

idle owl
#

Ok.

manic glacierBOT
#

https://github.com/micropython/micropython/commit/f9cbe6bc47dd4f5b8e85178caecd6f0de22b4c34 is a fix to MicroPython that improves the representation of printed floats noticeably.

ulab testing now breaks because the tests print differently for CircuitPython and MicroPython:
https://github.com/v923z/micropython-ulab/issues/541

We should consider cherry-picking this fix for 8.0.0 to allow ulab CI to work better again and to incorporate the improvement.

Tagging @v923z, who asked that...

manic glacierBOT
#

The _origin_ok method in supervisor/shared/web_workflow/web_workflow.c checks for acceptable request "origin" names. Currently the mDNS name or the IP address of the microcontroller board as well as 127.0.0.1, localhost and code.circuitpython.org pass the test.

In order to authorize additional web pages that may interact with the microcontroller via Web Workflow or to support local network naming schemes (netbios, dhcp, ...) other than mDNS, the ability for a user to define aut...

slender iron
#

@wraith crow you around? I have a build that should be more responsive

#

@tulip sleet I'm working on refining the board build matrix

wraith crow
#

@slender iron Yea, I can test it

slender iron
#

what board?

wraith crow
#

Let's do the Adafruit Feather ESP32-S2

slender iron
#

🤞

wraith crow
#

Looking really good, I'll give it a workout but so far none of the normal sticking points are showing up 👍

manic glacierBOT
slender iron
#

great! any other board builds you'd like?

wraith crow
#

The QT Py C3 and the Feather ESP32-S3 would cover all the flavors 🙂

slender iron
#

👍

#

the 4mb s3 feather without tft?

wraith crow
#

Yes

slender iron
#

kk

wraith crow
#

4M Flash/2M PSRAM

slender iron
#

👍

#

board id is what I need to be exact

manic glacierBOT
slender iron
#

@onyx hinge I haven't fully decided what the best way is

wraith crow
#

adafruit_feather_esp32s3_4mbflash_2mbpsram 😄

slender iron
manic glacierBOT
onyx hinge
wraith crow
#

All three pass the initial tests, the only thing I've notice so far is that occasionally when bringing up the file browser page no path is displayed next to the python and no files are listed. Simply refreshing the page has brought up the correct file list and path each time so far. I haven't tested enough for the numbers to really mean anything yet, but it's happened twice on the C3 and once on the S3. In my testing of the C3 so far the networking has been hit or miss, so I'm thinking the file browser may be giving up too early

slender iron
#

@onyx hinge I'm not sure if I tried it

#

@wraith crow can you see what happens in the browser's dev tools? I'd be curious if the js fetch is getting an error or empty result

#

@onyx hinge it does look the service_add fails if it already exists

#
    if (!_mdns_can_add_more_services()) {
        return ESP_ERR_NO_MEM;
    }

#if CONFIG_MDNS_MULTIPLE_INSTANCE
    mdns_srv_item_t * item = _mdns_get_service_item_instance(instance, service, proto, hostname);
#else
    mdns_srv_item_t * item = _mdns_get_service_item(service, proto, hostname);
#endif // CONFIG_MDNS_MULTIPLE_INSTANCE
    if (item) {
        return ESP_ERR_INVALID_ARG;
    }
onyx hinge
#

@slender iron Ok

#

OK my eyes were reading the diff backwards anyway, the change makes sense. I'd better do something other than reviewing code right this second (I'm getting signals from the kitchen that it's time to help anyway:) )

slender iron
#

np, I'm just about done for the day too

wraith crow
blissful pollen
#

Anyone here can point me to where to download the actions builds? Sorry I always forget where

slender iron
#

once the run finishes, there is an Artifact link

blissful pollen
#

I just saw it, dunno how/why I did not yesterday

#

thanks

wraith crow
slender iron
#

oh interesting!

#

please file an issue

wraith crow
#

Do you have a PR for this build yet? If not how should I identify it?

slender iron
#

but I suspect it is unrelated

#

(but isn't in the builds I sent)

manic glacierBOT
manic glacierBOT
orchid basinBOT
#

The update may cover some ESP32-XX boards, but the ESP32-S3 devkits are slightly different than the instructions you added.

The ESP32-S3 devkit boards have both a RESET and a BOOT button. Also, this board has “UART” and “USB” ports.

After installing the UF2 bootloader using the “UART” port, now connect your PC to the “USB” port.
To enter the UF2 bootloader mode, click the RESET button. As soon as the LED turns purple, click the BOOT button. The LED should quickly flash red and the...

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.0.0-alpha.1-69-gbc926b041-dirty on 2022-07-26; Adafruit QT Py ESP32C3 with ESP32-C3FN4
Adafruit CircuitPython 8.0.0-alpha.1-69-gbc926b041-dirty on 2022-07-26; Adafruit Feather ESP32S2 with ESP32S2
Adafruit CircuitPython 8.0.0-alpha.1-69-gbc926b041-dirty on 2022-07-26; Adafruit Feather ESP32S3 4MB Flash 2MB PSRAM with ESP32S3

Circuit Python Built from Pull Request #6651

Code/REPL

cmd = ""
while cmd.upper()...
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.0.0-alpha.1-69-gbc926b041-dirty on 2022-07-26; Adafruit QT Py ESP32C3 with ESP32-C3FN4
Adafruit CircuitPython 8.0.0-alpha.1-69-gbc926b041-dirty on 2022-07-26; Adafruit Feather ESP32S2 with ESP32S2
Adafruit CircuitPython 8.0.0-alpha.1-69-gbc926b041-dirty on 2022-07-26; Adafruit Feather ESP32S3 4MB Flash 2MB PSRAM with ESP32S3

Circuit Python Built from Pull Request #6651

Code/REPL

cmd = ""
while cmd.upper()...
proven garnet
#

@tidal kiln Noticed the SI1145 library doesn't have permissions set for CircuitPythonLibrarians, but didn't know if that was intentional. But since you submitted the PR to the bundle I thought I'd ask (noticed while I was adding the type annotation issue).

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.0.0-alpha.1-69-gbc926b041-dirty on 2022-07-26; Adafruit Feather ESP32S3 4MB Flash 2MB PSRAM with ESP32S3

Circuit Python Built from Pull Request #6651

Code/REPL

None

Behavior

If you attempt to paste text into the command line of the serial terminal the text is displayed as it's pasted, however pressing enter or the "Send" button only sends a carriage return to the microcontroller

Description

...

tidal kiln
manic glacierBOT
orchid basinBOT
#

Yeah, almost only Adafruit boards have the double reset feature. It's a support issue that comes up. And most boards are not Adafruit boards anymore, and will not have a learn guide or instructions about using tinyUF2. I would prefer if instructions with boot were given.

After installing the UF2 bootloader using the “UART” port
It works on the USB port too. You can completely ignore the UART port on the devkit, it's an additional CP2102 connected to the debug UART.

manic glacierBOT
orchid basinBOT
#

I don't really want to embed detailed instructions in this circuitpython.org page, because it's harder to maintain than a Learn Guide page, and the instructions may not be applicable to all ESP32-nn UF2-capable boards. That is what I was trying to convey as a caveat. I think it would better to have general-purpose Learn Guide page for these non-Adafruit boards that we can link to. I was thinking of removing the reference to the "ESP Web Flasher", for instance.

manic glacierBOT
manic glacierBOT
orchid basinBOT
#

I understand @dhalbert but my practice is to go to circuitpython.org download and get a hit from there on how to upgrade...

The first reason for having the information on that page is to know if I have to download the ".bin" or the ".uf2" (else I will download both, just in case).

The issue and pain is when working with non Adafruit board or unusual Adafruit board that run CP such as STM32, Teensy, or that have special button clicking like the Wio Terminal, I fail remember and I hate to...

tulip sleet
#

@onyx hinge I can move to ESP32 no-PSRAM debugging at this point. I think you are far away from that at the moment, is that right?

onyx hinge
#

@tulip sleet that's right, I'm working on this camera stuff

#

I'd appreciate it, your fresh eyes will hopefully turn over a rock I didn't notice for the trees, if you'll forgive me mixing all those metaphors

radiant trench
#

Good news, my ESP32-S2 TFT Feather thingy arrived so I can get to playing with web workflow and testing my CSS. @slender iron can you give me some pointers where I can start with web work flow please?

random junco
#

Create your /.env file with your credentials and then off to circuitpython.local!

radiant trench
#

do I need to be a specific version of CircuitPython for this to work?

#

I'm currently running 8.0.0-alpha.1

jaunty juniper
#

the absolute latest

radiant trench
#

for that I have to build myself right?

jaunty juniper
#

it's still in development and there's new fixes all the time

#

you get it from the site on the "Absolute Newest" S3 link

#

top one will be the latest build (it's uploaded every time a PR is merged)

radiant trench
#

Boom! That got it working

onyx hinge
#

hmph. I had noticed that the gc_alloc took both a flags argument AND a bool for long-lived. I thought maybe putting long-lived in the flags argument would save code size but .. it didn't.

#

(I figured it'd be able to avoid loading a register with 0 or 1 for every gc_alloc call but either there aren't that many [there aren't that many] or lto is able to optimize it out since it's usually a constant argument)

radiant trench
#

I can't tell if I'm being daft, but I don't see the default username for the web work flow file manager in the documentation (I set the password)

jaunty juniper
#

leave it empty

radiant trench
#

Ha ha, it's on the previous screen, I just noticed that

#

Could be good to add that to the comment in the /.env file to catch the dopes like me 😄

jaunty juniper
#

I'll make a note

onyx hinge
#

yeah passing a non-blank username is apparently unsupported at the moment

radiant trench
#

Now going through the building circuitpython learn guide to get my dev environment up and running, then I should be able to get the CSS modifications I promised a week ago 🙂

slender iron
#

@radiant trench I'm at my desk now so can answer any questions too

radiant trench
#

awesome, I'm just getting the local repo up and running and will do a practice build

#

did you have any thoughts on how you want it to look and feel? I was thinking of borrowing some basic typography styles from circuitpython.org for consistency?

slender iron
#

not really. my main concern is that it works offline and without bloating the firmware size too much

#

(though we could have a second online css to supplement)

#

the online one will be hard to maintain though because it'll be used with different versions of the files from cp

radiant trench
#

I'll make the first pass super minimal then. I think it's a good place to start, just improve the typography a little, get the line-lengths under control etc

#

less for me to mess up too 😄

slender iron
radiant trench
#

When I do pre-commit install I get the error zsh: command not found: pre-commit

#

is there something missing from the guide?

#

everything else before that seems to have gone ok

#

(I'm on a Mac running Montery)

slender iron
#

did you do a pip install before?

radiant trench
#

I just followed this

slender iron
#

the step before that is pip installs

#

and pre-commit is installed by that I believe

radiant trench
#

This part?

slender iron
#

yup

radiant trench
#

Yes, I got "Requirement already satisfied" for most of the lines

slender iron
#

and pre-commit isn't listed in those files

#

🙂

radiant trench
#

yes, I don't see it in there anywhere

slender iron
#

pip install pre-commit

radiant trench
#

pip3 right?

slender iron
#

want to add it as your first commit?

#

whatever works for your setup

radiant trench
#

ha ha, sure happy to do so

#

I guess I just have to add it to requirements-dev.txt ?

slender iron
#

yup

radiant trench
#

is it as simple as? # For pre-commit pyyaml black pre-commit

slender iron
#

yup, think so

radiant trench
#

okay

#

will get through the rest of the guide then hopefully able to commit

slender iron
#

thanks!

manic glacierBOT
radiant trench
#

😄

dense hound
#

hey guys, quick PR question - to add support for a RTC I ended up needing to add many optional arguments to adafruit_register.i2c_bcd_datetime and adafruit_register.i2c_bcd_alarm - is that something that I should propose as a PR? Or are those classes supposed to stay simple

tidal kiln
#

could open an issue in the repo as a way to start a general discussion

manic glacierBOT
radiant trench
#

Is there someone at Adafruit I need to ping to get the learn guide updated now that part is no longer needed?

slender iron
#

what part isn't needed?

slender iron
idle owl
slender iron
manic glacierBOT
#

Hurrah on the CI improvements - very nice!

I tried the web workflow on an ESP32-S2 Feather TFT. Starting up with correct credentials is very snappy. Starting up with a bad password shows "Authentication Failure" on the display pretty quickly, but the lines like:

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:

come out slowly, with a few seconds in between each line. (The printing of each line is fine; it's the interval betwee...

tulip sleet
#

@slender iron should we bump the mpy-cross-mac build to macos-11? I'm thinking that rather than 12. 12.0 was released 10/2021. 11 was introduced 11/2020.

#

I have not heard of many people running 10.x (except my father 🙂 ) and the older ones can remain for download

slender iron
#

@tulip sleet either way is fine with me

#

was just thinking about doing that too 🙂

tulip sleet
#

i'll make a PR

manic glacierBOT
#

GitHub Actions is dropping runs-on: macOS-10.5. There have been intermittent brown-outs to alert us of this, with the message:

_This is a scheduled macOS-10.15 brownout. The macOS-10.15 environment is deprecated and will be removed on August 30th, 2022. For more details, see https://github.com/actions/virtual-environments/issues/5583_

Update to macos-11, not macos-12 since many users may still be on 11.

Also update the names to have the architecture uniformly as the suffix: ...

manic glacierBOT
slender iron
#

I enabled auto-merge on the circuitpython repo

tulip sleet
#

does that mean an approval causes a merge?

slender iron
#

approval + green CI

tulip sleet
#

if there is more than reviewer, does it wait for all?

slender iron
#

not sure

tulip sleet
#

looking...

#

it doesn't really say

#

we can see what happens. Sometimes I don't want this - I want to approve but defer the merge build for timing reasons. It's not so much the merge, but the action triggering

radiant trench
#

I'm still having some trouble getting my build environment working... when I run the pre-commit install stage, I still get the error zsh: command not found: pre-commit (and I ran pip3 install pre-commit first which seems to have gone fine)

slender iron
#

you can skip it

#

it isn't used to build, only commit

radiant trench
#

ah cool. ok. So on to the next problem 😄

#

I'm in the directory ports/espressif and I run the command make BOARD=adafruit_feather_esp32s2_tft I get the error CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.

#

(sorry for all the questions, I'm not familiar with a lot of these tools)

slender iron
#

did the esp-idf install work?

radiant trench
#

this is the full error:

#
IDF_PATH=/Volumes/CP-DEV/circuitpython/ports/espressif/esp-idf cmake -S . -B build-adafruit_feather_esp32s2_tft/esp-idf -DSDKCONFIG=build-adafruit_feather_esp32s2_tft/esp-idf/sdkconfig -DSDKCONFIG_DEFAULTS="esp-idf-config/sdkconfig.defaults;esp-idf-config/sdkconfig-opt.defaults;esp-idf-config/sdkconfig-4MB.defaults;esp-idf-config/sdkconfig-esp32s2.defaults;boards/adafruit_feather_esp32s2_tft/sdkconfig" -DCMAKE_TOOLCHAIN_FILE=/Volumes/CP-DEV/circuitpython/ports/espressif/esp-idf/tools/cmake/toolchain-esp32s2.cmake -DIDF_TARGET=esp32s2 -GNinja
CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!
See also "/Volumes/CP-DEV/circuitpython/ports/espressif/build-adafruit_feather_esp32s2_tft/esp-idf/CMakeFiles/CMakeOutput.log".
make: *** [build-adafruit_feather_esp32s2_tft/esp-idf/config/sdkconfig.h] Error 1
slender iron
radiant trench
#

Ahhhhhh 😄

tidal kiln
tulip sleet
radiant trench
tidal kiln
tidal kiln
jaunty juniper
radiant trench
#

ha ha, makes a lot of sense if you're doing this stuff on the daily for sure

tulip sleet
radiant trench
#

Thanks for all the help so far everyone! You sure know how to make people feel welcome!

tulip sleet
#

@slender iron @onyx hinge FYI, GitHub actions is pretty flaky today. Most job sets have at least a couple of failures that are internal Azure network failures. I found another job that had spent an hour trying to fetch the last little bit of some file, and cancelled that run (it was just a PR merge build).

proven garnet
#

@idle owl - this quick PR I think should resolve the pylint errors listed on circuitpython.org by forcing adabot to use the same pylint version as the repos, let me know what you think whenever you get a chance to take a look: https://github.com/adafruit/adabot/pull/282

GitHub

Based on what I'm seeing here, I think a mismatch between the version of pylint being used within adabout on the libraries, and what the version the pre-commit hooks are running is likely causi...

idle owl
#

Will do in a bit!

slender iron
tiny token
#

a small celebration here... I was able to build my own CP .uf2 for a rp2040 today using WSL. Even loaded it to the board and it's working. Woot!!!!

onyx hinge
brazen hatch
#

Is psram slow or is it my idea?

#

built tinyuf2 & circuitpython from scratch for Waveshare ESP32-S2-Pico
and successfully booted ljinux onto it
but the commands seem oddly slow to start and finish

tulip sleet
#

certainly slower than on-chip static ram

brazen hatch
#

like its not a catastrophic delay, but its a good half a second for most external commands

#

thats a board circuitpy doesnt support, and I will have to pr it when im done
waveshare is kinda weird
they "advertise" circuitpy support, but they provide a uf2 for a completely different board..

tulip sleet
#

it's not -that- slow, it maybe reading files or something

brazen hatch
#

but that half a second delay is not present on the pico

slender iron
brazen hatch
manic glacierBOT
onyx hinge
slender iron
#

it's blocking a couple other PRs, so that's why I'm bugging you

#

could have dan review

onyx hinge
#

OK, I think I can get it done.

#

@tulip sleet have you checked whether booting a no-psram build on a has-psram module has the same problem? for devkits I'm only seeing ESP-WROVER-KIT with jtag, but it has psram. in any case, let me know what you pick up and I'll preemptively pick up two too

tulip sleet
#

@onyx hinge https://www.digikey.com/en/products/detail/espressif-systems/ESP-WROVER-KIT-VE/13584249 maybe. also the smaller Saola boards. I have to go, will look later tonight

#

not saola, thats ESP32-S2

onyx hinge
#

https://www.espressif.com/en/products/devkits lists features, and this is one of the only two with JTAG listed. The other is ESP32-LyraTD-MSC which is for audio stuff and it doesn't seem to be via the dual-ftdi solution

tidal kiln
manic glacierBOT
onyx hinge
#

@slender iron I wonder if it would be helpful to add a function that gets a guaranteed-terminated, guaranteed-untruncated value. I think it might read like this but of course with buffer handling in C there's always a great deal of room for embarassing failure: ```c
/* Retrieve the value for a given key, if it fits in the buffer (including a terminating '\0')
*

  • Returns: NULL if the key was not found, or the value did not fit (including the terminating '\0')
  • Returns: value if the key was found, and its value fit. value is a '\0'-terminated string.
    */
    char *dotenv_get_key_terminated(const char *path, const char *key, char *value, mp_int_t value_len) {
    mp_int_t actual_len = dotenv_get_key(path, key, value, value_len-1);
    if(actual_len == -1) {
    return NULL;
    }
    if(actual_len >= value_len) {
    return NULL;
    }
    value[value_len] = 0;
    return value;
    }
onyx hinge
#

drat, the direct use of the FAT file access APIs means I can't build dotenv module into the unix port for testing. 😕 @slender iron I guess this is a necessary evil? Does it mean I also couldn't access /sdcard/.env with it if I mount /sdcard?

slender iron
#

@onyx hinge probably. I need to figure out what api to use. Probably the same reason that mounting an sd card messes up the web workflow

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.0.0-alpha.1-75-gfed3f9c97-dirty on 2022-07-27; Raspberry Pi Pico with rp2040

Code/REPL

import dotenv

for i in range(0, 11):
    key = f"env_test_{i}"
    value = dotenv.get_key("env_test", key)
    print(i, key, repr(value))

Behavior

compared to running on cpython with python-dotenv installed, the variables env_test_8 and env_test_9 get incorrect values due to a bug in parsing

Descript...

#

Output with standard Python:

Key env_test_0 not found in env_test.
0 env_test_0 None
1 env_test_1 'hi mom'
2 env_test_2 'hi mom'
3 env_test_3 'hi mom'
4 env_test_4 'hi mom'
5 env_test_5 None
6 env_test_6 ''
7 env_test_7 '#'
8 env_test_8 ''
9 env_test_9 '#'
10 env_test_10 'last'

(note that the "Key env_test_0 not found" line is printed by dotenv, but this behavior is probably not important)

circuitpython prints:

0 env_test_0 None
1 env_test_1 'hi mom'
2 env_te...
onyx hinge
#

OK this is not super important, but wanted to report it anyway ^^^

onyx hinge
#

yes

#

the espressif page says -E so not sure how -VE is different. part numbers are hard.

tulip sleet
#

yes, that looks right to me, so I'll get two. Mouser has the same thing

onyx hinge
#

OK. I'm unlikely to get to it this week. Next week I'll be prepared to switch off with you if you haven't cracked it.

tulip sleet
onyx hinge
#

oh, too bad I missed seeing that. I'll try to remember it if I make another digikey order sometime soon

tulip sleet
#

i'll tell you if it's good for anything

hidden rain
#

Evening. About ready to build with a test module for RP2040. I have files in shared-bindings subfolder and in ports/raspberrypi/common-hal subfolder. The instructions indicate to add file names to Makefile (SRC_SHARED_MODULE list) and mpconfigport.h (EXTRA_BUILTIN_MODULES). However, these places do not exist, so instructions might be a bit dated. Can not find a consistent example to follow. Please guide...

tulip sleet
hidden rain
#

ah.. already did that. guess i'm a little over efficient and precautious.

tulip sleet
#

substitute the name of your module for busio and BUSIO. CIRCUITPY_BUSIO indicates the compile-time enable/disable flag, which is handled in py/circuitpy_mpconfig.mk and py/circuitpy_config.h. Look at other examples there.

#

put it in alphabetical order

hidden rain
#

Will do.. very close now. After test module works out, I'll start on the ADC-DMA stuff. Already found lots of good references and some code. Will resume tomorrow .. was up at 5AM ...pushing this thru...Thanks!

quaint gull
#

So does anyone have a CircuitPython build that renames main.py like you can download for MicroPython? I think I wrote myself a fancy main.py that is preventing REPL from working when I power up my pico. Shoot..I think this was the wrong topic channel.

rough folio
#

you could just write a code.py that was just import main
but micropython and circuitpython are somewhat incompatible lib-wise

#

and course that wouldn't work if you did the whole if-name-eq-main affair

tulip sleet
rough folio
#

Oh
and I
entirely missread the question

quaint gull
tulip sleet
#

or you can touch the reset pin to ground twice with a slight delay to simulate a slow double-click, which would get you into safe mode

quaint gull
#

@tulip sleet I'm also using your excellent library to use an LCD with a PFC8574! Can't wait to do a show-and-tell of my MIDI control code footswitch.

tulip sleet
#

thanks! glad it was useful

manic glacierBOT
radiant trench
#

Hey folks, I know most of you are probably asleep so no rush on this one, but I'm still having trouble building CP for the Feather ESP32-S2 TFT. I can build the standard ESP32-S2 and other boards successfully but get this massive wall of errors when I build the TFT feather). If anyone has any thoughts, I would appreciate it. Cheers! https://gist.github.com/andywarburton/c45d44b2add4c7b268fe6cc1cf849f70

Gist

Can't build ESP32-S2 TFT. GitHub Gist: instantly share code, notes, and snippets.

jaunty juniper
radiant trench
#

I did not

#

so just make BOARD=adafruit_feather_esp32s2_tft clean ?

stuck elbow
#

yes

#

you can also try re-running esp-idf/install.sh and . esp-idf/export.sh to make sure you have the right version

radiant trench
#

looks like it's going well now!

#

yes it worked!

#

Thanks folks

#

Yay! I managed to successfully flash a self-built UF2 file to my Feather. Ok now I can get down to work!

stuck elbow
#

it's just the beginning

radiant trench
#

ok I know this is ugly as sin, but I just wanted to check and I've now been able to add an external css file with modifications to my custom build.

manic glacierBOT
brazen hatch
#

I have finally gotten the Waveshare ESP32-S2-Pico working properly
Waveshare's uf2's were borked (did not use psram or the led) and obsolete (cp 6.x)
Is there a proccedure for pr'ing new boards to circuitpython?
Or do I just yolo the pr?
I have also built tinyuf2 and I'm ready to pr that too

brazen hatch
#

no I haven't, I will read it now, thanks!

manic glacierBOT