#circuitpython-dev

1 messages ยท Page 381 of 1

onyx hinge
#

I forget why I thought I wanted the jmp pin, I think it was maybe just for completeness

#

Or was it for a different take on pulsein, that would fill the queue only on change?

manic glacierBOT
#

I'm still seeing the original issue where the code continues to run but MIDI stops in 15-20 mins. I'm seeing this on a Dell XPS 8930 desktop running win10, but I also see it on a Dell Inspiron 5593 laptop running win10 (haven't tested on one previously). So the problem is a bit more widespread than I thought. I've run the exact same test on a custom built non-Dell system and MIDI continued for 3 days w/o stopping.

manic glacierBOT
manic glacierBOT
manic glacierBOT
slender iron
#

@tulip sleet you around? I'm just about free

tulip sleet
#

yes, and I have more info

slender iron
#

kk, will let you know when I'm free

onyx hinge
#

our progress bar is getting so full

slender iron
#

I just added a new issue ๐Ÿ™‚

#

it's easy though

onyx hinge
#

well that is weird. ```$ ./micropython-coverage -c 'import sys as errno; print(errno.EINVAL)'
22

#

print(errno.EINVAL) even prints a number without importing anything ๐Ÿค”

tulip sleet
#

looks like some short-circuiting of a lookup??

onyx hinge
#

yeah

#

I understand why, I wouldn't have discovered it otherwise

#

but the more exciting news is, I found 1k of flash space in the couch cushion while looking

tulip sleet
#

lol

onyx hinge
#

MICROPY_COMP_MODULE_CONST

#

I'll re-check my results, I was surprised it was that much

tulip sleet
#

i would think we need it =1?

onyx hinge
#

what makes you say that? It doesn't seem like referring to errno constants is a performance critical path in the type of code our users create

tulip sleet
#

// Whether to enable lookup of constants in modules; eg module.CONST . Is that an optimization or it just doesn't work if off?

#

It sounded like the latter

onyx hinge
#

oh I see what you're asking

#

I think it's just an optimization

#

.. turning errno.EINVAL into a constant load whereever it appears, rather than actually looking it up in the errno module by string at runtime

#

I'll make sure though

tulip sleet
#

where to enable compile-time lookup is maybe what it means

#

yes, i am confuised

onyx hinge
#

disabling MICROPY_COMP_MODULE_CONST is +112 bytes free, disabling MICROPY_COMP_CONST_FOLDING is +884 for a total of +996

tulip sleet
#

const folding is pretty important, i wouldn't turn that off

onyx hinge
#

I won't PR it right now but like some other things I'll keep it in my pocket. We might decide it's a trade-off to make for the most constrained boards. constant folding would remain active in mpy-cross so in byte-compiled files it's not giving anything up

#

while True: print(1+2+3+4+5+6+7+8+9+10) I imagine it can make code like this run a lot faster/slower, for sure

tulip sleet
#

especially floating point calcs on non-fp chips

onyx hinge
#

yeah I see that

slender iron
#

ok @tulip sleet

manic glacierBOT
#

Remove max_size parameter from displayio.Group
Closes #4959

This is potentially a breaking change as the constructor signature is changing.

Status of dependents:

Frozen modules

> grep -r max_size frozen | wc
      0       0       0

All frozen modules that use max_size have been updated

Adafruit_CircuitPython_Bundle libraries - after the next release

>> Adafruit_CircuitPython_Bundle ๏„ฆ main
> .update-submodules.sh
> grep -r max_size * | gr...
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Hi! I'm using CircuitPython 7.0.0-alpha.5-8-g779b5c185 on a Raspberry Pi Pico.

Despite the Pico's datasheet labelling GP16-19 as default for SPI, GP4&5 as default for I2C, and GP0&1 as default for UART, there is no board.SPI(), board.I2C(), or board.UART() available.

The pinout diagram on [Getting Started with Raspberry Pi Pico and CircuitPython](https://learn.adafruit.com/getting-started-with-raspberry-pi-pico-circuitp...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.0.0-alpha.4 on 2021-07-08; Adafruit ItsyBitsy nRF52840 Express with nRF52840

Code/REPL

# boot.py
usb_cdc.enable(console=True, data=False)
usb_midi.disable()

#code.py
...

devicename = "123456789A123456789B123457"
# this are 27 characters (no error in advertisement with names which are 26 characters long)

...

_bleio.adapter.name = devicename  # I don't know if the device name here or bleow is necc...
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.0.0-alpha.4 on 2021-07-08; Adafruit ItsyBitsy nRF52840 Express with nRF52840

Code/REPL

print("first line.")
s = input("first input\n")

Behavior

The code above runs fine as expected!
But when you press CTRL-D at the input several times,
there will be a hard crash of the board with no output to repl. (The serial USB-Device "goes-away")
Similar to the crash reported in #5043
Note that once the bo...

spiral elk
#

I have some questions regarding submitting a new board if someone has some time to explain.

spiral elk
#

Yes, the thing is that the board I'm working with is a variant of a board adafruit sells, but wondering what to do about usb pid/vid

#

This is more a political thing than technical.

analog bridge
#

You will need new vid/pid... if your board is open source then you can get it from https://pid.codes/

spiral elk
#

Not an open hardware board, same physical pcb as an adafruit-sold third-party product but a different mcu onboard.

manic glacierBOT
#

The WeAct blackpill_with_flash board (unlike the non-haxpress version) seems to reserve 16k of flash for nvm usage. It uses the ports/stm/boards/STM32F411_nvm_nofs.ld linker script, but does not seem to actually implement the nvm module in the build. It would be a good idea to reclaim this space for future use given a) the port already omits some built-in modules and b) a tinyuf2 port is in progress for this board and will need to be shoehorned in somewhere.

manic glacierBOT
manic glacierBOT
#

Thank you @hierophect!

@tannewt, if the string stuff looks good to you, I guess the TODO comments can be removed? I can make a PR to that effect.

diff --git a/shared-bindings/supervisor/__init__.c b/shared-bindings/supervisor/__init__.c
index 83b473616..055b3a908 100644
--- a/shared-bindings/supervisor/__init__.c
+++ b/shared-bindings/supervisor/__init__.c
@@ -267,14 +267,13 @@ MP_DEFINE_CONST_FUN_OBJ_0(supervisor_ticks_ms_obj, supervisor_ticks_ms);
 //|     ...
 //|
 ST...
tulip sleet
#

@idle owl if you have availability today let's talk about keypad/gamepad stuff

idle owl
tulip sleet
#

that's good

idle owl
#

Excellent. I'll ping you in a bit.

manic glacierBOT
manic glacierBOT
#

@ThomasAtBBTF Thanks! I overlooked this element of the issue because I read it too quickly.

It would be great if you enter a fresh feature request for these items (maybe just one, as they do seem closely related/interdependent). I do agree that we have room to refine how the bluetooth "flow" goes and how to control it from code, though I only know the basics and haven't used it much for myself.

I still would like to be able to actively start Bluetooth in code.py when turned off in boo...

slender iron
manic glacierBOT
#

CircuitPython version

6.3, 7.0 alpha, tested on both Feather M4 and Raspberry Pi Pico

Code/REPL

import board
import audiobusio
import audiocore

FILE = 'sweep.wav'

# Feather M4
BIT_CLOCK_PIN = board.TX
LR_CLOCK_PIN = board.D10
DATA_PIN = board.D11
OUTPUT = audiobusio.I2SOut(BIT_CLOCK_PIN, LR_CLOCK_PIN, DATA_PIN)

DATA = open(FILE, 'rb')
AUDIO = audiocore.WaveFile(DATA)

OUTPUT.play(AUDIO, loop=True)
while True:
    pass

Behavior

...

#

This draft PR outlines the requirements for a SAMD51 implementation of the Alarm module, with instructions for light sleep, deep sleep, fake sleep, PinAlarms and TimeAlarms. I've outlined recommendations for what modules should be used where, along with relevant sections from the datasheet, in this git gist. I haven't added much in the way of actual port-specific implementation, to make it more clear what code is generic/u...

manic glacierBOT
#

While working on code for HID devices on the nRF52840 ItsyBitsy I am observing that as soon as power is applied to the board, it starts advertising (unknown to Windows) devices.
Only after code.py starts and executes code to present an HID device these "unknown devices" are "going away" and the device prepared in code.py gets advertised.
I think it would be helpful and allow a cleaner customer experience if the behavior of the default Bluetooth (sub-)system can be modified in boot.py as now...

lone axle
#

@idle owl I noticed the PR you linked earlier that removed were_pressed from CircuitPlayground library. The CLUE library contains the same API currently. I'm about to update that library for these changes. Should I remove it from there as well? I found two uses of it in examples / learn guides so if we do remove I'll update those to use the direct button value API but keep the same behavior from users perspective.

idle owl
# lone axle <@!330227457296957440> I noticed the PR you linked earlier that removed `were_pr...

One of the examples in Learn isn't relevant, because it's implementing a few things from the CLUE library in a library included with the project bundle (Dan and I were looking into this earlier). Yes, we're trying to slowly deprecate gamepad and the were_pressed functionality isn't really necessary. Folks can use keypad for similar if desired, or poll the buttons etc. So if you're already in there, please remove it, and ensure that any example code is updated. Thanks!

manic glacierBOT
lone axle
#

@tulip sleet do you know if there is a "simpletest" type most basic example of how to use the new keypad module somewhere? I've just written this one to make sure that I understand how it works:

from keypad import Keys
import board
import time

pins = [board.BUTTON_A, board.BUTTON_B]
keys = Keys(pins, value_when_pressed=False, pull=True)

while True:
    if keys.events.overflowed:
        keys.events.clear()
    
    event = keys.events.get()
    if event:
        if event.pressed:
            print("{} was pressed".format(event.key_number))
        
        if event.released:
            print("{} was released".format(event.key_number))

If there isn't one out there yet I'd be happy to share this where is the best place to do so (in the docs perhaps?)

tulip sleet
#

which has several simple examples

lone axle
#

Ah, thank you. didn't think to check for a guide. ๐Ÿคฆ

tulip sleet
#

np! I try to talk it up ๐Ÿ™‚

#

@lone axle the "overflow" stuff is discussed on the Advanced Features page

lone axle
#

Nice, thank you

tulip sleet
#

@slender iron verrrrry interesting re audio:

  1. stopping neopixel statemachine on deinit made no difference
  2. playing a RawSample by reading a raw version of my a440.wav file works fine by itself, even with displayio DMA going on.
  3. playing the RawSample and the WavFile version are very different. The WavFile version is crackly or very quiet. After some number of plays the RawSample play also stops working (perhaps due to DMA getting messed up).
    This is with a 32k 1-second 16-bit sample. I will continue to look at things.
manic glacierBOT
manic glacierBOT
spiral elk
#

@slender iron Should I actually move ahead and prep a PR for the changes necessary to reclaim the nvm area for the blackpill_with_flash? My local build without it seems fine after a day in use.

thorny jay
#

Hi, I tested adafruit-circuitpython-circuitplayground_bluefruit-en_US-20210723-5fbe6d4.uf2 and noticed that boot_out.txt is empty. I tried import storage; storage.erase_filesystem() but still empty.

spiral elk
thorny jay
spiral elk
#

Mine is on STM32

#

MIGHT be on devices with external flash only?

manic glacierBOT
jaunty juniper
#

hey, @tulip sleet I don't know if you can help with this, but it relates to pyserial for windows: on win 10 at least it gives me bad information for the manufacturer ("microsoft" for a CPX) and description (it says a generic "USB serial peripheral (COM3)") and doesn't even fill product (which should say "CircuitPlayground Express").

I think I understand that you used a DEVPROPKEY to get the serial channels names, do you know if a similar method would work to retrieve those other fields ? and how would I go about finding the key for those USB properties (if any) ?

manic glacierBOT
ornate breach
#

The addition to support multiple status LEDs, will that end up working if Iโ€™ve got a matrix of LED connected for the neopixel status?

#

For instance the RGB matrix board I showed off on show and tell has an ESP32-s2 and currently it just uses the first neopixel of the matrix for status

#

Would I be able to use all the neopixel for status?

onyx hinge
#

Seems like?

manic glacierBOT
devout jolt
#

Does anyone here have an Arduino Nano RP2040 they can test CircuitPython on? In the help-with-CircuitPython channel there seems to be recent issues with this board, where MicroPython and Arduino UF2 uploads work but CP does not. Sounds kinda like flash setting not right in the build?

jaunty juniper
#

mine works as expected, demo code runs on latest, wifi, RGB LED, I'm wondering if there are different flash chips or some variability (or something else entirely)

devout jolt
#

Thatโ€™s what Iโ€™m wondering as well. Whereโ€™s that Arduino sketch that prints out Flash info ๐Ÿ™‚

tulip sleet
# jaunty juniper hey, <@!329766224093249548> I don't know if you can help with this, but it relat...

I am looking for the docs.microsoft.com webpages I used. Here is one for DEVPKEY_Device_BusReportedDeviceDesc: https://docs.microsoft.com/en-us/windows-hardware/drivers/install/devpkey-device-busreporteddevicedesc. Its siblings may be what you want. I am looking for the GUID values: I can't remember whether I got those from a header file or a webpage.
I think you know about this PR I made: https://github.com/pyserial/pyserial/pull/571/files

#

Google 540b947e-8b40-45bc-a8a2-6a0b894cbda2 and you can find the docs.microsoft.com webpages, and then look at their siblings.

#

(I had that GUID in my search history)

#

i am no expert at this: I just replicated how the existing .py script looked up values, and probably found how it was done in some other examples (maybe C#)

jaunty juniper
#

ah thanks a lot, looking up the keys in that format does return resources with lists and stuff, that's my new rabbit hole to dive in !

onyx hinge
#

I don't know whether this is a good idea, but I learned a lot to implement it.

manic glacierBOT
#

This adds IS25LP128F as an alternate flash chip, in addition to the AT25SF128A.

Several users on the [#help-with-circuitpython channel ](#help-with-circuitpython message)reported CircuitPython not working and the flash being different than Arduino's published schematic. @Neradoc made a UF2 build with the new chip and[ two of the affected users reported success](#help-with-circuitpython message...

manic glacierBOT
manic glacierBOT
#

I'm finding the (default for device) floating point mode a bit flaky with my setup of a Feather nRF52840 attached to an Pimoroni Enviro+ doing nothing and that's on a breadboard with 15cm wires over to SPS30 and 10k pull-ups and there's some dangling 25cm unconnected wires (from previous probing). It'll give CRC errors after maybe 10-30 reads. The integer mode (current default for library which I'm pondering changing) is more robust but just gave an error at the 386th read.

The data length...

manic glacierBOT
solar whale
#

Sorry, I did not get to this and won't be able to test it for the next week since I am away from my hardware.

thorny jay
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.0.0-alpha.5-42-g0a3c75c43 on 2021-07-25; PewPew M4 with samd51g19

Code/REPL

import audioio, board; a = audioio.AudioOut(board.SPEAKER)

Behavior

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

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

Adafruit CircuitPython 7.0.0-alpha.5-42-g0a3c75c43 on 2021-07-25; PewPew M4 with samd51g19
>>> import audioi...
spiral elk
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
stuck elbow
#

@onyx hinge I've stolen your example, and I have to report that it works very well! https://hackaday.io/project/174095-dorsch-40k-keyboard/log/195783-shiny-new-code

I fished this keyboard out of the proverbial drawer to try the new CircuitPython on it, with some of the new fancy features that have been added.

First of all, there is now a keypad module for scanning the key matrix in C โ€” since it does it in the background using interrupts, it frees the Python code to display the LED animations much more smoo...

onyx hinge
manic glacierBOT
onyx hinge
#

@stuck elbow Is the check for "code == 0" an optimization? otherwise, it seems unneeded, since a value of 0 wouldn't pass into either of the other if-clauses. python for code in pressed_keys: if code == 0: continue if code & 0xff00: report_mod_keys[0] |= (code & 0xff00) >> 8 if code & 0x00ff: report_bitmap[code >> 3] |= 1 << (code & 0x7)

stuck elbow
#

@onyx hinge I think it's a reminder of older code

#

aaand I just noticed a bug there

lone axle
#

@tulip sleet was gamepad removed in 7.0.0 alpha 5 but going to be added back for next alpha / beta? If I understand correctly the PR removing that hasn't been merged yet, but testing out something unrelated I'm getting a Module Not Found on a CLUE with alpha 5:

Adafruit CircuitPython 7.0.0-alpha.5 on 2021-07-21; Adafruit CLUE nRF52840 Express with nRF52840
>>> import gamepad
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: no module named 'gamepad'
tulip sleet
#

It is turned off by default in circuitpy_mpconfig.mk

#

@lone axle I am now seeing your other PR's. We can remove were_pressed from the CLUE library, for instance, as you did. We just have to make it a major version bump , as Kattni just did for the circuitplayground library.

What were you testing that ran into needing gamepad on the nRF?

lone axle
tulip sleet
#

ok, thanks. I see some uses of gamepadshift and gamepad in various learn guides, but not were_pressed(). There is were_pressed() in Pyloton, but that's a special case, and we know about that (it has its own mini version of the CLUE library). gamepadshift is still present in the boards that need it. So in the next alpha, I will put back gamepad.

#

@lone axle do you want the Learn Guide fixes you approved to be merged, or do they need to be done in conjunction with any guide editing?

#

i am just wondering why you didn't merge immediately.

lone axle
#

I'll start merging them as I go through. And I will update the guide pages as needed for any that have code outside of github embeds.

tulip sleet
#

@onyx hinge I am seeing this in local make html builds. Is it significant?

checking consistency... /home/halbert/repos/circuitpython/shared-bindings/ulab/numpy/approx/index.rst: WARNING: document isn't included in any toctree
/home/halbert/repos/circuitpython/shared-bindings/ulab/numpy/numerical/index.rst: WARNING: document isn't included in any toctree
/home/halbert/repos/circuitpython/shared-bindings/ulab/numpy/stats/index.rst: WARNING: document isn't included in any toctree
/home/halbert/repos/circuitpython/shared-bindings/ulab/numpy/transform/index.rst: WARNING: document isn't included in any toctree
/home/halbert/repos/circuitpython/shared-bindings/ulab/numpy/vector/index.rst: WARNING: document isn't included in any toctree
#
build finished with problems, 5 warnings.
make: *** [Makefile:93: html] Error 1
#

FYI

halbert@tuna:~/repos/circuitpython/extmod/ulab$ git status
HEAD detached at 8d93dde
nothing to commit, working tree clean
onyx hinge
#

@tulip sleet that's interesting, can you do a git clean in shared-bindings and try it again? Is it failing on github too, or just locally for you?

#

I think numpy.numerical is a module that has been removed/renamed into numpy-compatible naming

#

but I notice that building the docs leaves .rst files in shared-bindings/ that are maybe being picked up later?

tulip sleet
#

i was just testing in preparation for a PR for gamepad-related stuff. About to go for a walk but I will try again in about an ahour

tulip sleet
manic glacierBOT
#

We have the room now to have both keypad and gamepad on most boards. Restore gamepad so libraries will work on both.

When 7.0.0 final is shipped, we can change library and guide code to use keypad, and remove gamepad and gamepadshift.

  • Revert 04b69cde, part of #4891, to restore gamepad to most builds.
  • Turn off both gamepad and keypad on builds that don't need them.
  • Add deprecation notice in gamepad and gamepadshift.
  • Update frozen libraries: in particular,...
manic glacierBOT
#

This is a work-in-progress PR for supporting the SparkFun STM32 MicroMod Processor board.

This is my first attempt at adding support for a new board in CircuitPython and there are a couple areas outlined below where I would appreciate some early feedback before this is finalized.

Peripheral numbering question

When I was reviewing the SparkFun MicroMod Tech Specs, I noticed that the MicroMod...

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
stiff pelican
thorny jay
#

I am always hesitant to create an issue... I prefer to check here if it is a know behaviour, if I am the only one affected, before creating an issue. You see, I don't track the forum, I might only see a small percentage of the created issue. So I almost never know for sure if it is a known issue, a new issue, just me making mistake or not using new code the expected way.

manic glacierBOT
#

CircuitPython version

adafruit-circuitpython-pimoroni_picolipo_16mb-en_GB-20210725-a9735fb.uf2

Code/REPL

> ls -l /media/user/CIRCUITPY/boot_out.txt

Behavior

-rw-r--r-- 1 user user 0 Jan 1 2020 /media/purpleankh/CIRCUITPY/boot_out.txt

Description

The latest UF2 from S3 is producing an empty boot_out.txt. This is possibly board specific as my PyPortal is fine.

adafruit-circuitpython-pyportal_pynt-en_GB-20210725-a9735fb.uf2
`Adafruit...

manic glacierBOT
manic glacierBOT
#

Testing UF2s from alpha-5 forward

-rw-r--r-- 1 user user 91 Jan  1  2020 /media/user/CIRCUITPY/boot_out.txt
Adafruit CircuitPython 7.0.0-alpha.5 on 2021-07-21; Pimoroni Pico LiPo (16MB) with rp2040

-rw-r--r-- 1 user user 104 Jan  1  2020 /media/user/CIRCUITPY/boot_out.txt
Adafruit CircuitPython 7.0.0-alpha.5-8-g779b5c185 on 2021-07-23; Pimoroni Pico LiPo (16MB) with rp2040

-rw-r--r-- 1 user user 104 Jan  1  2020 /media/user/CIRCUITPY/boot_out.txt
Adafruit CircuitPython 7.0.0-...
manic glacierBOT
#

CircuitPython version

CircuitPython 7.0.0-alpha.4

Code/REPL

-

Behavior

I plugged the PiCo into my computer to continue my project and all my files on it are gone. It now contains a code.py with hello world in it and an empty lib folder.

  • Why did this happen?
  • Is there any way to get my files back?

Description

No response

Additional information

No response

manic glacierBOT
turbid radish
#

?serverinfo

digital shoreBOT
#
adafruit
Owner

adafruit#3230

Region

us-west

Channel Categories

8

Text Channels

58

Voice Channels

6

Members

30112

Roles

35

manic glacierBOT
tulip sleet
#

@idle owl gamepad + keypad together is not fitting in Feather M0, etc. so I may just remove gamepad altogether from SAMD21, now that the libraries have stopped using it. It does fit on CPX because we turn off displayio, which is big

idle owl
#

I'm all for turning it off.

tulip sleet
#

we pull other tricks on the displayio build (like no longints)

idle owl
#

Ah

tulip sleet
#

i will fix pyloton not to use it

idle owl
#

<@&356864093652516868> Greetings! The CircuitPython Weekly meeting is in just under 2.5 hours. Remember that if you'd like to participate (or are missing the meeting and wish to provide notes), please add your hug reports and status updates to the notes document. This is what I will pull from as I go through the meeting. If you're planning to simply listen in, you don't need to do anything. Hope to chat with you soon! https://docs.google.com/document/d/1IO_iC2RE9w83MMxA-Gy5T3VeeAy3HbuCkSOehqth15I/edit#

jaunty juniper
#

somebody in the help channel had installed the latest libraries from the bundle on a CPB 6.3.0, which is still the stable, and of course it didn't work because of keypad. The issue here is that the problem is not obvious: the bundle is described as "This bundle is built for use with CircuitPython 6.x.x." and it's actually not, because that's about the mpy format used, not the feature compatibility

#

the solution, to download an older version of the adafruit_circuitplayground library from the github releases of said repository is not super easy to find on your own either

thorny jay
jaunty juniper
#

yeah but the library is already changed, has not backwards compatibility and is in the bundle

lone axle
jaunty juniper
#

oh it was ?

jaunty juniper
#

ah ok, I see

lone axle
#

the were_pressed API was removed all together with this PR. So user code can either poll button_a or button_b directly or if desired implement keypad in the usercode space instead of within the library.

jaunty juniper
#

so it was in 4.4.0, but is fixed in 5.0.0

idle owl
#

We broke it temporarily.

#

In terms of 6 compatibility.

#

It has been fixed in the latest version, yes.

jaunty juniper
#

ok good, thanks ๐Ÿ‘

idle owl
#

No one used were_pressed anyway, and shouldn't have been. That's all that ended up changed in the end was its removal.

tulip sleet
jaunty juniper
#

well I use it but that's fine ๐Ÿ˜‰

tulip sleet
#

you are "encouraged" to switch to keypad ๐Ÿ™‚

idle owl
manic glacierBOT
thorny jay
#

Obviously you are better informed and I have a partial view. Long LIVE the keypad.

idle owl
#

Personal opinion, I suppose.

thorny jay
#

I work in "operation" (the Ops in DevOps) and I was: "But how are we going to transition from the old to the new and synchronise the library change and the core change."

manic glacierBOT
tulip sleet
#

The frozen CPX library is OK for now in 6.3.0

#

that will not change in 6.x

jaunty juniper
#

yeah, that's why their code worked on the CPX but not the CPB

analog bridge
#

@slender iron I'd like to discuss about the traceback module implementation, can you ping me when you are available.

tulip sleet
#

in the long run we might have different bundles, but we haven't come up with an easy mechanism for that.

#

there's a long issue discussing that

manic glacierBOT
slender iron
#

@analog bridge at my desk now

analog bridge
#

I have implemented the cpython version of print_exception(), the only thing is that the cpy exceptions doesn't contain the __traceback__ obj...
Should I alter the print_exception() function to only take exception (i.e. print_exception(value), instead of print_exception(etype, value, traceback))?

slender iron
#

could we add __traceback__?

#

another option is to make a new module that does it based on the exceptionn

#

and then we can make a python version for cpython

analog bridge
#

yes the mechanics are there... its just not exposed

jaunty juniper
#

the C python traceback API is not great, I personally would prefer we implemented traceback.format_exc which can only be called for the latest exception, but the result can be kept for later so it's fine, and it doesn't require additional parameters

#

or, micropython-lib has a traceback module written in python

analog bridge
jaunty juniper
#

the only thing is I guess it allocates memory

tulip sleet
#

there is an emergency exception buffer, could that be used?

tulip sleet
#

MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF, etc.

jaunty juniper
slender iron
#

I think there are two options 1) add native traceback that is a subset of CPython's traceback or 2) create a new module name that has the existing print_exception and provide a Python version in Blinka for CPython. Either option is fine with me. My goal was to get it out of sys

analog bridge
slender iron
#

yup, looks right

analog bridge
#

one more thing... we don't actually need to obtain etype, traceback params from the user... they can be obtained in c from the exception i.e. value parameter.
in-fact python-3.5 just ignores etype, its only there for backwards compatibility with things like sys.exc_info() which returns a tuple (etype, value, traceback), exc_info() is at the moment disabled by default, should I enable it?

analog bridge
slender iron
#

we don't need it everywhere

analog bridge
#

I am removing etype, traceback params for now and will focus on adding print_excepction(value, limit=None, file=None, chain=True)

#

and also format_exception() its same as print... just returns a string instead printing or writing to file like object

manic glacierBOT
#

Discord question from @maholli (paraphrased)

What is the issue described with callbacks / why is the _port_interrupt_after_ticks not sufficient for TimeAlarm?

When the timer alarm goes off when the device is not in deep sleep (so either in light sleep, or fake deep sleep), it needs to call a function that will set the TimeAlarm static variable woke_up to True. In the STM32 HAL, it's possible to either register a specific function that is called when the ISR occurs, or to use a gen...

slender iron
analog bridge
#

need help with docs... is it possible to have params without type annotations?

#
//| def print_exception(etype, value: BaseException, tb, limit: Optional[int] = None, file: Optional[io.FileIO] = None, chain: Optional[bool] = True) -> None:
//|     """Prints exception information and stack trace entries.
//|
//|     .. note: Setting `chain` will have no effect as chained exceptions are not implemented.
//|
//|     :param etype: This is ignored and inferred from the type of value.
//|     :param BaseException value: The exception.
//|     :param tb: The traceback object.
#

I am struggling with etype and tb...

slender iron
manic glacierBOT
#

@hathach Sorry I was pulling serial data from the pico not GPIO0. I was able to capture the log data when MIDI stops, this appears to be the interesting part:

`USBD Xfer Complete on EP 85 with 4 bytes
MIDI xfer callback
Queue EP 85 with 4 bytes ...
USBD Xfer Complete on EP 85 with 4 bytes
MIDI xfer callback
USBD Unplugged
USBD Bus Reset : Full Speed

USBD Setup Received 80 06 00 01 00 00 40 00
Get Descriptor Device
Queue EP 80 with 18 bytes ...
USBD Xfer Complete on E...

idle owl
#

I will be right back.

modern wing
storm minnow
#

I wish I could join the frey

modern wing
#

unplug the second monitor so it doesn't randomly reboot?

thorny jay
#

I will follow the recording. I wrote my notes (that cover some hug report from last week too).

manic glacierBOT
lone axle
#

Today OSHWA, in collaboration with the Engelberg Center on Innovation Law & Policy at NYU Law, is excited to launch The 2021 State of Open Source Hardware. This graphic report builds on data from OSHWAโ€™s Open Hardware Certification Program, the annual Open Hardware Summit, and the annual Open Hardware Community Survey.

onyx hinge
#

open horse hardware ๐ŸŽ 

lone axle
#

Adafruit CLUEใจAliExpressใงๅฃฒใฃใฆใŸBlackberry็”ฑๆฅใฎใƒˆใƒฉใƒƒใ‚ฏใƒœใƒผใƒซใƒขใ‚ธใƒฅใƒผใƒซใ‚’CircuitPythonใงๅˆถๅพกใ—ใฆใ€็”ป้ขไธŠใฎใ‚ชใƒ–ใ‚ธใ‚งใ‚ฏใƒˆใ‚’ๅ‹•ใ‹ใ—ใฆใฟใพใ—ใŸใ€‚

ใƒˆใƒฉใƒƒใ‚ฏใƒœใƒผใƒซใฎใƒ›ใƒผใƒซใ‚ปใƒณใ‚ตใฎ็ฒพๅบฆใฎใ›ใ„ใ‹ใ€ใชใ‹ใชใ‹ๆ€ใฃใŸใจใŠใ‚Šใซๅ‹•ใŒใชใ„ใ‘ใฉใ€ๆŠผใ—่พผใ‚€ใจใƒœใ‚ฟใƒณใซใชใ‚‹ใฎใ„ใ„ๆ„Ÿใ˜ใ€‚ https://t.co/eAxoat2bwP

blissful pollen
#

I needed to light up my life...

onyx hinge
#

that's a lot of unfamiliar names

modern wing
#

๐ŸŽต So please carry the lantern high. ๐Ÿ’ก

onyx hinge
#

Add Gravitech Cucumber R board definition (updated) #4131

storm minnow
#

Good job @devout jolt

slender iron
#

@swift arrow mute please

#

thank you

swift arrow
#

very sorry, didn;t notice I wasn;t

slender iron
#

np

onyx hinge
#

@idle owl seems like the adafruit_ticks library should have been listed as new ๐Ÿคท

lone axle
#

maybe the script is checking for (non-pre-) releases?

slender iron
#

probably. the bundle only does stable releases

#

iirc

onyx hinge
#

hmmm

#

I'll check & make sure there's a stable release of ticks

slender iron
#

ahead of the game as always ๐Ÿ™‚

idle wharf
#

@slender iron Deep Dive question.... is there a page where we can see all the notes\timestamps across all the previous dives? I wanted to re-watch some sessions where you're doing protocol analysis

slender iron
#

@idle wharf I don't have a single place. We could make a repo for it like we do for these meetings

idle wharf
#

It would be pretty awesome...

#

Let me know how I can help make it happen

slender iron
#

I can probably jam it out

modern wing
#

Thanks everyone ๐Ÿ™‚

onyx hinge
#

๐Ÿ‘‹

slender iron
blissful pollen
#

Just a small FYI real life has really got in the way of contributing much, but always feel free to message me if there is a question on something I worked on

slender iron
#

np @blissful pollen. I hope all is well

blissful pollen
slender iron
blissful pollen
#

Thanks! All this is a great distraction and fun to pay attention to

idle wharf
slender iron
#

I'm adding them from the google drive copies

idle wharf
#

Thank you !

#

I'll look at how we can make the timestamps into links into YT

tulip sleet
#

@idle owl I am adding board.LED to those boards that should have it. But I see a bunch of boards with board.L: should I leave that or change it to board.LED?

slender iron
#

thanks! feel free to help polish it all

#

I'm just getting it into one place

idle owl
idle owl
tulip sleet
#

โœ”๏ธ will just alias

idle owl
#

Perfect.

crimson basin
idle owl
idle owl
#

But that is entirely optional and up to you.

crimson basin
#

cool

idle owl
idle owl
crimson basin
#

yes

idle owl
crimson basin
#

thank you kattni

idle owl
#

You're quite welcome

onyx hinge
#

@idle owl I'm not sure if it should be accepted or not. The idea is, adafruit_ticks is on all boards and doesn't have accuracy issues on m0 boards after they've been running (float precision limitation) .. and it gets the nasty if/try/import/etc out of the LED animation library. That doesn't mean it's necessarily a good idea.

onyx hinge
#

It was also a good exercise for adapting existing code to adafruit_ticks and putting it through its paces, so a learning experience for me

idle owl
#

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/1fsekWWLvcaMb7w6lfiDHqOjYbM38JgLOOxEjGdwh3A0/edit

manic glacierBOT
storm minnow
#

Random question... How come the meetings are during business hours on a Monday?

stuck elbow
#
  1. they are only during business hours in your timezone, 2. many circuitpython developers do this as their day job
storm minnow
#

Fair and fair

stuck elbow
#

time is tricky

storm minnow
#

I guess "US business hours" would have been more accurate XD

idle owl
stuck elbow
#

would have been easier if we didn't live on a spinning ball

idle owl
#

So initially it was a work-related thing.

storm minnow
#

Ahh...

idle owl
#

And was meant to be a sync-up for the week for us.

#

But folks started asking to listen in, and eventually we got others involved, etc.

storm minnow
#

shakes fist at job for taking that timeslot

idle owl
#

So it stayed at the same time/day, since we still need to sync up, but turned into a community effort as well.

storm minnow
#

Makes sense

#

I figured there was a good reason for that seemingly random time XD

blissful pollen
idle owl
storm minnow
stuck elbow
#

It's in the evening for me, but I rarely have any energy left to join it.

#

every time would have its downsides

storm minnow
#

Energy hard... a precious resource

idle owl
manic glacierBOT
idle owl
#

@onyx hinge This works either way, but we went with the .git address for the .gitmodules file in the Bundle. Please update it at your convenience. Nothing else needs to be fixed along with it. https://github.com/adafruit/Adafruit_CircuitPython_Bundle/blob/094622fbd46b719e264cab2632f60ab97ca12ccf/.gitmodules#L841

GitHub

A bundle of useful CircuitPython libraries ready to use from the filesystem. - Adafruit_CircuitPython_Bundle/.gitmodules at 094622fbd46b719e264cab2632f60ab97ca12ccf ยท adafruit/Adafruit_CircuitPytho...

slender iron
#

@idle wharf I just copied the last one up

idle wharf
manic glacierBOT
storm minnow
#

So, kattni said that the "good first issue" tag isn't really well maintained for finding first issues... What's the best way to do so? Is there a way to see all pending reviews?

manic glacierBOT
idle owl
storm minnow
idle owl
# storm minnow When I'd asked about where to start, you said `We're currently really bad about ...

Oh! You mean reviewing PRs. Those don't have the "Good First Issue" label, that's for issues only. In terms of reviewing, you simply have to go through the open PRs and take a look at them. In terms of issues, unfortunately, until we go through and curate better, the only way to find an issue to take on is go go through the issues and see what you speaks to you. Terrible answer, I know, but it's the state of things at the moment.

#

PRs aren't really labeled in terms of good first issue etc. If they're labeled at all, it's more to categorise the contribution than it is to assist reviewers.

manic glacierBOT
storm minnow
#

Ah, yeah, I meant PRs. Still getting used to terminology XD I've realized that my development skills are on an entirely different plane of existence than the dev work y'all have been doing

idle owl
idle owl
storm minnow
storm minnow
idle owl
#

Those links will take you to GitHub. But that's the best way to get there.

storm minnow
#

Thanks ^_^

river quest
#

8-6-2021 is the Snakiest day of the year and itโ€™s also this yearโ€™s CircuitPython Day! The day highlights all things CircuitPython and Python on Hardware. Working with CircuitPython? Tag your projects #CircuitPythonDay2021 on social media and Adafruit will look to highlight them.

onyx hinge
#

nice video, I never knew circuitpython was so easy to use

manic glacierBOT
manic glacierBOT
slender iron
manic glacierBOT
manic glacierBOT
manic glacierBOT
hollow token
manic glacierBOT
manic glacierBOT
onyx hinge
tulip sleet
#

Feel free to push that. I'm still wondering why it ever failed at all.

manic glacierBOT
onyx hinge
#

@tulip sleet sure, I didn't want to interfere further with that PR so I made a fresh one; I'll rebase it after 5069 goes in

#

remembers it's amazing to have CI at all .. just think how it used to be

tulip sleet
#

i find pushing commits to someone else's PR to be a tricky business if it's not possible to do from github. The hint that git gives is not quite right.

onyx hinge
#

it's true, I'm also gunshy about that.

manic glacierBOT
manic glacierBOT
analog bridge
#

The recent addition of BusDevice on Proxlight Trinkey M0 (PR#5058) doesn't leave enough room for the traceback module.
It is the only board that is failing, what should I disable on it BusDevice or traceback?

tulip sleet
#

we might find something else to remove later. I already added the tricky flag that turns off SPI

idle owl
#

@tulip sleet Am I ok to merge ^^? You tagged Jeff and Scott on it as well.

tulip sleet
tulip sleet
#

thanks!

idle owl
#

Done and done.

manic glacierBOT
idle owl
#

@lone axle You around for a max_glyphs question?

idle owl
#

@lone axle Ok, so I'm using the MacroPad library. Which uses Simple Display Text. I can't find max_glyphs anywhere but I'm getting Please update your code: 'max_glyphs' is not needed anymore. when I run my code. What am I missing?

#

Is it buried in Simple Display Text or something and I missed it?

lone axle
idle owl
#

Oh!!

#

That's why I can't find it.

#

I was searching on GitHub.

#

Ok, I'll do a release. Thank you so much! I was so confused.

lone axle
#

I just did the same and was confused for a minute also ๐Ÿ˜„

idle owl
#

OK, release made. Whew. Thanks again.

#

Oi.... downloaded a Project Bundle for the MacroPad library, and it downloads WAY more libraries than I expected. I am confused.

#

Oh ... wait.

#

checks a thing.

#

Ok found two of them. Still not sure where another one is coming from.

#

Oh nevermind. Wasted time. It downloads all libraries necessary for all examples present in the repo. Which includes the LED Animation example that Tim included 10 days ago. It's not based on a requirement, it's based on an example.

lone axle
#

Ah, that is good to know. I didn't realize it included requirements for examples in addition to the library itself.

idle owl
# lone axle Ah, that is good to know. I didn't realize it included requirements for examples...

Only when you're downloading a project bundle that is embedded into Learn out of a library repo. Or potentially if you have multiple files in the same directory in the Learn repo. That's why we've switched to using folders with code.py in them, so it only includes the files you need. But we don't do that in library examples in the library repo. And I don't think we intend to start. So the Project Bundle for those examples will sometimes include things you don't need.

onyx hinge
#

nope, "OV2640 SPI" is a different thing than what I've been working on @idle owl

idle owl
#

Ah fair enough. I'm no help either.

onyx hinge
#

somebody makes this product "arducam" that puts a microcontroller between you and the camera; you can talk to the microcontroller via spi and ask it to talk to the camera. beyond that I don't know much about this product

idle owl
#

Ah. Huh ok.

manic glacierBOT
#
  • Only print_exception() is currently implemented. I was considering implementing format_exception() (only difference is that this returns a string) but ran into trouble with compressed strings %q specifier. I am thinking of adding mp_sprintf() but haven't made any progress on that front yet.
  • Following args are ignored for the reasons given and are only implemented to maintain compatibility with CPython.
    • etype - From Python-3.5 this is ignored and is inferred from type o...
manic glacierBOT
manic glacierBOT
manic glacierBOT
idle owl
#

@lone axle Good morning! Are you around for a question you may or may not have an answer to?

#

Nevermind, I fumbled my way through it.

idle owl
#

@tulip sleet So.... stumbled upon the fact that you apparently can't import usb_hid without it trying to find some kind of connection. Which means you can't power MacroPad projects using the MacroPad library from a battery or wall plug because it fails with USB busy (I think that's the message, I can only see what's on the display). Is there a way around this? Can I check for whatever CircuitPython is checking for, and not import it if it's not present... or I'm tossing things out here, I have no idea.

tulip sleet
#

i'll look at that, it should be innocuous just to import it

idle owl
#

I did a demo that does not use HID. And it fails to run on wall power.

#

I'm guessing about it being usb_hid. Might be something else.

tulip sleet
#

could you point me to the code?

#

it might be something in the macropad library?

idle owl
#

I need to give you the file, it's not on GitHub yet.

#

Yeah it could be..... but what?

#

I don't know how to troubleshoot it even.

#

Not very much serial console shows up on the display.

tulip sleet
#

Macropad() does self._keyboard = Keyboard(usb_hid.devices). it's probably failing there

idle owl
#

Hmm.

#

I was considering moving that to the keyboard call

#

Would that still work?

tulip sleet
#

so check whether self._keyboard is None, and if it is, import that stuff?

idle owl
#

Except if you called keyboard and keyboard_layout you'd call _keyboard twice and it would fail again.

tulip sleet
#

you can do some kind of "is this the first time?" for .keyboard and .keyboard_layout,

idle owl
#

oh...

#

I think I follow.

#

Let me try it.

tulip sleet
#

you could still import all the keyboard stuff, just don't create the Keyboard() until you need it. You don't have to conditionalize the keyboard imports, though it would save space to import them only on demand.

#

like def _touch() in the CP library, for instance (it does not do conditional imports, just existence checking)

idle owl
#

That's what I thought you meant.

#

I'm more fuzzy on exactly what it looks like. Committing what I have so I can git stash drop if I screw if all up.

#

Ok what I did at least lets the demo work.

#

Now to see if HID still works.

onyx hinge
#

On my calculators, I've made it so the use of USB HID is postponed until the paste function is first used, but the way I did it is not necessarily a good one. Let me find a link to the source..

idle owl
#

I think I got it.

#

Just have to make sure it works.

idle owl
#

Seems to work!

#

need to try keyboard layout

#

Works!

#

Now to fix MIDI since it has the same issue.

manic glacierBOT
idle owl
#

MIDI does not in fact have the same issue.

#

No fix needed.

manic glacierBOT
manic glacierBOT
#

Is this parameter required in CPython?

Yes, this is a required parameter.

What will we provide in CircuitPython?

As this is ignored, anything (i.e. Type: Any) can be supplied to the function call.

Does it do the same thing in CPython?

Yes, the current implementation is same as in CPython. The only difference is:

  • CPython - The traceback is obtained from the supplied traceback object.
  • CircuitPython - There is no traceback object (i.e. Type: TracebackType)...
idle owl
manic glacierBOT
#

Is this parameter required in CPython?

Yes, this is a required parameter.

What will we provide in CircuitPython?

As this is ignored, anything (i.e. Type: Any) can be supplied to the function call.

Does it do the same thing in CPython?

Yes, the current implementation is same as in CPython. The only difference is:

  • CPython - The traceback is obtained from the supplied traceback object.
  • CircuitPython - There is no traceback object (i.e. Type: TracebackType)...
idle owl
#

Thank you!

manic glacierBOT
tidal kiln
#

@idle owl hey - i think you know this one? sphinx issue when you have single quotes in a docstring for trying to do code markup, just add more quotes or something?

tidal kiln
#

yep

idle owl
#

Yeah double on each side. Sphinx ignores.

tidal kiln
#

so change a to a ?

#

meh...forget how to escape markdown here...

#

`a` change to ``a``

#

^^ that?

#

ah, yah, nvm, that's it...found an example in another lib

#

@idle owl got it. thanks.

idle owl
#

Ah sorry. Yeah.

slender iron
#

cp as a UART bridge:

import board
import busio

print("reading uart")
serial = busio.UART(rx=board.RX, baudrate=115200)

while True:
    print(serial.read(serial.in_waiting).decode("ascii"), end="")
idle owl
tidal kiln
#

no worries. thanks for the info.

#

the error message for that is super non-obvious

manic glacierBOT
idle owl
manic glacierBOT
idle owl
#

@slender iron If you haven't already, are you going to share the multi-status-pixel love with NeoTrinkey as well? I might have a guide or two to update with these changes. Not going to do that until 7 is stable though.

slender iron
#

goes to edit the board file for neotrinkey

#

there are probably others to do too

jaunty juniper
#

too bad the RGB LEDs are on I2C on the keybow ๐Ÿ˜ฆ

slender iron
#

@idle owl done

idle owl
manic glacierBOT
#

I wanted to add my findings to this. So I am having the same issues, running a circuit python app (specifically https://learn.adafruit.com/using-the-adafruit-funhouse-with-home-assistant ) the bigger issue I have is it seems to crash communications as well (or it is a leak that finally ends it) but usually my funhouse goes offline from a getting updates standpoint. I have tried both python 6 and 7. It seems to run longer when I run it on 7 but ultimately both crater.
<img width="706" alt...

manic glacierBOT
manic glacierBOT
#

I Just re-tested with the current main (commit e9369d5) built with
DEBUG=1. I had to reset
a couple of times, but my Feather nRF52840 Express did mount as CIRCUITPY
and get into the REPL.
However; it was in safe mode with the following message:

CircuitPython core code crashed hard. Whoops!
Attempted heap allocation when VM not running.

A subsequent reset then brought the board into normal operation. I will do
some more testing to see
if more info can be gathered.

On Wed, Jul 28, 2021 at ...

#

See my comment in issue #5018.

On Wed, Jul 28, 2021 at 7:19 PM Scott Shawcroft @.***>
wrote:

Does this still happen for folks? I can't replicate it now.

โ€”
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/adafruit/circuitpython/issues/4768#issuecomment-888704256,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFNJKEVQQDSPXAEGO2VVBYLT2CNARANCNFSM446MF2FA
.

manic glacierBOT
manic glacierBOT
#

I'm working on a prototype customized keyboard using a Raspberry Pi Pico. This is a Japanese keyboard.

When the host is macOS, keycodes above 0x80 are not being sent or received.
Normal keycodes are sent to the host without any problem, and modifier keys such as SHIFT ALT CMD seem to work fine.
Normal keys with keycode 0x80 and above are not reaching the host.

When the same Pico is connected to a Windows host, all keycodes are received.

I noticed this when using KMK_Firmware as key...

#

The code in the library is not the problem, but there might be a problem in the default keyboard report descriptor, so I have transferred this issue to https://github.com/adafruit/circuitpython/. If there is a problem, it might be that MacOS is more sensitive to this than Windows. It is a signed/unsigned-value problem.

Could you try this UF2 and see if it makes a difference? Unzip it before uploading, of course.

[pico-kbd-report-desc-logical-maximum-fix.uf2.zip](https://github.com/adafr...

manic glacierBOT
#

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

idle owl
#

@onyx hinge What became of the auto-generated CIRCUITPY-contents screenshots?

onyx hinge
#

@idle owl They exist

idle owl
#

How existential.

onyx hinge
#

they are supposed to be updating daily, but I haven't checked lately if it's happening as planned.

idle owl
#

Hmm. How do I know what I'm looking for though?

#

Oh I kind of see the naming scheme.

#

Can I use them?

onyx hinge
#

yes

#

you copy the image URL and plop it into learn

idle owl
#

Limor said they're "on pause". So I ended up downloading the image and uploading it directly from my computer for now. She wasn't clear on whether I should or should not use them...

onyx hinge
#

where is the place that this should have been documented?

idle owl
#

I have no idea.

onyx hinge
#

really? hm

idle owl
#

Wait

#

I do have an idea

#

in the ALS Academy guide

#

I mean current authors aren't going to look there intuitively

#

but we can post to Slack and email the team and let Anne know, and then everyone has a place to look.

idle owl
#

I'd like to be using them, because if I had been, this py/pixelbuf update wouldn't have been necessary.

#

Would have been dynamic.

onyx hinge
#

right

idle owl
#

@onyx hinge Oh hmm. It's designed to work with Bundlefly specifically then? So to generate the image, it has to be a directory/code.py situation, not a bunch of files in the same directory - that only generates a single image for all of them?

#

I mean that's what I'm seeing, but I'm verifying with you.

onyx hinge
#

yeah I think that is correct.

idle owl
#

Ok I have to update the template code then.

onyx hinge
#

Does it match what the zip contains?

idle owl
#

There's no image for some of them at all. But they're a bunch of files in a single directory.

#

Some of them are near-pseudocode example though that you're supposed to adapt.

#

So I had them loose in the directory.

#

But I need images.

onyx hinge
#

I'd have to review what it does, do you want to give me a specific example?

idle owl
#

Um.... I think it's a me problem. I don't think we want to change how it works to deal with templates only.

#

When I should be able to adapt the template examples pretty easily to cause images to generate (in theory)

#

If not, it's not a huge deal, at least templates are a single point of failure for updates, versus a bunch of separate pages.

onyx hinge
#

OK, if there's a specific .py file you thought it should have made an image for, and yet it didn't -- let me know

#

or where you think the content of the image is wrong

idle owl
#

I think it's simply me not understanding how it worked.

#

Will do if I find anything.

idle owl
#

Seriously itching to update this template code to use rainbowio, but I would also have to put a warning in the template about using CircuitPython 7. I guess I probably shouldn't do that. Or I can put mangley try/except import blocks in. But it has to account for 6x, boards without _pixelbuf, and rainbowio. So.... super mangle. Bleh.

tulip sleet
#

since template code is just copy/pasted (if I understand this)

idle owl
slender iron
#

@tulip sleet what was the buffer issue you found?

idle owl
#

The reason I want to update is right now it's a file on the Learning Guides repo where you have to update the PIXELBUF_VERSION in the code to match what the board has. If I used rainbowio I could embed it in the template and be done with it.

#

As it is now, every guide has its own copy of the code. It's annoying.

manic glacierBOT
idle owl
#

Too bad we can't backport rainbowio to 6.

tidal kiln
idle owl
#

There are probably warnings I should also remove in places. But that's a whole other ordeal to find all of those. I'm in template land at the moment.

tidal kiln
#

thanks. i'm in there now making some other updates from feedback. and noticed those. guessing very few people are using anything before 4.x these days.

tulip sleet
# slender iron <@!329766224093249548> what was the buffer issue you found?

https://github.com/dhalbert/circuitpython/compare/main...debug-audio#diff-7f2729ae33d8da45b91ced94cc11b8e78402c08a6bec0b894fb0ad10f2328a5c starting around line 235, The m_realloc() for the first buffer was never called if no conversion was necessary, so it first_buffer was NULL the first time, it reused the buffer from the WavFile reader as first_buffer, due to code at line 141 in that file.

It's not completely clear to me this is definitely causing problems, but it could cause as use-after-free issue, because the file reader would be unaware someone else was hanging on to that buffer.

It was suspicious because the code for first_buffer and second_buffer was not the same.

Also I just fixed a bug that 8-bit audio had half the samples removed, so, e.g. a 1-second sample played only for 0.5 second (buffer size was not doubled when converted)

#

output is still scratchy at higher sample rates when display is in use. Also the USB connection goes away randomly.

#

I saw that before. It is not a crash, just USB going away

#

the new code has some belt-and-suspenders checking in it to make sure we're not writing past the end of some buffers. I may remove that later.

#

I don't see signs yet that buffer filing is getting behind. I'm checking for both channels being unbusy and that only happens at the end.

slender iron
#

๐Ÿ‘

#

sounds like good progress

#

and a failure in me trying to prematurely optimize

tulip sleet
#

also I did some checking to make sure the data in the buffers is not garbage, and it has the correct values (with my non-dithered square waves)

#

there's still a lot of "why is it doing that???"

#

still don't understand the scratchiness. I did Saleae the I2S output, but it's hard to check, and the Saleae parser is seeing what it thinks are errors due to clocking glitches (even if I deglitch the recording).

slender iron
#

hrm

tulip sleet
#

i will try Saleaeing the PWM output with clean square waves, which should alternate between two duty cycles

slender iron
#

right

manic glacierBOT
analog bridge
# manic glacier

@slender iron where would the implementation of empty traceback object type go? py/objtraceback?

slender iron
#

good question

#

there or you can put it in shared-bindings

idle owl
#

Hmm. I just realised the way I updated the pixelbuf implementation means that the bundler isn't downloading pypixelbuf anymore anyway. Meaning for the M0 non-express boards, there's no colorwheel available to 6.x CircuitPython anymore if folks don't specifically grab pypixelbuf from the bundle. NeoPixel and DotStar still work with pypixelbuf, but the Bundler isn't grabbing it anymore.

tulip sleet
#

hmm, not sure how to fix that without adding some version-specific functionality to something

manic glacierBOT
idle owl
# tulip sleet hmm, not sure how to fix that without adding some version-specific functionality...

I don't think it's worth fixing. I will update the four references to it in Learn to use rainbowio and update the templates to use rainbowio as well. I was going to update them to a try/except import block but realised there's no point for the M0 boards. There aren't any templates in M0 non-express guides yet anyway (that don't have _pixelbuf built in anyway....) I guess I could try except rainbowio and pixelbuf, leave off the pypixelbuf part.

#

@onyx hinge This is one of the instances: CircuitPython_Heart_Sculpture/code.py:3:import adafruit_pypixelbuf CircuitPython_Heart_Sculpture/code.py:16: pixel[0] = adafruit_pypixelbuf.colorwheel(hue)

#

I'll fix it, simply letting you know.

idle owl
#

Yeah that's probably bad.

onyx hinge
#

that's the image that gets generated

idle owl
#

To have both.

#

@onyx hinge There's a guide for it right?

#

I'll add a 7.x warning to it.

#

Actually having both doesn't matter, but it never gets to pypixelbuf in neopixel imports. I guess you could still import colorwheel from it separately.

#

Maybe this is fine.

onyx hinge
#

here's what I get from the bundler

idle owl
#

I was concerned they would clash somehow.

#

But I don't think they do.

onyx hinge
#

dotstar imports pixelbuf now?

idle owl
#

Yes.

#

Tries to first.

#

But still falls back to the other options if it's not found.

onyx hinge
#

and of course I am using pypixelbuf directly, for colorwheel pixel[0] = adafruit_pypixelbuf.colorwheel(hue)

idle owl
#

right, that's what I'm saying

#

I think that's fine.

onyx hinge
#

I think .. it's as good as it can be?

idle owl
#

To leave it for now.

#

Yeah.

#

What I want to know is will the bundler grab pypixelbuf if the import looks like this: py try: from rainbowio import colorwheel except ImportError: try: from _pixelbuf import colorwheel except ImportError: from adafruit_pypixelbuf import colorwheel

#

Only one way to find out I guess.

#

It's ugly but I'm done making the same example over and over for each guide when it could be a single example in the template.

onyx hinge
#

I don't know what it does in that case, and I'm also not sure whether it'll match what the image-maker gets since they are different bits of code

#

I do know how to run the image-builder locally so we could see..

idle owl
#

I know we've done it elsewhere, let me find some place we do it, and check the associated image.

#

oh

#

That could also work.

onyx hinge
#

it's better if you can check a zip file though

idle owl
#

oh right

#

ok

#

I'll try to find one

onyx hinge
#

I got this image with that code

#

I think that's the same as before

idle owl
#

Everything I'm finding is trying/excepting built in modules.

#

versus libraries.

onyx hinge
#

rainbowio is a built in module, though?

#

or is there a bundle / pure python version too?

idle owl
#

hmm.

#

no

#

It's built in.

#

But I need something that excepts to a library

#

to see if the bundler grabs it

#

This is a really dumb way to do this.

#

I don't think I can test it.

#

Shrug.

idle owl
onyx hinge
#

frustratingly, it's separate, so we don't know if they behave the same

idle owl
#

Hmm ok

onyx hinge
#

I assume that the bundlefly zip-maker is in the learn system somewhere, which is not on public github

idle owl
#

Right.

onyx hinge
#

I hope that at some level it's using similar code but we can't know for sure. it would be best if one program made the images and the zips, because then it would at least be consistent

idle owl
#

Asking Justin instead of speculating and wasting time searching for an example in the monumental beast that is the Learning Guides repo.

#

@onyx hinge Turns out bundlefly uses findimports.

#

Or rather, "that's how we start building the dependency tree, the rest is via the json that is generated that defines the imports for each lib"

#
CircuitPython_Templates/status_led_one_neopixel_rainbow/code.py: could not find rainbowio.colorwheel
CircuitPython_Templates/status_led_one_neopixel_rainbow/code.py: could not find _pixelbuf.colorwheel
code:
  _pixelbuf.colorwheel
  adafruit_pypixelbuf
  board
  neopixel
  rainbowio.colorwheel
  time```
#

So, yes, it will work.

#

Perfect.

onyx hinge
#

findimports is what the image maker uses too

idle owl
#

@onyx hinge Excellent. Then there is much reason to believe they will behave the same.

idle owl
storm minnow
#

Just flashed CP 7 alpha 5 to MacroPad, it's going to a "raw REPL", can't connect to serial with PuTTY and get "access is denied" -- did I find a bug?

idle owl
#

Updating mine, hold on.

#

Or maybe it was already up to date.

#

Because I already downloaded alpha 5 previously.

#

And my code is still running.

storm minnow
#

Hmm... Anything I can try?

idle owl
#

So you start up and it automatically goes to the REPL?

storm minnow
#

After running the inbuilt Hello World demo

idle owl
#

Anything on it you need to keep? I would try the nuke.uf2 on the CircuitPython page in the guide first, try flashing it, and then load CircuitPython again and see if it's still doing it. I mean, that's a burn it to the ground and start over plan, but it's not necessarily a bad one.

lone axle
lone axle
#

index would be the order they were added I believe.

idle owl
#

Hmm ok

storm minnow
lone axle
#

a future enhancement might be to provide a function that allows accessing them via their x,y cell location within the grid though. That seems like it'd be more easily usable than index.

idle owl
#

If not, perhaps it's a bug.

idle owl
storm minnow
storm minnow
idle owl
#

Hmph. I'm stumped, but that doesn't mean others wouldn't know what's going on better.

storm minnow
#

If there's no like, logs I can obtain from the board, guess I'll just nuke and see if it happens again

idle owl
#

Not really yeah.

idle owl
storm minnow
#

Ahh, I timed connecting to it IMMEDIATELY after resetting [while code was running] and it went to the normal "code done running"

#

Hmmmm.... reset again and no more raw REPL... very strange

idle owl
#

Indeed.

#

Oh it's color

lone axle
idle owl
storm minnow
#

Well, I gotta go, but I'll nuke later and let you know if it happens!

lone axle
#

I'll make an enhancement issue on GridLayout for the x/y cell location. That would be great functionality I think.

idle owl
# lone axle I'll make an enhancement issue on GridLayout for the x/y cell location. That wou...

Brilliant. I used it in the Braille Keycaps code instead of the code PhilB wrote that generates all the shortcut labels and does a bunch of math to spread them out. So I'm trying to adapt it to having the MacroPad rotated 90 degrees. But displaying 4x3 shortcuts grid on the display is difficult in that orientation. So instead, I'm doing 2x6, and highlighting the shortcut when the key is pressed.

#

Ideally it would change the entire cell background. But it only changes the text label itself.

#

The way I generate the labels makes this work properly: py if key_event: if key_event.pressed: layout[key_event.key_number].color = 0x000000 layout[key_event.key_number].background_color = 0xFFFFFF

lone axle
#

Yeah, I think for that we need a different type of Label object inside display_text. The current ones are sized entirely dynamically based on the text that they contain. We need one that allows itself to be resized to arbitrary sizes rather than basing it off of the contained text. I started working on one like that at one point but didn't end up wrapping it up enough to publish.

lone axle
#

That way the grid could control the size of the label to make it fill the cells.

idle owl
#

Nice

#

I mean this still works pretty well.

#

I'm pretty happy with it. Not sure Limor will want a guide for it because it doesn't match the key layout exactly. But if I can come up with something, I'll use it myself.

#

@lone axle ^^

#

Each set of 4 is a row.

#

Doesn't actually do HID right now because I'm terrible about pressing things randomly if they light up on my desk, so I try to avoid leaving HID running if I'm not explicitly using it ๐Ÿ˜„

lone axle
#

Nice! I had never considered using it at 90 degrees before but I do really like the way it looks now that I've seen it.

idle owl
#

Right?! Display is easier to see, knob's there if you need it.

#

I like 90 best of all the rotations I think.

#

MacroPad library maps the keys and pixels, and rotates the display.

#

The pixelmapping was the worst part of that bit. What a beast.

onyx hinge
#

@idle owl I wonder if you can fit dotted lines somehow to emphasize which ones are the groups of 4 .. is it the first 2 display rows are one physical row? (in any case, neat, it's nice that you can rotate the display during a program!)

idle owl
onyx hinge
#

do two of the groups in reverse video, then choose keycaps that are light/dark themed?

idle owl
#

Top line is a label. The rest are grid layout.

onyx hinge
#

you know more about that stuff than me

idle owl
#

Not sure what to use to generate a line.

#

@lone axle Could you also make it so you can add lines between the cells? And the ability to specify only some cells having an outline?

#

Or is that bonkers ๐Ÿ˜„

lone axle
#

display_shapes library or maybe vectorio can make lines I think. It would require a bit of manual placement to have them seperate the cells atm I think. I can look into providing that as an option within GridLayout to make it easier though.

idle owl
#

Seems to only offer shapes, not lines. Hmm.

#

Maybe a rectangle with no height?

#

I have literally no idea how to use this.

#

lol.

#
TypeError: unsupported pixel_shader type```
#

Bleh, code runs, but nothing happens.

#

Have to run. Later!

hollow token
#

Thanks for all the help getting the SPI version of the MC23XXX chips in! :)

lone axle
#

Rectangle with 1 height for a line maybe, or maybe a polygon with just 2 points. I do think it would be great if there were some more example code for vectorio. Perhaps there is some out there that I am unaware of.

#

Maybe it would be good to add a section that covers it in the main displayio learn guide.

idle owl
#

I see the little Blinka, so it's not displaying anything.

lone axle
#

but it's been a little while. I wrote some sample code at one point that is on one of my devices and I always have to refer back to it because I never managed to get it committed to memory yet.

idle owl
#

Oh!

#

Add to a group.

#

Ok

#

I now have a blank spot, lol. So it drew something alright.

#

I don't get how to make it show up white.

#

Anyway I need to bail for the evening. Thanks for your help!

jaunty juniper
storm minnow
jaunty juniper
#

it sure does, unless they fixed it

#

what if you quit it ?

#

though it usually manifests as M105 being sent to the REPL, not the raw REPL, it also manifests as the serial port not being available

storm minnow
#

I still have Cura running, but it isn't doing that raw REPL thing now

#

What is 'raw REPL' anyway?

jaunty juniper
#

it's like the REPL but for computers, tools like thonny use it

storm minnow
#

Ohhhh, so for software to have serial comms with CP devices? noice

jaunty juniper
#

it doesn't interpret what you type (like tabs as completion) and doesn't echo/output anything

#

it's ctrl-A, paste mode for humans is ctrl-E

storm minnow
#

Wonder what was kicking it into that before... Unless it was Cura, and it's just intermittent

jaunty juniper
#

some software hogging the serial port no doubt, did you look at the link above ?

#

(solution at the bottom is to disable USB printing in cura)

#
without any input from me it goes into the REPL after approximately 30 seconds.
, and I see the following (transcribed, may be some minor typos)
"
Adafruit CircuitPython 4.0.0-beta.4-1-27-g67440acd3 on 2020-02-03; Adafruit CLUE nRF52840 Express with nRF52840
>>>
raw REPL; CTRL-B to exit
>
storm minnow
#

Hadn't gotten to the bottom yet XD I have a feeling it's not Cura, as I've got it sitting in REPL now and nothing is happening... And Cura isn't configured to print to USB at all

#

I wonder if it might be the pump...

jaunty juniper
#

I don't know, same exact issue and you happen to be running cura, I know where I put my 2 cents

storm minnow
#

Hmm, their pictures show regular REPL...

jaunty juniper
#

yeah I suspect on windows the use of the serial port is more exclusive, so once putty is running cura can't access it, on my mac I would see it output M105 while I'm in the REPL, might be a difference in the way screen or tio access the serial

#

it doesn't need to be configured too, it just hogs the serial ports, out of the box

storm minnow
#

Hmm

#

It stopped doing it randomly, even after PuTTY was closed/disconnected... And I haven't seen M105 at all

storm minnow
manic glacierBOT
storm minnow
#

@jaunty juniper I'm disabling USB printing since I don't use it; should I ping you if it happens again later?

manic glacierBOT
jaunty juniper
#

not me particularly, but whatever it is, I think it's most likely something using the serial port if putty says "access denied" (as opposed to not found or timed out), so look at what is running when it happens

storm minnow
#

Okie dokie Loki!

analog bridge
manic glacierBOT
fluid canopy
#

Hello, thank you very much for the invitation, I have a doubt I want the example that you created in python Adafruit_CircuitPython_RockBlock / examples / rockblock_send_text.py can be displayed in a window, I don't know anything about python, only the most basic thing, I would appreciate it a lot if it can be done

idle owl
#

@tulip sleet Do you know who would know how vectorio works or is supposed to work? Because it is not working the way it feels like it should be, and I have no idea where to even begin.

tulip sleet
#

WarrierOfWire started on it, and kmatch98 has also worked on it. I'm assuming you read the guide on it.

idle owl
#

There's a guide? Ugh. I missed that.

#

I checked Learn....

#

Yeah I did check Learn. I didn't find anything.

tulip sleet
#

sorry, I was mistaken about that -- I thought there was a guide (there should be, or more pages in the displayio guide).

idle owl
#

Yeah that might be a good place for it.

#

But I'm not the one to do it apparently. Since I can't even figure it out.

tulip sleet
#

there are a number of people who've used it in #help-with-circuitpython , and i've seen queries, so i think going there with a use case will help.

idle owl
#

Alright, thanks.

tulip sleet
#

i haven't used it at all, sorry

idle owl
#

No worries. I didn't think you had, but I thought you might know who had. You did ๐Ÿ™‚

uneven mango
#

I use circuitpython.org filters to find boards for projects. I'm guessing others may too. I'm thinking of creating a PR for circuitpython.org to add a filter for a breadboard friendly feature. Defining bread-board friendly as two parallel pin rows with at least one breadboard socket available on both sides of the board. Horizontal pins could include UART/SWD, but not critical pins like power, ground, GPIO, etc. This would allow filtering out boards like the pyportal, magtag, funhouse, etc. Before I start researching all the current boards, is this a worth while idea?

idle owl
idle owl
uneven mango
tulip sleet
#

same for Pi-shaped boards - not breadboard-friendly without an accessory, but "general purpose")

uneven mango
ember iris
spare prawn
#

i saw a mention of "readinto" for ble no longer taking the nbytes parameter for CP 4. All later documentation seems to support nbytes. I am getting a "ValueError: length argument not allowed for this type" in nordic.py line 77 when i try to use "readinto" with ble...with buffer as a memoryview and as a byte array, with and without nbytes set implicity or explicitly. same code works for other streams (busio.uart, stdin).

tulip sleet
#

there are "development" boards, meant for general-purpose use. That is an Adafruit shop category. But it includes CPX and other non-breadboardy boards

spiral elk
#

You'd also need to factor in distance between rows. There are some ESP8266 boards that are only useful by straddling across 2 breadboards.

tulip sleet
#

so that may not be such a useful distinction

uneven mango
gilded cradle
#

@idle owl that sounds useful..

idle owl
#

@uneven mango Figure out the best way to categorise things, and go ahead and make a PR.

spiral elk
#

And there also exist breadboards with a 0.6" center gap. radio shack sold them.

tulip sleet
#

so "breadboard-friendly" or "breadboard-pluggable", also maybe "general-purpose" (for CPX), "Arduino form factor" (not sure about exactly what to call that)

gilded cradle
#

Breadboard-Friendly sounds good

uneven mango
#

I think people would want to search for breadboard-friendly and arduino form factor. I don't know if "general purpose" for the board not meeting the other criteria would be searched for.

#

I'm thinking of mapping a project requirement to a board feature.

tulip sleet
gilded cradle
#

How about Arduino Shield Compatible?

#

Cause Arduinos are now all sorts of form factors

spare prawn
tulip sleet
#

that is a slice, not sure if it's supported in general in that kind of context (does slice have buffer protocol)

#

what kind of object is device

#

is this in CircuitPython or bleio blinka?

manic glacierBOT
spiral elk
#

Question while people are awake: If I were to want to enable support for a board variant (same PCB, just a uC with a different amount of ram), would it be best approached as a compile-time option or a new board definition?

spare prawn
spare prawn
stuck elbow
#

@spiral elk do you actually need a board definition for this? different LD file?

spiral elk
#

just a different ld file mainly

tulip sleet
#

which chip?

spiral elk
#

stm32f411 board with a 401 instead

#

96k ram vs 128k

tulip sleet
#

that is a different board, since the CPU is different (and especially since STM differences are quite idiosyncratic). If this is a one-off, then you can keep your own fork for this. If it's a product, then we can consider a board defn.

tulip sleet
#

I am not sure if we want to have board defns for the huge array of cheap-o BlackPill clone variants or not

spiral elk
#

Well, this board isn't a clone, its from the original manufacturer

tulip sleet
#

the chips are enough different (from a search): _

The STM32F411 is backward compatible with the STM32F401 and should run your code for the STM32F401 without any modification.
The STM32F411 has a few additional features, so if you use them, your code will not work anymore on the STM32F401.

some diferences:

new peripheral (SPI5)
higher maximum frequency (100MHz instead of 84MHz) and differend voltage scales configuration
larger SRAM
Additional peripheral pin mapping for flexibility and for new peripherals
Additional DMA remap for flexibility and for new peripherals
tulip sleet
#

@spiral elk so definitely a new board definition

spiral elk
#

I think most of that is abstracted away in the STM HAL isn't it if MCU_<mumble> is conditionally set?

ionic elk
#

@tulip sleet yes boards are largely defined on the MCU they hold so the F401 blackpill should get a new def

spare prawn
tulip sleet
#

@spare prawn I think it is just a bug in Adafruit_CircuitPytyhon_BLE. It should no longer take a length. Could you open an issue? Does plain read() work for you in this case?

ionic elk
#

The blackpill also has "versions" where you add external flash but we didn't opt to make different profiles for that

#

@spiral elk just copy the og blackpill profile pretty much wholesale and swap out for the LD file we already have for the F401

#

and change the MCU flags ofc

spiral elk
#

Yeah, I have already done that and got it pretty much up and running already.

spare prawn
ionic elk
#

@spiral elk nice, if you PR it I'll approve quick

spiral elk
#

Needs some cleanup, not sure if I can get to it this week.

tulip sleet
#

the issue will make us re-examine that decision

spare prawn
tulip sleet
#

@spare prawn Please include the complete backtrace in your issue and also more context for the code, thanks. You can edit the original post

spare prawn
manic glacierBOT
tulip sleet
#

@spare prawn if that's in, then that's it. I thought it would go deeper, but they way it works is tricky

onyx hinge
# spare prawn what do you mean by "complete" backtrace? is this suffiicient: ` File "lib/met...

@tulip sleet ``` def readinto(self, buf, nbytes=None):
"""
Read bytes into the buf. If nbytes is specified then read at most
that many bytes. Otherwise, read at most len(buf) bytes.

    :return: number of bytes read and stored into ``buf``
    :rtype: int or None (on a non-blocking error)
    """
    return self._rx.readinto(buf, nbytes)

// CPython extension: if 2nd arg is provided, that's max len to read,
// instead of full buffer. Similar to
// https://docs.python.org/3/library/socket.html#socket.socket.recv_into
mp_uint_t len = bufinfo.len;
if (n_args > 2) {
    if (mp_get_stream(args[0])->pyserial_readinto_compatibility) {
        mp_raise_ValueError(MP_ERROR_TEXT("length argument not allowed for this type"));
    }
    len = mp_obj_get_int(args[2]);
    if (len > bufinfo.len) {
        len = bufinfo.len;
    }
}

It seems that either that `readinto` needs to avoid passing `nbytes=None`, or the core code should treat `nbytes=None` like it was unspecified.  I don't know which is more python-compatible.  (`if (n_args > 2 && args[1] != mp_const_none` or so)
tulip sleet
#

i think this is due to CharacteristicBuffer or something like that. I don't remember why it was removed.

spare prawn
spare prawn
spare prawn
analog bridge
manic glacierBOT
#

RP2040 and SAMD51:

  • Detect when DMA has finished, and stop DMA audio explicitly.
  • Do not accidentally reuse first_buffer supplied by WaveFile or RawSample. Always realloc first_buffer and second_buffer

RP2040:

  • When audio playing is stopped, write a final zero to the output register. This prevents residual PWM tones.
  • Handle buffer size for 8-bit samples properly for 16-bit output.
  • Fail on some edge cases (which may not be possible at the moment).

I don't think this fix...

onyx hinge
slender iron
#

I haven't been following along

#

do whatever you think is best

analog bridge
manic glacierBOT
idle owl
#

@tulip sleet Can you get me a build of the audio fix PR? CI is still going to be ages and I don't work that much longer today.

#

For MacroPad.

ionic elk
#

@slender iron so the project that I'm worried about leaving dangling here is the whole "system reservation in sleep memory" thing, so that stuff like next_file can store information across deep sleep. I got decently far with it, (implemented deep sleep memory on STM32, created the API, had it compile and some basic tests working) but I've been bogged down in the debugging and haven't been in the right headspace to finish it with everything else going on.

slender iron
ionic elk
#

Is it ok if I put it down and come back to it informally later on? Should I post up what I have for someone else to pick it up? I could filter out the STM32 sleepmem stuff into a separate PR

slender iron
#

I think it's best to file an issue and then link to your WIP branch

#

that way it doesn't sit as a pending pr

ionic elk
#

Ok, that sounds good to me

slender iron
#

๐Ÿ‘

tulip sleet
idle owl
#

@tulip sleet Thanks.

idle owl
#

I used play_file from the MacroPad library.

tulip sleet
#

what is the sample rate?

idle owl
#

um

#

Where is that set?

#

Oh of the wav file