#circuitpython-dev

1 messages · Page 423 of 1

proven garnet
#

You did! Thanks for the fun project 😁

thorny jay
#

So the result will be a bitmap to use in displayio?

proven garnet
#

Basically. I think right now it can give both the bitmap and palette

#

Up to user to do a tilegrid

jaunty juniper
#

no, I was not really here

idle owl
#

@proven garnet I have a question for you too 😄

jaunty juniper
#

go on

#

oh ? like its own repo ?

proven garnet
#

I can hop back in haha

#

I'm definitely happy to help with that

jaunty juniper
#

ok yeah

proven garnet
#

Thanks!

manic glacierBOT
#

Thanks!

If you are using https://gitee.com, I think we could point to a submodule there, since the fetching is done strictly with git, which should not care.

The only issue I see is the error I get when trying to browse a gittee.com repo without being logged in:

为了营造绿色健康的开源社区,推动中国开源生态建设,当前仓库仅限 登录 用户访问。
Gitee 公开仓库作者需要先进行申请,审核后才能开放匿名访问。
如果你是仓库持有者,请检查你是否处于登录状态。

I had to Google translate this to read it, but my understanding is that though it's not the d...

orchid basinBOT
manic glacierBOT
digital shoreBOT
idle owl
#

@tulip sleet Are you dropping an 8.0.0-alpha.0 before tomorrow as well? Or not yet?

#

I'm going to assume no so I can wrap up the newsletter. We'll include it next week if it ends up released.

tulip sleet
#

but given the build backlog, it will be tonight

idle owl
#

I removed the "and its unstable version is foo" from the newsletter. I think it's fine to include it next week.

tulip sleet
#

I will let Anne know what is available if she wants to make last minute changes

idle owl
#

Ok sounds good.

slender iron
#

@tulip sleet do you know the format of .a archives?

slender iron
#

The archiver, also known simply as ar, is a Unix utility that maintains groups of files as a single archive file. Today, ar is generally used only to create and update static library files that the link editor or linker uses and for generating .deb packages for the Debian family; it can be used to create archives for any purpose, but has been la...

manic glacierBOT
jaunty juniper
#

I updated the frozen CPX PR with the release of the library, let's see if it passes CI

manic glacierBOT
slender iron
tulip sleet
#

Well, that is a pretty timely blog entry 🙂

thorny jay
tulip sleet
#

i am living in the past

stuck elbow
#

what is time anyways

idle owl
tulip sleet
orchid basinBOT
tulip sleet
#

pretty slow light there 🙂

ornate breach
#

maybe it was a millisecond

#

it's been at least 4 years since I was taught the definition of a second xD

#

apparently it's based on Cesium 133

#

Today, one second is defined as “9,192,631,770 periods of the radiation corresponding to the transition between the two hyperfine levels of the ground state of the cesium 133 atom”

#

the more you know.

#

I also had it backwards, 1 meter is defined as 1/299792458 of a second light travel in a vacuum. lol

manic glacierBOT
slender iron
#
local /home/tannewt/repos/circuitpython/ports/espressif/build-ai_thinker_esp32-c3s-2m/extmod/ulab/code/numpy/numpy.o:ulab_numpy_globals_table 367 31729
local /home/tannewt/repos/circuitpython/ports/espressif/build-ai_thinker_esp32-c3s-2m/extmod/ulab/code/numpy/numpy.o:mp_module_ulab_numpy_globals 368 31745
global esp_wifi_init_internal 745 46668
global esp_wifi_init 883 55760
global common_hal_wifi_init 1115 65026
local /home/tannewt/repos/circuitpython/ports/espressif/build-ai_thinker_esp32-c3s-2m/shared-bindings/wifi/__init__.o:wifi___init__ 1116 65046
local /home/tannewt/repos/circuitpython/ports/espressif/build-ai_thinker_esp32-c3s-2m/shared-bindings/wifi/__init__.o:wifi___init___obj 1117 65054
global mesh_nwk_task_main 657 68875
global esp_mesh_nwk_task_init 693 71291
local /home/tannewt/repos/circuitpython/ports/espressif/build-ai_thinker_esp32-c3s-2m/shared-bindings/wifi/__init__.o:wifi_module_globals_table 1379 76698
local /home/tannewt/repos/circuitpython/ports/espressif/build-ai_thinker_esp32-c3s-2m/shared-bindings/wifi/__init__.o:wifi_module_globals 1380 76714
global wifi_module 1381 76722
local /home/tannewt/repos/circuitpython/ports/espressif/build-ai_thinker_esp32-c3s-2m/py/objmodule.o:mp_builtin_module_table 4436 241850
#

esp_mesh is being brought in and is huge

#

nope, that's a lie

ornate breach
#

looks like it kind of tried

manic glacierBOT
manic glacierBOT
#

I tested plain values, single-quoted values, and multi-line values, and they work for me.

But it doesn't always take the last value for multiple values:

abc=def
abc=ghi

and it gives me the first value, not the second

Adafruit CircuitPython 8.0.0-alpha.0-6-g3dca8a776 on 2022-05-23; Adafruit Metro M4 Express with samd51j19
>>> import dotenv
>>> dotenv.get_key(".env", "abc")
'def'

However, this gives the last value:

abc=def
abc=ghi
abc=jkl
...
manic glacierBOT
orchid basinBOT
proven garnet
#

As far as I can tell the bluefruit is currently having issues picking up the image

#

Going to try the Arduino library to confirm the app is sending properly

orchid basinBOT
thorny jay
# proven garnet As far as I can tell the bluefruit is currently having issues picking up the ima...

Thanks, I need to locate a Bluefruit with screen hardware. My CLUE screen is dead, I found my "TFT Gizmo" but I need to locate my "Circuit Playground Bluefruit". So you try to do this: https://learn.adafruit.com/wireless-image-transfer-with-circuit-playground-bluetooth-and-tft-gizmo but in CircuitPython. And this is more information on the protocol: https://learn.adafruit.com/bluefruit-le-connect/image-transfer . I wonder if it has been used by any other guide...

Adafruit Learning System

Now you can beam images THROUGH THIN AIR from your mobile device to your Circuit Playground Bluefruit!

Adafruit Learning System

Learn how to use your iOS or Android device to control and communicate with Bluefruit LE.

proven garnet
#

Yeah pretty much. I used the explanation of the protocol but I'm not able to actually "get" it on my bluefruit (I don't find the leading ! or anything) so something isn't working - almost certainly my code 😂

manic glacierBOT
#

As mentioned in the issue #6309, The newer Teensy boot loader can retain a file system that is stored in the flash memory as long as it is not in the area that is automatically erased.

Some of this is described on the web page: https://www.pjrc.com/teensy/td_code_security.html

But to do this, the bootloader code looks at specific things in the uploaded data to determine if it will retain any data or not and how much.

The two things I fixed was the Loader is looking for the value: ...

manic glacierBOT
manic glacierBOT
#

This was discussed for possible inclusion in 7.0 but didn’t happen there. See #4794. Breaking change. Heard an 8.0 might begin soon, so here’s code.

Summary: subtly changes behavior of analog reading on most ports so the result spans the full range from 0 to 65535. As of 7.X, it appears that cxd56 and espressif already do this, but all other ports return a max of 65520 due to a simplified left-shift operation.

manic glacierBOT
tulip sleet
#

@slender iron I closed 7.3.0 and 7.x.x milestones, created a 7.3.x milestone, and moved all 7.x.x issues to 8.0.0 milestone for now. Could still triage, and some may deserve a backport to 7.3.x.

proven garnet
idle owl
slender iron
#

sounds good @tulip sleet

manic glacierBOT
idle owl
# proven garnet Sounds good! <:zoop:415996886575742977>

Ok, so here's the deal. You will need to clean up your script files if necessary, and document them very thoroughly. Once you've completed that (and you can PR it when you're ready so we can go over them together), you can add them to the directory-I-haven't-named-yet on the Adabot repo. Eva will do the same. I think it's important to share them where folks can find them, and since they either tie into Adabot, or do similar things, I feel like that's an excellent place to share them.

#

WRT documentation, I want it to be something where anyone could pick it up, understand what's going on, and basically be able to run it entirely based on the docs in the file.

slender iron
#

@tulip sleet have you built CP on your m1?

slender iron
#

nice! limor is trying to get it going

idle owl
#

Not for ESP though. If that is what you're looking for.

slender iron
#

that is what limor is trying

hidden rain
#

Hi: Moving some code from a 16bit MSP430 to RP2040 and thought I would also go with CPy. My code sets many registers which have equivalents on RP2040. So my question is "how does one set a register"? Its obviously different since no pointers, etc.

idle owl
#

I never took the time because it wasn't on my official list of tasks, and it seemed like a bit of a rabbit hole.

#

So I thought Limor would be happier if I didn't spend the time.

slender iron
#

@hidden rain you'd be better off doing C for register level code

hidden rain
#

Yes if could do the entire app that way, however, the main part of the code will be CPy. Is there a way to mix and match, or use PIO, or create a little register getter/setter?

slender iron
#

we don't currently have a direct memory API

#

PIO support is pretty good though

stuck elbow
#

a simple C module that just exposes some registers would be quick to write though

hidden rain
#

How would I "mix", C/C++ as a module? Do you have a link?

#

I could write the PIO assembly if it can takes arguments and return values.

idle owl
#

Did we decide on ignore-list for the replacement, or were we opting for allowlist and denylist?

#

@slender iron I feel like you were part of the discussion about this that I'm vaguely remembering. ^^

#

I'm not sure what the opposite of "ignore-list" would be anyway.

slender iron
#

I feel like we decided to go with worked best for the given situation

idle owl
#

Hmm. Alright. Thanks.

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.3.0 on 2022-05-23; Adafruit QT Py ESP32S2 with ESP32S2
Board ID:adafruit_qtpy_esp32s2

Code/REPL

import board
import rotaryio

class Encoder:
    def __init__(self,pin1,pin2):
        self.encoder = rotaryio.IncrementalEncoder(pin1, pin2)
        self.last_pos = 0

    def read(self):
        change = 0
        if self.encoder.position > self.last_pos:
            change = 1
        elif self.encode...
idle owl
#

Fair enough.

proven garnet
idle owl
#

We'll want a README in the directory I think.

proven garnet
#

The difference being some scripts are definitely have hyperspecific purposes, but I could refactor the one that checks that state of the latest build to be more generally useful

idle owl
#

With maybe the names of each of the scripts and a quick description.

idle owl
proven garnet
#

Sweeto! I can do that, just let me know what the repo ends up being and I can PR it

idle owl
#

It'll be Adabot but want a clear name for the directory.

#

So I'll get back to you as soon as I come up with some ideas. Or an idea.

proven garnet
idle owl
proven garnet
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
slender iron
#

just posted a small javascript project to #help-with-projects for those who can make sense of it all

#

I want to use the treemap to see the code size of different directories of circuitpython

tulip sleet
#

@stuck elbow I can ping you with stuff if it would help, e.g. see x:54 above

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
stuck elbow
# manic glacier

thanks, once I know there is something to watch for, I see it, it's just the long-time things that I miss

manic glacierBOT
manic glacierBOT
#

There is ongoing discussion about multicore support on RP2040 #4106; whether it's really necessary or how the situation can be improved by grabbing lower-hanging fruit.

@ladyada:
displayio is also handled in the background with DMA...

I've done a little bit of profiling on my project and found that my biggest bottleneck right now is the i2c display: In my project, the displayio update takes ~44ms whe...

manic glacierBOT
manic glacierBOT
manic glacierBOT
lone sandalBOT
manic glacierBOT
manic glacierBOT
orchid basinBOT
#

I did not check the documentation, but I checked 20+ of the latest new board, and only two had that duplicate, and from the same author. So I guess the instruction are OK and the same mistake was done twice by the same author.
Maybe the "Contribute" section could be put elsewhere, more global to the page and not in the same text box, so that what appear in the box is exactly and only what was provided in the md file for this board.

onyx hinge
#

pre-commit.ci web service has the apparently unavoidable behavior that it opens PRs to upgrade pre-commit to "the latest tag", without taking account of whether a tag is stable under python / semver standard practices. It's frustrating, and probably enough to make me turn pre-commit.ci back off for the two repos where I enabled it. fyi, since I'd softly floated the idea of switching to it for CircuitPython libs.. https://github.com/pre-commit-ci/issues/issues/124

GitHub

I have a PR opened by pre-commit-ci to upgrade pylint to an unstable (beta) release: jepler/Jepler_CircuitPython_udecimal#14 I would prefer that pre-commit-ci not propose upgrades to unstable versi...

#

pre-commit's author is extremely opinionated!

manic glacierBOT
#

What does 8.0.0 mean?

We use the "semver" versioning model. 8 is a major version, and means there are incompatible changes in API or (significant) behavior changes.

Will there be 7.4 / 7.5 / 7.6... versions to be expected?

There will be more 7.3.x versions. The rightmost x indicates bug fixes. If we decide to add significant features to 7.x.x, we would go to 7.4.x, etc. Such a decision might depend on how long we expect it to take to get to 8.0.0 final. Our attitude is that in...

hidden rain
#

At the risk of asking a question that must have already been answered, Should I use asyncio to catch n incomming UART action that would otherwise be an interrupt?

#

This is for an RP2040

tulip sleet
hidden rain
#

Thats cool. The app will decide 'when' to turn on the listener, so it would it does not need to be pre-emptive! Thanks.

orchid basinBOT
orchid basinBOT
manic glacierBOT
rough folio
#

Found out the adafruit_ntp lib will quite happily sit in a timeout condition for hours- worth PRing a timeout for?

#

one of the things I was wondering is how you would log that it had timed out- standard py I'd just throw a logging statement in there but I don't think that's the route for cirpy

manic glacierBOT
#

@dhalbert (@ThomasAtBBTF ) - Sounds like, lots of stuff to keep you busy!

Simple point of reference is that simple UART stuff is working on CircuitPython...
Some simple testing.

MPY: soft reboot
MicroPython v1.18 on 2022-01-17; FeatherS2 with ESP32-S2
Type "help()" for more information.
>>> import machine
>>> uart1 = machine.UART(1, baudrate=9600, tx=43, rx=44)
>>> uart1.write("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
26
>>> print(uart1.read())
b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
>>>

```...
orchid basinBOT
slender iron
rough folio
#

Nah, just raises OSError: [Errno 116] ETIMEDOUT

slender iron
#

that'll work

rough folio
#

Right now I've just got a format_traceback with some info so it doesn't just fail silently

#

there's also what to do if it times out for the first invoke

#

maybe having some list of fallback servers?

manic glacierBOT
#

@KurtE
Thank you so much for testing this!
Do you have any idea on which ESP-IDF version the Micropython is working?
And on which version we (CircuitPython) is working?

Also, even though I have very little understanding of the inner workings of the CircuitPython UART code, I am pretty sure, that the bug is located in the "receiving code" inside CircuitPython and not in the "sending code".

Reason: I did tests also with another board connected to the UART-pins and the CircuitPython ES...

rough folio
#

ie right now it's

def datetime
  if time to refetch:
    adjustment = get time from ntp
    
  return time + adjustmenet```
roughly

if I change it to

def datetime
if time to refetch:
try:
adjustment = get time from ntp
except:
pass
return time + adjustmenet```

then the first time it's invoked it will be entirely wrong if it times out then

#

so it needs some fallback support

#

(but what if all the fallbacks fail too? Should it raise?)

slender iron
#

the adafruit ntp server isn't working?

manic glacierBOT
#

@ThomasAtBBTF
I am not sure which one they are using right now:

Their instructions for build it show:

The ESP-IDF changes quickly and MicroPython only supports certain versions.
Currently MicroPython supports v4.0.2, v4.1.1, v4.2.2, v4.3.2 and v4.4,
although other IDF v4 versions may also work.

And yes it appears like TX may be working:

>>> import board, busio
>>> uart2 = busio.UART(board.IO17, board.IO18, baudrate=115200)
>>> uart2.write(b'1234567890')
10
>>>...
rough folio
slender iron
#

hrm, ya feel free to improve it

rough folio
#

I was wondering why my code was just sitting dead after a couple minutes and it's because of NTP

karmic oyster
#

I am having trouble with the circuit python GPS library. The problem is in the gps.update command. On line 549 in the _parse_gsa section of the function, I am getting an error that "bytes" object has no attribute "decode" I am trying to run the "simple test" example

#

My setup runs the gps_echotest example fine. It outputs NMEA sentences, so I don't think it's a problem with the GPS

slender iron
stuck elbow
#

clicking on the two links on the bottom does nothing, probably because they are covered by something?

slender iron
#

gah, I love css

#

that's the file

stuck elbow
#

how do I use it?

slender iron
#

click the squares

stuck elbow
#

squares?

slender iron
#

gray squares

#

not the best example 🙂

stuck elbow
#

there are no squares

slender iron
#

rectangles

stuck elbow
#

oh, so it's like a directory browser

slender iron
#

ya

slender iron
#

with the rectangles sized appropriately

stuck elbow
#

very nice

stuck elbow
#

interesting, so the compiler and the strings are the biggest part of the python itself

#

kinda makes sense

#

though I would expect the vm to be bigger than the compiler

manic glacierBOT
#

@KurtE Thank you so much for testing this! Do you have any idea on which ESP-IDF version the Micropython is working? And on which version we (CircuitPython) is working?

Also, even though I have very little understanding of the inner workings of the CircuitPython UART code, I am pretty sure, that the bug is located in the "receiving code" inside CircuitPython and not in the "sending code".

Reason: I did tests also with another board connected to the UART-pins and the CircuitPyt...

slender iron
#

I think it'd be cool to have the # in the url be the root

#

easier to share links then

#

though it doesn't have the file itself...

manic glacierBOT
lone axle
slender iron
#

right

#

but the user would still need to provide the file which is weird

#

back button could work then though

lone axle
#

if it had a server side it could keep a copy of the JSON so different users could view the same thing. Or if the circuitpython repo is the primary intended files it could just clone it's own copy of the repo.

slender iron
#

it's meant to be generic and is just hosted statically with gh pages

lone axle
#

This is a neat visualizer. I didn't quite grok what you were talking about before I saw the example.

tulip sleet
#

i have used tools like that a lot to figure out what's using up all my disk space (back when I didn't have giant disks)

lone axle
#

For circuitpython specifically, maybe actions on the core repo could generate the JSON file and this tool could grab it from there?

manic glacierBOT
idle owl
#

Here is the notes document for next Monday’s CircuitPython Weekly meeting. It is happening 24 HOURS LATER on Tuesday, May 31, 2022 at 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/13ESjBlnO5LdgZWdyrCDvklIvtYcsLqgUnyzM559at9A/edit?usp=sharing

hidden oxide
#

Ah, OK. That's a better time for me anyway

manic glacierBOT
lone sandalBOT
manic glacierBOT
#

If any of you see these UART problems on ESP32-S3, but not ESP-S2, that would be interesting.

I see the problem on a QT PY ESP32 S2 as receiver and Feather RP2040 as transmitter. Bytes are shifted/swapped on the S2. Stopping and Restarting the S2 in the repl causes a unique shift. Stopping and starting the Feather RP2040 in the repl has the same shift offset in the QT PY ESP32 S2.
Adafruit CircuitPython 7.3.0 on 2022-05-23; Adafruit QT Py ESP32S2 with ESP32S2

ornate breach
#

I've seen it twice today

#

no wait

#

my months are off

manic glacierBOT
#

The current atmel-samd port does not support RTS/CTS for hardware flow control, even though the underlying SAMx2x/SAMx5x chips are capable of using this mode on async UARTs. This change enables hardware flow control by allowing assignment of pins to RTS/CTS, and enabling selection of the correction pad configuration for the pinout via the CTRLA.TXPO register.

An example of working code looks like this (using the pin configs on the Sparkfun SAMD51 MicroMod):

import board
import bus...
manic glacierBOT
manic glacierBOT
#

If any of you see these UART problems on ESP32-S3, but not ESP-S2, that would be interesting.

I have seen it on both as I mentioned back earlier in this issue (April 9th)

Was hooking up again with a newer S2, that I see for sale on Adafruit:
https://www.adafruit.com/product/4769

And tried for a long time to reinstall CPy... But I screwed up that I did not realize that this Feather S2 is not the same as the Feather S2. Only when I unplugged it from a breadboard did I see that ...

manic glacierBOT
#

Sorry typo’s yes to to rx…

Sent from my iPad

On May 25, 2022, at 6:45 PM, Dan Halbert @.***> wrote:

@KurtE Just to make sure:

uart1 = busio.UART(board.TX, board.RX, baudrate=115200)
uart2 = busio.UART(board.IO17, board.IO18, baudrate=115200)
I have the two uarts jumpers so TX->17, 18 -> RX

That would be TX->TX and RX->RX. Did you swap them around? I'd expect TX->RX and RX->TX.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are ...

proven garnet
warm flame
#

I'm trying to solve the bootloop problem from my board. Going to add an issue on it

#

Tried with 2 different devices same problem

manic glacierBOT
warm flame
#

Go figure I flash T-01C3 on the board and everything is working

#

I flash t-oi plus and bam bootloop

orchid basinBOT
warm flame
#

I litterally just added pins to the t-01C3

#

but still nothing

#

last build for today ...

orchid basinBOT
manic glacierBOT
#

-flto slows down a build by a factor of two or so. We were also always using -flto-partition=none, which saves more code space than the default -flto-partition=balanced. However, one some builds that need -flto, they don't really need the extra savings of -flto-partition=none. Using the default -flto-partition` reduces build times to 2/3-3/4 of the original.

I did a bunch of experiments to see what space savings were lost, and also tried the other -flto-partition= options.
...

manic glacierBOT
tidal kiln
tulip sleet
tidal kiln
#

if use specific pin(s) it seems

tulip sleet
#

hmm, strange restriction. I'll research this some more, thanks, unless you want to stay on the trail.

tidal kiln
#

@gilded cradle hey. have you ever gone down the "how to run neopixels without sudo" rabbit hole?

gilded cradle
tidal kiln
#

yep. on pi.

gilded cradle
# tidal kiln yep. on pi.

I think I looked into it for I2C and SPI but didn't get very far. It was more like peeking into the rabbit hole.

tidal kiln
#

ok. seems like we've all taken a peek 🙂

gilded cradle
#

🙂

tidal kiln
#

@tulip sleet if you're willing. i think you'd be better suited. could get into some lower level stuff you'd be a better ninja at.

jaunty juniper
#

I2C I was able to use without sudo by adding pi to the I2C group or something

tulip sleet
#

yes, that seems straightforward, it's neopixels in particular

jaunty juniper
#

but neopixel uses /dev/mem which is kernel protected or something

tidal kiln
#

the neopixel lib can use different plumbings under the hood. spi being one of them.

#

yah, it seems any attempt to use /dev/mem is where it becomes a bigger issue. not as simple as adding a group permission.

idle owl
#

@tidal kiln Ready for a shallow dive into Yet Another Schematic?

tidal kiln
#

sure

idle owl
#

I do not see a pull-up on A0. Am I missing something or is that correct?

#

I'm trying to work from as much of the pinouts page for the ESP32-S2 as possible, but obvs there are differences.

tidal kiln
#

do you have eagle installed?

idle owl
#

Yeah that's how I exported that.

#

Already have it open

tidal kiln
#

same thing works for "wires"

idle owl
#

Ok I see some things highlighted

tidal kiln
#

easy place to double click

idle owl
#

I got it from the chip connection

#

but yes.

tidal kiln
#

ok. yah. anywhere works.

#

now can look around at all the highlighted wires and see if there are any pull ups

idle owl
#

It's so barely obvious on the schematic what's lit up. 😕 The color change isn't very ... different.

#

I see it on the board though, which is easier.

tidal kiln
#

yah...it's not a very contrasty color 😦

idle owl
#

Looks like a direct connection there, although it also looks like a trace is missing. Might have turned off a layer I shouldn't have.

#

No.... there's a layer I've never seen before that has the trace in it. Is this a multi-layer board?

#

It's a direct connection from the pad to the chip on the board.

#

So I guess no pullups.

#

@tidal kiln Thanks. I'll remember to do the eyeball-clicky-thing eventually before asking you. 😄

tidal kiln
#

sry. was looking too.

#

yep. multilayer board. direct connection. no pull up.

idle owl
#

Not sure how I've managed to get this far and never deal with a multi-layer board, or get this far having somehow missed the extra layers entirely when working with previous multi-layer boards. 😄

tidal kiln
#

i think multilayer is only used if necessary. most boards are 2 layer.

idle owl
#

@tidal kiln I made the highlight color change to something way more obvious!

tidal kiln
#

i wish the line thickness would also increase

idle owl
#

Yeah agreed.

#

This is at least a huge improvement.

#

I can see things when zoomed out now

tidal kiln
#

that trick is handy, because it's possible to tie in something like a pull up resistor and, on the schematic, tuck it away in some odd corner that is easy to overlook with just visual scanning.

idle owl
#

I went to Options>Set... and checked the High Contrast box in the "Highlight" section of the window, and dragged it around until I was happy with the visual effect.

#

Sorry if you already knew what I did. Figured I'd share in case you weren't.

tidal kiln
#

huh. i had that on. but never noticed the hue slider.

#

can use that to dial it in even more

idle owl
#

Yes!

#

Oh it even changes how it looks on the board view

#

Nice.

digital shoreBOT
manic glacierBOT
#

We've added a few improvements to the Swan R5 (STM32L4R5) board that we hope can be included in the next release. This PR brings these changes:

  • increases filesystem to 1MB by using bank2 of flash on the L4 as storage for that
  • add an ext object on the board that contains the expanded set of pins on Swan from the castellated edges.
  • Builds with the UF2 bootloader offset by default.
  • adds the UF2 family ID for the STM32L4 and supported STM32 devices
  • based on main. (not 7.3.x...
manic glacierBOT
#

This fixes the feather_m0_express build overflow when #6407 was merged.

@tannewt My thoughts were that traceback is "nice", but not vital, especially on SAMD21 builds, and getting onewireio consistently back is good. Itsy M0 still doesn't have pulseio, because it has APA102 support for its DotStar, and there's no room. That would be nice to regularize too, but that requires more digging.

#

@dhalbert and all - quick update, Found the simple example I posted, which is now up at:
https://github.com/KurtE/circuitPython_sketches/blob/main/ESP32 Uarts/simple_version.py
replicates the issue a lot more than my more advanced option which is up there as well:
https://github.com/KurtE/circuitPython_sketches/blob/main/ESP32 Uarts/code.py

The differences mainly have to do with: In simple case I read as many bytes as possible until timeout:

        text = input()
        te...
slender iron
#

@warm flame is there a UART debug output on the board? It will tell you what the restart reason is

orchid basinBOT
manic glacierBOT
orchid basinBOT
#

Thanks for the suggestion. The main purposes of having the boards are to allow people with these boards to be able to download the bootloader and showcase the boards that CircuitPython can run on. As you're probably aware we have filters to be able to find boards with certain features, but if we were to unlist or hide the boards, then it would defeat the main purposes.

Perhaps a better idea would be to only show ones available to purchase, though I'm not sure how easy that would be to imp...

orchid basinBOT
slender iron
orchid basinBOT
warm flame
slender iron
#

what esp is on the board?

warm flame
#

esp32-c3

slender iron
#

ah, so maybe the uart is already used for circuitpython

warm flame
#

but when I flash the t-01c3 build it works

warm flame
#

the t-oi-plus build don't

slender iron
#

you could try loading a debug build and seeing if you get any extra output

slender iron
#

ya, add DEBUG=1 to the make command

warm flame
#

ok

manic glacierBOT
#

I definitely concur with the intent. However, I'm not sure that's possible, since the literal value is needed before link time. We could add some code to populate the array at startup, but that feels like going one step too far for a relatively small concern.

Given that it's a well known value and hard-coded in the hardware, it's not something that needs to be configurable/flexible - so change is unlikely. The filesystem offsets were duplicated for the original F4/F7 ports, so the situa...

warm flame
warm flame
#

21 for tx and 20 for rx.

slender iron
#

there are usually multiple uarts that are broken out

warm flame
#

ok

slender iron
#

ya, those look like the default

warm flame
slender iron
#

it is possible that the gpio number isn't the same as the package pin number

warm flame
#

ok

warm flame
#

trying again and again

#

now the compiler only compile a small 500ko bin file

slender iron
#

I haven't done a ton with the C3

warm flame
#
Executing action: all (aliases: build)
Running ninja in directory /home/delarn/Documents/dev/circuitpython/ports/espressif/build
Executing "ninja all"...
[1/6] Performing build step for 'bootloader'
[1/1] cd /home/delarn/Documents/dev/circuitpython/ports/espressif/build/bootloader/esp-idf/esptool_py && /home/delarn/.espressif/python_env/idf4.4_py3.9_env/bin/python /home/delarn/Documents/dev/circuitpython/ports/espressif/esp-idf/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 /home/delarn/Documents/dev/circuitpython/ports/espressif/build/bootloader/bootloader.bin
Bootloader binary size 0x62c0 bytes. 0xd40 bytes (12%) free.
[2/4] Linking CXX executable circuitpython.elf
FAILED: circuitpython.elf 

#

maybe it doesn't help

#

ok how do I fix this idf.py build error

#

@slender iron the failed: circuitpython.elf is making me nervoous

#

just after

#

[698/700] Linking CXX executable circuitpython.elf
FAILED: circuitpython.elf

#

again

manic glacierBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.3.0 on 2022-05-23; Adafruit Grand Central M4 Express with samd51p20

UF2 Bootloader v3.14.0 SFHWRO
Model: Grand Central M4 Express
Board-ID: SAMD51P20A-GrandCentral-v0

Code/REPL

import displayio
import rgbmatrix
import board
import framebufferio
import audioio
import audiomp3
import digitalio
from controller import Controller
import gc

# RGBMatrix
displayio.release_displays()

matrix = rgbmatr...
slender iron
#

@warm flame you shouldn't use idf to build

#

use make

#

make BOARD=your board

manic glacierBOT
#

This allows the compile stage to optimize most of the translate()
function away and saves a ton of space (~40k on ESP). However, it
requires us to wait for the qstr output before we compile the rest
of our .o files. (Only qstr.o used to wait.)

This isn't as good as the current setup with LTO though. Trinket M0
loses <1k with this setup.

So, we should probably conditionalize this along with LTO.

blissful pollen
#

I swear whenever I take a break from any core work and then come back I mess some upgrade up and break everything in my linux environment. Lesson learned, don't stop working

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

This code was changed here: https://github.com/adafruit/circuitpython/commit/7100d5e485a93552e035476cb794145d6e194052#diff-a944053c00651f658ae1cb445647c6509c09f656236817a32d11eded4ad449d1R143 about two years ago, before 5.4.0-beta.0. We added a SWRST of the RTC, in preparation for a rework of how ticks are used internally, so we could use less power during time.sleep().

I am not sure we can undo that; we may depend on the tick registers starting at 0, and the RTC being in a known sta...

manic glacierBOT
warm flame
tulip sleet
warm flame
#

What's the difference between qio and dio ?

tulip sleet
#

for flash chips, 4-bits-wide data is sent over qio. dio is for "dual": 2 bits wide

warm flame
#

ok it depend on the flash chips

#

thanks

manic glacierBOT
tulip sleet
warm flame
#

@tulip sleet Nice to know

#

Now All I need is that the build work

#

@tulip sleet When I flash the new firmware do I need to flash the bootloader too ?

tulip sleet
#

if you flash the .bin (and erase the chip in advance to remove any partitioing), then you don't need the UF2 bootloader. You can skip that for now to remove an extra possibility of problems.

#

do you have other ESP32-Sn boards?

warm flame
#

ESP32-C3 don't have uf2

tulip sleet
#

oh, sorry, I forgot which board you were working on

#

so you are just using the ROM bootloader

#

there is no bootloader to flash

warm flame
#

@tulip sleet If I want to check if the build was succesful via debian terminal, how do I do that ?

tulip sleet
#

I think the repl will show up on the tty port the board presents, not sure, I haven't tried it myself. The C3 support is very early.

warm flame
#

how do I access the port in terminal ?

tulip sleet
#

let me try it on a QT Py C3 and I'll get back to you. It will be /dev/ttyUSB0 or ttyACM0 or similar

warm flame
#

it's on ttyUSB0

tulip sleet
#

you need a terminal program. We recommend tio, so install that, then just do tio /dev/ttyUSB0. ctrl-T is the escape character in tio to send it commands

#

don't leave tio connected when you are trying to upload the .bin; it will interfere with the upload

warm flame
#

ok

#

I am on tio

#
:~$ tio /dev/ttyUSB0
[tio 11:56:43] tio v1.32
[tio 11:56:43] Press ctrl-t q to quit
[tio 11:56:43] Connected
tulip sleet
#

can you type at it?

warm flame
#

and cursor is flashing

#

nope

#

on a reset : ```
ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0x1 (POWERON),boot:0xd (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:2
load:0x3fcd6100,len:0x16b8
load:0x403ce000,len:0x930
load:0x403d0000,len:0x2d28
entry 0x403ce000
I (31) boot: ESP-IDF 944c01eef 2nd stage bootloader
I (31) boot: compile time 11:25:39
I (31) boot: chip revision: 3
I (33) boot.esp32c3: SPI Speed : 40MHz
I (38) boot.esp32c3: SPI Mode : DIO
I (43) boot.esp32c3: SPI Flash Size : 4MB
I (47) boot: Enabling RNG early entropy source...
I (53) boot: Partition Table:
I (56) boot: ## Label Usage Type ST Offset Length
I (64) boot: 0 nvs WiFi data 01 02 00009000 00005000
I (71) boot: 1 app factory app 00 00 00010000 00200000
I (78) boot: 2 user_fs Unknown data 01 81 00210000 001f0000
I (86) boot: End of partition table
I (90) boot_comm: chip revision: 3, min. application chip revision: 0

#
I (97) esp_image: segment 0: paddr=00010020 vaddr=3c050020 size=1edc0h (126400) map
I (133) esp_image: segment 1: paddr=0002ede8 vaddr=3fc88e00 size=01230h (  4656) load
I (134) esp_image: segment 2: paddr=00030020 vaddr=42000020 size=43ac4h (277188) map
I (198) esp_image: segment 3: paddr=00073aec vaddr=3fc8a030 size=004d8h (  1240) load
I (199) esp_image: segment 4: paddr=00073fcc vaddr=40380000 size=08d40h ( 36160) load
I (213) esp_image: segment 5: paddr=0007cd14 vaddr=50000010 size=00010h (    16) load
I (216) boot: Loaded app from partition at offset 0x10000
I (219) boot: Disabling RNG early entropy source...
I (235) cpu_start: Pro cpu up.
I (244) cpu_start: Pro cpu start user code
I (244) cpu_start: cpu freq: 160000000
I (244) cpu_start: Application information:
I (247) cpu_start: Project name:     circuitpython
I (252) cpu_start: App version:      8.0.0-alpha.0-81-g8dcbd3ab4-dir
I (259) cpu_start: Compile time:     Ma 27 2022 11:25:29
I (265) cpu_start: ELF file SHA256:  47ce06cd16a1b45a...
I (271) cpu_start: ESP-IDF:          944c01eef
I (276) heap_init: Initializing. RAM available for dynamic allocation:
I (283) heap_init: At 3FC8CB50 len 000334B0 (205 KiB): DRAM
I (290) heap_init: At 3FCC0000 len 0001F060 (124 KiB): STACK/DRAM
I (296) heap_init: At 50000020 len 00001FE0 (7 KiB): RTCRAM
I (303) spi_flash: detected chip: winbond
I (308) spi_flash: flash io: dio
I (316) sleep: Configure to isolate all GPIO pins in sleep state
I (318) sleep: Enable automatic switching of GPIO sleep configuration
I (326) coexist: coexist rom version 9387209
I (330) cpu_start: Starting scheduler.
Hello, world!
#

can't type

warm flame
#

will check in a min ... os update

tulip sleet
#

it doesn't look like you've loaded CircuitPython

#

oh, yes, I see it there

#

the pins will not be right, but it should talk to you

warm flame
#

let's try it

#

I tried to flash wit web esptool

#

no good

#

flashing in terminal

#

same problem

#

@tulip sleet Just flashed the t-01C3 build and it works

tulip sleet
#

did you erase it in advance before?

#

glad to hear it works!

warm flame
#

yes

tulip sleet
#

so t01 works but not tOI ? (gack, their model numbers are problematic)

warm flame
#

But I need to access those GPIO that are not avalaible in T-01C3 ...

#

exactly

#

T-01C3 and t-oiPlus

tulip sleet
#

does the "Absolute Newest" t01 work on the t-oi?

#

I looked at the build differences and they are minor

warm flame
#

yes

tulip sleet
#

where is the schematic for the t-oi?

warm flame
tulip sleet
#

i am at a loss, so the prebuilt t-OI build that we have does not work, you are saying? Did you try reloading it again?

warm flame
#

I'm remaking the build

#

with default_i2c_bus and default_uart_bus

#

it may not like the circuitpy bus

manic glacierBOT
warm flame
#

@tulip sleet @slender iron in my build folder I got 2 firmware.bin file. one called circuitpython-firmware.bin and the other firmware.bin

tulip sleet
#

firmware.bin is what you want - it's combined with other stuff to make a ful .bin

warm flame
#

ok

#

@tulip sleet yes the prebuild is not working

#

tried on 2 different boards

tulip sleet
#

if you build the 01 firmware yourself, does your own build work?

#

So I would stay start with the 01, and start making the OI changes, one by one, but I think you are doing that

warm flame
#

this is exactly what I'm doing

#

this is what I should have done

tulip sleet
#

it could be the never reset stuff - that is my highest suspicion, but just because it's the most complicated change

warm flame
#

But the 01C3 works with the oiPlus

#

will be an other day tho

#

familly time

manic glacierBOT
sour spoke
#

Has something changed about the mu-editor. I haven't used it in a few months, but IIRC I could open the serial window, do a ctrl-c, and get REPL. Now I get a flashing cursor in the serial window, but nothing else. I am using 1.0.3 with a pybadge. I know the connection work because I can save/modify code.py

stuck elbow
#

that's a different connection

#

is this Linux?

sour spoke
#

yup

stuck elbow
#

make sure you have the rights to /dev/ttyACM0

#

you probably need to add yourself to the dialout group

sour spoke
#

I can get a repl with gtkterm just fine. permission should be the same

stuck elbow
#

do you have the gtkterm open right now? because only one program can open the serial connection at a time

sour spoke
#

There is a gtkterm running but it is connected to /dev/ttyUSB0. If I start a gtkterm, it will connect to /dev/ttyACM0 and display the REPL. If I kill it and restart mu-editor, the behavior is the same.

#

2022-05-27 18:53:48,250 - mu.modes.base:227(find_device) INFO: Found device on port: ttyACM1
2022-05-27 18:53:48,251 - mu.modes.base:228(find_device) INFO: Serial number: e00fce6898dcda8f48f21674
2022-05-27 18:53:48,257 - mu.modes.base:278(add_repl) INFO: Started REPL on port: /dev/ttyACM1
2022-05-27 18:53:48,257 - mu.modes.base:259(toggle_repl) INFO: Toggle REPL on.

#

It looks like mu-editor thinks it is starting REPL.

stuck elbow
#

but ACM1

sour spoke
#

just noticed that.

stuck elbow
#

do you have more devices connected?

#

or did you enable the CDC data?

sour spoke
#

the pybadge is on acm0, I can verify that with gtkterm. Let me look at my logs and see what got ACM1.

#

You were rightish! The Boron, which I normally only think of in terms of /dev/ttyUSB0 claimed ACM1 which is what mu-editor is glomming onto. Unplug the boron and things work fine. Thank you!

#

May 24 21:52:46 alton kernel: usb 1-4.4.2.4.1: Product: Boron CDC Mode
May 24 21:52:46 alton kernel: usb 1-4.4.2.4.1: Manufacturer: Particle
May 24 21:52:46 alton kernel: usb 1-4.4.2.4.1: SerialNumber: e00fce6898dcda8f48f21674
May 24 21:52:46 alton kernel: cdc_acm 1-4.4.2.4.1:1.0: ttyACM1: USB ACM device

#

One of the rare times a power-only USB will be useful!

manic glacierBOT
jaunty juniper
manic glacierBOT
lone sandalBOT
manic glacierBOT
#

As mentioned in issue #6274 there was a request to add the ability to statically set your IP address. Using @anecdata's suggestions I have added in this functionality. There are three new methods for wifi.Radio:

  1. stop_dhcp - Stop the DHCP client (required to set a static address)
  2. start_dhcp - Start the DHCP client (will automatically grab an IP address if it was stopped)
  3. set_ipv4_address - Provide the static IP, subnet and gateway addresses (all are required). This will sto...
lone sandalBOT
warm flame
#

I'm reinstalling the whole toolchain

warm flame
#

@tulip sleet I started by changing the names

slender iron
#

@shell bolt do you compile your code with clang?

warm flame
#

in mpconfigs and sdkconfig

tulip sleet
#

and adding more pins should be fine

#

did you reinstall the toolchain with esp-idf/install.sh ? I assume so

warm flame
#

yes

#

everything

#

added 5 pins too

#

now it's compiling

manic glacierBOT
#

I looked into this this afternoon. -Oz without LTO is still too large on SAMD21. It's not possible to -Oz with LTO and lld.

Relevant talk about LTO and sections: https://www.youtube.com/watch?v=hhaPAKUt35E

Changes for it are here: https://github.com/tannewt/circuitpython/tree/clang13

Build of feather_m0_express from dc5565a5c is 65664 bytes free in flash.
With clang -Oz no lto, 12824 bytes are free.

-Oz not supported in the linker: https://reviews.llvm.org/D63976

warm flame
#

REPL works with the additional pins

#

how can I see if the pins are really added

shell bolt
warm flame
#

@tulip sleet Pins are added

#

adding more

slender iron
shell bolt
warm flame
#

I've added the SDA SCL pins

#

maybe those are the culprit

manic glacierBOT
slender iron
warm flame
#

@tulip sleet I've added the SDA SCL in the pins but not in the mpconfig

#

now adding the battery stuff

#

do I have to do a make clean??

jaunty juniper
#

you can do make BOARD=... clean, it can be necessary if there are new strings (which pin names are)

shell bolt
slender iron
#

Yup, I followed that. Got it going but it was too large. No size optimized lto

manic glacierBOT
orchid basinBOT
manic glacierBOT
#

Not sure if this helps identify anything. I decided to try wave format and the issue does not occur from the file I tested.

wav file: https://learn.adafruit.com/circuitpython-essentials/circuitpython-audio-out

import displayio
import rgbmatrix
import board
import framebufferio
from adafruit_display_shapes.rect import Rect
import audioio
import audiocore
from time import sleep
import gc

# RGBMatrix
displayio.release_displays()

matrix = rgbmatrix.RGBMatrix(
    width=...
lone sandalBOT
#

Hi,

I would like to add a link to the http://pewpew.rtfd.io documentation in here, but I'm at a loss where it would belong. PewPew started as a featherwing for making simple games, but it gradually evolved into several independent devices, and a whole lot of tutorials, guides and example games. I use it for running Python programming workshop, and I think it could be a very useful tool for educators, but where to put it? Under "Guides", because there are tutorials? Under "Code", because of...

lone sandalBOT
manic glacierBOT
#

For now I think I will leave this for someone who actually uses and knows the ESP32 hardware/software to debug and update the code to work.

I sort of traced the code, to where I think the data comes in on an ISR, and the handler than calls through a few layers of code to read the stuff from the ESP32, into a buffer. It then returns and then this buffer is copied into a ring buffer. When the data is requested, the code then calls off again through layers to copy all or part of the data f...

manic glacierBOT
#

This PR contains all of the changes made by cloning a fresh copy of this repo on main branch and then running pre-commit run -a with no other modifications.

Most of the changes are formatting around ** operator with spaces inside of files in tools/ and tests/

We can close this if we don't want the changes from it. I think it was mentioned durning brief discussion during the meeting a few weeks back to make this PR and see if we want to pull in the changes from it.

It would ...

#

Looks like I had an out of date version of Black which is why all of these things got flagged by the formatter and changed.

This failed actions here because of the format check which led me to look into the versions.

After updating my local black to the same version as the actions container is using I no longer get the big list of changes on fresh clone. :tada:

manic glacierBOT
manic glacierBOT
lone sandalBOT
manic glacierBOT
manic glacierBOT
#

Using CircuitPython to control stepper motors is currently pretty ugly. At the moment, I use PWMOut, precalculate the frequency steps needed to provide pseudo acceleration/deceleration, compute the time necessary for the total steps in each PWM window, sit in a timing loop while monitoring a digital input 'limit switch' and end up sorta close to the total number of steps I wanted. I realize that I may get better precision with PulseIO or AudioPWM, but they have their own issues. It would be p...

wraith crow
#

I'm playing with a Sparkfun SAMD51 Thing Plus which I thought had 4 MB (megabytes) of SPI flash but the CIRCUITPY drive only has about 500K available space. After digging through the CP flash code for a couple days, I finally noticed that the external SPI flash on the Sparkfun board is 4 Mb (megabits) or 512 KB in size.

So this now changes my confusion about this board. Now it appears to have too much Flash. There is 1 MB (megabyte I think 😋 ) internal flash on the ATSAMD51J20 microprocessor but the mpconfigboard.mk file in ports/atmel-samd/boards/sparkfun_samd51_thing_plus does not have the INTERNAL_FLASH_FILESYSTEM flag enabled so I wouldn't expect CP to be using the flash on the controller. I think I saw somewhere that under some conditions CP will cut the available flash in half for the file system and if that's what it's done then the 500K available makes sense.

I guess I have two questions:

  1. Did I miss the setting of the INTERNAL_FLASH_FILESYSTEM flag for this build somewhere or is the internal flash selected by some other means?

  2. and from a what the heck perspective, why would Sparkfun put a 512KB SPI flash chip on a board with a microcontroller that has 1MB flash onboard?

manic glacierBOT
jaunty juniper
#

RP2040 and ESP builds need to share the flash with the CP binary, so it's a different situation

wraith crow
jaunty juniper
#

as it turns out the thing plus build uses less than half the internal flash, but that just means the space is left unused, it could be filled with more builtin modules in the future

462472 bytes used, 561528 bytes free in flash firmware space out of 1024000 bytes (1000.0kB).
wraith crow
#

Yeah, it's sort of ironic that the file system would actually have move space if CP ignored the external flash chip

#

Just for kicks, maybe I'll take another whack at trying to get a custom build of CP to ignore the external flash, my first attempt at that didn't go to well 😆

manic glacierBOT
#

As far as I can tell, the PCA9585 CP library doesn't really handle any of the specific things I'm looking for, such as generating a precise # of pulses, smooth frequency acceleration/deceleration, and monitoring of limit IO to stop motion. Is there something I'm missing? If I need to separately modify and time the PWM frequency for acceleration, and separately monitor the limit IO, and then communicate over I2C to the PCA9585, that makes my problem even worse with regard to precision stepping...

wraith crow
#

Actually, if CP cuts internal flash in half, I guess the available space would be the same and maybe my earlier attempt did work and I just didn't notice because the file system is using 512KB either way. Oh well... Thanks I think I can finally put this down now.

jaunty juniper
manic glacierBOT
jaunty juniper
#

more accurately the space used by the drive when using internal flash is defined somewhere, and CP uses the rest

wraith crow
jaunty juniper
#

yeah ok that's the default for samd51

manic glacierBOT
#

Yeah, the Pololu controllers would work, though they are considerably more expensive than the seesaw. They could replace our external stepper drivers for some of our steppers, and we could use the step/dir outputs for the NEMA52 drivers. The Status: Rationed and low stock is a bit concerning :) Not sure of their long term reliability.

I have thought about the RP2040 PIO, and it's a possibility I think, though it's a bit tricky to get the right math for smooth acceleration/deceleration. If ...

orchid basinBOT
onyx hinge
manic glacierBOT
#

Checking for button presses in the background makes it much easier to write interactive programs, as we no longer have to worry about missing them. It would be nice to have a similar functionality for touch inputs, so that buttons and touch pads would truly be interchangeable, and could be handled by similar code.

Perhaps we could add a TouchPads class to the keypad module, which would only be compiled if touchio is enabled, and which would do the same as keypad.Keys, but with touc...

manic glacierBOT
#

@dhalbert No luck, board freezes (LED keeps lit with last update) and USB disconnect.
I am printing gc.mem_free() every round and it is staying stable.

Can you reproduce the error with your own Matrix Portal M4 and LED 64x32? It would be good to know that this isn't a hardware or quality control issue with one of the pieces. This seems like it would be a major and prevalent bug for a product that is advertised to specifically fetch internet data and put it on an LED board. But I don't ...

#

@kmatch98

Hello,

I have recycled 2 Crestron TSW 750 and I would like to use them but I can't because of the proprietary system.... I saw that you managed to get some of them to work. Could you please tell me how to do it? It would be a shame to throw them away....
I would like to display sensor data or a web page with my home automation like Jeedom or other. I saw that the TSW 750 has a micro sd card but I don't know if I can install a system inside.

Translated with www.DeepL.com/...

#

gc.mem_free() being stable means that gc is working. But the gc is not compacting, so there can be enough free memory, but it could be fragmented, and not have enough contiguous space for a requested large buffer. If one does gc.collect() before the fragmentation has a chance to happen, then it cn be avoided.

I think it may have to do with what is being fetched. If the HTTP response is of constant length, or nearly so, then the same memory block can get used over and over. If it grows ...

manic glacierBOT
#

Could you explain how it was wrong before? Just want to understand the changes.
Sure, with pleasure.

Here is some background information:
Default SPI frequency settings are defined by SPI peripheral clock frequency (1) and SPI peripheral prescaler (2).

SPI bus frequency value := peripheral clock frequency (1) / prescaler (2)

The prescaler value is stored in self->prescaler (A). The prescaler register value is stored in self->handle.Init.BaudRatePrescaler (B).


...

#

Sorry I know I'm a bit late to this conversation, but I thought I would add this in case it helps anyone else.
It's really easy to change the device name if you want to. Just download the Circuit Python .UF2 file and using a Hex file editor (I used PSPad) search for "CircuitPython Audio". You can then edit the Text, save the changes and install your modified version of the .UF2 file.
The Pi Pico should then appear with the new name you gave it.

manic glacierBOT
#

Thank you, that is interesting. I have a lot to learn about memory use.
I have gc.collect() sprinkled throughout now. And will see how this goes.

As far the transit site: it definitely tolerates requests every 30 seconds. The site is even hard-coded to auto-refresh on that interval if you leave it open on browser. It is meant for public wear and tear and probably doesn't get much traffic. I push it and fetch 4 times on 30-second interval (which is the ultimate need of this project, bu...

manic glacierBOT
#

@dhalbert @ThomasAtBBTF @futari-media - I was playing around instrumenting more of the code like setting/clearing IO pins around the ISR and the like, but every time I would start my sketches I am getting a little garbage on the input of each UART...

So I added a call to reset the input like:

uart2 = busio.UART(board.IO17, board.IO18, baudrate=115200)
uart2.timeout = 0.1
uart2.reset_input_buffer()

Which cleared that up, and it also so far has the current test sketch working ...

#

Awesome! Glad to see that you’re trying to use these displays. In my work I discarded the original circuit board and just used the display touch panel and added different electronics.

Here is some background on what I’ve done.

https://hackaday.io/project/184118-crestron-tss-752-teardown-rebuild

https://hackaday.io/project/183895-crestron-tsw-732-teardown

If you want to just reuse the touch panel display, first you will need to figure out the pin outs for the display connector. ...

manic glacierBOT
#

@dhalbert One thing I've reproduced a couple times: when I comment out all the Matrix objects and don't engage with the LED matrix in any way, the board hums along and requests for 24 hours+ with no issues. The second I bring the LED display (via adafruit_matrixportal Matrix) into the picture, alongside fetching data online, the system will inevitably hang.

manic glacierBOT
#

fwiw, for over a month I've had three ESP32-S3 UART senders sending to one UART receiver ESP32-S3, with the following (pretty aggressive) config:

uart[0] = busio.UART(board.IO6, board.IO7, baudrate=921600, stop=1, timeout=1, receiver_buffer_size=65535)
uart[1] = busio.UART(board.IO16, board.IO17, baudrate=921600, stop=1, timeout=1, receiver_buffer_size=65535)
uart[2] = busio.UART(board.IO10, board.IO11, baudrate=921600, stop=1, timeout=1, receiver_buffer_size=65535)

The code doe...

manic glacierBOT
#

@anecdata
Thank you for sharing your observations and thank you for mentioning reset_input_buffer() !
I did not have this in my test-code and I can say, that calling reset_input_buffer() certainly changes the behavior of the UARTs.

This code:
`uart1 = busio.UART(board.TX, board.RX, timeout=0.01)
uart2 = busio.UART(board.D13, board.D12, timeout=0.01)
uart3 = busio.UART(board.D11, board.D10, timeout=0.01)
uart1.reset_input_buffer()
uart2.reset_input_buffer()
uart3.reset_input_bu...

lone sandalBOT
lone sandalBOT
manic glacierBOT
#

@ThomasAtBBTF and @anecdata thanks for the inputs. I am not sure how much farther I will take this.

I personally don't really use ESP32s. I was mainly trying them out to see how they behave. In particular I was debugging some stuff with the Teensy 4.x ports to CircuitPython. So I tried out some test sketches on a few different processor chips to compare, including the RP2040 and then ESP32-S3.

I reported the issue on the S3, but it was mentioned that CircuitPython on Teensy and...

lone sandalBOT
manic glacierBOT
#

@KurtE It seems to me that you should look at the ESP32-S3 transmitter side and not the receiver side.

You are right that the TX is screwed up...
Sketch:

import time
import board
import busio
import supervisor

uarts = []
board.UART().deinit()
uarts.append( busio.UART(board.IO6, board.IO7, baudrate=115200, stop=1, timeout=1, receiver_buffer_size=255))
uarts.append(busio.UART(board.IO16, board.IO17, baudrate=115200, stop=1, timeout=1, receiver_buffer_size=255))
uarts.appe...
warm flame
#

I made it work !

#

YAY !

manic glacierBOT
manic glacierBOT
manic glacierBOT
thorny jay
#

Maybe this is a message for danh (no tag as this is low priority and a day off),

I would like to use keypad to simultaneously scan a KeyMatrix, and an independent Key on a GPIO. (this is the case for C64 keyboard that have a 8x8 matrix plus the RESTORE key, this is also the case for the BBQ20KBD and the to right button that is wired outside the matrix)
The idea would be for those to share an Event queue so that event stay in order and I don't need to merge two queue in userland.

I have checked those two documentations, but I don't see the way to do what I want:

The kind of API I expect is to be able to add arbitrary number of matrix, GPIO and shift register, and have CP scan that and collect the event. Where should I publish that as an issue?

PS: For Kattni, maybe you could hint about the existance of keypad build-in in this guide: https://learn.adafruit.com/matrix-keypad maybe that learnguide is outdated and use old technique to scan keys?

slender iron
#

<@&356864093652516868> Just a reminder that our meeting is in just over 24 hours due to a US holiday. Talk with you tomorrow!

tulip sleet
jaunty juniper
#

I would do that with a python library, the events have a timestamp so having a next_event() that gets the next event of each queue, returns the oldest and caches the other should be simple enough

proven garnet
#

I'm starting to get errors on my own libraries using Sphinx that language = None isn't good with Sphinx 5.0.0, and my guess is it'll be an issue for the libraries too. @idle owl, just a heads up that may need to be a patch that will need to be applied for the documentation to be published properly to RTD.

#

The good news is spent the week developing my patch tools so if we want to move to Sphinx 5.0.0 I can fix it pretty quickly. Or pin back to Sphinx 4.0.0

thorny jay
#

Ok, that's an option. Right now I erronously added that GPIO to the matrix as a row(?) and a press trigger one event for each column(?) so I can just filter out and not use n-1 of them. But I felt that something was missing. I did not check KMK yet, not sure if they handle that.

proven garnet
#

The fix is easy, just changing to language = "en" in docs/conf.py

#

Yeah, I re-ran the CI on a library that previously had no issues, and it popped out there as well :/

#

I guess this is a problem for everywhere where Sphinx is pinned as sphinx>=4.0.0 and language is explicitly equal to None so heads up y'all!

manic glacierBOT
manic glacierBOT
proven garnet
idle owl
#

@proven garnet Thank you so much for catching this and the super quick fix!

proven garnet
#

No problem! Always easy when it's a holiday Coolpika

proven garnet
#

Patched! Took longer because my laptop decided to go wonky during the patch so it was harder to find failures, but I managed to get a script to do it. Between adabot and manual patching problem should be settled!

worldly escarp
#

Hello, @cold wharf and I just joined the server and wanted to introduce ourselves. Alex and I make cat-shaped educational boards with a focus on learning cybersecurity and ethical hacking as HakCat.com.

#

We’ve been creating CircuitPython labs that run on our ESP32s2 based Nugget boards with tutorial videos on the Hak5 YouTube channel. I’ve had some great conversations with CircuitPython developers, and I was encouraged to join this server while I work on new labs. If anyone mentions one of our boards, we’re happy to answer questions. I hope we can contribute here!

blissful pollen
proven garnet
#

A few of the libraries seem to have new issues probably resulting from the upgrade to Sphinx 5.0.0, looking into those now

cold wharf
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.3.0 on 2022-05-23; FeatherS2 with ESP32S2
Board ID:unexpectedmaker_feathers2

Code/REPL

import adafruit_requests
import ssl
import socketpool
import wifi
import dualbank
from secrets import secrets

print('connecting to wifi')
wifi.radio.connect(secrets["ssid"], secrets["password"])
print('wifi connected')

pool = socketpool.SocketPool(wifi.radio)
requests = adafruit_requests.Session(pool, ssl.creat...
tulip sleet
#

@onyx hinge thanks for the astroid fix! I wonder why it does not seem to be actively maintained.

onyx hinge
#

Yeah the last release was some time ago!

manic glacierBOT
onyx hinge
#

Besides working on that sphinx bug today I also toured Königstein near Dresden Germany. Hope y'all are well.

ornate breach
#

What a view

manic glacierBOT
tulip sleet
#

<@&356864093652516868> Weekly meeting is today at 2pm Eastern / 11am Pacific / 1800 UTC. See the pinned messages for a link to the notes doc. See you then if you can make it!

onyx hinge
#

@tulip sleet it would be nice if some of this stuff were better signposted!

fathom sand
#

@tulip sleet would you please add me to the "circuitpythonistas"

manic glacierBOT
#

Thanks for diving in to this!

Using this test code on a
Adafruit CircuitPython 8.0.0-alpha.0-22-g297aa91f2 on 2022-05-27; Adafruit QT Py ESP32S2 with ESP32S2
to set up the static parameters:

print(f"Setting IPv4...")
wifi.radio.set_ipv4_address(ipaddress.ip_address("192.168.6.252"),
                            ipaddress.ip_address("192.168.4.1"),
                            ipaddress.ip_address("255.255.252.0"))
print(f"IPv4    {wifi.radio.ipv4_address}")  # None
print(f"Gat...
#

It freezes when I am instantiating a Matrix object and using it to display
data derived from requests. I've noticed the import alone doesn't cause the
glitch.

On Tue, May 31, 2022 at 1:03 PM Dan Halbert @.***>
wrote:

The second I bring the LED display (via adafruit_matrixportal Matrix) into
the picture, alongside fetching data online, the system will inevitably
hang within couple hours.

Just to clarify, is just import adafruit_matrixportal enough to cause
trouble, or are y...

thorny jay
#

Sorry, skipping the meeting, no notes, not even listening LIVE. I have not done much anyway, despite an extra day.

proven garnet
#

I don't have access to main for neopixel so if anyone who does has a minute, please take a look at the PR patch I submitted for it. It's the same one the rest got yesterday, for what it's worth, nothing fancy.

slender iron
idle owl
#

We had to lock it down after a broken PR got merged. So we limit who can touch it.

#

Since it's such a widely used library.

tulip sleet
#

<@&356864093652516868> Weekly meeting starting now in CircuitPython audio channel

turbid radish
#

Yes, please send interesting tidbits

idle owl
manic glacierBOT
#

@dhalbert @ThomasAtBBTF @futari-media - From the hints from the last few posts, I think I may have found something that is making it work better, but not sure what to do with it. Also would need more testing.

And then there is what to do to make it work, versus someone to properly do it.

Theory: the hardware FIFO queues were not properly setup and working right, especially after soft reboot...

So what I did that appears to resolve the issue with TX being screwed up and guessin...

random junco
#

He fixed the linter on the awesome list, too!

turbid radish
#

Thanks Melissa!!

slender iron
#

blinka 🎉

hidden oxide
#

Hi all - just wanted to pop in and say hi and thanks all!!

proven garnet
#

Thanks!

manic glacierBOT
#

Has this been fixed? It looks like the CODE OF CONDUCT now links to an online page (HTML) instead of 404'ing. Or am I misunderstanding?

tekktrik appears to be right. I tested both the original link and the only other Markdown I could file, and both pages load the HTML page and no longer 404:

Unless I'm misunderstanding too, this can be marked fixed and closed.

--Paul

ember iris
#

Thanks all! Have a great week!

random junco
#

@proven garnet Nice work, almost every documentation issue I look at, you're already on it. 🙂

manic glacierBOT
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> https://docs.google.com/document/d/1KXxPd9X8w8UI8Cg-YgWBTlw8rMMlCBpzM2-osVtJDrg/edit?usp=sharing

manic glacierBOT
#

Hi, @calcut, the bin fetched from circuipython.org, starts at address 0x0 and includes various partitions that can't be updated using dualbank, the actual firmware is at 0x10000 in the bin (checkout the following partition table).
https://github.com/adafruit/circuitpython/blob/ebe442cd9dac31204f3d4f74ec615040ed21fe2a/ports/espressif/esp-idf-config/partitions-16MB.csv#L1-L10
I recommend fetching the firmware from [CircuitPython's S3 Bucket](https://adafr...

idle owl
#

@errant grail Did your NAU module that you added to the bundle end up on PyPI?

manic glacierBOT
#

Appears to work on S3 and S2, although still found it good to reset the input buffer.
Here is current sketch on S3:

import time
import board
import busio
import supervisor
from digitalio import DigitalInOut, Direction, Pull

uarts = []
board.UART().deinit()
uarts.append( busio.UART(board.IO6, board.IO7, baudrate=115200, stop=1, timeout=1, receiver_buffer_size=255))
uarts.append(busio.UART(board.IO16, board.IO17, baudrate=115200, stop=1, timeout=1, receiver_buffer_size=2...
idle owl
#

@errant grail Would you be willing to post it to PyPI?

proven garnet
#

It's also about all I can currently contribute to the core haha

random junco
#

me too! that's why I was looking at docs. 🙂

errant grail
idle owl
errant grail
idle owl
errant grail
manic glacierBOT
#

I was working on issue #4664 but I found a few other small issues and instead of opening issues for each I hoped it would be ok if I just submitted one pull request that addressed them all. I tested these changes with a dht22, an ir remote and an rcwl-1601 and all work as expected. Below is a list of changes.

Fixes #4664
Addresses #4946 since just dropping short pulses isn't a valid way to filter out short pulses
Fixes a buffer start index reset bug on [line 160](https://github.com/adafr...

#

CircuitPython version

Adafruit CircuitPython 7.3.0 on 2022-05-23; Adafruit ItsyBitsy nRF52840 Express with nRF52840

Code/REPL

# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT

import time

import adafruit_ble
from adafruit_ble_adafruit.adafruit_service import AdafruitServerAdvertisement
from adafruit_ble_adafruit.temperature_service import TemperatureService

# PyLint can't find BLERadio for some reason ...
slender iron
#

@stuck elbow I'm thinking about CP's built in font

#

what do you think about one that is 6x12 and then we could add 12x12 emojis

stuck elbow
#

I can design anything as long as it's at least 3x5 (not counting the spacing)

slender iron
#

I want to make the blinka in the corner a snake emoji

stuck elbow
#

6x12 seems huge to me

slender iron
#

its 6x14 now

stuck elbow
#

well, my boards have 4x6 font :)

#

but I tend to work with low-resolution displays

slender iron
#

ya, that's the problem if I add emoji support

#

it'll be harder to have different font sizes

stuck elbow
#

I think I'm not in the target audience for that feature

slender iron
#

ya, we could have the top status bar without the snake emoji

stuck elbow
#

by the way, I've been meaning to ask, are the escape sequences for the terminalio documented anywhere?

#

I wanted to make a menu in text mode

slender iron
#

they are standard vt100 commands but we don't document what we support anywhere

stuck elbow
#

I tried a couple vt100 commands and they didn't work

slender iron
#

here is my status bar test

#

I was going to implement what I need there

stuck elbow
#

I looked at it, but it's a bit convoluted

slender iron
#

ya, it is

stuck elbow
#

so you will need an escape code for setting the scroll area now?

slender iron
#

yup

#

and saving and restoring cursor location

#

a status bar seems like the best way to show wifi, ble, usb and usb host status

stuck elbow
#

if you used a separate terminal tilegrid, you could use different fonts for them

slender iron
#

ya, at a flash cost though

stuck elbow
#

even different text orientation

#

I assume this is for boards like the esp32 ones that have plenty of flash

slender iron
#

I was hoping to switch everything to a status bar

#

for consistency

stuck elbow
#

I really don't see a status bar on a 128x64 display

#

especially if it's 12 pixels high

#

with the 4x6 font it just fits most exceptions in the 64 pixels

slender iron
#

if the screen is high res then it'd be hard to read though

#

we could just drop the 12x12 emoji if the font is smaller

#

blinka is 16x16 atm

stuck elbow
#

I think I had smaller blinkas somewhere

#

the storage for emojis is also going to eat flash

#

I assume they won't be stored in the font?

slender iron
#

ya, I'd only store the snake blinka on small builds

#

I think they'd need to be separate to be more colors

stuck elbow
#

if you want a custom font, you could have it use more colors too. In Stage I use a 4-color font, so I get to anti-alias the letters

#

you would then just need custom palette for the emoji

slender iron
#

custom font could work for english but then other languages would be left out

stuck elbow
#

why, you can have diacritics in a custom font

slender iron
#

it's just a lot to add

stuck elbow
#

mostly copy-paste

slender iron
#

ya, true

#

I can't imagine a 4x6 font on this esp display

#

6x12 is pretty small already

stuck elbow
#

right, I don't think one font will work for everything

#

also, 4 colors means it's 2x bigger in the memory

#

I would say we need a small font, possibly without emojis, for small screens like the OLEDs, and a big font for the larger displays

slender iron
#

could we antialias a 6x12 font down?

stuck elbow
#

scaling down doesn't work at those sizes very well, at the very least you would need pixel hinting, most fonts require manual touch up

#

do we need cirillics and greek too?

#

or just latin with diacritics?

slender iron
#

we do cyrillics for ru yes

#

not exactly sure about all of our languages

stuck elbow
#

if you want to generate a font, best take a ttf font with good hinting and use that

slender iron
#

I'll keep using terminus

#

just realized I was making it 6x14 due to a misunderstanding of offset

#

@tulip sleet could you pull the language download stats when you have a chance?

tulip sleet
slender iron
#

something recent-ish

tulip sleet
#

SELECT language, count(*) FROM "default"."adafruit_circuit_python_downloads_details" where board <> '' and language <> '' and version like ('7.%')group by language order by count(*) desc

#

I am not sure about the en_us (as opposed to en_US) ones

#

maybe it's just that case gets ignored on fetches

slender iron
#

do we have terminal enabled for ja?

tulip sleet
#
SELECT lower(language), count(*) FROM "default"."adafruit_circuit_python_downloads_details"  where board <> '' and language <> '' and version like ('7.%')group by lower(language) order by count(*) desc
#

looking...

#

This is only in the atmel-samde Makefile:

# We don't have room for the fonts for terminalio for ja and ko
# so turn off terminalio, and if it's off and displayio is on,
# force a clean build.
# Note that we cannot test $(CIRCUITPY_DISPLAYIO) directly with an
# ifeq, because it's not set yet.
ifeq ($(TRANSLATION), ja)
CIRCUITPY_TERMINALIO = 0
RELEASE_NEEDS_CLEAN_BUILD = $(CIRCUITPY_DISPLAYIO)
endif

ifeq ($(TRANSLATION), ko)
CIRCUITPY_TERMINALIO = 0
RELEASE_NEEDS_CLEAN_BUILD = $(CIRCUITPY_DISPLAYIO)
endif

#

and only off for samd21

slender iron
#

hrm, interesting

#

builds a ja build

#

on esp

tulip sleet
#

i would like to understand why the ru build is so big. Sure, the UTF-8 chars are mostly double-wide, but they are on the same code page, so the first byte would be the same. So why doesn't the huffman handle this succinctly, with the code page encoding being very narrow?

#

the ru translation is only 20-25% done, or maybe even less

slender iron
#

ja does have terminal but the ja chars are ignored

tulip sleet
#

so nothing in the font?

slender iron
#

yup

tulip sleet
#

maybe ko was/is in the font??

#

I don't know why I would have written that. I think it was me that wrote that comment.

slender iron
#

ya, maybe ko is

#

can you see what the most popular boards for ja are?

#

rp2040 is my guess

tulip sleet
#

let me do better than that

slender iron
tulip sleet
#

SELECT lower(language), board, count(*) FROM "default"."adafruit_circuit_python_downloads_details" where board <> '' and language <> '' and version like ('7.%')group by lower(language), board order by lower(language), count(*) desc, board

slender iron
#

my font bitmap data is 3552 uint32_t long now

tulip sleet
#

14kB, includes ja and ko?, or just ja?

#

you mean now after shrinking, or this is before any work on it?

slender iron
#

thats just switching to ja unifont and running the regular gen display resources

#

I'm thinking about supporting double wide characters so that blinka can be an emoji

tulip sleet
#

can the kerning be set so that blinka is made of two half images?

slender iron
#

In CJK (Chinese, Japanese and Korean) computing, graphic characters are traditionally classed into fullwidth (in Taiwan and Hong Kong: 全形; in CJK: 全角) and halfwidth (in Taiwan and Hong Kong: 半形; in CJK: 半角) characters. Unlike monospaced fonts, a halfwidth character occupies half the width of a fullwidth character, hence the name.
Halfwidth and F...

tulip sleet
#

if blinka is the only one,

slender iron
#

that's the concept I'd need

tulip sleet
#

fullwidth is the concept you'd need? I was thinking of blinka-left and blinka-right

#

but doing the half/fullwidth would make ja more readable

slender iron
#

well, ideally I'd have one character for the snake unicode codepoint

#

then it works in your serial terminal too 🙂

tulip sleet
#

i was just thinking of hacking it as two characters

slender iron
#

ya, I think thats how I'd do it in terminalio/tilegrids

#

when a characters is full width it takes two spots with indices n and n+1

tulip sleet
#

ヒメイジ城1234

#

himeiji castle 1234

#

in monospace

slender iron
#

right, so monospace can still handle full and half width

manic glacierBOT
tulip sleet
#

@slender iron I was thinking you were going to conditionalize translate.c vs .h:

This isn't as good as the current setup with LTO though. Trinket M0
loses <1k with this setup.

slender iron
#

ya, I did

#

there is CIRCUITPY_LTO now

#

and it controls CIRCUITPY_TRANSLATE_OBJECT

tulip sleet
#

oh, I looked only at the last commit, not at all the changes

#

oops

#

got it

slender iron
#

baby time. bye!

proven garnet
#

Good call on hyperspecifying the Sphinx targets, @tulip sleet!

tulip sleet
#

glad it worked!

proven garnet
#

Wordy, but it seems to work in the local docs I built

tulip sleet
#

you may be able to avoid the :py:meth: part, and just do ~module.Class.method

#

we already do that a bunch of places

#

or maybe you did that already

proven garnet
#

Honestly, it was worth it just to learn what the ~ does, I was looking for that bit of information for a while now haha

pearl basin
#

Hey there pythoners. I'm looking to get adafruit-circuitpython-dht installed, but piwheels, the wheel provider, has an expected outage for the next 10 hours. Does anyone know if there are mirrors available?

manic glacierBOT
#
CFLAGS += -DCIRCUITPY_LTO=1 -flto -flto-partition=$(CIRCUITPY_LTO)

The build times for your PR runs seemed kind of long (2 hours instead of the 1 hour I was seeing after my recent PR). I did some sample builds with and without specifying a value for -flto:

Build free bytes make -j12 in secs
Trinket M0: this PR with -flto=NPROC 2928 23
Trinket M0: this PR but with -flto 2908 16
Trinket M0: tip of main 2596 ...
pearl basin
#

I don't think so; raspbian os has the default of piwheels for pip installations, its probably where the arm whl files actually reside. IDK the configuration change to make pypi work correctly on raspbian.

#

But maybe

proven garnet
#

You could also download the source code and run pip install . in that directory

pearl basin
#

Assuming no dependencies.

proven garnet
#

As long as you have Blinka already you should be good, DHT doesn't seem to have any others.

pearl basin
#

Install running, but its on a raspberry pi 3, so it has one core cranked to 100%, but it is churning along.

#

requirements file might be missing packaging and/or pyparsing for the builds, had to manually install those to get it to build on my pi.

#

Seems to have installed though, so lets see what happens

#

yay worked, now i have actual python errors.

#

thanks

proven garnet
#

No worries, glad it worked!

pearl basin
#

Whelp, now I'm working on the DHT11, seems to work fine mostly, but about 20% of the time I get this: ```Traceback (most recent call last):
File "./src/temp.py", line 28, in <module>
print("Temperature: {:-3.1f} C".format(device.temperature))
File "/home/pi/gardenpi2/venv/lib/python3.7/site-packages/adafruit_dht.py", line 274, in temperature
self.measure()
File "/home/pi/gardenpi2/venv/lib/python3.7/site-packages/adafruit_dht.py", line 230, in measure
raise RuntimeError("A full buffer was not returned. Try again.")
RuntimeError: A full buffer was not returned. Try again.

#

I can just average on this and run retries so I can always get data.

#

I have a 6-second-delay between reads.

pearl basin
#

Seems weird that the digital message is imprecise, since other digital protocols like I2C work just fine. However I have a dozen DHT11s laying about so I'll just put these into a retry loop and do some averaging to get healthy data.

#

But thanks for the help folks, even if I did invade the wrong channel.

tulip sleet
pearl basin
#

Yes I assume the full buffer not returned refers to a timing error getting the bits off the wire, and the related checksum mismatch error is the same issue with double-reading bits / missing bits.

proven garnet
#

It's late so no need to respond now but before I forget, @lone axle, I realized while fixing my own libraries that the CircuitPython_Org libraries need the Sphinx fix. Let me know if you want me to patch that directly to main on those.

manic glacierBOT
#

It's not able to ping LAN or WAN numeric IPv4 addresses for some reason (result always is None) - I may be missing a step or it could be a local network issue.

Ping is working for me, so not sure what could be wrong there?

Without DHCP, there is no DNS address. I don't think we have a way to set DNS address(es). So there is no name resolution. But, Requests to an mDNS host does still work, and the mDNS host reflects the static IP :-)

Well that won't do! I added a set method ...

pearl basin
warm stump
#

Have you got this yet? I've seen this in WebUSB but not in traditional desktop python before and I have to import both usb and serial (tried pygame.midi as well, the Feather didn't show up)
This just creates a mini network bus of directly attached Adafruit Devices - which removes some of the thinking behind sending messages to certain ones when USB connects/disconnects etc...
The device in question can respond only if the message contains a CUID (constant unique identifier) pre-assigned by the code.py and never changed where possible (but this demo doesn't do that)

spiral elk
# slender iron rp2040 is my guess

By far pi picos would be the most common circuitpython-capable board you'd find in Japan in terms of sales as well. That number of downloads list is relatively accurate in terms of order but for sales everything past the top 3 entries is an order of magnitude lower at least.

#

Based on what I see in akihabara shops.

#

I don't understand why the Maker Pi RP2040 is so popular here, except for the fact that its a well made board at a cheap price.

manic glacierBOT
manic glacierBOT
#

Probably the proper fix would be to change: void common_hal_busio_uart_construct(busio_uart_obj_t *self,
to not call all of the individual setup functions within the idf, but instead call:

This sounds right to me. Thanks for digging into this!

You are welcome, If I get a chance and no one beats me to this, I may take a quick cut at updating that main setup
function to use the method which sets up everything including clearing both hardware queues. But will probably be
lo...

manic glacierBOT
manic glacierBOT
#

using:
Adafruit CircuitPython 7.3.0 on 2022-05-23; S2Mini with ESP32S2-S2FN4R2
Board ID:lolin_s2_mini

I can also confirm this bug and the workaround of @jdimpson .

my project use the neopixel a lot but only rarely get info from the web. In the end, I completely shut down the wifi (wifi.enabled=False) between uses to get the flickering stop. This is still not an ideal solution as the whole reconnect, takes some time that is noticeable.

manic glacierBOT
manic glacierBOT
#

The LTO builds are taking about the same amount of time, but the non-LTO builds are now much longer, and each translate build takes about 3x the time of before. Basically the non-LTO builds are now catching up to the LTO builds in slowness. But it does save a lot of space.

So the entire latest PR build was about 132 minutes, compared with about 75 minutes before.

atmel-samd (LTO), before and after:
<img src="https://user-images.githubusercontent.com/2847802/171497881-5c6d0d2a-e5b6-4a...

manic glacierBOT
#

User reports that long-running programs hang after about 12 days (maybe 2^30 seconds):
https://forums.adafruit.com/viewtopic.php?f=60&t=191597.

The problem: I am using an Adafruit Feather RP2040 with Circuitpython 7.2.x to constantly readout multiple sensors, e.g., a Bosch BME680, and save the data to a SD card. After roughly 12 days and a bit, no further data is saved and the microcontroller seems to stop working (neither properly exiting the code nor throwing an exception).

I suspe...

lone axle
manic glacierBOT
#

I am thinking about two ways around the long build times:

  1. On a PR, do only representative builds: English, and a few large builds, like de, ja, ru or even fewer. So kind of like the windows-builds. Do the complete set only on merge.
  2. More radical: give up on using real strings in translate(), and use message ids, e.g. translate(MSG_INVALID_Q_PIN) or whatever. I don't me qstr symbol nameparsing, they would be too long, but a central message table file. It could still be compiled per...
manic glacierBOT
#

Use this function instead of several individual configuration functions
to configure such things as Baud rate, transfer size, stop bits,
parity...

This function also resets both the RX and TX Hardware Fifo
reset functions are called to setup the hardware.

This is a First attempt at what was mentioned in issue.

If it works:
resolves #6254

My initial tests are working,
Would be good if others tried this and see if other configurations of UARTS work with this change.

manic glacierBOT
manic glacierBOT
manic glacierBOT
silk raven
thorny jay
#

Hi, I wanted to ask about the "Status of the USB-Host support and best hardware to play with that". So recently Anne was saying on Pi Cast https://www.youtube.com/watch?v=OGb55VXAp4I that it was there, and maybe @slender iron was saying in the chat "well not really". So I was wondering if there was hardware on witch it is already kind of working? Is it the RP2040 with that PIO trick and you have to solder yourself a USB-A female connector? I also saw on Show and Tell https://www.youtube.com/watch?v=cTCHe8Y8yhk that Scott use that great USB-OTG from Espressif that I have been hesitating to get (also I don't know who contributed that to the supported board): https://circuitpython.org/board/espressif_esp32s3_usb_otg_n8/ . My "usecase" or area of interest is USB-HID translation/man-in-the-middle/retro-gaming. I want to read from old joystick and convert the input to something else. Maybe similar to what @tough flax need for more useful purpose. It's OK to take a more costly hardware initially for development, if later there is a more affordable Adafruit product that does not require soldering and that I can recommend. Thanks.

tough flax
#

Right now use use a qtpy running cp on the device side and a trinket m0 running Arduino on the host side. They communicate over UART.

#

I think the best hardware for usb host right now is the teensy 4

#

But that’s currently Arduino only

#

TinyUSB Does have usb-pio integrated at this point. So I’d you’re willing to use the C API for the rp2040 that’s an option

#

My ideal platform is an rp2040 running CP over TinyUSB with usb host on PIO. In a perfect world the usb host would run on the second core (or we can just run the host task in the main loop but that leaves the host timing at the mercy of the device side)

#

@thorny jay I will tell you that our biggest tip on this is to have the host side read his inputs and update its own state (which keys are pressed, how far the mouse has moved, which cells on the intellikeys are pressed). Then the device side polls and gets the full state and sends its own HID events that show the changes. Just sending through the HID events with modifications looks simple but it leaves open the possibility of keys getting stuck down etc

thorny jay
#

Thanks, yes sometimes I get CTRL stuck on my physical keyboard, and the computer start to act funny until you understand!

thorny jay
manic glacierBOT
#

@ThomasAtBBTF and all,

Hi,
I see and understand what you are changing.
But do we know the root cause of the problem?
I would feel better if we could point to the code where the problem is and not just do it differently.
Btw: can you provide a UF2 for your build? I am happy to test. (I have nearly every ESP32-S3 board model and also some ESP32-S2)

From the best I can tell from the debugging, the main issue is that the hardware FIFO queues are not properly setup. It app...

solar whale
#

The Product page for the new adafruit feather esp32s3 - 4MB Flash/2Mbyte PSRAM https://www.adafruit.com/product/5477 says it is supported by CP but I don't see it in the espressif/boards or on the Download page at circuitpyhton.org. Am I missing it or if it is just not "quite" ready yet. Not a problem, just curious.

jaunty juniper
#

well it came out yesterday !

#

it's not in the CP repo yet, I guess it was a surprise release

solar whale
#

🎁

tulip sleet
#

I will make a build for it soon.

slender iron
#

@thorny jay I was working on the Teensy 4 / iMX RT for the original USB host work. It doesn't actually read and write to the device yet though. I stopped when I took leave and haven't circled back to it yet. I'm working on web workflow instead

slender iron
#

@tulip sleet I think I may be able to speed up the translation builds by externing the compressed string structs

manic glacierBOT
manic glacierBOT
#

... Btw: can you provide a UF2 for your build? I am happy to test. (I have nearly every ESP32-S3 board model and also some ESP32-S2)

@tannewt @ladyada - Was wondering with your pre-build checks, It looks like it builds all of the boards...

Question I wondered about, was are those saved? That is if someone like @ThomasAtBBTF wishes to test out a change such as this one, without having to setup to build everything, what is the best way to do this?

I did upload zip file which conta...

idle owl
#

@lone axle I need a favor. I figure you could probably put this together in less than 2 minutes, whereas I can not. I need a quick piece of code for the MagTag that clears the display. That's all I need it to do. Right now, it's showing the REPL because it's the default "Hello World!" that comes with CircuitPython, but I need a GIF of that board, and I need a blank display for it. Let me know if you can help!

jaunty juniper
#

board.DISPLAY.show(displayio.Group()) ?

lone axle
jaunty juniper
#

maybe refresh()

lone axle
#

I do think something like that would work

idle owl
lone axle
#

yeah refresh after setting it to the new empty group

idle owl
#

Hmm ok.

#

I'll give it a try!

slender iron
#

ok, @tulip sleet I pushed a new version. we'll see how fast it is now

#

generating the huffman tree is a little slow

#

could probably speed things up a little by parallelizing it

onyx hinge
lone axle
#

@idle owl I just confirmed that this will blank the display on magtag:

import board
from displayio import Group
board.DISPLAY.show(Group())
board.DISPLAY.refresh()
while True:
    pass
proven garnet
#

@lone axle did you clone the FONA library to CircuitPythonOrg? Or did I accidentally do that?

onyx hinge
#
 13512328    1.549    0.000    2.023    0.000 makeqstrdata.py:354(<genexpr>)
        1    1.404    1.404    8.936    8.936 makeqstrdata.py:319(compute_huffman_coding)
  1752508    0.991    0.000    3.014    0.000 {built-in method builtins.sum}
  1752508    0.713    0.000    5.014    0.000 makeqstrdata.py:382(est_net_savings)
```looks like finding a better way to `est_net_savings` would be beneficial
#

or to call est_net_savings less

#
-            ((s, -est_net_savings(s, occ)) for (s, occ) in counter.items()), key=lambda x: x[1]
+            ((s, -est_net_savings(s, occ)) for (s, occ) in counter.items() if occ > 3), key=lambda x: x[1]
         )
``` for instance this reduces the number of `est_net_savings` calls to just 132240 (7% as many) by only checking whether it's better to allocate a 'word' to a character sequence that occurs at least 3 times across all messages, and cuts the time about in half. it slightly changes the results of compression, too, not sure yet if it's an improvement or a regression
#

> 1 is almost as good in time and should make no difference in compression

manic glacierBOT
#

Profiling shows that est_net_savings is one of the highest costs of the whole process. Approximately, you can save storage only if a word appears more than once, and doing this greatly reduces the number of est_net_savings calls (this isn't exactly true, because a 'word' could be made only of very infrequent code points, but let's ignore it). In a local build, it reduces the time for this specific build step by 50% on ports/unix VARIANT=coverage build, without affecting the size of the ge...

slender iron
#

👍

#

thanks @onyx hinge

onyx hinge
#

that's not quite true. say for some reason you had just one occurrence of 'xyzzy' and no where else do x, y, or z occur; the huffman encoding of each letter x, y, and z would likely be >8 bits so making it a 'word' (even though it occurs just once) could still save overall space, because when it's stored as a word it's stored in code points (or maybe utf8s, I've lost track) rather than as huffman-coded.

proven garnet
#

@tulip sleet re: using something other than try/except for typing imports: Is using sys.implementation.name sufficient? Is that "concrete" enough that it could be used for optimization?

#

Or does it not meet the criteria of a constant?

#

And I guess is that module present in all builds?

onyx hinge
#

to circuitpython/micropython a "constant" is pretty much only something of the form name = const(literal integer). Anything resulting from an import cannot be a const, anything that is a string, tuple, float, can't be.

proven garnet
#

Thanks for explaining, I meant to ask that when this came up before.

onyx hinge
#

take a look at tests/micropython/const*.py for what is tested about constants

#

and it's late here so gn! 😴

#

currently in Germany 🙂

proven garnet
#

Thanks for the walkthrough! Gute Nacht!

manic glacierBOT
idle owl
#

NM. A longer time.sleep() worked.

#

Wait....

#

No. It worked for a minute, reloaded, and failed with the error.

#

@lone axle So, not nevermind. It worked for a moment, auto-reloaded, and failed after that with the same error.

lone axle
#

I find it's most convenient to put time.sleep(4) or similar at the begining of the any magtag scripts to it will always wait long enough to refresh.

idle owl
#

I hadn't tried that long.

#

Trying that.

lone axle
#

you could also catch the runtime error and then do a time sleep in the except and try one more time after that.

idle owl
#

Hmm also good idea. Thanks!

#

OK, adding the try/except seems to have made it work. It tried to fail even with sleep(4), so now there's another 4 second sleep in the except, and that appears to be working.

#

That I would not have thought of. Thanks so much for your help!

jaunty juniper
#

I do that sometimes: time.sleep(board.DISPLAY.time_to_refresh + 0.1)

#

I think that works 🤔

idle owl
#

Because I'm doing this so a GIF doesn't have CircuitPython on the display.

#

Not because I need to do more code with it.

jaunty juniper
#

there !

idle owl
#

oh interesting.

jaunty juniper
#

but yeah, you don't need that to make a gif, I was just thinking out loud 😉

idle owl
#

Fair enough! I appreciate it. I was unaware of that being a thing, so I learned something new today. 🙂

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT