#circuitpython-dev

1 messages Β· Page 382 of 1

idle owl
#

?

tulip sleet
#

just type file something.wav, and it should tell you the sample rate

idle owl
#

low_fade.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 22050 Hz

#

Works on CPX and so on though. Or worked anyway.

tulip sleet
#

try 16k or 8k sample rates

#

the display is still interfering

idle owl
#

I don't know how to change that. I've never made my own wav files, always get them from JP

#

Do you have some?

tulip sleet
#

that I haven't debugged in detail yet; I was trying to prevent crashes and not playing at all and getting stuck

#

do you have the sox program?

idle owl
#

Limor told me to test it, so I am πŸ˜„

#

No

tulip sleet
#

can install via homebrew

idle owl
#

Ok

manic glacierBOT
#

The implementation of #3454 does not currently behave in an intuitive way when used in conjunction with Deep Sleep. In general, a "sub program" called by supervisor.set_next_file should behave in an identical way to a typical code.py program, so that code examples and copied projects can be used without thinking about whether they've been selected from a menu. However, current programs that use Deep Sleep in conjunction with set_next_file cannot store next file information, since deep s...

idle owl
#

@tulip sleet Then what do I do with it? Docs are... lacking.

tulip sleet
#

sox something.wav -r 16000 something-at-16k.wav converts something.wav to 16kHz sampling

idle owl
#

Ok thanks

tulip sleet
#

it is a messy CLI program

idle owl
#

Brew is doing brew things. So it's taking forever.

#

πŸ™„ of course.

#

This is why you never ever ever brew install python.

tulip sleet
#

brew is the opposite of instant iced tea

idle owl
#

We'll need to document this limitation on samplerate somewhere or somehow.

#

Because it means a bunch of files we've used previously won't work.

tulip sleet
#

oh yeah, yeah, we still need to experiment, and it still might be terrible

#

I've only fixed some things so far

idle owl
#

16k is still a bit crunchy. Hmm.

#

Seems so anyway.

#

Making 8s.

#

@tulip sleet So, it seems better than it was? Also weird, they each play once but not again.... Like the whole program stops responding. Or one plays once and then everything stops responding. No LEDs, no HID....

tulip sleet
#

well, I was hoping to fix that 😦

idle owl
#

Oh!

#

That's the bug?

tulip sleet
#

that's one of a number of bugs

idle owl
#

I really need to stop assuming things are me.

#

The vectorio thing is a display rotation issue. It's also not me. πŸ™‚

tulip sleet
idle owl
#

Testing now.

manic glacierBOT
#

Adding RP2040 sleep memory is actually kind of tricky because of the way we handle the general RAM during deep sleep. Unlike every other port, the RP2040 is actually incapable of fully shutting down the RAM during deep sleep - even the lowest power settings still retains all data. In an effort to be as close as possible to the other ports, which typically lose all memory when deep sleeping, the RP2040 port currently implements a watchdog reset after deep sleeping, resetting all RAM except f...

idle owl
tulip sleet
#

just type the number to the left of the files

idle owl
#

smarter.

#

It's not hanging.

#

I can play a few in a row so far.

tulip sleet
#

also those samples are mostly 1 sec. The woman playing the autoharp is slightly longer

idle owl
#

Including mine.

tulip sleet
#

I should try your program

idle owl
#

Those are the files you'd need.

marble sundial
#

~~Hey all, noob here, so apologize if I'm asking the wrong question or in the wrong way. Feel free to direct me to the right place. ~~

Moving to #help-with-circuitpython

idle owl
#

You'll get excellent help there!

tulip sleet
#

use the + to the left

marble sundial
#

Thank you, I'll remove the post here to reduce the noise.

#

Will do, thanks!

manic glacierBOT
#

Section 2.11.4 of the RP2040 datasheet notes that the memory can be set to a low power state during deep sleep using MEMPOWERDOWN. This is not used in the deep sleep examples given by the demo SDK and the amount of power it saves is not described. As noted in #5081, this still does not result in any data loss, it's just a lower power state and apparently needs a little bit of extra time to start back up.

Kind of a low priority feature but it could be considered by anyone who's interested i...

idle owl
#

You have to update the file names in shortcuts.py if that's unclear

#

to test other files

#

No idea if that's helpful but I figured it can't hurt to send them to you.

tulip sleet
#

thanks, I am going to fix the xosc bug first, then I will try those. Could you upload the prog too?

idle owl
#

Should be in the zip?

#

play_file_demo.py

#

I had already renamed it to test your code, so I sent the renamed file to you as is.

#

Did I forget to include it?

#

Na it's in there.

manic glacierBOT
tulip sleet
#

@slender iron When we switched back to the raspberrypi/pico-sdk, I lost the XOSC oscillator fix by accident, so it's not in alpha.5. It's in there forpico-sdk builds, but we don't use the pico-sdk board files. Where do you think we might put pico-sdk-specific settings for boards? Putting them in sdk_config/pico/config_autogen.h doesn't seem right, but perhaps that could #include some kind of RP-specific config.h for an RP2040 build for us?? I don't know whether you've thought about this.

#

I can't remember if you have specific board settings for anything right now

#

that is pico-sdk-specific. I don't really want to #include "mpconfigboard.h" or something into the pico-sdk sources

EDIT: I have an idea about adding a pico.h to our board directories, which will be included by config_autogen.h. I think that's the simplest for now. No comment needed for now. Next step is a PR.

manic glacierBOT
lone axle
#

I just noticed a small typo in the opening sentence of the CircuitPython day blog post:

lone axle
#

It looks like all of the streams that are planned so far are in the afternoon. 1pm Eastern being the earliest one. I am going to plan on streaming a bit earlier in the day 11am Eastern (10am Central) which is the same time of day that I normally stream on Saturdays.

orchid basinBOT
#

Added Breadboard-Friendly and Arduino Shield Compatible features.

Breadboard-Friendly is defined as parallel pins with at least one socket open on each side of the board (Assuming single, standard breadboard) and minimal non-critical perpendicular pins. (i.e. 3V3, Vcc, Vusb, GND, En, Reset not perpendicular)

As I worked through the boards, I found some boards definitions missing features and corrected those.

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.0.0-alpha.5 on 2021-07-21; Adafruit PyPortal with samd51j20


### Code/REPL

```python
import board
import displayio
import vectorio

main_group = displayio.Group()
board.DISPLAY.rotation = 0
#board.DISPLAY.rotation = 90
#board.DISPLAY.rotation = 180
#board.DISPLAY.rotation = 270
board.DISPLAY.show(main_group)

rect = vectorio.Rectangle(width=50, height=1)
rect_palette = displayio.Palette(2)
rect_palette[0] = ...
#

The longer xosc delay startup was inadvertently lost when we switched back to the raspberrypi/pico-sdk submodule. So 7.0.0-alpha.5 did not have the XOSC fix for Adafruit boards. This is a regression which can cause a few samples of boards not to work.

Add the fix back, by including a board-specific in the pico-sdk global config file ports/raspberrypi/sdk_config/pico/config_autogen.h.

manic glacierBOT
manic glacierBOT
lone sandalBOT
tulip sleet
#

@slender iron @onyx hinge I started to create a team of "CircuitPython core reviewers", so you could request a review from anyone on the core team. I was going to include @analog bridge and @ionic elk . But it turns out you can't add "outside collaborators" to teams, only team members, and you have to buy a seat for a member. So I gave up on this. You can ignore the invitation to join the (now deleted) team. Nevertheless, perhaps we can add more people as reviewers whenever we do a PR if any of those people could give a review. It's hard to indicate AND vs OR in terms of reviews. We can assume OR unless otherwise specified.

manic glacierBOT
#

CircuitPython version

7.0.0 alpha 5
7.0.0 alpha 4
7.0.0 alpha 3

6.3.0 Does not have this issue

Code/REPL

No COM/serial presented to OS via USB

Behavior

I flash the mentioned 7.0.0 versions and when I plug the teensy back in, after about 3 minutes, all I get is this USB descriptor:
image

Description

No response

Additional i...

#

It looks like the need to update display makes using REPL slower. It may not be relevant for manual usage, but Thonny, for example, uses REPL for management tasks (eg. for querying variables and available modules) and also for running code from the active editor. Because of this, using TrinketM0 in Thonny is much smoother experience compared to CLUE (which contains faster processor, if I'm not mistaken).

What about turning off output mirroring when CircuitPython enters REPL? I assume the R...

manic glacierBOT
#

I strongly disagree. It's useful to know things are running and for most boards the display showing errors is extremely helpful. Getting a serial connection to see errors is a big hurdle for some folks.

I agree that it might be useful for debugging purpose, but for this reason i also think it should be disabled by default because most software has disabled debug output unless you really want it.
Instead of using an additional function parameter there might be other solutions like a glob...

lone axle
#

@onyx hinge The barometric pressure example on this page: https://learn.adafruit.com/ulab-crunch-numbers-fast-with-circuitpython/filter-example-measuring-barometric-pressure#low-pass-filtering-measuring-barometric-pressure-with-a-bmp280-3057472-1 doesn't seem to run on the CLUE any more, I'm getting pystack exhausted consistently when I try to run it. Truthfully I quite understand all of the math that is occurring, but I noticed if I remove some of the values from the taps array that is able to run successfully again. Do you know if it would be worth making that change in order to get it back to running or does that mess up what it's trying to illustrate?

onyx hinge
#

@lone axle hum that's frustrating.

lone axle
#

I tested with 6.3.0 using the original script, and 7.0.0 alpha5 with the updates for new ulab names

onyx hinge
#

try splitting the big list, so arbitrarily break it into 2, 3 or 4 parts: ulab.array([...] + [...] + [...])

lone axle
main furnace
#

Where did you get the big list of coefficients? I'd like to try filtering other frequencies.

stiff pelican
#

https://en.wikipedia.org/wiki/Window_function#Hann_and_Hamming_windows

manic glacierBOT
onyx hinge
lone axle
#

@onyx hinge on more question related to that example. I noticed that my filtered line seems to be pretty much straight horizontal, it doesn't appear to be "following" the jagged line from what I can tell. I also found in the code this import ulab.filter https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/d83d646233c791fcab25f8888dda4128d819d6fd/ulab_Crunch_Numbers_Fast/cluebarometer.py#L7 that doesn't seem to get used for anything after importing. I didn't see anything analogous to that in the newest version of ulab so I've removed it. But now I'm questioning whether it was actually somehow responsible for making that filtered line get drawn correctly somehow even though it didn't seem to be used (to my untrained eye)

onyx hinge
#

no, I think it was just unused

#

if you raise or lower the sensor by 3 feet / 1 meter does the line move about 10 seconds later? Based on what I'm remembering/reading that's what you'd want to see.

#

the reading should be constant if the sensor is stationary and nothing interesting is happening in the weather

lone axle
#

I did experiment with raising it up and down a bit and the jagged line does seem to respond to that but the smooth line still stays exactly horizontal to my eye.

onyx hinge
#

that doesn't seem right, if you change it so the average of the jagged line is +.2 from what it was before then the smoothed line should also move up by +.2

#

it's a very complicated way to compute an average

#

exactly horizontal seems wrong

lone axle
#

during the boxed section I raised it up at arms height for about 10 seconds, and the section after is back on my desk.

onyx hinge
#

yeah it's not working

#

mind sending me the code as you have it right now? I'll see if I can't fix it.

#

or figure out more about what's going on

lone axle
#

okay, I'll keep going with the ulab rename changes. I did notice the behavior seems the same using the current code on 6.3.0 as it does with my updated / renames and 7.0.0 alpha 5

thorny jay
#

Maybe just a moving average of the last 10 values will be more "simple" than this big table and using ulab? πŸ™‚

lone axle
#

yep, I can do that.

onyx hinge
#

@thorny jay the purpose of the guide is to illustrate ulab, so no πŸ™‚

#

@lone axle you never know, maybe what was committed never worked

thorny jay
onyx hinge
#

I'm going to accept that as a pun and move on

thorny jay
#

pun intended

onyx hinge
#
        data = np.roll(data, 1)
#

looks like you have to assign the result of calling roll, it's the same in numpy

#

perhaps ulab used to be different, and it was fixed to be more compatible

thorny jay
#

I am humming right now. It's a musical scipy.signal ...

onyx hinge
#

@lone axle ^ maybe this is the answer

lone axle
onyx hinge
#

Thank you!

#

wonders whether it ever worked as committed

lone axle
#

I think it's likely that it worked at some point because there is an image in the guide that depicts it with the graph following. But maybe it could have come from code that was modified after commit

thorny jay
#

Do you know if the intended use of the new ulab is not to do import ulab.numpy as numpy and then write the code using numpy.x?

onyx hinge
#

A lot of internet code writes import numpy as np. It is hoped that you can write code for a compatible subset of numpy and ulab by using import ulab.numpy as np. with a try/except clause, the theory is that it'll work on CP, MP, and py3

#

or maybe it's from ulab import numpy as np due to a MP limitation, I forget

lone axle
#

looks like both work.

onyx hinge
#

micropython (I have v1.15 handy) rejects import ulab.numpy as np but accepts from ulab import numpy as np

thorny jay
#

So that last form is the best I guess.

onyx hinge
#

It is not a goal of a CP guide on learn to be compatible with numpy or micropython, except that I think that guide has a section on numpy/ulab compatibility that needs to be updated

#

afk

manic glacierBOT
#

I had the same issue on a imxrt1010_evk
Ran in debug mode and got the following stack:

#0  vsnprintf (str=<optimized out>, size=538972849, fmt=<optimized out>, ap=...) at ../../lib/utils/printf.c:119
#1  0x6002794a in reset_cpu () at supervisor/port.c:313
#2  0x6002859c in reset_into_safe_mode (reason=reason@entry=HARD_CRASH) at ../../supervisor/shared/safe_mode.c:127
#3  0x60027aa8 in HardFault_Handler () at supervisor/port.c:443
#4  <signal handler called>
#5  CLOCK_SwitchOsc (o...
ember iris
onyx hinge
#
Please file an issue here with the contents of your CIRCUITPY drive:
https://education.ti.com/en/customer-support
``` Hey this was a nice gesture by the folks at TI: they fixed the bit where it said to report bugs to
#

also there are some strings in this file which strongly indicate that code I wrote now ships in TI calculators

ember iris
#

At pycon US I got to talk with someone who worked on that project at TI

onyx hinge
#

any tidbits you can share?

ember iris
#

Argh if only I could remember his name, but he talked about how much they pulled from circuit python and had to massage into the calculator

#

Biggest notes were they had to use a subset because all of the I/O pin related features weren't needed, which caused them a ton of headaches in the build because of library issues, but that it worked well once the massaging was done

#

The guy was a 'I've been using assembly guy' and he worked on the tests there, and wasn't overly fond of the experience, but was darn proud of the team to get it working, and really happy circuit python had put so much into making the code work

onyx hinge
#

it looks strongly like the firmware update for the main calculator (Python.8ek) embeds a UF2-like bitstream for the samd21 coprocessor where circuitpython runs

ember iris
onyx hinge
#

I'm guessing that the main calculator CPU can feed the UF2 to the samd21 coprocessor where circuitpython actually runs, but that's not based on actually disassembling anything

#

that's just how they can update the embedded circuitpython version

ember iris
#

That structure does sound like a 'lowest energy' solution to slapping circuit python into an already existing embedded program. That way their years of code and tests are still present and they don't need to build those back up from the ground up

onyx hinge
#

it's tempting to try to extract it from the 8ek file, and put it on a device I have like a qtpy..

manic glacierBOT
#

So the issue is in the way it's computing the dirty area + a displayio semantic. This works fine, but it has really sharp edges.

main_group = displayio.Group()
display = _get_initialized_display()
display.brightness = 1
#display.rotation = 0
display.rotation = 90
#display.rotation = 180
#display.rotation = 270
display.show(main_group)

rect = vectorio.Rectangle(width=20, height=6)
rect_palette = displayio.Palette(2)

# rect_palette.make_transparent(0)     <----------...
tulip sleet
low sentinel
#

I'd like to make a breaking change to vectorio palette semantics.

Currently:
To color vectorio shapes correctly you have to pass in a palette with length 2. Palette[0] must be set transparent and palette[1] must be the color you want.

Proposed:
To color vectorio shapes correctly you pass in a palette with length >= 1. Palette[0] will be the color of the shape.

manic glacierBOT
#

This is a breaking change with previous palette semantic with respect to python code that uses vectorio.
Displayio has breaking changes in cpy 7 for Group's removal of max_size parameter so this is as good a
time as any to break everything.

Currently:
To color vectorio shapes correctly you have to pass in a palette with length 2. Palette[0] must be set transparent and palette[1] must be the color you want.

New:
To color vectorio shapes correctly you pass in a palette with le...

manic glacierBOT
#

Is this check correct, or does it need to be negated with !?

I'm not sure if this is an enhancement or a simplification, but:

Haven't you made input_pixel be the same for every pixel now? If so, can the conversion to an output_pixel be done above, and the "double-check" becomes "if the output pixel is not opaque, NOTHING is drawn, and the loops can be skipped"? This also moves code out of the inner loop, so that maybe it becomes faster.

#

I'm not sure why my local feather test harness is working right with that error. I swear I am a professional software developer 🀦

re input_pixel:
Look closer at what displayio_colorconverter_convert can do. This has to be in here (I tested that colorconverter transparency still works).
The perf increase here comes from skipping a function call per pixel that we know is not covered by the shape. We were computing a color that we knew we were never ~going~ supposed to consume.

manic glacierBOT
#

Got the HID report descriptor, ARCHISS PTR91 is the off-the-shelf one.
I don't know why two are shown, but one is connected.
Here is the URL of the product page in Japanese.
https://archisite.co.jp/products/archiss/progres-touch/retro-tiny-jp/

$ ~/Downloads/mac-hid-dump
mac-hid-dump:
2BE8 0001: ARCHISS - ARCHISS PTR91
DESCRIPTOR:
  05  01  09  06  a1  01  05  07  19  e0  29  e7  15  00  25  01
  75  01  95  08  81  02  95  01  75  08  81  01  95  05  75  01
  05  08  19  ...
versed lark
#

@idle owl @tulip sleet pm me if there's any need for another tester for crunchy audio issues on macropad - i've been getting them consistently in alpha5 with my 16 bit signed wav files using macropad.play_file. some files are always crunchy, some are inconsistent. sometimes truncated and sometimes going unresponsive as well. i'm not much help on the code side, but don't mind testing with my sound files.

#

going to try latest from s3 tomorrow to see if there's any changes.

manic glacierBOT
#

FWIW this is also affecting the FeatherS2 β€” and it's a regression from CircuitPython 6.2.

Press any key to enter the REPL. Use CTRL-D to reload.

Adafruit CircuitPython 6.2.0 on 2021-04-05; Adafruit Feather M4 Express with samd51j19
>>> print("foo", flush=True)
foo
Adafruit CircuitPython 7.0.0-alpha.5 on 2021-07-21; FeatherS2 with ESP32S2
>>> print("foo", flush=True)
foo
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [Errno 22] ...
cunning galleon
#

Is there a way to deploy assets like .jpg and .wav files into a custom circuitpython build? I am successfully freezing python modules into the build. But I need some read-only assets too.

onyx hinge
#

@cunning galleon we don't do that, as far as I'm aware.

cunning galleon
#

roger roger. I may make byte-arrays for them in frozen python files then.

onyx hinge
#

I don't think that the mp3 decoder will accept anything that isn't a file on flash or sd πŸ˜•

cunning galleon
#

hmmm. OK then!

#

thanks for the info

onyx hinge
#

it would be nice if mp3s in particular took any object with a readinto/recvinto method but that has not been implemented yet.

#

right now I think what you'd have to do is freeze in a block of memory that is a FAT filesystem image, then you can mount that with the storage module..

#

(if you went "ugh" just now, I agree)

cunning galleon
#

Ugh, but if it works for now!

onyx hinge
#

then I think you need to wrap it with an object that implements at least count and readblocks methods; not sure if the other two are needed. The implementation can be in C or in Python. https://github.com/adafruit/circuitpython/blob/98cd989c16ab82bff10002359b09d4027a198a97/shared-bindings/sdcardio/SDCard.c#L176

GitHub

CircuitPython - a Python implementation for teaching coding with microcontrollers - circuitpython/SDCard.c at 98cd989c16ab82bff10002359b09d4027a198a97 Β· adafruit/circuitpython

#

to have it happen at boot time everytime you could poke it into the supervisor, see filesystem_init -- but I'm not sure what the secondary effects are of wanting a second filesystem

#

of course you could just make this part of the initial CIRCUITPY filesystem when you program your device, too, and if a user breaks it they break it. This can go in the same uf2 file if you have a unified flash for program & CIRCUITPY (like non-express boards, esp32 boards, and pico boards) or you would need a second step at manufacture to load it...

#

afk for now

tulip sleet
versed lark
cunning galleon
#

The current version of "adafruit_display_text" has a simple "display_text_simpletest" module. The code raises an exception from Label.py -- "Group full".

tulip sleet
#

which version of CircuitPython are you using?

cunning galleon
#

6

tulip sleet
#

The limitation on group size was removed in 7; the example should not fail, but try 7

cunning galleon
#

I modified the "BaseLabel" in the adafruit_display_text "init.py" to give a large "max_size" to groups. That seems to work.

tulip sleet
#

max_size is being removed completely in 7

#

there is now no limit

cunning galleon
#

I'm not sure we can upgrade to 7 yet. But I'll check.

cunning galleon
#

The FREEZE process doesn't seem to pick up .mpy files in the target directory. I only have the version 6 libraries as mpy files (from the bundle).

#

Is there a link to the source for the version 6 libs?

tulip sleet
#

you can download a source bundle. You can also add the library you want as a git submodule. That is the way the current code is included, and is recommended so you can fix it to a specific version and update it easily.

cunning galleon
#

that's what I was trying when I got the "group full" error

#

I figured the source was already changed for version 7

tulip sleet
#

the source bundle for 6 and 7 is the same. we don't yet have a mechanism for including different library releases in the 6 and 7 bundles. The only difference is that they are compiled with different mpy-cross versions.

cunning galleon
#

OK. I dragged the "adafruit_display_text" source library from that folder to my board running version 6 circuitpython. I get the "group full" error.

#

I will modify my copy of that source to add "max_sizes" so we can get going.

#

The version 6 mpy files of that library work fine. But I can't freeze in mpy files.

tulip sleet
#

are you using the latest versions of the 6 .mpy files? There is no difference between the 6 .mpy and .py files except that they may have been updated recently

#

do not use the .mpy files just because they work

cunning galleon
#

understood. I don't know how to get the 6 .py files.

tulip sleet
#

they are in the bundle I circled in the image above. But if you have older versions, then that bundle is too new. So you can use an older bundle. Do you have the zip file for the bundle you are using? You can look at its timestamp in the bundle name

#

or just roll that particular library back

cunning galleon
#

how do i get an older bundle?

tulip sleet
#

for any paritcular library, go to its github release page and find the release you want

cunning galleon
#

so all i can get for version 6 is mpy files

tulip sleet
#

you can look at the PR's for a particular library to find when the group_size stuff was removed

#

the "py" bundle is the same for 6 and 7

#

the 6 and 7 .mpy bundles are both generated from the same py sources

main furnace
#

Anyone know why my boot_out.txt file is empty? Running yesterdays 7.0.0 on rpi 2040 pico.

main furnace
#

Okay thanks.

manic glacierBOT
manic glacierBOT
tulip sleet
#

@onyx hinge @analog bridge I tried making a DEBUG=1 ESP32-S2 build, but even if I turn off large modules (e.g. CIRCUITPY_ULAB = 0), I get something like:

[658/658] Generating ld/esp32s2.project.ld
/home/halbert/.espressif/tools/xtensa-esp32s2-elf/esp-2020r3-8.4.0/xtensa-esp32s2-elf/bin/../lib/gcc/xtensa-esp32s2-elf/8.4.0/../../../../xtensa-esp32s2-elf/bin/ld: build-adafruit_metro_esp32s2/firmware.elf section `.dram0.bss' will not fit in region `dram0_0_seg'
/home/halbert/.espressif/tools/xtensa-esp32s2-elf/esp-2020r3-8.4.0/xtensa-esp32s2-elf/bin/../lib/gcc/xtensa-esp32s2-elf/8.4.0/../../../../xtensa-esp32s2-elf/bin/ld: region `dram0_0_seg' overflowed by 2904 bytes
collect2: error: ld returned 1 exit status
#

do you have a suggestion? Thanks.

onyx hinge
#

Huh that's a ram section and not a flash section. Weird.

#

Not really, I was in the habit of turning off wifi but I haven't had to do that lately (build with debug)

manic glacierBOT
manic glacierBOT
#

Making this change causes boot_out.txt to appear again. A NULL was passed before the commit mentioned above

        //bool found_boot = maybe_run_list(boot_py_filenames, &result);
        bool found_boot = maybe_run_list(boot_py_filenames, NULL);

Tagging @cwalther for interest and perhaps some insight.

I tried one other thing, which was to insert a one second delay after the filesystem_flush() in run_boot_py(), and that did not help. I thought perhaps the new except...

manic glacierBOT
#

Hi there Adafruit folks,
I'm running into this similar error with the Funhouse which I think is built on a similar architecture.
https://learn.adafruit.com/creating-funhouse-projects-with-circuitpython/temperature-logger-example

`Traceback (most recent call last):
File "code.py", line 69, in <module>
File "code.py", line 59, in log_data
File "adafruit_portalbase/network.py", line 345, in connect
File "adafruit_portalbase/network.py", line 340, in connect
File "adafruit_po...

slender iron
manic glacierBOT
tulip sleet
onyx hinge
#

it seems like you could write some sort of script that figures out what grows, especially if we know how to get it to fit again right now (by reducing tinyusb buffer size) .. maybe some judicious comparisons of firmware.elf.map would help

analog bridge
tulip sleet
#

did you see the above about trimming the tinyusb buffers? Maybe tinyusb DEBUG=1 adds a bunch of stuff?

analog bridge
#

FYI, this was after idf-v4.3 update.

tulip sleet
#

was it exactly after? Or also tinyusb upgrade? I looked through the .ld stuff but could not find anything relevant or anything to adjust, which I was confused about

analog bridge
tulip sleet
#

I looked for what DEBUG was doing

#

I think an issue would be good if we don't already have one

analog bridge
#

from esp32 forum

Because of some fixed RAM addresses used by the ESP32 ROM, there is a limit on the amount which can be statically allocated at compile time. Much more RAM is available at runtime via the heap (it is, as WiFive says, non-contiguous.)

There are some plans to work around this and allow more static allocation, but no ETA yet.

The best fix for the issue is to find a large statically allocated buffer in your program and change it to allocate dynamically (ie via malloc()).
tulip sleet
#

i just wonder what DEBUG is causing to be allocated statically.

#

since we don't have the problem on regular builds

analog bridge
manic glacierBOT
analog bridge
tulip sleet
manic glacierBOT
#

I had to turn off almost all of the common-hal modules to get a DEBUG=1 build.
Also, @tannewt on discord suggested another way to get a debug build is by reducing tinyusb buffer size.

From this esp32 forum post:

Because of some fixed RAM addresses used by the ESP32 ROM, there is a limit on the amount which can be statically allocated at compile time. 
Much more RAM is available at runtime via the heap (it is, as WiFive says, non-contigu...
#

I did some debugging of this over the weekend. The MacroPad library creates and destroys the PWMAudio object on each audio play. At first I thought that was the difference, but it's not. Instead, what I am seeing is that after the second audio play, background tasks are not being run. In particular, the scanning routine for the Keys object is not being called. So button presses don't play anything after the second play. (I am not sure it's consistently the second play, but it seems to be ...

manic glacierBOT
manic glacierBOT
#

@DynamoBen sorry for late response, looking at your log, look like rp2040 got suspended after awhile. since currently tinyusb port of rp2040 doesn't distinguish between disconnected vs suspend (doable with a bit of extra code with decent testing). Therefore it will cause an re-enumeration. Unfortunately, the dcd isn't clean up all the previous pending transfer which cause the WARN: starting new transfer on already active ep 4 out. This can probably cause the failed to transfer as you experi...

#

@hathach I have just noticed USB disconnects randomly while trying to debug some audio playback on RP2040. I am not doing MIDI. USB becomes disconnected, but when I reconnect, everything is fine (no crash). I will try to narrow this down later. Perhaps the USB interrupt handling is being starved or disabled due to some other operations. I am doing some DMA (audio and display), though at the time of the disconnect, there is no audio playing, and the display is not changing.

It could proba...

manic glacierBOT
#

I've encountered this bug after building the touch deck from John Park's tutorial: https://learn.adafruit.com/touch-deck-diy-tft-customized-control-pad. Power cycling is my workaround.

Adafruit CircuitPython 6.2.0 on 2021-04-05; Adafruit Feather RP2040 with rp2040

Traceback (most recent call last):
File "code.py", line 34, in
File "adafruit_featherwing/tft_featherwing_35.py", line 34, in init
File "adafruit_featherwing/tft_featherwing.py", line 67, in init
...

manic glacierBOT
turbid radish
#

?serverinfo

#

?serverinfo

tulip sleet
manic glacierBOT
#

Adafruit CircuitPython 7.0.0-alpha.5 on 2021-07-21; Adafruit Feather RP2040 with rp2040 + Adafruit TFT FeatherWing - 3.5" 480x320 Touchscreen for Feathers PRODUCT ID: 3651

I can now enter the REPL and reload without encountering the STMPE610 error. I can also trigger a reload via filesystem write without error. The display correctly initializes in both cases.

onyx hinge
onyx hinge
#

hmmm there's loud work going on outside my house today. If it interferes with the meeting I may have to lean on someone else to be the host.

#

hopefully in a few hours they'll have moved from the part that is just outside my window to the part that's further down the back yard

onyx hinge
#

<@&356864093652516868> Reminder: our weekly meeting is in about 2 hours in this text channel and in the CircuitPython voice channel. Add your notes to the notes doc, and if you won't be speaking please note that so I can read your notes aloud. We look forward to seeing all of you there! https://docs.google.com/document/d/1fsekWWLvcaMb7w6lfiDHqOjYbM38JgLOOxEjGdwh3A0/edit

idle owl
tulip sleet
idle owl
manic glacierBOT
#

Newbie question.
Was hoping to connect this like a USB memory stick, write jpeg files from the PC and have those changes trigger the posting of file names and sizes to a remote server. Is this possible? Perhaps with some onboard program that might, for example, switch connection of the SD card back and forth between the unit and the PC so the card could take a peek at the new files? Or completely impossible given the current specs? Thanks.

manic glacierBOT
modern wing
#

Happily lurking and drinking mid-afternoon coffee, because sleep? Who needs it. β˜•

#

πŸͺš this helps with making split ⌨️ , but it may or may not need some effort to make it work.

manic glacierBOT
idle owl
#

We have a person here doing an estimate on a new AC, potentially plus a furnace. We have no AC at the moment. Sigh.

modern wing
#

Hopefully it's fixed quickly πŸ™‚

idle owl
manic glacierBOT
#

What about turning off output mirroring when CircuitPython enters REPL? I assume the REPL can only be entered via working serial connection (or, at least this is the main way for using it). In this case I find it unlikely that anybody prefers to look the output on a tiny (or smallish) screen instead of her terminal program.

I like that it shows on the REPL. You could have thonny do displayio.release_displays() to turn it off completely. You would need to know how to reinitialize a disp...

lone axle
idle owl
#

@opal crystal Will you be reading off your status update or are you text-only and would like the host to read it off?

lone axle
lone axle
idle owl
opal crystal
#

I just have no hug reports because I wasn’t involved this week. πŸ™‚

idle owl
#

No worries!

lone axle
opal crystal
#

for some reason I can't unmute

#

It’s not working, no idea

slender iron
#

are you using the app or in a browser?

opal crystal
#

Browser

#

Tried reloading the page

slender iron
#

that might be the issue

#

I think folks have more luck with the app

opal crystal
#

It had worked in the past…

slender iron
#

hrm

idle owl
#

@lone axle I am happy to test that PR too! I'd rather be using vectorio, as it's simpler than displayio.Shape().

low sentinel
#

Oh hey so about vectorio

onyx hinge
low sentinel
#

I am writing a draw protocol and removing VectorShape from the python-facing api

lone axle
#

My understanding of the distinction is community bundle = you intend to support mostly yourself, whereas circuitpython bundle = intended for multiple folks all helping support

low sentinel
#

Because the ergonomics of the current api are really bad. I’m hoping to shoot out a draft this evening - having perennial troubles with transposition. It’s simplifying a ton of stuff though so seems worth

modern wing
#

Woo, another quick yet awesome meeting. Thanks all! πŸ™‚

lone axle
slender iron
#

11 pacific

opal crystal
#

I’m not hearing anyone but kattni now but I suppose that’s on my side too.

low sentinel
#

I.e., you make a Rectangle(pixel_shader=palette, width=10, height=20, x=24, y=42) and just stuck that in your displaygroup

idle owl
lone axle
#

Ooh, I like that. It took me a bit to figure out the current API with VectorShape at first.

thorny jay
#

Thanks.

modern wing
#

Nice job Jeff πŸ™‚

low sentinel
#

Yeah vectorshape is bad to expose to python. It’s very useful in C but no reason to expose it (well, no reason if you have a draw protocol)

manic glacierBOT
#

I think I figured it out. PR forthcoming.

diff --git a/main.c b/main.c
index c6801dca7..b35c874c0 100755
--- a/main.c
+++ b/main.c
@@ -633,11 +633,13 @@ STATIC void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) {
 
     static const char * const boot_py_filenames[] = STRING_LIST("settings.txt", "settings.py", "boot.py", "boot.txt");
     bool skip_boot_output = false;
+    #ifdef CIRCUITPY_BOOT_OUTPUT_FILE
+    FIL file_pointer;
+    #endif
 
     if (o...
manic glacierBOT
manic glacierBOT
#

I have been using the uf2 bootloader. I just loaded a debug 7.0.0-alpha.5
build on a Feather nrf52840
Express using a jlink connection and it booted correctly. The .uf2 size was
1127936 bytes.

On Mon, Aug 2, 2021 at 5:01 PM Scott Shawcroft @.***>
wrote:

How did you all copy the build over? UF2? I suspect the bootloader is
failing on images >512k in size (1MB+ uf2 file).
adafruit/Adafruit_nRF52_Bootloader#213
https://github.com/adafruit/Adafruit_nRF52_Bootloader/issues/213

...

manic glacierBOT
manic glacierBOT
#

a patch for folks who don't want to wait, latest builds fix bitbangio and you can read/write the SD card with SPI!

import os
import busio
import digitalio
import board
import storage
import adafruit_sdcard
import bitbangio

# Connect to the card and mount the filesystem.
spi = bitbangio.SPI(board.CLK, board.CMD, board.DAT0)
cs = digitalio.DigitalInOut(board.DAT3)
sdcard = adafruit_sdcard.SDCard(spi, cs)
vfs = storag...
hollow token
manic glacierBOT
low sentinel
#

☝️ draft pr I mentioned earlier. I struggled with the transposed screen presentations over the weekend and just do not have time to get deep on it this week πŸ˜•

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Version: fails with 7.0.0 main at this time and earlier

RP2040 board builds built with DEBUG=1 don't work: they crash. The crash can be seen with gdb:

(gdb) mon reset
Resetting target
(gdb) c
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
isr_hardfault () at sdk/src/rp2_common/pico_standard_link/crt0.S:99
99	decl_isr_bkpt isr_hardfault
(gdb) bt
#0  isr_hardfault () at sdk/src/rp2_common/pico_standard_link/crt0.S:99
#1  
#2  0x1001d160 in port_init (...
onyx hinge
#

the free lunch of flash space on esp32s2 is going to come to an end soon. 1329536 bytes used, 112256 bytes free in flash firmware space out of 1441792 bytes (1408.0kB).

tulip sleet
#

@slender iron Could I talk to you about ticks when you are free?

onyx hinge
#

well this'll be fun -- my new code crashes on esp32-s2, but it requires the camera, which uses the debug pins so I can't use the debugger πŸ˜•

#

@tulip sleet I should also confess to knowing about ticks (or background tasks, more to the point)

tulip sleet
#

i may ask you next πŸ™‚

slender iron
#

@tulip sleet I’m pretty busy this morning. Meetings at 10 and 1 with a vet appointment at 11:30

#

I can let you know when I have time

tulip sleet
#

sure; there is some commented out code in RP2040 port.c re ticks. Trying to understand that. There are some other things to look at before that as well.

tidal kiln
#

what's the github setting thing when a group is not showing up as an option for a PR review?

tulip sleet
#

you're not seeing CircuitPython Librarians when you expect it?

tidal kiln
#

well...it's an arduino repo TBH πŸ™‚

tulip sleet
#

which repo? I can check on the group settings

tidal kiln
#

i have access too, just can't remember the what/where

#

did this once long ago when setting up CP libs

tulip sleet
#

looking at the settings...

tidal kiln
#

thanks. yah, i'm comparing to another repo where it works and not seeing any obvious diff.

tulip sleet
#

wrong team (or at least not Arduino Librarians for ADXL345

tidal kiln
#

ah...thanks...that's probably it...the one place i didn't look πŸ™‚

tulip sleet
#

it took me a while to find it πŸ™‚

tidal kiln
#

@tulip sleet thanks. that was it.

slender iron
#

@tulip sleet I have some time now

solar whale
#

Have there just not been any releases since then?

idle owl
#

The Bundle repo thinks that's the latest

solar whale
#

ok -- just wanted to check -- I know there have been a lot of merged updates, I guess they just have not been released

idle owl
idle owl
# solar whale ok -- just wanted to check -- I know there have been a lot of merged updates, I ...

Not everyone knows to make a release or how to make a release. Dylan does weekly releases usually, but she's out of town at the moment and is working sporadically so I think it's not happening as consistently. circuitpython.org/contributing/library-infrastructure-issues says the following libraries have commits since last release: ``` Library has new commits since last release over a month ago

https://github.com/adafruit/Adafruit_CircuitPython_MCP230xx (99 days)

Library has new commits since last release within the last month

https://github.com/adafruit/Adafruit_CircuitPython_Simple_Text_Display (11 days)

Library has new commits since last release within the last week

https://github.com/adafruit/Adafruit_CircuitPython_SCD4X (7 days)
https://github.com/adafruit/Adafruit_CircuitPython_MacroPad (5 days)
https://github.com/adafruit/Adafruit_CircuitPython_SGP40 (5 days)
#

Looks like Dylan did releases a few hours ago.

#

So there should be an updated bundle tomorrow in theory.

solar whale
#

Thanks!

manic glacierBOT
#

We highly recommend using pre-commit to vet the code before you commit, if you are not already doing that:
https://learn.adafruit.com/building-circuitpython?view=all#install-pre-commit-3096511-10
https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/check-your-code

Yeah that definitely did not install correctly when following the instructions on a fresh Ubuntu wsl2. I’ll look at why at some point. If you want people to use this tool it ought to install easily (o...

manic glacierBOT
#

What are you trying to do overall? It would be ok to have it on and advertise until user code advertises something else. If a device connects before the user code, then the user code can create the HIDService and the central will pick it up.

#5089 does the minimal API to turn it all off. I don't really want to add more complicated APIs until we know what we want to be able to do.

manic glacierBOT
#

I haven't been getting around to solving this... But my guess would be much less than 7.5 ms. A single successful transmission normally takes a little over 500 us (depending on what you have the auto-retry feature's delay value set to).

If auto-ack feature is off (not recommended), then it would be more like 200 us. Note that turning off auto-ack is really only for OTA backward compatibility with Nordic Semi's older ShockBurst protocol (only used by deprecated nRF24*** radios or some horri...

manic glacierBOT
#

Hey @hierophect thanks for the punch-list of items to port at the link above. I've pulled those into my port and have started working through them. One question about this item...

Create a board family and SoC folder in stm/peripherals/, with clock setup code brought in from CubeMX, and pin/peripheral/ definitions for the SoC. Pin and peripheral files can be created with the python scripts in tools/.

Specifically on getting clock code from CubeMX, can you elaborate on where I can find...

tulip sleet
#

@idle owl I fixed the keypad scanning problem in your test of macropad audio and pushed that. Now I am back to figuring out the scratchiness, but i have gotten more clues

idle owl
#

Dinner is ready! afk.

tulip sleet
#

no, a bug in the audio code was overwriting the list of keypad scanners, causing scanning to stop. The keypad list happened to be just after an array used by audio to record info about a play in progress, and something wrote past the end of that array, and smashed the keypad scanners list

idle owl
#

Huh good to know.

tulip sleet
#

it was an accident it broke keypad as opposed to something else

manic glacierBOT
#

It looks like the shape classes could be backwards compatible if you don't reorder the arguments. Want to do that? I'm a bit worried about cross 6/7 compatibility.

That’s a good idea however I 6/7 migration is going to be a change anyway with yanking VectorShape out. Like, you’re still going to have both your Rectangle and your VectorShape lines in python complain: The latter because it’s no longer newable and the former because it requires a pixel shader argument.

idle owl
manic glacierBOT
#

CircuitPython version

recent 7.0.0 versions

Code/REPL

# strange how the sound jumps around at around 1800 and on up
# Tested with CircuitPython 7, not with 6
from time import sleep
from adafruit_macropad import MacroPad
macropad = MacroPad()
for freq in range(200,10000, 50):
    print(f"freq: {freq}")
    macropad.start_tone(freq)
    sleep(.45)
    macropad.stop_tone()
    sleep(.05)

Behavior

he tone jumps randomly at 1850 and up.

###...

manic glacierBOT
thorny jay
#

I now have a "MacroPad" (and a Hackaday keypad) and having that increase the frustration with poor support for non US QWERTY keyboard. I know this is not an issue of the core and the priority might be to get the 7.0.0 out. But getting a better solution for MacroPad user maybe should be put somewhere not too low in the priority list... if possible. πŸ™‚

jaunty juniper
tulip sleet
#

I think just defining some classes that are collections of constants, like KeycodeFR, KeycodeDvorak, would be a good start.

jaunty juniper
thorny jay
#

My idea was that Adafruit should show the way a localisation should be done, with one example. And then people will be able to follow that and adapt for their own language. There was one PR for French keyboard and one PR for German keyboard. French was just a replacement library (if I remember well) that you use in place of adafruit_hid. German, I don't remember how it was done. But if there is one way, that would be the recommended way to do it, that is not inflating the size of the library (because that was an issue), and other people can provide their propose for their keyboard... then you have valuable input that will not be rejected. I started working on Belgian keyboard 12 or 18 month ago, but I would not invest time in a PR that will be rejected because it is not done in a way that make sense.

#

The same way other PR have been rejected later.

#

There was a similar issue with Joycon support.

#

There was a request from the community to support other Wii device, such as joystic, guitare, name it.

#

We had to do the PR 3 or 4 time before it got accepted and it was decided on the proper way to extend the libary that was Joycon only.

jaunty juniper
#

that's why I made the Circuitpython_Keyboard_Layouts repository, to get all the keyboard layouts in one place, also showing a way to make one, they can be downloaded from the Circuitpython_Keyboard_Layouts bundle, and soon installed individually with circup

thorny jay
#

I participated at that Wii I2C device effort. I gave up at the 2nd rejection...

thorny jay
jaunty juniper
#

well it's not official by any means

#

the idea is to add third party bundle support to circup, and maintain the library

#

maybe once it's solid, move it to the circuitpython org if it can be agreed upon

thorny jay
#

I love it, the PR has a lot of French discussion. πŸ™‚

#

Let me dive in before having an opinion. πŸ™‚

jaunty juniper
#

the point is to make a repo that people can contribute layouts to, and as a bonus make it easy to install only one at a time

thorny jay
#

And this can go "in the weed" topic (it was already more than a year ago).

#

My message to Adafruit CP community was: "Ok, you made the translation a key differentiator of CircuitPython. Once weblate was in place the community was able to contribute, new language came, they get updated. So if you are serious about the language issue, you should also worry about keyboard".

#

Now my message to Adafruit could be: "Ok, so you made Keyboard thing a big part of your new development and product. That MacroPad in the Adabox is the peak of that evolution (even if Adabox is not shipped to Europe anymore), but if you only have EN-US keyboard support, you are excluding a lot of people (hint: customer). The same way you try to be an inclusive company (race/gender), you cannot be or stay US centric on your keyboard side. (I did fight some US centric learn guide that did temperature in FΒ° too)."

#

I wonder if I am good at lobbying companies. πŸ™‚

jaunty juniper
#

by the way, I want to look into automatically creating layouts (than can then be tweaked/fixed by hand fi needed) from OS layout configuration files, since I find it hard to find online references (like tables with keycodes/letter associations) though that could work too

thorny jay
manic glacierBOT
manic glacierBOT
#

@jepler Very cool! I tried this on my Kaluga v1.3 with your example. Works well as lomg as the qr code image was big enough!
BTW, I think the example usage of the button is not working properly, it did not seem to wait for the button press, so I removed it rather then troubleshoot.

Adafruit CircuitPython 7.0.0-alpha.5-98-gbd903f2f0 on 2021-08-04; Kaluga 1 with ESP32S2
>>> import qr
a
a
a
b'http://s.espruino.com'
b'http://s.espruino.com'
b'http://s.espruino.com'
b'http://s.espr...
idle owl
# thorny jay Ok, if that is the official way, and is recommended/approuved... then that is fi...

I could be wrong, but I thought the plan was to create separate libraries for each keyboard layout. The issue is that we can't add more to the HID library at this point in time - it is frozen into certain builds, and there is not enough room. So, creating a separate module for each new layout means that folks who want to use them can, but they are not making it impossible for us to continue with some current situations. We can certainly discuss this in the weeds again. If this is the case, then I am happy to create repositories to get things started. MacroPad, for example, has plenty of space to handle many different layouts, so there's no concern there.

idle owl
#

Or something like it anyway.

slender iron
#

@tulip sleet is your fixes pr ready for review?

#

I see a recent push but no comment

tulip sleet
#

i was going to have kattni re-test, but it seems better. I'll re-request reviews. We just got off Zoom watching a relative getting married in Italy

manic glacierBOT
#

Ok. it looks like there is only one library in the Adafruit bundle that needs updating anyway:

libraries/helpers/displayio_layout/adafruit_displayio_layout/widgets/__init__.py
10:import vectorio
31:    ``vectorio.rectangle`` functions
44:     when `False` uses :py:func:`~vectorio.Rectangle`
58:        rect = vectorio.Rectangle(width, height)
59:        vectorio.VectorShape(

libraries/helpers/displayio_layout/adafruit_displayio_layout/widgets/cartesian.py
30:import vectorio
4...
tulip sleet
#

@slender iron FYI, I instrumented the buffer filling by toggling pins, and it's yielding useful info

slender iron
#

nice!

tulip sleet
#

first buffer is loaded in the top spikes; second in the lower spikes. This is time spent in the "next block" routine

slender iron
#

that gap is concerning

tulip sleet
#

exactly - you can hear it

#

now the q is why

slender iron
#

and its probably playing something wrong in that time too

#

is it a gc?

tulip sleet
#

possibly, it's actually quite regular. I could easily turn off GC in that time

#

to check

#

and maybe I will add another pin to mark the DMA ISR routine

slender iron
#

πŸ‘

#

I think you are on the right track!

tulip sleet
#

disabling GC before the play does not change the glitch

slender iron
#

so it is something else

tulip sleet
#

it seems to be always at the same time. I need to double-check that. It may be a delay in reading the wav file. I am testing only with wav's at the moment, because that's the realistic test case

#

I did some testing with raw samples earlier just to vet the data

slender iron
#

ah, that would make sense

#

are you setting the pin for the duration of the block load?

#

would that include the file system read?

thorny jay
# idle owl I could be wrong, but I thought the plan was to create separate libraries for ea...

Yes, that was the idea and reason for that solution. But devil is in the details and practical implementation help test the idea and detect flaw or problems.
I think someone need to bootstrap the work and show the first vetted alternate keyboard. Because writing the Nth rejected proposal is not fun. The other will follow. Maybe some keyboard/languages will have challenge, like dead key or diacritics (?).

jaunty juniper
idle owl
#

Exactly what Neradoc said. We need them submitted as separate libraries. What I'm saying is that I believe Adafruit is willing to host them, so they're "official" libraries, and do not need to be hosted by the author. But again, I would want to verify that.

jaunty juniper
#

or join me and contribute to my layout repository πŸ˜‡

idle owl
jaunty juniper
#

wii stuff should still be contributed to the community bundle though

ember iris
#

what stuff does the wii stuff encompass?

idle owl
#

@tulip sleet I broke sending strings with the MacroPad library when I updated it to generate the HID object when called. I am not sure how to fix it. πŸ˜•

tulip sleet
#

did you compare the old and new versions? Could you send me those or point to them?

idle owl
#

Yeah hold on I can do that.

jaunty juniper
idle owl
#

You're better at this than me.

tulip sleet
#

I am just using that to compare

onyx hinge
#

Here is the notes document for Monday’s CircuitPython Weekly meeting. It is at the normal time of 11am Pacific / 2pm Eastern here on Discord. Everyone is encouraged to attend! Please add your hug reports and status updates even if you’ll be attending the meeting - it’s super helpful! If you are unable to attend but would still like to include updates, feel free to include them in the notes and we’ll read them off during the meeting. Hope to see you there! <@&356864093652516868> https://docs.google.com/document/d/1Q1Oonou_pZY-R81DYkik9YjksRHtEUHWdb5Fd9hVB9M/edit?usp=sharing

onyx hinge
#

h/t kattni who reminded me πŸ™‚

jaunty juniper
tulip sleet
#

@idle owl:
self._keyboard_layout = KeyboardLayoutUS(self._keyboard) line 409 should be indented; it's being created fresh every time, though I don't see why that should break it; it should just slow it down

ember iris
idle owl
#

I'll try it again.

#

Nope.

#

No change.

#

That was the first thing I tried.

tulip sleet
#

in any case it and the comment should be indented. which test pgm is failing?

idle owl
#

It's failing when I import the shortcuts.py file because inside it is macropad.keyboard_layout.write("String")

#
Traceback (most recent call last):
  File "code.py", line 13, in <module>
  File "shortcuts.py", line 29, in <module>
AttributeError: 'property' object has no attribute 'write'

Code done running.```
#

Feels like it's not creating the keyboard_layout object...

#

But I'm reaching here.

#

That's my drive including libraries. MacroPad code obvs.

#

macropad.keyboard_layout.write() used to work.

tulip sleet
#

shortcuts.py:

from adafruit_macropad import MacroPad
macropad = MacroPad

should be macropad = MacroPad()

idle owl
#

omg.

#

Yes it should be.

#

I'm not sure how it ever worked.

#

Thank you.

#

Also it typed all of that out immediately. So I was doing it wrong anyway.

#

Should only contain the string.

#

@tulip sleet Thank you so much.

tulip sleet
#

yw!

idle wharf
#

Just an FYI.
https://github.com/adafruit/circup/issues/117
This issue in circup was opened, that was essentially a link back to their own project, but to which they added circup. Its a little spammy\self-linking imo, but I don't know if tldr-pages is a real thing or not... If anyone thinks its spammy and has GH Admin you can delete that issue if you like.

idle owl
#

Oi, now this Traceback (most recent call last): File "code.py", line 15, in <module> File "/lib/adafruit_macropad.py", line 113, in __init__ File "/lib/neopixel.py", line 130, in __init__ ValueError: NEOPIXEL in use

#

(β•―Β°β–‘Β°οΌ‰β•―οΈ΅ ┻━┻

#

I think I know why.

tulip sleet
#

yah, you are creating a MacroPad() twice?

idle owl
#

yep

onyx hinge
#

@idle wharf it looks like tldr is a real thing, though I hadn't heard of it before. I wouldn't sweat it, though if you had any feedback on the proposed text you could probably suggest to change it.

idle owl
tulip sleet
#

i don't think its shortcuts.py did anything except define the lookup table

idle wharf
manic glacierBOT
idle owl
#

@tulip sleet You requested changes on that PR, but thumbsupped it. Did you mean to approve?

tulip sleet
#

Do not eat while reviewing.

manic glacierBOT
onyx hinge
tulip sleet
#

lol

manic glacierBOT
onyx hinge
#
>>> import usb_hid
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: no module named 'usb_hid'
``` can we enable usb_hid on esp32 for now?  makefile comments indicate it was an endpoint shortage problem.
#

@tulip sleet do you know ^ ?

tulip sleet
#

i'll look, i thought it was there, but the default devices weren't

tulip sleet
#

@onyx hinge If you are working on a PR anyway, you can remove these lines from both kaluga board mpconfigboard.mks:


# We only have enough endpoints available in hardware to
# enable ONE of these at a time.
CIRCUITPY_USB_MIDI = 1
CIRCUITPY_USB_HID = 0
CIRCUITPY_USB_VENDOR = 0
#

They should have been removed a while ago. I checked for others, and it's just those (it's also turned off for satellite boards, etc.)

onyx hinge
#

@tulip sleet OK, I can do that

tulip sleet
#

if not, we can just make a regular PR. Not a big deal.

onyx hinge
#

looks like the qr code PR is still open so I tacked it on

#

tomorrow I need to do & react to reviews, it sounds like

manic glacierBOT
#

I couldn't make edits on PR #4131, so this is a replacement. Many thanks to @cotdp for all of the prior work.

For this PR, I started with the Saola WROOM (for M and MS) and WROVER (for R and RS) files, customized for the Gravitech boards, bringing in some of the code from @cotdp's commits on #4131.

Tested the R build on a Cucumber R, and the RS build on a Cucumber RS.

Limited testing of the M and MS builds on a Saola WROOM board. I think it's low-risk to merge, easy enough to file a...

spiral elk
blissful pollen
#

I'm not even sure if this is an issue cause it seems so strange so I'll post something here first.

I have a FeatherS2 hooked via stemma to a PM25 air sensor hooked via stemma to an oled .91". in alpha 5 if I go to save the file more then once it resets.

If I disconnect any one device it works fine.

manic glacierBOT
thorny jay
#

Catching up on Show&Tell and noticed that the "Fidget mode" from kattni can also be useful for cats. πŸ™‚ (I have not put a mention to avoid waking up her)

hollow token
#

For cats and/or Kats?

low sentinel
#

@tulip sleet fyi pre-commit is a sudo install on wsl2 (and maybe other distros idk). It installs happily without sudo and does absolutely nothing. (i.e., command not found, nothing obvious in the site package to put on PATH)

stiff pelican
tulip sleet
#

What does apt show pre-commit show on your WSL2 instance?

manic glacierBOT
#

Add support for MX25L12833F 16MB QSPI flash chip.
Add QSPI activity indicator LED.
Add D15-D19 as aliases for the I2S peripheral pins.

VINA-D51 originally used a 64MB flash chip, but the SAMD51 only supports 16MB in the QSPI pseudo-memory mapping area. And 16MB is really quite a lot, so let's just go with the Macronix MX25L12833F 16 MB chip and simplify. The MX25L12872F chip is actually used on the board, but it is interchangeable with the '33F and they even have the same JEDEC ids as re...

manic glacierBOT
onyx hinge
ember iris
#

For the reddit post, are there any cool projects you'd like to share as an example of what can be done with circuit python?

low sentinel
low sentinel
tulip sleet
#

and then in the repo you must do pre-commit install for each repo for which you want pre-commit to work.

#

otherwise nothing will happen

low sentinel
#

Yeah what I’m trying to say is:

pip install pre-commit does not install pre-commit in an executable location.

tulip sleet
#

what is in your $PATH?

#

something like /home/halbert/.local/bin: should be in your path

#

what does which -a pre-commit say?

low sentinel
#
$ pip install pre-commit
$ echo $?
0
$ pre-commit
Command not found
$ sudo pip install pre-commit
$ echo $?
0
$ pre-commit
<usage information>

I’m away from that machine at work, can’t inspect path but iirc it put pre-commit in /use/bin when invoked via sudo.

#

And /usr/bin is on my path

#

Sry phone that should say /usr/bin

tulip sleet
#

basically never use sudo pip to install something, because it can mess up the system-installed commands that the system needs for its own purposes.

low sentinel
#

Yep

tulip sleet
#

there is an automatic way that ~/.local/bin gets added to your path. Let me find it.

#

this is in your .profile, which is only executed by a login shell:

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
    PATH="$HOME/.local/bin:$PATH"
fi
low sentinel
#

Oh? I didn’t see that but if that’s what is supposed to be on path I can easily put that in zshrc

#

Mm yes

tulip sleet
#

pip installs stuff in ~/.local/bin

#

yeah, that is almost certainly the problem

low sentinel
#

Thanks for your help. I agree this’ll be it

tulip sleet
#

the gotcha is that if you install something with pip for the very first time, it creates ~/.local/bin, but it doesn't get added to your PATH, because that stuff above didn't see ~/.loca/bin when it was run at the beginning. So you have to log out and log back in, and then it's on your path. So it might be that if you exit the WSL2 shell and then go back in, it will just work.

#

this is very confusing, and has happened to me on fresh installs

low sentinel
#

Nah this actually persisted across a shut down and a startup.

#

This is very good to know. I basically never use pip installed tools by name like this

#

Unfamiliar with pip distribution of executables

tulip sleet
#

it could be that zsh doesn't run .profile?? or maybe you edited .profile. The distinction between login shells and regular shells is not obvious, and i don't know what happens when you create a WSL2 session

#

i find this all kind of a mess

low sentinel
#

I didn’t edit profile

tulip sleet
#

pylint and black are also best installed via pip, if you want recent versions. I always look in pip first if I know the thing is python-based

#

i think you will figure it out when you get home πŸ™‚

low sentinel
#

Agree

prime flower
#

FYI if Actions is stalled (or really slow) for anyone else, "Investigating - We are investigating reports of degraded performance for GitHub Actions.
Aug 5, 14:09 UTC"

idle owl
idle owl
ember iris
idle owl
#

@onyx hinge I need your brain for a moment. I have to rename a bunch of files that show up in a find search, and I bet you know how to do that not-manually.

onyx hinge
idle owl
#

Yes.

#

I'm already in a branch so if I bork it all, no biggie.

onyx hinge
#

okay

#

you will want to tell git that you are renaming the files, which is the git mv command. You need to run it once for each thing that you find. Do you know, are there spaces in some of the filenames?

#

or other characters that give shells the willies

idle owl
#

All of the file names are main.py. The directories all appear to be letters with _

onyx hinge
#

it looks like in the learn system the filenames are all file for the simple technique, yay

idle owl
onyx hinge
#

There are lots of ways to to this, but here's one way I would do it

#

git ls-files "**/main.py" | while read fn ; do echo mv $fn ${fn%main.py}.code.py; done (or use your find instead of git ls-files, it's about the same)

#

this will print a sequence of 'mv' commands. you can either execute them by using copy & paste, or by modifying the line and removing "echo"

#

I can explain any of it you like, but it may not be worth the trouble; your goal is probably not to become an expert in bash shell

idle owl
#

I think I understand what it's doing?

onyx hinge
#

Probably? It's just stuff like, nobody knows until they learn it that "%" is removing a matching suffix from a variable, for instance...

#

oh except it's wrong

idle owl
#

I ran it w/ and w/o echo, and it did what you said

#

Oh.

onyx hinge
idle owl
#

Oops.

#

So need to run it again against .code.py ?

#

wait

#

I can stash and drop

#

and then rerun it.

onyx hinge
#

sure, that's a great alternative

#

do you see which "." to remove?

#

git ls-files "**/main.py" | while read fn ; do echo mv $fn ${fn%main.py}code.py; done

idle owl
#

yes.

#

But it didn't work

#

because they're untracked files now

#

So...

onyx hinge
#

after stash+drop?

idle owl
#

Yes.

#

well they were before the stash

onyx hinge
#

oh oops, two mistakes

idle owl
#

stash didn't make them untracked.

onyx hinge
#

git ls-files "**/main.py" | while read fn ; do echo git mv $fn ${fn%main.py}code.py; done

#

remember I said we needed to tell git that we were renaming? I left the git off of git mv

idle owl
#

Would this work? git ls-files "**/.code.py" | while read fn ; do echo git mv $fn ${fn%.code.py}code.py; done

onyx hinge
#

no, for a number of reasons

idle owl
#

ok

onyx hinge
#

git ls-files doesn't list untracked files

#

git ls-files -o might

#

but git mv won't want to move them, because they are untracked

idle owl
#

git ls-files -o does, but includes some other stuff in .gitignore as well.

#

ok

onyx hinge
#

the original main.py files are what stash and drop put back, the untracked .code.py files we just want to delete, which git clean can help with

idle owl
#

ah they are back indeed.

#

OK it's not as bad as I thought then.

#

How can I use git clean then?

onyx hinge
#

try git clean -n "**/.code.py"

#

it should say it would remove all those files, change the -n to -f to do it

#

aren't you glad we automated this and saved time?

idle owl
#

ok branch is back to normal.

idle owl
#

So back to this? git ls-files "**/main.py" | while read fn ; do echo git mv $fn ${fn%main.py}code.py; done

#

minus the echo to do it.

#

The commands look correct at least.

#

Hey! renamed: the whole lot!

#

That became the easy part. The hard part is going to be updating all the guides. πŸ˜–

manic glacierBOT
onyx hinge
#

@idle owl OK, onward

idle owl
#

@tulip sleet How would I go about making wav playback in the MacroPad library be non-blocking? I thought it was blocking by nature, but PhilB indicated it is not, in fact.

tulip sleet
idle owl
tulip sleet
#

for now, yeah, it will just raise more issues until it's fixed

idle owl
#

Ok. Thank you.

tulip sleet
#

@slender iron btw I do not see the huge memory consumption when debugging LTO on say, SAMD51. I am using the gdb from the arm download

slender iron
#

what versions of gcc and gdb are you using?

tulip sleet
#
$ arm-none-eabi-gdb-py --version
GNU gdb (GNU Arm Embedded Toolchain 10-2020-q4-major) 10.1.90.20201028-git
#
$ arm-none-eabi-gcc --version
arm-none-eabi-gcc (GNU Arm Embedded Toolchain 10-2020-q4-major) 10.2.1 20201103 (release)
slender iron
#

I have gdb 10.2 and gcc 10.3

tulip sleet
#

yeah, you are using the arch ones, I guess, you might try the ARM download

slender iron
#

ya

#

I tried gcc 11 and didn't have much luck with it either

tulip sleet
#

i have seen gdb regress and then get fixed several times (e.g. tab completion has been horribly slow and then got fixed)

slender iron
#

I was hoping to see a new gdb release fix it

#

but it's been a while

tulip sleet
#

the thing about the ARM release is that we know it's vetted

slender iron
tulip sleet
slender iron
#

yup, and 2.37 is released

#

I'm using 2.36 and just poked the arch package

tulip sleet
slender iron
#

nice!

tulip sleet
#

i can try that, but not right now πŸ™‚

slender iron
#

I've been using 10.3 so it should be ok to switch to

tulip sleet
#

the previous toolchain is using ld 2.35.1.20201028; the latest there is ld 2.36.1.20210621

slender iron
#

yup, I'm trying to install it now

#

I wonder if the arm version has the issue

onyx hinge
slender iron
#

@onyx hinge can you review my PR today please?

onyx hinge
#

@slender iron shoot, yeah

slender iron
onyx hinge
#

what's -z,max-page-size=0x1000 ?

slender iron
#

that changes the section alignment in the elf file

onyx hinge
#

does it have to do with the bootloader problem?

slender iron
#

it defaults higher and as a result pyocd was clearing more flash than it should have

onyx hinge
#

and the tilegrid stuff?

slender iron
#

I was worried it was writing to uninitialized memory

onyx hinge
#

aha, so maybe not necessary but also not harmful?

slender iron
#

since write is called from serial_write

onyx hinge
#

nods

manic glacierBOT
slender iron
#

*may speed things up I think

onyx hinge
#

oh what I wouldn't do for an accurate sense of how fast/slow my C code was πŸ˜›

#

was there a second thing you mentioned in the CE meeting you were waiting on me for?

slender iron
#

"dear sir, I'd like my python code to run as fast as C. k thx bye"

slender iron
#

I don't think so

slender iron
#

@tulip sleet looks like the ld update worked

tulip sleet
#

great! that is a lot less work than changing your debug workflow

slender iron
#

100%

manic glacierBOT
#

Overall, I am trying to use a nRF52 board with CircuitPyton.
And when powering on the board, I want the Bluetooth radio / transmissions of the board to be off / disabled.
Until the python code in code.py is ready to advertise the intended features of the project / product.

supervisor.disable_ble_workflow() will allow for this. It turns off background advertising and creation of the file transfer service and the nordic uart service for circuitpython serial connectivity. You can st...

tulip sleet
#

@idle owl should I blacken the macropad learning guide scripts?

#

there is no pre-commit action for the Learning Guide repo

manic glacierBOT
idle owl
tulip sleet
#

I will not bother, then, since it will churn the code something fierece.

solar whale
#

@onyx hinge the aio_image guide is fantastic!! Works great! Thank you!

onyx hinge
#

awwww that's the best use of the camera so far

ember iris
#

The AMA is now Live, folks can ask questions ahead of time this way

ember iris
#

I think that post should have all the needed info, I'm going to keep track of it throughout the day to make sure things are running smoothly (and asking some questions as I think of them)

idle owl
ember iris
#

Just got a loaf of bread in the fridge, I'm free now

idle owl
ember iris
#

Mind if I just directly use your description for the links?

idle owl
#

I can do better for the LED Animations πŸ˜„

manic glacierBOT
idle owl
#

Use this: This guide covers much of what you can do with LED Animations in CircuitPython, and makes displaying animations super simple.

ember iris
#

Awesome! I'll have to look and see if I can embed an image easily in this as well

idle owl
lone axle
# solar whale

That is a really nice quality photo. I haven't played with any of the camera sensors yet but am pleasantly surprised by how that came out. Also quite the majestic kitty.

idle owl
#

Anything else you can think of that might be worth including? I could grab a Bluetooth guide. I'll do that. I have one in mind.

#

I think that covers some of the flashy ideas you were looking for πŸ™‚

ember iris
#

Awesome! I think that should offer a variety of projects for users to get a sense of 'why embedded python'

idle owl
#

Agreed.

ember iris
#

And these capture the flashy side of it super well

idle owl
#

So this is definitely a super noob question, but is there a way to track the AMA thread other than refreshing the website? πŸ˜„

ember iris
#

Do you like the bluefruit? I've been eyeing it lately and after I'm done updating the VOC algorithm on the SGP40 I was thinking of picking one up

idle owl
#

Maybe not as noob as I thought then.

ember iris
#

Usually AMAs are done by setting them up ahead of time, and by the time you stop by there are questions ready, it's not a feed like structure like discord

idle owl
#

Ah fair enough.

ember iris
#

Yeah reddit has been doing a ton to change their platform and I just can't keep up with everything.

idle owl
#

I won't worry about it until tomorrow sometime then. πŸ™‚

ember iris
#

Yeah I'll be checking frequently to make sure if there are bad comments, I can remove them before anyone see's them. At least making sure as best I can. Some can slip through but I don't want to let them last long

idle owl
#

I should really set up tonight for the stream tomorrow. And not wait until tomorrow morning to find out what isn't working. πŸ˜„

idle owl
ember iris
#

Yeah if I didn't have the sgp40 setup by now I wouldn't be able to work on the code for it. My desk is a mess and doing anything more than that code, like streaming, would be crazy right now. I'm looking forward to tomorrows streams!

ember iris
# idle owl I understand moderating. Thanks for doing that!

No problem! I don't know how long I'll be a moderator for, so I'm taking this time as a chance to talk with cool people and use reddit to do interesting things. It's been pretty fun and the python community is not a community that makes moderation stressful thankfully

idle owl
ember iris
#

This is a fantastic community, I've really enjoyed time on this server and seeing the encouragement and support from everyone. I hope the subreddit says fun and interesting, but the best I can hope for is try my best with judgement calls and field joe and the other mods for perspective when I'm on the fence. Past that I just get to see a ton of cool projects, news, and updates. It's not a bad deal at all

solar whale
tulip sleet
#

@ember iris I did answer the first q, should i have waited, maybe? Just wanted to show some activity.

ember iris
tulip sleet
#

πŸ‘ thanks!

ember iris
#

I just don't want you feeling obligated to stay online constantly. I'd like it to be a minimal time investment unless you're comfortable doing more

tulip sleet
#

i just checked it, was all, and it was a good q. I will drop in the same manner I would in discord. And I might point people to discord or the forums if they need extensive followup

ember iris
#

That sounds good to me

#

Let me double check with Joe before you link to the discord, I want to check on something

tulip sleet
#

yes, I hesitated on that, since there's a subreddit

ember iris
#

You're welcome to direct them here, I just don't know if posting a link on reddit, which can easily be scraped, would invite raid spam. I don't want to say go for it and then leave you to deal with spam that I could have prevented

tulip sleet
#

then I would just point to something that points to discord; i understand

ember iris
#

So I'm checking with Joe to see if the python discord gets raid spam

manic glacierBOT
ember iris
ember iris
#

Joe hasn't seen much of an issue for raids coming from the subreddit. But I'd imagine pointing to something that points to the discord might still be a better idea. I just wouldn't worry too much if you do directly link here

dapper parcel
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.0.0-alpha.5 on 2021-07-21; Adafruit Macropad RP2040 with rp2040

Code/REPL

//This is the code from John Park's Ableton learning guide

# SPDX-FileCopyrightText: 2021 John Park for Adafruit Industries
# SPDX-License-Identifier: MIT
# Ableton Live Macropad Launcher
# In Ableton, choose "Launchpad Mini Mk3" as controller with MacroPad 2040 as in and out
# Use empty fifth scene to allow "unlaunching" of tracks...
manic glacierBOT
#

This feature does exactly what I was asking for in #5049
Thank you!
I can now call supervisor.disable_ble_workflow() in boot.py and no "strange" devices are appearing anymore after powering on the board.
As soon as the code in for my Bluetooth HID device is ready in code.py the correct advertising starts.

Remains the question: Is one of the initial devices providing the ability for "over-the-air" updates and if so, can the original workflow be reenabled by CiruitPytho...

manic glacierBOT
manic glacierBOT
spiral elk
#

Have asked WeAct about PIDs for the STM32F401 blackpills, holding off on my PR to add the board definitions until I hear back from them.

manic glacierBOT
manic glacierBOT
#

I chatted with @ATMakersBill last night about the details of this, and gave him some more recent builds to try, which did not help. It does sound like #4190. I have seen #4190-like symptoms on Ubuntu Linux 20.04 without using MIDI at all, with a quiescent connection, while doing some audio testing.

It is merely the connection that is broken. I can reconnect CDC and resume where I left off.

@jedgarpark Try https://www.onlinemusictools.com/webmiditest/ as Bill did and leave it quiescent ...

manic glacierBOT
#

Hi all,

I am using {Adafruit Metro M0 Express + Serial communication + Adafruit Shileld Motor Shield V2 + Stepper motor}, and I'm programming it with Circuit Python.
I want to receive command transmitted from the computer to which the Metro is connected via USB. Then I can execute the right command and activate motors.

CircuitPython Code:

import time
import board
from adafruit_motor import stepper
from adafruit_motorkit import MotorKit
import supervisor

kit = MotorKi...
#

So... perhaps this will help - I think this might be an interaction problem between the CP code (or maybe TinyUSB) and the Dell hardware/firmware/drivers. I noticed on #4190 that the user was on a Dell XPS. I am testing on my Dell Inspiron 7506 2n1 and getting the issue consistently. On the same machine, I tested a Behringer Control Surface (hardware MIDI device) and it ran continually all night without problem. I also moved the Macropad to my wife's MSI laptop and IT ran all night cont...

#

Try printing the data that you are receiving, and make sure that the COM port is correct.

We don't do this kind of support via GitHub, as it is not a bug or enhancement request, but a support issue. Too many people get email each time a comment is made here. We can move this to discord: https://adafru.it/discord or to the forums: https://forums.adafruit.com/viewforum.php?f=60. Let us know which you choose. I am closing this issue for now.

manic glacierBOT
#

It looks like the issue is that the line:
RTC->MODE0.COMP[0].reg = target;
in port_interrupt_after_ticks() is taking about 100us to complete. Since the pulses coming in from a DHT11 can be as short as
24us there can be more than one pulse counted as a single pulse. port_interrupt_after_ticks() looks to be getting called about every 525us, so in a ~4ms sequence of incoming pulses there will be several combined values, causing the inaccurate number of pulses. This looks like the same i...

manic glacierBOT
#

BLE provides functionality via services. A device can advertise different services at different times and provide different services at different times. Advertising only influences when something chooses to connect to another device. It doesn't limit what services are available once a connection is established.

If you want the BLE workflow stuff, then leave it enabled. The advertisements the core does shouldn't prevent HID from working because the HID advertisement will replace the first one.

jaunty juniper
#

what's the etiquette with the reddit AMA ? somebody asks for "any known fun-facts about where CircuitPython and MicroPython is used?" and I wanted to link to the PyCubed satellite thing

idle owl
manic glacierBOT
ember iris
#

I can also tag you as a part of it if you like as a Circuit Python Community Member in the post itself

manic glacierBOT
manic glacierBOT
#

For transferring text files to and from the SD card, you can use Thonny (and maybe other editors, eg Mu, but I haven't tried)

Once code.py has run and mounted the SD card, the /sd/ directory shows up when you try to read or write a file to the CircuitPython device. I don't understand how it actually works but it does.

I don't think this can be used for transferring binary files but someone might be able to figure out something.

idle wharf
#

Oh.. if a board has a pin mapped to "ID" ...

#

We can look for that I bet

jaunty juniper
#

I don't understand what you want to do with the board module anyway

idle wharf
#

I'd like there to be someway for circup to direct a user to the board specific download page when there is a new version of CP available.

jaunty juniper
#

yeah, but that has nothing to do with board modules or os.uname

stiff pelican
jaunty juniper
#

we can't make circup connect to the board's serial REPL, interrupt the code, run print(board.ID) or anything

idle wharf
#

We're trying to find a place to that value... board.ID was suggested... as was os.uname() as was boot_out.txt

jaunty juniper
#

that's way too complicated (just finding the right serial port, if it even exists) and intrusive

idle wharf
#

If its defined in board.ID can the boot_out.txt generator (?) read it and write it ...

#

So its available both ways ?

jaunty juniper
#

it can in any case, it's a matter of having a define

stiff pelican
#

There was also a comment from Scott
I like the idea of making the board id available from CircuitPython. I did that somewhere once.... I'd like to see it available to Python code as well, not just boot_out.txt.

jaunty juniper
#

yeah sorry, I guess I just found it weird to have that conversation about board in a circup issue

idle wharf
#

I was assuming it would get added to board and then to boot_out.txt ...

#

Does that sound like a workable solution ?

jaunty juniper
#

adding it to board or uname is a completely independent process in my eye

idle wharf
#

That makes sense ..

#

I was just going looking for that boot_out stuff, thanks!

#

Not being able to search on GH is a pain .

jaunty juniper
#

ah the file says "This file was generated by py/makeversionhdr.py" I should have a look at that, it must be filling in the %s for the target before building

#

yeah I use silversearcher locally

#

what am I saying, I AM looking at makeversionhdr.py, I meant I should look how to add the board id to it πŸ˜›

idle wharf
#

Another angle is to enforce that MICROPY_HW_BOARD_NAME is the download URL path ...

jaunty juniper
#

it's supposed to be human readable like #define MICROPY_HW_BOARD_NAME "Adafruit ItsyBitsy RP2040"'

idle wharf
#

It could human readable and the URL is just replace spaces with underscores

#

Need more GUIDs ..

jaunty juniper
#

how do you like my new boot_out.txt ?

Adafruit CircuitPython 7.0.0-alpha.5-117-gbe2342f32-dirty on 2021-08-07; Adafruit QT Py M0 Haxpress with samd21e18
BOARD ID: qtpy_m0_haxpress
boot.py output:
idle wharf
#

Oooooo so lovely !

#

So the URL path is the port path ..

circuitpython/ports/atmel-samd/boards/qtpy_m0_haxpress/

circuitpython/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/

I didn't realize that ...

#

Test sample of 2 ... might not be true

#

That does not appear to be guaranteed ... unless board id in the directions equates to the folder name in the path ...

https://github.com/adafruit/circuitpython-org#readme
To add a new board to the site:
Duplicate template.md to _board/<board id>.md.
Edit _board/<board id>.md according to the template's instructions.

#

It must mean the folder name ... there is not other value in the files in
circuitpython/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/
which has that value they're using in the url path

jaunty juniper
#

as far as I know the only exceptions are alias boards as I mentioned in the issue

idle wharf
#

Got it !

manic glacierBOT
#

As discussed in the Circup repo https://github.com/adafruit/circup/issues/113

Having a way for circup to determine a link to the CP.org page would allow circup to direct users where exactly to go when there is a newer version of CP detected for their board.

As per Neradoc "the process would be to add the board ID somewhere as a define in the core, whether automatically generated or manually, then add it to the boot_out.txt which is as simple as adding the define name to this line:"
...

tough chasm
#

Can u use hx711 with circuitpython?

lone axle
# tough chasm Can u use hx711 with circuitpython?

I don't have experience with that device specifically so I can't be certian. But I don't believe there is a helper library written for that chip currently. It may be possible to use lower level communication techniques to make it work but it would be more complex / advanced than many of the examples / hardware that does have helper libraries.

analog bridge
#

looks like adafruit_proxlight_trinkey_m0 build is overflowing by just 8 bytes

manic glacierBOT
#

By storing "count of words by length", the long wends table can be replaced with a short wlencount table. This saves flash storage space.

Extend the range of string lengths that can be in the dictionary. Originally it was to 2 to 9; at one point it was changed to 3 to 9.
Putting the lower bound back at 2 has a positive impact on the French translation (a bunch of them, such as "ch", "\r\n", "%q", are used). Increasing the maximum length gets 'mpossible', ' doit Γͺtre ', and 'CircuitPy...

onyx hinge
#

I wasn't going to work today, was I

spiral elk
ornate breach
#

Nonsense, don’t you know the French surrendering is a classic joke πŸ˜‰

spiral elk
#

technical words in german are usually a mouthful

ornate breach
#

I know I was trying to be funny

manic glacierBOT
#

Thanks! These irregularities in the bdf file apparently don't bother the tools we use to build CircuitPython, but it would still be nice if this was a valid bdf file. As you noted, the remaining problem is of a mismatch between the count of STARTCHAR blocks and the number on the CHARS line. Probably increasing CHARS to match what is actually present is the thing to do. Do you mind adding that change to this PR?

While pcf files are often smaller than bdf files, it is apparently not alwa...

manic glacierBOT
#

Looks like CI found some problems. One problem:

Boards for job "build-xtensa" not sorted. Must be:
        - "adafruit_feather_esp32s2_nopsram"
        - "adafruit_feather_esp32s2_tftback_nopsram"
        - "adafruit_funhouse"
        - "adafruit_magtag_2.9_grayscale"
        - "adafruit_metro_esp32s2"
        - "artisense_rd00"
        - "atmegazero_esp32s2"
        - "electroniccats_bastwifi"
        - "espressif_kaluga_1"
        - "espressif_kaluga_1.3"
        - "espres...
timber mango
#

Does Metro 328 work with circuitpython?

crimson ferry
timber mango
#

Thanks

slender iron
#

@solid blade hey, have you hacked a wii balance board over the uart? I see you worked on wiiuse

manic glacierBOT
manic glacierBOT
lone sandalBOT
manic glacierBOT
#

i don't know what to tell you about pre-commit. It seems pretty weak at checking for mundane issues before commit.

@WarriorOfWire looks like your local pre-commit is failing at finding and fixing formatting issues.

  • The most likely reason is that your uncrustify version is wrong, uncrustify>=0.71 is needed.
  • By default Ubuntu 20.04 installs 0.69, 0.71 can be obtained from ppa:pybricks/ppa. Following is how CI installs it.
sudo apt-add-repository -y -u ppa:pyb...
manic glacierBOT
#

I am working on a project where 12 processor pins are used on an nRF52840 and I am running into the problem that these pins can not be used as pins for ending light sleep.
It would be helpful if already initialized / in use pins could be added to alarm.light_sleep_until_alarms().
I fear, deinitializing all 12 pins (which I use to detect user input) before "going to sleep" and reinitializing them after "wake up" takes too long and will result in losing user input events.

Or, can I i...

lone axle
#

are there specific versions of the pip requirements from requirements-dev.txt to build the core? I'm noticing that today I'm getting this error when I try to build:

ModuleNotFoundError: No module named 'click._bashcomplete'
make: *** [../../supervisor/supervisor.mk:68: build-pyportal/genhdr/devices.h] Error 1

I just made a build a week or so ago and it went successful. I don't think I've changed anything in between but not 100%

jaunty juniper
#

yeah, it requires typer, which requires click 7.1.2, click 8 breaks compatibility with the completion, and circup switched to click 8

#

so if you updated circup to test the auto PR, and don't build Circuitpython in a virtual env, you need to do that and install click 7

lone axle
#

Ah, I see. Thank you

jaunty juniper
#

that's my guess

lone axle
#

I wonder if there are plans to change the core build to work with click 8 or if we should make that line click==7.1.2 int he requirements file

#

and yep, you are right. Downgraded to 7.1.2 and have successful build now.

jaunty juniper
#

yeah it's a long standing issue, typer does require click==7.1.2 but the requirement is not passed along when installing apparently, so some people get a lower version, so that was added to the build guide: pip3 install --upgrade click==7.1.2

#

on a side note, I would love a way to install a tool like circup in a virtual env, while still available from the path in any shell

main furnace
#

You should be able to create an alias using the full path to circup. Then you can run it without activating the virtual env.

manic glacierBOT
#
>>> import traceback
>>> try:
...     1/0
... except Exception as e:
...     ee = e
>>> traceback.print_exception(type(ee), ee, None)
ZeroDivisionError: division by zero
>>> traceback.format_exception(type(ee), ee, None)
'ZeroDivisionError: division by zero\n'

(I wasn't sure how to get a traceback object for printing, as sys.exc_info didn't seem to be available, so I didn't test this. Is there an alternative way?)

This also improves mp_printf so that it can p...

jaunty juniper
#

@onyx hinge the traceback PR added Exception.__traceback__

onyx hinge
#

I overlooked that

opal crystal
versed lark
#

@tulip sleet @idle owl @onyx hinge thanks for the CP chat on friday... just finished watching, and it's great to put faces to the names.

manic glacierBOT
lone axle
#

does anyone know of a spot in the core, or any other example code that would show to create a list and append things to it? Specifically I'm looking to append another list that contains ints representing x,y pixel locations.

#

Fumbling through it a bit I found mp_obj_list_t and I think this might be what I need but I'm not sure how to properly append things to it, and then append it to another list.

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.0.0-alpha.5-140-g9a6b11806 on 2021-08-08; Adafruit Grand Central M4 Express with samd51p20

Code/REPL

import board
from digitalio import DigitalInOut, Direction
led = DigitalInOut(board.LED)

Behavior

The following error is displayed:

AttributeError: 'module' object has no attribute 'LED'

Description

No response

Additional information

No response

low sentinel
lone axle
#

Thank you!

low sentinel
#

np. Btw do consider just doing 0, NULL to start with. You'll segfault if you pass in the wrong length and then try to use it in python 😬

humble shadow
#

Hi, I've built circuit python for a custom board and have it working. I'm curious about Arduino though; are Arduino files created at the same time when you build CircuitPython? I think I remember reading somewhere that if you add a board to the CircuitPython repo, it'll have both CircuitPython and Arduino configs created for it.

manic glacierBOT
lone axle
#

@crimson ferry do you happen to know if LED or L is preferred as a name for that pin? Or maybe both of them should be available?

crimson ferry
#

I think both... I believe we always want to match the silk for ease of use, and board.LED has recently become a standardized expectation iirc

manic glacierBOT
crimson ferry
#

so now there are three ways to address the LED

lone axle
#

Nice, I missed it on my first look, but Metro M0 and M4 do have LED already, I'll add one for L

manic glacierBOT
atomic summit
#

Hi everyone... been absent for a while focusing on hardware production. So the neopixel library and it's use of the NEOPIXEL_POWER pin - and IO locking....

#

How is a user supposed to have control of the power of the neopixel, or if a user already has control of it, how is the lib supposed to work, when the IO is "in use" ?

#

All of my boards have the explicit ability for user control on the "thing" that enables or disables power for the RGB LED - but this IO locking thing prevents this from working, or if the IO is assigned by the user already, it prevents the lib from working.

#

I'm failing to understand how this is all supposed to work now that power control has been added to the neopixel library - I know it was done a little while ago, but it's causing code breaking changes for me 😦

#

is there a way to check if an IO is "in use" ? an attribute?

#

This is all with 7 alpha 5

#
Traceback (most recent call last):
  File "code.py", line 8, in <module>
  File "neopixel.py", line 123, in __init__
ValueError: NEOPIXEL_POWER in use```
#

or is it reasonable to add a try/exception NEOPIXEL_POWER in use in the neopixel library to allow it to bypass the power pin control if the IO is already in use?

manic glacierBOT
manic glacierBOT
tulip sleet
#

@crimson ferry @lone axle As I mentioned, we don't really want to have both board.L and board.LED. board.LED is canonical. I won't remove the board.L's right now, but I don't want to add more either (despite the silk). (We don't have board.MO and board.MI either.)

manic glacierBOT
crimson ferry
#

@lone axle sorry I steered you wrong, I thought the silk was a stronger signal

tulip sleet
#

np, this isn't really written down

lone axle
#

no worries here. I'm happy to get the practice modifying things and building the core.

low sentinel
#

yo @analog bridge thanks for the tip on uncrustify, that was the issue.

lone axle
#

I've worked out that I can get the length of a list in core code by having it set into a variable by mp_obj_list_get() is there a way to get the length without specifically getting an item out of the list? or is that the best way? Also is there any sort of resource to learn things like this about working in core code at this point or is looking around at existing core code the best thing to do to pick up things?

low sentinel
#

mp_obj_list_get doesn't get items out of the list. It just gives you a pointer to the raw vector of items and the length of that vector. That's the right way to get the length; it costs 1 extraneous pointer write though. You could add a function:

size_t mp_obj_list_get_length(mp_obj_t self_in) {
    mp_obj_list_t *self = mp_obj_cast_to_native_base(self_in, &mp_type_list);
    return self->len;
}
#

(untested)

lone axle
#

Ah, I need to probably read up some more on pointers honestly. I don't have any real prior experience with C or any other languages where they are not hidden to a larger degree. I used code like this to do what feels like getting an item out of the list (and the length):

mp_obj_t *current_point;
size_t list_length = 0;
mp_obj_list_get(fill_area, &list_length, &current_point);
mp_obj_print(current_point[0], PRINT_STR);

Thank you for pointing me toward Polygon inside of vectorio btw. I've only taken baby steps but even those I would not have been able to manage without that help.

manic glacierBOT
low sentinel
#

so you're printing fill_area[0] with that code. I think you should rename current_point to fill_area_content or something if fill_area_content[0] is actually the current_point but idk what this code actually is doing so maybe it makes sense :-p
Anyway good luck! Pointers are good.

lone axle
#

Thank you. I do think some renaming is in order. fill_area is a name left over from the python implementation that I am trying to move into the core. It's a "paint bucket" style fill into a bitmap.