#circuitpython-dev

1 messages Β· Page 394 of 1

lone axle
#

git grep D13 | grep -v MP_QSTR_D13

idle owl
#

I do have standard grep on this machine too.

onyx hinge
#

oh yes that actually is more like what kattni literally asked for

idle owl
#

Ah nice, ok

onyx hinge
#

-v is the inVerse I guess

idle owl
#

Thanks @onyx hinge and @lone axle!

slender iron
#

@crude blaze just pushed speed ups to my branch

manic glacierBOT
manic glacierBOT
#

I'm using CircuitPython by uploading it on the Raspberry Pi Pico board.

I tried to make a uf2 file according to the contents in the guide.(https://learn.adafruit.com/building-cir ... cuitpython)

I want to create a uf2 file with added network functionality. Is there a way to get and use the Adafruit_wiznet5k file provided by Bundle?

Just as Adafruit_bus_device is ported, I would like to add a wiznet5k library.

Instead of adding a library to the lib file, we try to implement...

manic glacierBOT
supple gale
idle owl
#

@onyx hinge What does the code in the tests/circuitpython-manual/audiopwmio do? It references D13, which not all boards have, but it is obviously not related to the LED.

#

I'm assuming leave it alone.

#

Also you import math in two of them and it's not used.

#

I say "you", I only assume it was you.

onyx hinge
#

@idle owl It is using D13 as the audio output pin. If you hook up an audio amplifier to it you'd hear audio, but if D13 is an LED you can also "see" the sound intensity in the LED's brightness.

#

Looks like it was actually Lucian

idle owl
#

Oh hmm.

#

So maybe it should be board.LED for the one then?

onyx hinge
#

looks like it was actually Scott, moved into the current location buy Lucian

idle owl
#

fair enough. One said "jeplayer" so I assumed incorrectly.

#

I'll leave it alone I guess.

onyx hinge
#

you can remove the import math though! good catch.

idle owl
#

Ah ok

onyx hinge
#

at least one example is using math.sin maybe the same imports were blindly copied to all examples.

idle owl
#

Might have been yeah.

#

I have a question about one more.

#

The PWMOut page has three examples of PWM, all use D13, but I don't believe they're all LED-specific. Though I also don't know PWM well enough to know whether all examples would affect an LED anyway.

#

The first example should clearly be board.LED. The other two.... not so clear.

#

Basically I'm not sure how frequency affects an LED

#
//|
//|           import pwmio
//|           import board
//|
//|           pwm = pwmio.PWMOut(board.D13, frequency=50)
//|           pwm.duty_cycle = 2 ** 15                  # Cycles the pin with 50% duty cycle (half of 2 ** 16) at 50hz
//|
//|         Variable frequency (usually tones)::
//|
//|           import pwmio
//|           import board
//|           import time
//|
//|           pwm = pwmio.PWMOut(board.D13, duty_cycle=2 ** 15, frequency=440, variable_frequency=True)
//|           time.sleep(0.2)
//|           pwm.frequency = 880
//|           time.sleep(0.1)```
#

These two examples.

#

Actually w/o a while True the first example isn't really doing anything.

manic glacierBOT
slender iron
#

@gilded cradle the bond button isn't doing anything for me

gilded cradle
slender iron
#

yup, unsupported version πŸ™‚

#

need to update cp

gilded cradle
#

yeah

#

It probably should pop up a message in that case and I figured stuff like that would be in the next round of updates.

slender iron
#

is it possible to connect to an existing device?

gilded cradle
#

What do you mean by existing device?

slender iron
#

one that has been bonded already

gilded cradle
#

If it has already been bonded, hitting connect should make the bond button appear. Maybe we need to add auto bonding next since it's not anything the user really needs to do..

slender iron
#

ah, I'm crashing

gilded cradle
#

yeah

slender iron
#

πŸ‘ will look now

gilded cradle
#

Cool that you were able to reproduce the issue.

slender iron
#

yup yup

#

crash from malloc outside of vm

gilded cradle
#

Hopefully an easy fix.

slender iron
#

usually is

idle owl
#

So the other two examples, when updated to include while True both affect the LED, even if they're not designed to. so I guess I'll change the pin to board.LED and call it a day.

#

Actually I think the tone example would play a tone without the while True if a speaker were connected.

#

Ugh.

#

How do I build the docs for CircuitPython? I only know how to do it for libraries, and that command did not work.

#

I mean mostly I changed pin names, but I added an example as well, so maybe worth test building? Or shrug.

slender iron
#

@idle owl at the top level you can do make html

idle owl
#

Ah ok

slender iron
#

@gilded cradle the issue is that the listdir entry struct is larger (28) than ble packet size (20)

#

I'll have to split it across packets

gilded cradle
#

Hmm, ok. I wonder why it only crashed on mobile?

slender iron
#

@gilded cradle I bet mac has a higher packet size

#

slightly too tall

gilded cradle
#

Makes sense

slender iron
#

it'd be nice to have a modal pop up when usb is preventing ble writes

gilded cradle
#

Yeah, that's actually on my list. I just wanted to get these changes added first.

slender iron
#

πŸ‘

#

will have a fix for you in just a sec

gilded cradle
#

Actually it was the only item left on my list.

slender iron
#
sync starting at 0 to 48
script.js:533 0 'import time\ntime.sleep(8)\n\nprint("hello world")\n'
script.js:537 write
script.js:336 DOMException: GATT operation failed for unknown reason. undefined
script.js:522 sync starting at 48 to 48
script.js:533 48 ''
script.js:537 write
script.js:522 sync starting at 48 to 48
script.js:533 48 ''
script.js:537 write
script.js:522 sync starting at 48 to 49
script.js:533 48 '\n'
script.js:537 write
#

@gilded cradle what board are you testing with? I'll give you a uf2 for it

manic glacierBOT
gilded cradle
slender iron
gilded cradle
#

thanks

manic glacierBOT
tulip sleet
#

@slender iron do you think packet_buffer_write() should do the splitting itself?

gilded cradle
# slender iron clue

Ok, couldn't get it to connect. I just figured out how to use the remote Chrome Dev Tools (which is really cool), so I can see the output the device's console. Looks like there's some cleaning up to do from the packet split, but at least this gets me unstuck.

#

I have some github stuff to do and then I'll head back to the Code Editor stuff.

slender iron
#

@tulip sleet I thought about it. maybe it should be a kwarg. /shrug

#

@gilded cradle sounds good. this fix is a good reason for us to do 7.1

gilded cradle
#

Yeah

ornate breach
#

Finally got an M1 MacBook Pro (present from family for my birthday next week) so if anyone has M1 related bugs with building circuitpython or with circuitpython devices connected I can hopefully be of help πŸ™‚

idle owl
#

πŸŽ‰ It passed!

ornate breach
#

It’s next week but thank you πŸ™‚

#

Today might as well have been my birthday because lots of small little rays of sunshine

idle owl
#

I thought you only did one

#

Wanted to know which

tulip sleet
#

rewriting that kind of started me on the "maybe revise this guide" path

#

anmd then discovered the other one

idle owl
#

Ok that's what I wanted to know

#

Going to remove it from there, and put it only in the FAQ, but wanted to know which one to copy - it will be that one.

tulip sleet
#

I see me in the history for that page. I will check the other page

idle owl
#

The one in Troubleshooting looks nicer, so it is likely the one you did

tulip sleet
#

I think that is true. I was editing something else in Troubleshooting. But my paw prints are on both pages recently

idle owl
#

Do CPX/CPB use the LEDs as CircuitPython status LEDs in 7.0.0?

jaunty juniper
#

yep

idle owl
#

Ah nice ok. Thanks

idle owl
#

Whee the docs built and deployed.

idle owl
#

For some reason, CircuitPython RTD is defaulting to 7x when you go to the main link. Is there some reason we did this deliberately? If not, I'll update it so it defaults to latest.

slender iron
sterile bronze
ornate breach
#

I would love one but ugh other money priorities:(

crimson ferry
#

that will be pretty sweet with CircuitPython on it πŸ˜‰

errant grail
idle owl
#

@tulip sleet The "Gemma M0, Trinket M0" erase file would work on QT Py M0 and the SAMD21 Trinkeys, right?

#

And it would make more sense to specify "SAMD21 Non-Express boards" ... or do we not have any other non-express boards anyway.... I'm now second guessing.

#

Still better to specify.

#

I mean, I'm pushing for using the storage method, but obviously we still list the old way with the erase files. So if it works on more boards, it might as well say so.

tulip sleet
idle owl
#

OK thanks

#

@tulip sleet Any idea if we're still shipping tinyboards with the Windows 7 driver? I haven't ordered one in ages. I might have a QT Py M0 still in a bag somewhere... But not a Trinket or GEMMA.

tulip sleet
#

i doubt if it's changed

idle owl
#

Not even sure we're shipping those with CP at all.

#

Alright, I'll leave that sentence in there

#

Thanks!

#

Basically I would move the "uninstall old versions" bit and the screenshots to the new page if you think that makes sense

tulip sleet
#

I'd say move it and put a link in the original troubleshooting page

idle owl
#

Right on, ok. That's what I was thinking.

#

Thank you for your help with this! I have some idea how I'm going to do the CircuitPython Documentation page, but I'm still fuzzy on the How Do I Learn Python? page, so I may be pinging you tomorrow about that.

#

Have a lovely evening!

tulip sleet
#

thanks, g'night!

steady thistle
stuck elbow
#

straight into drawers, to never see the light of day again

blissful pollen
#

I was so close to buying one a few times today but realized I had no immediate use for it and it would just sit

stuck elbow
#

I have an immediate use (I got the hyperpixel display today), but I will wait until I can order it with shipping costing less than the board itself

blissful pollen
#

ugh yeah that isn't fun either

jaunty juniper
#

added it to my already full basket at Pimoroni, I have a Pi zero project that could benefit from an upgrade in processing power, and a use for the old one, so I'm really happy with that

steady thistle
#

Zack Freedman's latest video is about a modular keyboard, running Circuitpython -- pretty neat!
https://www.youtube.com/watch?v=Fg0V5M0llaE
https://github.com/zackfreedman/mirage

The goal: the most hackable mechanical keyboard. The result: trolling the pants off /r/mk.
This episode is sponsored by NextPCB! Visit https://bit.ly/3ATzxtV for massive discounts on high-quality PCB's. They made the boards for this episode!

My latest project is a low-profile mechanical keyboard, with three clickable displays, CircuitPython fir...

β–Ά Play video
GitHub

The most hackable keyboard in all the land. Contribute to ZackFreedman/MiRage development by creating an account on GitHub.

manic glacierBOT
#

Sorry for the delay.

I've been having a lot of trouble getting the stm32 port to work right on my h743zi2 nucleo board..

Every time I try to load the hello-world model the board reset's.

I've just been through a deep dive on how a bare metal port works and how to debug on on the hardware in visual studio code but to no avail.

In Java you can set breakpoints on Exceptions and the IDE will pause when the error occurs and then you can see via the back trace where it originate...

manic glacierBOT
#

I've written a keyboard handler for the Keyboard Featherwing and I've been trying to figure out if there's a way to generate a keyboard interrupt (ctrl-C) programmatically from a key press (that seems unlikely to me) or more likely from a button press on a gpio pin.

My code is essentially an operating shell for the microcontroller flash, allowing me to launch various python scripts by typing in their names. If a script misbehaves, I have no way to interrupt it without powercycling the micr...

manic glacierBOT
#

@dhalbert I was in the process of making a custom build (to fit audiobusio and audioio onto the MKR Zero for I2S) and I noticed that it rainbowio had been removed from several of the other SAM21 boards. I've been using a couple of these boards for messing with some I2C stuff as well, and there hasn't been a lot of space for libraries.

That said, I can see why you'd want to get rainbowio back on all boards for baseline consistency in CP.

I'll close this one.

manic glacierBOT
manic glacierBOT
#

I've been having a lot of trouble getting the stm32 port to work right on my h743zi2 nucleo board..

Every time I try to load the hello-world model the board reset's.

I've just been through a deep dive on how a bare metal port works and how to debug on on the hardware in visual studio code but to no avail.

That sounds really frustrating! I can help you get a backtrace when you are ready to circle back to it. I wrote a guide about my process here: https://learn.adafruit.com/d...

idle wharf
#

@slender iron I won’t be around today, but I’ll push deep dive notes to the repo next week or this weekend. At some point, I’ll make some suggestions about how to fully automate that, just need to find the time. Until then, happy to do it manually.

slender iron
#

@gilded cradle The listdir struct is sent over two packets now if the MTU is < 28 bytes

#

the full struct is 28 bytes and will be split into 16 and 12 byte packets

gilded cradle
#

Right @slender iron, but after around 632 bytes returned, the payload goes back to a smaller value, but the i count is higher than before

#

So it appears to be coming back in chunks. I just wanted to confirm. This may be a mobile only thing as well.

slender iron
#

@gilded cradle sorry I missed the second ping. what command are you referring to?

#

the data non-head parts were always split amongst multiple underlying packets

gilded cradle
# slender iron the data non-head parts were always split amongst multiple underlying packets

The listDir command. Before, the payload would continually append packets and grow until it had all the data. Now that payload seems to reset after it builds up to a certain number of bytes. This probably was always the case, but I'm only noticing it because I'm debugging through a mobile device now. It's probably similar to how we didn't see the 20 byte limit until we did it over mobile.

slender iron
#

hrm, it should return everything still

gilded cradle
#

Yeah, it's probably because the bluetooth stack is a bit different.

#

It's just broken up more

slender iron
#

ya, it looks like mobile is transferring at 20 bytes at a time

idle owl
#

@gilded cradle Hey so I want to switch the PyPI deployment to use an API key instead of the username and password. It involves using __token__ as the username and the API key as the password. Should I update the Adafruit org secrets and do a test release on a library and see if it works? I don't know how else to test it really. I can always put it back to the current values if it fails.

gilded cradle
idle owl
#

Keen.

gilded cradle
gilded cradle
#

Payload was resetting because readFile swooped in too early, which meant the promise from process listDir was being resolved too early.

idle owl
gilded cradle
idle owl
#

@jaunty juniper Please describe the Community Bundle to me in a few sentences. (I'm adding it to this guide, and am struggling to describe it well.)

#

Here is what I have so far ```The CircuitPython Community Library Bundle is made up of libraries written and provided by members of the CircuitPython community.

These libraries are maintained by their authors and are not supported by Adafruit. As you would with any library, if you run into problems, feel free to file an issue on the GitHub repo for the library. Bear in mind, though, that most of these libraries are supported by a single person and you should be patient about receiving a response.```

#

It is not enough. πŸ˜„

#

I want to clarify the difference, but also give the Community Bundle its own space. So I don't want the entire description to be "Here's how this isn't the Adafruit Bundle."

gilded cradle
# slender iron so it is a js bug?

Is is possible that it's sending the header an extra time after it sends everything? There seems to be an extra 28 bytes that it wasn't expecting.

slender iron
#

I think that's by design

#

looks

blissful pollen
#

I think the writeup @idle owl only thought (and not sure if its needed) to say that the community bundle being libraries the community wrote that they didn't find in Adafruit libraries or was to help on their own projects... something to that affect

idle owl
#

Ah good call.

jaunty juniper
#

did you intend to ping me ? I'm sorry, I have no idea about that

slender iron
#

@gilded cradle that is deliberate so that empty directories get a response

#

The server will reply with n+1 entries for a directory with n files:

idle owl
gilded cradle
idle owl
# blissful pollen I think the writeup <@!330227457296957440> only thought (and not sure if its nee...

Eh? ```The CircuitPython Community Library Bundle is made up of libraries written and provided by members of the CircuitPython community. These libraries are often written when community members encountered hardware not supported in the Adafruit Bundle, or to support a personal project. The authors all chose to submit these libraries to make them available to the community.

These libraries are maintained by their authors and are not supported by Adafruit. As you would with any library, if you run into problems, feel free to file an issue on the GitHub repo for the library. Bear in mind, though, that most of these libraries are supported by a single person and you should be patient about receiving a response.```

blissful pollen
#

That sounds good to me. Question though if someone tried to reach (say me) and it's been a long time and no one can reach the contributor would you pull the library from the bundle?

idle owl
#

Hmm.

#

Good question. I want to say no. I guess if it reached a point where it was entirely unusable and no one could be reached to the point that it was causing support issues for Adafruit, I would consider it though.

#

But we would deprecate our own stuff in that case.

#

So I think that's a reasonable standard to follow.

blissful pollen
#

Yeah just was th inking in regards to the "patient about receiving a response". I think most contributors will strive to respond but wonder if its worth adding something like "... patient about receiving a response. Remember these are not paid employees of Adafruit"

idle owl
idle owl
blissful pollen
#

That is good (better then what I wrote!) and may have alleviate anger at the contributors and Adafruit (hopefully) if an issue arises

idle owl
#

Eh... if it's going to happen, it'll happen whether or not this guide is explicit. πŸ˜„

#

But yeah, we'll have something to point to at least.

blissful pollen
#

very true. If nothing else helps Adafruit fend off the complaints. I almost hope one day my code is used enough I can make someone angry I don't tell them exactly how to use it πŸ˜›

idle owl
#

That's like the first time I did git blame when it turned out to be me!

idle owl
#

If nothing else, Download the appropriate flash .erase uf2 from the Adafruit_SPIFlash repo. is incorrect, because it is not a .erase file.

#

And there's no mention of storage.erase_filesystem().

#

Fixing.

manic glacierBOT
idle owl
#

@onyx hinge @slender iron @tulip sleet Construction continues here, I may or may not be able to run the meeting on Monday. I won't know until Monday how bad it will be. I think they're scrambling to finish before weather stops them, and so it's worse than usual. Also would appreciate a backup recording regardless since the last one I produced was borked. Anyway, heads up. I'll keep you posted.

hoary moat
#

@slender iron the costume is just plain awesome. Thank you, Becca!

manic glacierBOT
idle owl
#

Since I don't want to recreate that entire list in this page...

manic glacierBOT
tulip sleet
idle owl
blissful pollen
#

My brain isn't working today but a question about a PR. The Adafruit_CircuitPython_Logging moved the adafruit_logging.py file to init.py in the folder adafruit_logging. You should still be able to just import adafruit_logging and it will work correct?

jaunty juniper
#

yes

idle owl
#

Good thing my explanation was more complicated, because Neradoc beat me to it, and I would have been wrong πŸ˜„

jaunty juniper
#

circup will have a hard time updating it however

#

but that's a rare occurence

blissful pollen
#

Thanks @jaunty juniper I was worried the PR may break the learn guides using it. But my python is not great and my brain is slow today

idle owl
#

Wait...

#

It might break code.

jaunty juniper
#

import adafruit_logging imports adafruit_logging/__init__.py

idle owl
#

Because you might have to access it differently, even though the import won't change.

#

Ah..

#

What else is in there then?

#

Why was it moved to init to begin with?

blissful pollen
idle owl
#

Ah ok

jaunty juniper
#

hmmmmm

blissful pollen
#

dastels and foamyguy reviewed it but there is a merge conflict and i just thought about not breaking learn guides as I looked at the merge part

jaunty juniper
#

I'm not keen on extensions.py either, a class is better in a file with its name file_handler.py

idle owl
#

Well, I think the only guide I'm aware of it being used in was written by Dastels. So I guess he might have considered that if it was going to break anything?

manic glacierBOT
manic glacierBOT
#

Thank you for this! I just tried new custom HID reports with the blink(1) USB LED report descriptor (which uses FEATURE reports w/ reportIds) and TinyUSB hid_generic_inout (IN/OUT reports). But I get ValueError: usage_page must be 1-255. The HID report descriptors look like the below, using the 16-bit way of specifying usagePage & usage, and I think the current usb_hid assumes usagePage/usage are only 8-bit. I've noticed this 16-bit usagePage/usage specification is used by several "rawh...

slender iron
#

@idle owl I should be around to back you up

manic glacierBOT
#

Thank you for this! I just tried new custom HID reports with the blink(1) USB LED report descriptor (which uses FEATURE reports w/ reportIds) and TinyUSB hid_generic_inout (IN/OUT reports). But I get ValueError: usage_page must be 1-255. The HID report descriptors look like the below, using the 16-bit way of specifying usagePage & usage, and I think the current usb_hid assumes usagePage/usage are only 8-bit. I've noticed this 16-bit usagePage/usage specification is used by several "rawh...

manic glacierBOT
#

I finally managed to get a hex compiled locally and flashed and the same happens. @petejohanson was able to flash his ZMK firmware on test hardware and got it running fine. As such, its not really a bootloader issue. ZMK uses Zephyr, which uses its own BLE stack (not the softdevice). This might have an impact but not quite sure.

Does CP automatically initialize/start the SD when starting up? Or does it wait for bleio to get called? Could this be related to the new BLE workflow?

Nord...

manic glacierBOT
#

Does CP automatically initialize/start the SD when starting up? Or does it wait for bleio to get called? Could this be related to the new BLE workflow?

The new workflow does use the SD from the start. You could prevent that by doing supervisor.disable_ble_workflow() in boot.py. We might use the SD for a few other things, but we don't enable it until we need it.

onyx hinge
#
  Smaller embedded C library for ARM development
``` I noticed this in debian.  I wonder if it's a good alternative to the newlib we use presently (shipped by arm with their arm toolchain)
tulip sleet
manic glacierBOT
#

We rely on newlib as implementation of the C standard library and some standard UNIX APIs. This is generally furnished by ARM with their GNU toolchain.

In the past, @tannewt has observed that Arch's newlib is built with -Os, and this saves some space compared to the newlib furnished by ARM.

I noticed that Debian has picolibc which has its home at https://keithp.com/picolibc/ -- I believe it would be suitable to incorporate in CircuitPython.

As Picolibc is a combination of co...

manic glacierBOT
#

With this bootloader (from INFO_UF2.TXT)
UF2 Bootloader 0.6.2 lib/nrfx (v2.0.0) lib/tinyusb (0.10.1-293-gaf8e5a90) lib/uf2 (remotes/origin/configupdate-9-gadbb8c7)
Model: Nordic nRF52833 DK
Board-ID: nRF52833-pca10100-v1
SoftDevice: S140 version 6.1.1
Date: Sep 10 2021

Neither adafruit-circuitpython-pca10100-en_US-6.3.0.uf2 or adafruit-circuitpython-pca10100-en_US-6.0.0.uf2 work.

I drag/drop the UF2 onto the drive and it never gets to boot into CP properly - it just goes back into ...

manic glacierBOT
#

I have a Keyboard FeatherWing - QWERTY Keyboard + 2.6" LCD (Adafruit PRODUCT ID: 4818) and a Adafruit Feather RP2040
(Adafruit PRODUCT ID: 4884). I have Circuit Python 7 (adafruit-circuitpython-adafruit_feather_rp2040-en_US-7.0.0.uf2) running on the feather and running the example code from Solder Party to test the keyboard and receiving the same error.

`from bbq10keyboard import BBQ10Keyboard
import board

i2c = board.I2C()
kbd = BBQ10Keyboard(i2c)

while kbd.key_count == 0:
p...

proven garnet
#

Whenever I try to commit using pre-commit for changes to libraries, it fails on pylint (examples code) and I get:

Executable /usr/bin/env not found

Anyone know what might cause that? I use Windows 10, for reference.

ornate breach
proven garnet
ornate breach
#

Gotcha, strange indeed

proven garnet
# idle owl Submit a review πŸ™‚

Also, hello! Just found this channel, so I thought I'd chime in on this one (I'm the author). Happy to change the filename for the new class's file, or provide any other support for documentation, especially if it break things or changes them drastically. Lemme know!

formal summit
#

Hi folks! Does anyone know if there's a significant performance difference when using w25qxx flash devices in QSPI vs QPI modes for a XIP application?

manic glacierBOT
#

I tried picolibc with the following change:

--- a/ports/atmel-samd/Makefile
+++ b/ports/atmel-samd/Makefile
@@ -197,9 +197,9 @@ CFLAGS += \
        -DSAM_D5X_E5X -DSAME51
 endif
 
+CFLAGS += -specs=/usr/lib/picolibc/arm-none-eabi/picolibc.specs
 
-
-LDFLAGS = $(CFLAGS) -nostartfiles -Wl,-nostdlib -Wl,-T,$(GENERATED_LD_FILE) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections -specs=nano.specs
+LDFLAGS = $(CFLAGS) -nostartfiles -Wl,-nostdlib -Wl,-T,$(GENERATED_LD_FILE) -Wl,-Map=$@...
vestal bobcat
#

am using PCF8523 RTC with feather RP2040 and can't get it to work. I am using circuit python 7.x.x.x version. I run example pcf8523_simpletest.py and get following error. Traceback (most recent call last):
File "code.py", line 14, in <module>
File "adafruit_pcf8523.py", line 148, in init
File "adafruit_bus_device/i2c_device.py", line 125, in write_then_readinto
OSError: [Errno 19] Unsupported operation

#

I use PCF8523 RTC with Circuit playground express using example and it works good.

#

ideas??

slender iron
formal summit
#

Makes sense! Majority of the code would be accessed from the cache and a transaction after a cache miss might even be the same with SIOO mode

manic glacierBOT
#

Thanks alot.

This time, WIZnet launched Ethernet HAT and W5100S-EVB-Pico.
Only W5500 and W5200 chips were available in the existing library.
Additionally, I modified the wiznet5k file by adding the W5100S register.

I created a firmware file by putting the wiznet5k library in the uf2 file.
Where should I attach the library that added W5100S and the uf2 file?
Can I upload it to Pull Requests?

manic glacierBOT
tulip sleet
manic glacierBOT
idle owl
idle owl
#

@lone axle Can you do me a favor? Scroll up to the top of the "State of CircuitPython, Libraries and Blinka" and check the list of overall authors. If there are any new folks I didn't make bold, can you make them bold? I'm pretty sure I caught all the new folks, but you merged most of the PRs and might know someone else who is new.

lone axle
#

yep, will do.

idle owl
#

I might be recognising someone from their first PR and not remembering they're new.

#

Thanks!

idle owl
#

I would greatly appreciate a backup recording of today's meeting, as the audio on my recording was messed up last time with no indication while it was happening or why it happened. I am able to run today's meeting as planned - there is construction going on, but at the moment it's quieter than it was last week. I say at the moment, because who knows what will end up happening. πŸ™„ Won't be the first "Construction Edition" we've recorded πŸ˜„

thorny jay
#

Meeting is in 72 minutes?

idle owl
thorny jay
#

Ok, as expected, one hour earlier for EU (we changed time between Saturday and Sunday).

idle owl
#

Ah yes.

thorny jay
#

I'll skip it for today that is also a day off in my country (not sure why and why not in US... I take the day off when they are offered to me and I don't ask question).

idle owl
#

Makes sense!

thorny jay
#

But I will try to use that time advantage to maybe go to Show and Tell, maybe showing a CP project. πŸ™‚

idle owl
#

Excellent!

lone axle
manic glacierBOT
idle owl
#

Sigh. Of course it now gets loud.

idle owl
onyx hinge
#

Video is available here on YouTube.
@idle owl shouldn't this just say "Video is available on YouTube." ?

onyx hinge
#

It's the word here I'm asking about

idle owl
#

Oh

#

I figured that out late

onyx hinge
#

I did get the markup wrong, corrected.

idle owl
#

yeah

#

Remove "here"

onyx hinge
#

OK I changed the template doc

idle owl
#

Thanks!

#

"like" is a strong word πŸ˜†

ember iris
#

@lone axle How's the backup recording looking

lone axle
#

Should be good. Just did another short test recording.

#

😺

lone axle
onyx hinge
#

@thorny jay Most of the US switches from summer to winter time next Sunday. The next meeting is November 8 at 2PM EST, which is UTC-5. (I was just noting that for Scott to read at the wrap-up)

lone axle
#

Explore basic embedded hardware concepts with Kira Hartlage while she demonstrates how to use CircuitPython to control a Circuit Playground Bluefruit circuit board.
The Circuit Playground Bluefruit has a microcontroller board and various sensors such as LEDs, capacitive touch buttons, motion sensor, thermistor, phototransistor, microphone, spea...

β–Ά Play video
onyx hinge
idle owl
#

You beat me to it!

onyx hinge
#

@lone axle I probably would implement it different now but there's a selection list in jeplayer.

lone axle
idle owl
#

The next CircuitPython Weekly is November 8 Eastern STANDARD Time or UTC-5

onyx hinge
#

and in summary that is why daylight saving time should be abolished πŸ˜‰

#

Have a great week all!

ember iris
#

Thanks all!

lone axle
idle owl
#

Cheers!

#

My test recording sounded fine, of course. Sigh.

ember iris
#

Awesome, my recording missed the start of the stream but now I've got a obs scene setup for the future just in case

idle owl
#

Great!

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

I think this is because we are writing more info to boot_out.txt, but the code that checks to see whether boot_out.txt needs rewriting is not taking that new info into account. So boot_out.txt is being rewritten on every hard reset. That rewrite delays for 1.5 seconds, which would explain the longer boot time. The rewrite also explains the wiping: if you remove power in the middle of the write, it will corrupt the filesystem. I'll work on a fix.

onyx hinge
#

@tulip sleet dangit I had noticed the boot_out.txt "caching" not working but didn't file a bug. Note also that if there's a boot.py I think it gets written every time too; this is more notable now that so many will use it for tuning usb properties

idle owl
#

@tidal kiln By the way, I'm currently writing up documentation on loading part of a library. Specifically for LED Animation library, but the concept will apply to anything with multiple modules that can be partially loaded on a flash-constrained board. I will have you look over it to make sure I'm not creating a support nightmare for you and the rest of us with it. But wanted to mention it in case you had any suggestions heading into it versus only waiting until I'm done.

tidal kiln
#

okie doke. yah, no suggestions. so will just take a gander when done.

idle owl
#

Thanks!

#

Here is the notes document for Monday’s CircuitPython Weekly meeting. It is at the (somewhat) normal time of 11am Pacific / 2pm Eastern STANDARD time here on Discord. The time may be different in your time zone! 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/13krd3FcC82ir_a0DBnJMaq0OEqJzY_bPgHg_5bhufWQ/edit

slender iron
#

should we create a 7.1 milestone?

idle owl
manic glacierBOT
#

Please create a pull request to the existing library that you added the W5100S support for.

You could also create a new library for the new chipset. Instructions for creating a new library are here: https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library

We won't redistribute a uf2 here. You can redistribute it yourself if you really want it bundled in the UF2. Otherwise, I think it's best to get the existing library update for the new chipset and then it'll be available...

slender iron
ornate breach
#

We’ve made it to a 32 bit array sized release milestone number!

#

πŸŽ‰

idle owl
#

So uh.... I've got this QT Py running 7.0.0 fresh, and it's not auto-reloading on save of code.py or when files are copied over.

#

I have to ctrl+d every time to get it to reload.

#

I feel like I had this happen before and either a reboot or unplug/replug fixed it.

#

It didn't click that it was happening the same way as before until now. I kept reloading it manually like that was normal for at least 15 minutes πŸ˜„

#

Yah reboot via reset fixed it.

#

I wish I could replicate it. πŸ˜•

jaunty juniper
#

I have noticed that happen sometimes too, I think only on M0 boards ? not sure, hard to replicate

idle owl
#

Yeah I don't remember what board did it before. Bleh.

slender iron
#

I think we changed how ticks work on the samd21 in 7

#

could be related to that

idle owl
#

Hmm.

#

I don't use SAMD21 enough to have it happen very often.

#

Which based on all the effort I have to go through to get parts of the LED Animation library loaded via command line, I'm kinda glad I don't deal with SAMD21 much.

manic glacierBOT
#
  • Fixes #5514.

boot_out.txt was getting rewritten every time, because the contents check did not include checking for the new Board ID: info.

I checked to see whether a longer concatenated string or two string comparisons was smaller in terms of firmware space. The latter was better.

I also reduced the time spent waiting for stable power from 1.5 seconds to 1 second.

Note that the existence of a boot.py will cause boot_out.txt to be written every time, since we don't know ...

tidal kiln
#

@gilded cradle blinka install on pi zero 2 w worked with no issue πŸ‘ got an LED blinking away

gilded cradle
#

Awesome @tidal kiln. Thanks for testing.

#

I'll need to add a board to cp.org now πŸ™‚

tidal kiln
#

np. thanks for updating!

idle owl
#

Oof. Another feature of the LED Animation library no longer works on SAMD21. It definitely used to. I'm not missing something regarding how MemoryError works, am I? It's completely irrelevant to flash space, correct? Which is to say, CIRCUITPY can be full up and it doesn't affect Memory allocation failure? I feel like the answer is "it's unrelated", but I'm second guessing.

#

Also I get how the number of bytes it fails to allocate has to do with the amount of contiguous space available, but I still find it weird at times how the numbers increase when removing code. As in, I get why it does that, but the raw values still make me look twice.

slender iron
idle owl
crimson ferry
#

with asyncio around the corner, libraries need to be adapted... it is something like adding in yield points?

idle owl
#

There are still a few things to try apparently, and then moving forward with whatever it turns out works best.

crimson ferry
#

cool, thanks, I'll watch the changes there

#

Requests is really in need of some async

idle owl
#

Keen. And yeah, that's a valid point as well. Once it's sorted, others can pick up other libs as well!

#

To that end, @tulip sleet when you get started on adapting the LED Animation library, if it makes sense, consider posting a link to your fork and working branch so interested folks can follow along.

gilded pewter
#

Does anyone know how can I get this dashboard and related code?
https://www.youtube.com/watch?v=yJs2y2HMmiw

Our new Feather Bluefruit Sense is available in the adafruit shop - its jam-packed with temperature, humidity, pressure, sound, light/color/proximity, and motion/orientation sensors. Even has a lil button! How to test it out? Melissa coded up a dashboard in javascript, using a Chrome browser you can visit the webpage, pair with the Feather and d...

β–Ά Play video
gilded pewter
#

The link above doesn't give instruction of how to use it.

lone axle
#

Anyone have an idea what could be causing a difference between these two functions?

def test_save():
    data = b'\x10\x00\x00\x00\x82\xa4name\xa4some\xa3num\\'
    print("len data: {}".format(len(data)))
    microcontroller.nvm[0:len(data)] = data


def test_save_broken():
    b = BytesIO()
    data = b'\x10\x00\x00\x00\x82\xa4name\xa4some\xa3num\\'
    b.write(data)
    b.seek(0)
    val_to_write = b.read()
    print(val_to_write)
    print("len val: {}".format(len(val_to_write)))
    microcontroller.nvm[0:len(val_to_write)] = val_to_write
#

The first one seems to work as expected and results in the data getting saved into nvm. The second one results in a hard lockup. Thumb drive and serial stop responding until I unplug / replug. Once it comes back up the nvm is filled with \xff values instead of the data.

slender iron
#

@lone axle I'd use a jlink to see where it is hard locking up

lone axle
#

I'll try to get set up for that. I have one but never used it for debugging. Only to write something to fix a device that got messed up once, dan walked me through it. I think that was not on this PC though, I'll have to get that stuff setup on here. Does the pico expose pins that can be used for debugging?

slender iron
#

ya, I think they are on the end of the pico

#

my gdb tutorial is similar to my rp2040 process

jaunty juniper
#

that bug is still there, and also causes a complete erase of the NVM (0xFF everywhere)

lone axle
#

interesting. It does seem like the same symptoms.

jaunty juniper
#

as if it crashes after the erase part of the erase-write cycle

#

in my tests it happens (almost) consistently when writing twice basically

lone axle
#

Ah, hmm. It does seem like my first function from above can cause it too. I never tried multiple. But I just tried to run it again now and it did hang.

#

Definitely did get a successful save a bit ago from the first one. I have never gotten a successful save from the one that uses bytesIO yet I think.

#

Ooo I think I had one that hung, but actually had the real data in it when it came back

jaunty juniper
#

maybe writing a bytearray for some reason causes multiple writes ? (that would be a thing to fix too !)

lone axle
#

I'll try to get the jlink set up later. I'm interested to see if the original thing I was working might be working correctly on other ports.

#

I'm working on a helper lib that uses msgpack to store and retrieve structured data easily and persist it with nvm.

jaunty juniper
#

I was trying to repro your BytesIO case, but it worked, until I realized I was on my clue

#

on the pico it does hang first try so far

lone axle
lone axle
#

Indeed it's working on esp32s2 as well! πŸŽ‰ can save and retrieve arbitrary objects like:

nvm_helper.save_data({'name': 'some', 'num': 92}, test_run=False)
print(nvm_helper.read_data())
manic glacierBOT
manic glacierBOT
#

New design:

  • capture output to a vstr
  • compare the complete vstr to boot_out.txt
  • rewrite if not a complete match

This is resilient against future changes to the automatic text written to boot_out.txt.

This also fixes rewriting boot_out.txt in the case where boot.py prints something.

Perhaps it also saves a bit of code space. Some tricks:

  • no need to close a file in read mode
  • no need to switch on/off USB write access, going down to the oofatfs layer doesn't check it...
orchid basinBOT
manic glacierBOT
manic glacierBOT
#

I don't have any cp boards to test my builds right now (I was working on a new port when I saw this issue). In terms of size I saw a 0.12% increase in text, 16.78% increase in bss

~/circuitpython/ports/atmel-samd$ arm-none-eabi-size  build-trinket_m0/firmware.elf #picolibc
   text    data     bss     dec     hex filename
 185588     320   12584  198492   3075c build-trinket_m0/firmware.elf
~/circuitpython/ports/atmel-samd$ arm-none-eabi-size  baseline/firmware.elf #newlib
   te...
orchid basinBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

This was originally found by a user in the forums at https://forums.adafruit.com/viewtopic.php?f=19&t=184484&p=895677. I was able to reproduce the issue by following the guide at https://learn.adafruit.com/magtag-google-calendar-event-display.

Here's the stack trace

Traceback (most recent call last):
File "code.py", line 246, in 
File "code.py", line 84, in get_current_time
File "adafruit_portalbase/__init__.py", line 411, in get_local_time
File "adafruit_portalbase/network.py", ...
orchid basinBOT
idle owl
#

@proven garnet Are you around? (edit: I replied on GitHub anyway.)

slender iron
#

@tulip sleet @onyx hinge what boot_out.txt PR(s) do we want to merge?

onyx hinge
#

Headed out for lunch shortly, can discuss later if helpful

idle owl
#

Any reason my terminal interacting with the disk image I have setup for CircuitPython would suddenly start taking way more time than usual to interact with it?

#

As in I change directories, or switch branches, and it takes significantly more time than it did two days ago.

#

I restarted the terminal, and ejected and remounted the disk image.. no change

#

Up to 2-3 seconds for every interaction.

tulip sleet
#

@onyx hinge @slender iron Jeff's is better, and I would approve it, but I asked some q's.

onyx hinge
#

Have been neglecting my notifications

tulip sleet
#

i was just trying to fix what seemed like a relatively urgent problem quickly

manic glacierBOT
idle owl
#

It is not happening interacting with any other repos, but all others are local, not in a disk image.

slender iron
#

@tulip sleet kk, sounds good. I'll drop a note on your PR.

manic glacierBOT
#

What happens if a write goes past the end of the vstr? Does it just discard the overflow?

The allocation is increased, until it fails. This means you could now MemoryError yourself if boot.py produces a lot of output.

How did you test? The easiest way I found to test whether a rewrite happened or not was to lengthen the 1 second delay to 10 seconds. I had a code.py that blinked board.LED, so I knew when it started.

I temporarily had code that turned the LED red during the 1 se...

tulip sleet
idle owl
#

I can look, but why would that slow down only that thing? πŸ˜• Checking.

#

That's not it.

#

Nothing out of the ordinary in there.

#

I mean, it's working, but I do anything, and it takes 2 seconds to complete. It's bizarre. And, if it continues long term, a massive time waster. Bleh.

manic glacierBOT
tulip sleet
#

@idle owl next thing I would do is reboot

idle owl
#

Ok. Yeah, fair enough.

#

Thanks for the suggestions! I hate rebooting so I always try every other possible thing first, but sometimes you simply have to turn it off and on again.

#

I'm not sure why any of our stuff failed on the Pylint f-string failure, it's not even in 2.7.1 and that's the version we pinned in pre-commit.

#

We added it to the pre-commit-config.yaml for examples, I guess that was futureproofing.

#

@onyx hinge When you're around, I'd like to implement the change to the Pylint example hook in the pre-commit-config, but I am struggling to read your git diff or patch or whatever you posted to that issue. What I put into the test file is already complaining about not being formatted properly and I think it's simply because I don't understand exactly what your change was.

onyx hinge
idle owl
#

Will do.

tulip sleet
#

@ruby atlas I haven't figured out what this means: Animations that support cycle complete notifications will have X property set to False., in various on_cycle_complete() in the anims library. I don't know what the "X property" is.

#

not urgent

idle owl
#

Sigh. Reboot didn't fix it. And it's happening on a local repo now too - I submod init'd the entire bundle for reasons, and it's taking forever to do things in there now too. So I guess it's suddenly being slow on giant repos. πŸ˜–

#

How do I send the output of a command to a file.

#

| something?

tulip sleet
#

something >log.txt

idle owl
#

ok thanks

tulip sleet
#

i am a bit worried about the health of your SSD.

idle owl
#

Seriously? That would figure. I have a new machine on the way, but won't see it for another month at least. Of course this one would decide to die before it gets here.

#

I need to hook up my backup drive at least.

jaunty juniper
#

is it only in repositories ?

idle owl
#

Yeah, and only big ones.

jaunty juniper
#

like if you cd .. out of it, do you see something slow ?

idle owl
#

So the entire bundle initialised so every lib is loaded, or the CircuitPython repo

jaunty juniper
#

are you using something like starship ?

idle owl
#

I don't know what that is

#

And it's only within the repo

jaunty juniper
#

it could be something running in your shell prompt that takes some time for some reason

idle owl
#

Suddenly though?

#

It was fine 2 days ago

tulip sleet
#

what does echo $PS1 say

idle owl
#

@tulip sleet From where? Inside a repo or in a new window?

tulip sleet
#

just in a terminal; it should not change

idle owl
#

\n\! \u@\h:\[\e[35m\]\W\[\e[0m\]$(virtualenv_info) $(__git_ps1 "\[\e[32m\][$(time_since_last_commit) %s $(tip)]\[\e[0m\]")\$

#

I have fancy git stuff in my prompt.

#

if that's what that's related to.

#

Which it kinda looks like it is

#

But again, it's only causing issues in big repos.

tulip sleet
#

so set it to something boring in one terminal: set PS1='>'

#

and see if it's faster in the slow repos

idle owl
#

that only changes it for one terminal?

tulip sleet
#

yes, just temporarily

idle owl
#

No, it's still awful.

#

wait

#

I still see fancy git stuff

#

when I cd into a repo

tulip sleet
#

and the prompt is now just >?

idle owl
#

nope

jaunty juniper
#

what does that say ? echo $PROMPT_COMMAND

idle owl
jaunty juniper
#

(on my computer it's starship_precmd for example)

idle owl
tulip sleet
#

ok, try just PS1='>'

#

without the "set"

idle owl
#

Sigh.

#

I'll deal with slow if it means getting rid of my fancy Git info to speed it up

#

I don't understand why it would suddenly change though

#

it's never been an issue before.

#

Computers are jerks.

jaunty juniper
#

my fancy starship prompt takes around 2s I'd say (in the CP repo)

idle owl
#

Fair enough.

#

It's never done this for me. But I'll deal with it to not lose the info.

#

I'm stunted without it.

#

I'm so used to having it

#

A friend help me set it up, I don't even know how to tweak it to try to fix it.

jaunty juniper
#

it used to be worse, I don't remember if I changed something or it "fixed" itself

idle owl
#

Heh yeah

jaunty juniper
idle owl
#

If you don't mind me asking

#

Mine is this:

#

It shows different things for different git statuses.

#

Different symbols.

jaunty juniper
#

yeah it uses a few magic symbols like [!$] to tell me there are modifications and new files

#

and it tells me the time a command took on the next prompt if it takes some time

idle owl
#

Neat

jaunty juniper
#

but sometimes it tells me that:

[WARN] - (starship::utils): Executing command "git" timed out.
[WARN] - (starship::utils): You can set command_timeout in your config to a higher value to allow longer-running commands to keep executing.
onyx hinge
#

@idle owl ready to type or video about the pre-commit stuff now

#

or, well, I would go sit in a different spot to video

idle owl
onyx hinge
#

ok I'll head to the webcam

onyx hinge
#

I was seeing it in datetime

#

or maybe most/all of the repos are shifted to python3.7 by now

#

turns out I was operating on an out of date datetime

tulip sleet
#

@idle owl can you give me some examples of LED animation code that right now uses a lot of tricks to be interruptible or to change things? I read through the library (and see the "cycle completed" callback capability). I also looked at the BLE remote control animation guide. It seems like it would be OK as is, but maybe it is slow to respond?

idle owl
tulip sleet
#

well, you send a command to change, and it takes seconds to move to the next thing, because the current animation cycle is long?

#

There seem to be a bunch of capabilities in the library that I don't see examples of use for

idle owl
#

Oh, that's totally true.

tulip sleet
#

capabilities to catch when a cycle is done, etc.

idle owl
#

Some of that was added because folks requested some thing, or we needed something... etc.

tulip sleet
#

maybe I should talk to Rose about it, since there isn't a lot written up

idle owl
#

So if it was a community requested thing, the applicable example may never have made it to our stuff.

idle owl
tulip sleet
#

yeah, that's fine, i will be taking a break for a while around 5 for a walk and making dinner

#

i will look at the issues and PR's in the library too

idle owl
#

Sounds good.

#

@onyx hinge The whole point of Weblate is that you don't need to know C to contribute, right?

#

I mean there's more point than that

#

but that's part of it right?

onyx hinge
#

@idle owl not much about C. You need to know some things about %-substitutions that are specific to circuitpython, and to know about \r\n and those kinds of stuff

idle owl
#

Ah ok.

#

Good to know, thanks.

onyx hinge
#

(like, nothing I know of uses %q as a %-format to mean "some string"

idle owl
ornate breach
#

Thanks Kattni! πŸ™‚

idle owl
#

You're quite welcome πŸ™‚

tidal kiln
idle owl
tidal kiln
#

yes

idle owl
#

Right on. Yeah, deprecate it for the CircuitPython lib.

tidal kiln
#

ok. thanks. will do.

tidal kiln
#

@idle owl done

idle owl
#

@lone axle Greetings! Are you around and do you have a moment?

lone axle
idle owl
idle owl
#

@tidal kiln No rush on this, but if you want to check out the new CircuitPython.org section on this page, I'd appreciate it. Anne hasn't checked it yet either. But it's in pretty much every board guide, so I'd appreciate any feedback you have as well. https://learn.adafruit.com/welcome-to-the-community/welcome-to-the-community#circuitpython-dot-org-3105440-6

Adafruit Learning System

The best part of CircuitPython is the community that comes with it.

tidal kiln
#

@idle owl looks good. maybe add level 3 header text to separate each tab section?

idle owl
tidal kiln
#

level 3 or whatever fits, etc. have text be same as tab.

#

like here

idle owl
#

Yeah, added. They won't have their own links, but that's ok. They're at least better.

#

Refresh?

#

See if that's what you meant

tidal kiln
#

yep

idle owl
#

Great! Thanks for the feedback.

tidal kiln
#

np

idle owl
#

@tulip sleet I may have succeeded in securing some of Rose's time πŸ™‚

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

The PCA10100 was added after 5.3.1, but is in some alphas and betas shortly after. So try the earliest builds here and see if they work: https://adafruit-circuit-python.s3.amazonaws.com/index.html?prefix=bin/pca10100/

Then also try earlier versions of the bootloader, from around that time. The PCA10100 was added Nov 11, 2019, but I don't know that it was tested at that time. On the other hand, presumably the people who added the board to CircuitPython originally presumably tested the firmw...

manic glacierBOT
manic glacierBOT
#

Monitor depends on part of the wifi init. If we want to separate the modules at some point, that could presumably be coordinated, or duplicated with error checks, or split into a separate shared module.

Just a note that Espressif says you can do Station or AP while Monitor is running, I haven't had good experiences with that. First because Monitor processes so many packets, and also if there is a connected Station or AP, then Monitor is limited to just that channel.

So currently Monit...

lone sandalBOT
manic glacierBOT
manic glacierBOT
#

By having a pair of buffers, the capture hardware can fill one buffer while
Python code (including displayio, etc) operates on the other buffer. This
increases the responsiveness of camera-using code.

On the Kaluga it makes the following improvements:

  • 320x240 viewfinder at 30fps instead of 15fps using directio
  • 240x240 animated gif capture at 10fps instead of 7.5fps

As discussed at length on Discord, the "usual end user" code will look like
this:

camera = ...

wi...
manic glacierBOT
idle owl
#

@lone axle Good morning! I have something to discuss. When you have a few minutes, let me know. No rush!

manic glacierBOT
#

Quick update...

I tried a bunch of bootloader releases and CP releases:

Bootloaders:

  • 0.3.0 Loaded fine
  • 0.3.1 Could not load bootloader on hardware
  • 0.3.2 Loaded fine
  • 0.4.0 Bootloader drive did not mount
  • 0.4.1 Bootloader drive did not mount
  • 0.5.0 Bootloader drive did not mount
  • 0.5.1 Bootloader drive did not mount
  • 0.6.0 Bootloader drive did not mount
  • 0.6.1 Loaded fine
  • 0.6.2 Loaded fine

CircuitPython Builds for PCA10010:

  • 5.4.0beta0
  • 5.4.0beta1
  • 6....
idle owl
#

@ember iris How goes the list of Python resources you were doing up?

#

I'm finally almost to writing up that page in the Welcome guide.

ember iris
idle owl
ember iris
#

Ok, I can work on that tomorrow (maybe today as well).
I've got a highlighted question, "What is the best way to learn python?": "Let me know if you find it" entry with a footnote for me to talk about how everyone learns the language differently and not to be disheartened when things are tough followed by pointing the resources entry and starter projects entry,

#

it seems to line up with this so it'll be good to work on it

idle owl
#

Thanks so much! I appreciate the assist. I have one link to the Python beginners guide for non-programmers, but ... that's kind of lacking for an entire guide page.

ember iris
#

Yeah, it's such a frequently asked question in all the communities I'm a part of. It's just a hard one to answer, and harder still to explain why it's hard to answer

idle owl
#

Well, I can definitely help. We can work together on this one.

ember iris
#

Woo! I need to focus on the FAQ so that'll be a huge help

idle owl
#

Excellent. If you want to put it in a Google Doc or something you can share, where we can both work on it, that might be useful.

#

Then I can include it in the guide, and you can include it in your docs.

ember iris
#

Um, let me see. It's in notion but it's through the python discord so I'm not sure how the permissions are managed

idle owl
#

I have no idea what notion is πŸ™‚

#

I'm on the Python Discord if that helps. (But I think you knew that.)

ember iris
#

I didn't either until Joe added me to it

idle owl
#

Hah!

lone axle
ember iris
#

I'll ping you when joe get's back to me about how the notion side of the organization handles permissions. Worst case scenario I copy it to a separate platform so we can work on it, and just copy and paste it when I need the pydis staff to go over it. It's in just it's early draft but it's got a really good set of questions highlighted

idle owl
# lone axle I've got some time now, or I should be around mostly the rest of the day.

Nice, ok. So you did the magic to put the Hacktoberfest topic on all the repos. I assume it's still there, and we need to remove it. But, another issue is Adabot did not remove the hacktoberfest label from all of the issues. I imagine there's something in the API to do this (as I think that's how Adabot was supposed to do it). Sommersoft fixed Adabot adding the labels, but apparently there's an issue with removing them now. And sommersoft is very intermittently available. So! I'm wondering if you can double-up your magic and remove both sets of labels?

lone axle
idle owl
#

Before trying to figure it out yourself.

#

Adabot is mostly a mystery to me, so I'm not much help there.

#

mostly.... heh.

lone axle
#

I don't have much experience with it either. I should poke around and learn more about the different things it can do. I have found the Github CLI to be very helpful for making these automated changes. Maybe there is some opportunity to improve or extend the currently functionality in adabot by using that CLI.

idle owl
#

Distinct possibility.

lone axle
#

looks like the CLI does provide a way to remove labels from issues as well, so that should be fairly straightforward as well I think:

$ gh issue edit 23 --remove-label "core"
idle owl
#

It is a gnarly mess. Built like Venice. One thing on top of another.

manic glacierBOT
onyx hinge
#

I wish I could test more bitmap stuff within the Unix build. but I don't want to implement displayio fully. I see 3 options:

  • stub out the actual display types on the unix build
  • separate out the actual display types to their own modules, like parallelbus already got
#
  • take everything but the display & display bus types to displaycore, a hypothetical new module
#

@slender iron feelings? ^

#

(I think stubbing out the display types means stubbing out i2c and spi which seems like a fair amount of work for nothing)

manic glacierBOT
#

I have a small board that's designed for props, it controls lighting effects, sounds, leds, stuff like that. It has a feature where it can output a PWM base on the intensity of the sound it's currently producing, the idea being that you can make lights or other devices react to the sound.

I've been toying around with reading the pulses on Arduino using PulseIn, I even made a few small test projects. When I went to port the code to Circuitpython, I found that it's PulseIn returned much defe...

slender iron
#

@onyx hinge I have no great options. stubbing has the benefit of not changing any example code or docs. you could theoretically actually implement i2c and spi for linux like blinka does

onyx hinge
#

Don't tempt me

slender iron
#

πŸ™‚

manic glacierBOT
timber mango
#

Does anyone have any tips on how to debug MemoryErrors? I'm getting random errors with small code changes, and they don't seem to make much sense. Like trying to import adafruit_datetime with 79000 bytes free, and the error i get is just:
Traceback (most recent call last):
File "code.py", line 541, in <module>
MemoryError:

Not even an amount of bytes it was trying to allocate.

#

Sometimes it will say it failed to allocate like 300 bytes, which seems like very little considering 79000bytes free... I guess its something else being the problem, it somehow i have managed to really fragment the memory

manic glacierBOT
#

I do have a jlink (it's included as part of the PCA10010). I never got into using it for debugging... I also have a Black Magic probe.

Sounds like I'll need to learn how to use them to figure out if it even gets into the code. From what I have seen on the nrf52840, when the code faults, it might reboot. In this case, I don't see it enter a boot loop at all. It's goes straight back to the bootloader as if nothing got flashed...

Do we have the right memory/flash mapped to the device? ...

idle owl
idle owl
lone axle
#

@idle owl I think the script to remove hacktoberfest topic from the repos is ready. I tested it on a repo of my own and it seems to work properly. We figured out last time that my account does not have permission to update for the adafruit library repos though. I'll need to get another token from you like we did when I added them.

idle owl
#

It needed "repos" permissions right? That was all?

lone axle
idle owl
lone axle
# idle owl Sent!

Got it. Will test 1 manually, then a few with the automation. If all goes well I'll start it running on the rest of the list.

idle owl
#

Thanks so much!

idle owl
lone axle
idle owl
#

We can do those manually.

#

Done πŸ™‚

lone axle
#

Nice, I'll poke around with adabot a bit tonight and work on the issue labels.

manic glacierBOT
manic glacierBOT
tulip sleet
idle owl
#

I agree we should highlight the core modules part. That's kind of the meat of the sammich.

#

I thought about doing more detailed things for each section then noped out of that. Too much.

stoic rain
#

Hey, y’all. I’ve got a question re CP7 debug builds and Express boards with smaller flash.

tulip sleet
#

@slender iron hi - I noticed that MicroPython #defines dummy values for MICROPY_BEGIN_ATOMIC_SECTION() and MICROPY_END_ATOMIC_SECTION() in mpconfig.h, and expects ports to implement them. MPy does: typically BEGIN returns PRIMASK and then disables interrupts; END restores PRIMASK. MPy doesn't use these a whole lot, mostly in the scheduler, which we don't have turned on, but it does use them inside one place in vm.c.

We do not implement these, instead using common_hal_mcu_disable/enable_interrupts and sometimes the similar mp_hal routines. We do not pass PRIMASK around. I notice that you even added a comment in the rp2040 port:

// We don't use save_and_disable_interrupts() from the sdk because we don't want to worry about PRIMASK.

I am going to do something about these ATOMIC_SECTION things, but I'm not sure why you didn't want to pass PRIMASK back and forth. What was your motivation (because the common_hal_mcu routines don't, maybe??)

tulip sleet
stoic rain
slender iron
#

@tulip sleet I don't remember why I ignored PRIMASK

idle owl
#

Hmm. Apparently circuitpython.org isn't listed in the library API docs. I feel like that should change.

tulip sleet
#

agree

idle owl
tulip sleet
#

sure, may as well roll it in

idle owl
#

Ok, so input then....

tulip sleet
#

where does the download link point now, to the github releases?

idle owl
#

yeah

#

could change it to "Download from GitHub" and "Download from circuitpython.org" or something separately

tulip sleet
#

yeah

idle owl
#

It's not a sentence area, it's a list area.

#

So I'll make it "Download Library Bundle" and link cp.org

#

and update the current one to Download from GitHub

tulip sleet
#

yes, i was going to type the same phrasing. There is also info on the libraries page about circup now

idle owl
#

OK

#

@tulip sleet git diff is: ```diff
.. toctree::
:caption: Other Links

  • Download <https://github.com/{{ cookiecutter.github_user }}/{% if cookiecutter.library_prefix %}{{ cookiecutter.library_prefix | capitalize}}{% endif %}CircuitPython{{ cookiecutter.library_name | replace(" ", "_") }}/releases/latest>
#

I was going to say harder to read without color, but it's red/green, so I guess it's not so different for you.

onyx hinge
#

If you start your code block with "```diff" I think it colorizes on discord.

 hello
-deletion
+addition```
manic glacierBOT
#

Issue 5477. The calculation for number of UART bytes returned under some circumstances could result in a negative number. Since it was unsigned, this meant that a large value would be used and memory would get stepped on. The real issue seems to be that the SDK does not always update the handle.rxData field, but rather than trying to fix the SDK, code was added to UART.c to correct for the situation.

idle owl
#

So very looking forward to the pre-commit fix.

#

Examples take ages. Bleh.

#

If only I had the time to tweak every library's documentation like I am with LED Animation today. It's all stemming from writing this documentation page in the Welcome guide.... Will involve screenshots, so I'm fixing the docs to look better. heh.

crimson ferry
idle owl
#

Not for me..

tulip sleet
idle owl
blissful pollen
idle owl
#

And it worked on Read the Docs!

#

Never know that until you merge. Heh.

blissful pollen
#

No problem I miss the e-mails all the time so just wanted you to know.

blissful pollen
#

Ha yeah I was thinking that, at least if it didn't there are two of us to blame πŸ™‚

idle owl
tulip sleet
idle owl
#

I saw you mention that! I like blue, might look into it anyway.

tulip sleet
#

there is a dark version too, haven't tried that

idle owl
#

Oooooh.

#

Very blue.

#

I realised one issue with it, if I do this - if I take screenshots for folks, it won't look like most folks' setups.

tulip sleet
#

yeah, I was thinking about that too

idle owl
#

So.... I guess I'll stick with the regular one simply to make sure I don't create support issues.

#

You have an actual reason to do it. πŸ™‚

idle owl
#

@tulip sleet How would you explain what an API is? "the way code features present to those using it" or "how the features of the library are available for you to use, versus how they work on the backend" or....? We keep talking about APIs but we never actually explain to anyone what an API actually is.

#

I tossed those off as I was writing that message, I'm not offended by feedback.

tulip sleet
#

for the native modules, I would say that readthedocs documents the functions and classes in each module. Maybe avoid "API" completely, unless that's a page name

idle owl
#

Libraries say "API Reference" on the docs pages.

#

So...

tulip sleet
#

"The API Reference page documents the functions and classes in the library"

idle owl
#

I was going to try to give a high level explanation of what API means.

#

Ok

tulip sleet
#

is this for a library or the built-in modules?

idle owl
#

Libraries.

#

What you said would probably work

tulip sleet
#

"The API (Application Programming Interface) defines how your program talks to the library: the functions and classes you call upon to use the library. "

#

could use some cleanup

idle owl
#

I like it though!

#

Good start!

tulip sleet
#

maybe some other synonym for "calls upon"

idle owl
#

Keen

#

@tulip sleet The API (Application Programming Interface) defines how your program interacts with the functions and classes that you include in your code to use the library.

tulip sleet
#

not "include", because you're not writing them yourself. You are using the functions and classes provided by the library. Maybe just "call" instead of "call upon"

idle owl
#

ok

#

changed to "call"

tulip sleet
#

The library provides functions and classes. They are the interface.

#

they are abstractions provided by the library

#

"abstraction" is jargony

#

unfortunately

idle owl
#

Changed "interacts" to "interfaces"

#

Yeah abstraction would require more explanation I think.

tulip sleet
#

The API of a library is the set of functions and classes the library provides. Your program calls those functions and uses those classes to use the library.

idle owl
manic glacierBOT
manic glacierBOT
#

I can confirm this issue; same chips and firmware but different boards.

Adafruit Feather RP2040 with Airlift ESP32 Featherwing, Nina 1.7.4, CP 7.0.0, attempting to start Bluetooth using example code at https://learn.adafruit.com/adafruit-airlift-featherwing-esp32-wifi-co-processor-featherwing/circuitpython-ble with the proper Feather pin settings uncommented.

Resulted in error at line 185 of ESP32.py:
_bleio.BluetoothError: Timeout waiting for HCI response

Unlike OP, reverting to CP...

onyx hinge
#

Receiving documentation bugs from the community helps the authors understand where their blind spots are. For example:

If the docs have too much info, they may need to be reorganized into smaller sections
If the docs are too verbose, they may need to be reworded
It’s often difficult for someone who created a solution to understand all the details the users of the solution will need
We may need user guides for some topics when:
    There are a lot of users new to the solution space
    The user base has varying levels of skills in each of many skill set silos
etc.
#

"It’s often difficult for someone who created a solution to understand all the details the users of the solution will need" is one I particularly need to take to heart

lone axle
#

@idle owl the issue label remover is running through the open issues now to remove "Hacktoberfest" label. I did poke around with adabot, and I think figured out how to use it to do this. But when I started it running it stopped after a minute and seemed like it was going to wait essentially an hour because of a rate limit. I tinkered a bit and ended up using something similar to the script that created the "Missing Type" issues. iirc I was able to avoid hitting the rate limit with a small sleep between each action. It's about half way through the "drivers" in the Bundle atm and hasn't hit a limit yet 🀞.

manic glacierBOT
#

Based on the error message, I tried making the following edit down in nvm.toml and the error seems to be resolved:

diff --git a/flash/puya/P25Q16H.toml b/flash/puya/P25Q16H.toml
index e4fd193..d7c6903 100644
--- a/flash/puya/P25Q16H.toml
+++ b/flash/puya/P25Q16H.toml
@@ -3,7 +3,6 @@
 # This config is still untested.
 total_size = 0x200000 # 2 MiB # Page 17
 capacity = 0x15 
-manufacturer_id = 0x85 #  Page 49
 write_status_register_split = false
 01_continuous_status_write ...
mortal mica
#

@onyx hinge Thanks for confirming that the removing the redundant line will indeed fix the issue of my PR.

manic glacierBOT
lone axle
#

@idle owl The bulk of the list is done now. A couple of things to follow up on: 1) a few issues had "hacktoberfest" with lower case h while the majority were "Hacktoberfest" with uppercase h. The script I ran removed all the uppercase ones, I'll need to tweak and run it again to do the lower case ones. That is easy enough though. and 2) I found a similar advanced search query to check on this https://github.com/search?p=2&q=org%3Aadafruit+label%3A"Hacktoberfest"&type=Issues which reveals that the issues that were closed did not get affected by my script. Do we want to remove the hacktoberfest label from closed issues as well? or leave it since the issue was already completed?

idle owl
idle owl
idle owl
#

I was working on this guide page last night, and apparently stopped mid-sentence, and I have no idea where I was going with it. πŸ€¦πŸ»β€β™€οΈ

manic glacierBOT
#

Apart from testing on the hardware itself, this PR is pretty much ready.
MengDu from Seeed on discord indicated that supply is tight right now. Getting some hardware for testing might take a while.

There are some out there right now (Zack Freedman's latest keyboard uses one). Do we get it out now and wait for people to load them up and let us know of any issues or do we wait to merge? Let me know and I'll update the WIP title...

idle owl
#

Reread everything before it a few times and.... nope. No idea. Oh well. πŸ€·πŸ»β€β™€οΈ

idle owl
#

@tulip sleet Here's what I have now The API (Application Programming Interface) of a library is the set of functions and classes the library provides. Essentially, the APIΒ  defines how your program interfaces with the functions and classes that you call in your code to use the library.

manic glacierBOT
stoic rain
#

Ok, new question. I’m trying to figure out the SPI flash issue with the MicroMod SAMD51 (the SPI wiring is a little weird, and something’s up, because the board boots in safe mode and doesn’t mount CIRCUITPY). This issue has been around since I submitted the port and I’m just getting back to it.

I’m trying to debug what;s going on with Microship Studio and a J-link, but the debugger is failing with β€œError: failed to load ELF executable”. I’ve built CP7 with `make clean BOARD=sparkfun_samd51_micromod; make BOARD=sparkfun_samd51_micromod DEBUG” and dropped the .uf2 onto the board. And I can see the board having booted in safe mode. Any ideas? Am I even on the right track trying to debug things this way?

stoic rain
manic glacierBOT
#

Thanks Dan. That's my impression too (pins can be triple-checked but testing with flash can only be done on real hardware). I messaged MengDu to see if they have someone who could load it on their side. I'll want to test it myself as this is the same format as the original Xiao and the QT PY(s) and these are all boards that can be used with my basic macropad/encoder. Having the same pin definition helps in keeping the python code to be the same across all boards...

idle owl
idle owl
#

Thanks

idle owl
tulip sleet
# idle owl Keep me posted so I can hand it off to Anne when you're done.

OK, all set, I just expanded this paragraph a bit:

The first section is API and Usage. This is where you can find information about how to use individual built-in core modules, such as time and busio, details about the supported ports, suggestions for troubleshooting, and basic info and links to the** library bundles**. The Core Modules section also includes the Support Matrix, which is a table of which core modules are available on which boards.

idle owl
#

Maybe go for digitalio instead of busio?

tulip sleet
#

sure

idle owl
#

Mostly because we have the singletons that take the place of busio a lot now.

tulip sleet
#

ok, done

idle owl
#

Thanks!

#

@tulip sleet Ok, so other then the How Do I Learn Python? page, how do you feel about the order of the rest of the guide right now?

#

Since this all started from your brainchild.

#

It's coming down to the end of the update, so I wanted to get your input.

idle owl
#

Ok thanks!

#

@tulip sleet I'm still not sure what to do with the How Do I Learn Python? page. πŸ˜•

#

I have one link, and a couple more links from the Python subreddit's WIP FAQ.

ember iris
idle owl
#

Fuzzy on that too, tbh. πŸ˜„

ember iris
#

Like, do you want to teach the basics of what a program is, or do you want to teach how to learn how to program?

#

(or both)

idle owl
#

Oh hmm

#

No I think it's more to provide a short list of resources that might help folks learn

#

Not to actually teach in the page

#

I want to provide at least one each of different types of resources like book, website, video etc.

ember iris
#

Ok good to know! And aimed at, "never before programmed" groups?
Yeah python.org has a lot of a wide variety of mediums. The main criticism I have is how buried they are on the site

idle owl
#

Ok

#

Good start

tulip sleet
#

These are pretty thorough, though not the most attractive

idle owl
#

What is moin anyway. It makes me think someone misspelled main but I realise that's not the case.

tulip sleet
#

(I mean all of the above)

#

it's a particular wiki software

idle owl
#

Ahhhhhhhhh

ember iris
idle owl
#

That makes so much more sense.

ember iris
idle owl
#

Ooh ok

#

This is good.

ember iris
idle owl
#

OK, all of these have been copied. I need to break for lunch. Thanks!

idle owl
#

Maybe realpython.com for example? But if that's the only other site we link to, I don't want it to look like we're specially endorsing them or something.

#

Since everything here so far is official Python stuff.

tulip sleet
#
slender iron
#

With a jlink attached you can set a break point on reset_into_safe_mode in order to catch the error before reset

tulip sleet
#

@idle owl those are specifically CircuitPython references. Also the Arduino->CircuitPython guide could be hlepful

idle owl
#

Hmm

ember iris
# idle owl <@!459119350851567626> <@!329766224093249548> I'll shift it up the list in a bit...

"One final note:
If you're trying to learn Python and you're having trouble, don't worry! Everyone learns in different ways. If you're working through something and it isn't sinking in, don't be afraid to look for a different way to learn! Everyone learns in their own ways and at their own pace. We hope this gives you the freedom to find your style!"

Maybe something like that? it looks really good as a whole though, I like it

idle owl
#

I wish we had a guide on "Learning Programming Basics with CircuitPython" or some such. I mean I guess there's already a lot of getting started resources for Python out there, and it would be rehashing a lot of that at a CircuitPython REPL or whatever, but still I think it could be helpful.

ember iris
#

Yeah I was running into that today too. I might do a "Basics of programing for non programmers" page for the subreddit which hit's things like, "What is a variable", has a blurb about it, then links to the "What is a variable" page, chapter, timestamp, in other tutorials, books, videos, so it kind of is a tutorial, but is much more a links doc to many tutorials

#

but that's for after the FAQ, and the How To pages

#

figuring out how to talk about how to learn to program in a non-chat way is difficult

stoic rain
#

Agreed. It’s also a different path when learning to program with hardware. The RPi book for the RP2040 does an excellent job of this, covering the basics of programming and hardware in a very approachable manner.

idle owl
#

Everything I know about Python I learned through CircuitPython.

#

I hadn't done programming or electronics at all before I got started with this.

#

To be clear, I'm missing some serious fundamentals because of my learning path, but I'm picking them up slowly along the way.

stoic rain
#

That’s awesome. The main problem, I think, is the Python is so broad.

idle owl
#

I tried to learn Python before finding CircuitPython, and couldn't get into it.

stoic rain
#

CircuitPython does a nice job on constraining the ecosystem. There’s a lot to learn, but it’s got bumpers on it.

#

You can start with CPython, but many of the applications almost immediately bring in big concepts or modules.

tulip sleet
#

The Pi Pico MicroPython book is Creative Commons licensed. It could be redone with CircuitPython with no copyright issues

stoic rain
#

That would be worth looking at @tulip sleet

idle owl
#

The guide we wrote is based on the book.

#

I say "we"... I wrote it πŸ˜„

stoic rain
#

Yeah, I appreciated the translation, @idle owl

idle owl
#

Thanks!

tulip sleet
#

there really is not a lot of Python instruction in the book, though

stoic rain
#

I found that it was a good reference backward on some specifics of MicroPython on RP2040. I write in both MicroPython and CircuitPython, but there was hardware stuff I wanted to understand about that processor in both.

tulip sleet
#

(looking at it now0

stoic rain
#

It doesn’t get into anything too deep, for sure. If you wanted to cover data structures like lists via tuples vs dictionaries vs sets, for example, you’d definitely need more

stoic rain
#

Plus awesomeness like comprehensions

idle owl
#

Excellent, thanks for the suggestion.

stoic rain
#

One tricky thing about teaching the basics of programming is deciding where the boundary of β€œbasic” sits.

idle owl
#

Yeah.... agreed. But I feel like I'm still in a good place to come up with an idea of where it sits still.

stoic rain
#

Plus, there’s general basics versus language or environment specific context.

#

I’m all for it, though.

idle owl
#

Not sure it'll happen, but I'm into it.

stoic rain
#

It’s some where between β€œa variable is a sort of box for data” and β€œyou need to read Knuth on algorithms before you even start to write any code”

#

πŸ˜‰

stoic rain
#

Maybe the place to start would be an outline/speculative ToC, just to see if there’s a general set of things to include. From there, figure out what can be fleshed out.

idle owl
#

It's more about whether or not I would be given time to do it. I already have a good idea what I would put in it. πŸ™‚

stoic rain
#

Gotcha!

#

If you do get the go ahead, and need help, I’d be up for giving you a hand. In all my copious free time. πŸ˜†

manic glacierBOT
idle owl
#

Thanks!

#

Appreciate that

#

Feedback as I go is often super useful, since guides are, on the whole, a pretty one-way affair.

manic glacierBOT
slender iron
tulip sleet
manic glacierBOT
#

see e.g., this build: https://readthedocs.org/projects/circuitpython/builds/15185882/

Running Sphinx v3.5.4
Traceback (most recent call last):
  File "tools/extract_pyi.py", line 201, in convert_folder
    tree = ast.parse(fragment)
  File "/home/docs/.pyenv/versions/3.7.9/lib/python3.7/ast.py", line 35, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "", line 27
    def continuous_capture_start(self, buffer1: WriteableBuffer, buffer2: WriteableBuffer,...
idle owl
#

@tulip sleet By the way, my git magic prompt uses __git_ps1 behind the scenes, which is part of Git, apparently. I talked Wolf (who set up this git magic for me in the first place) and he suggested maybe my Git wasn't up to date. It wasn't, but it wasn't far enough behind that it should matter. Regardless, I updated it, and it's a bit faster than it was. Still chokes on the entire bundle initialised, but the CP repo is significantly faster than it was before updating.

#

So there's that.

#

Either way, it's a little faster, and I get to keep my git magic, so I'm pleased.

tulip sleet
idle owl
tulip sleet
#

it's very reassuring

idle owl
#

I was taught well.

tulip sleet
#

because the state you think it's in is probably not the state it is actually in

idle owl
#

I keep opening a new tab and then getting distracted. At least I haven't managed to forget why I opened the tab yet.

manic glacierBOT
#

This blends two "565"-format bitmaps, including byteswapped ones. All the bitmaps have to have the same memory format.

The routine takes about 63ms on a Kaluga when operating on 320x240 bitmaps. Of course, displaying the bitmap also takes time.

There's untested code for the L8 (8-bit greyscale) case. This can be enabled once gifio is merged.

The demo below is real-time. It's using directio (display_bus.send(44, bitmap)) to send bitmap data to avoid displayio overhead.

https://u...

manic glacierBOT
idle owl
#

By the way, folks, I'm taking suggestions for Blinka art, probably until Tuesday, when I will be sending the list to our artist. Simply because it's suggested does not mean it will get made. But I'm happy to consider any suggestions that anyone has! Basically, we're going to be drawing up Blinka doing new things. We currently have art of her on a computer, sleeping, flying fast, wrapped around various things, etc. (That list is not even close to exhaustive.) We're ready to show her engaging in new activities. So let me know if you have any suggestions!

ornate breach
#

Idk how she would wear a backpack though…

#

Maybe have a CPX and and Clue in the backpack

blissful pollen
#

Not sure if you already have Blinka with the other characters like the Ruby the LED

ornate breach
#

Or, blinka coming out of a backpack with a clue and CPX in it

idle owl
ornate breach
#

Oh good idea

idle owl
#

Either way, PT and our artist Bruce are really good at figuring out how a snake can do things a snake shouldn't be doing.

ornate breach
#

I just think about how much Circuitpython has impacted education so it feels very fitting

idle owl
#

I like it

idle owl
blissful pollen
#

Just thinking if you ever did lessons along the line of LEDs but with CP it could work. Thinking while my food is being delivered πŸ™‚

idle owl
#

(I think that's the right character....)

blissful pollen
#

I have the stuffed LED from my first adabox sitting up in my living room so always see it

idle owl
#

That's lovely πŸ™‚

#

Added Blinka plus Ruby, Gus and Billie to the list πŸ™‚

#

(I had to look them up)

#

@blissful pollen @ornate breach Thanks for the suggestions!

ornate breach
#

You’re welcome! πŸ™‚

blissful pollen
#

glad to help!

idle owl
#

@lone axle Quick question if you're around.

#

No worries if not - I'll ping you tomorrow.

manic glacierBOT
#

I pushed a new version, you declare the list of I2C pins and their number like this:

#define DEFAULT_I2C_BUS (2)
// SCL, SDA, SCL1, SDA1
#define DEFAULT_I2C_PINS { &pin_GPIO25, &pin_GPIO24, &pin_GPIO23, &pin_GPIO22 }

And declare a new I2C object with a name and then number like this:

ADD_SINGLETON_I2C_OBJ(board_stemma_i2c_obj, 1)
...
    { MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_stemma_i2c_obj) },

It is compatible with the old style, thus not requirin...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.0.0-615-g38c381633 on 2021-11-03; Adafruit ItsyBitsy M4 Express with samd51g19

Code/REPL

import time

for t in range(10,0,-1):
    print("Starting in " + str(t) + " seconds")
    time.sleep(1.0)

from microcontroller import watchdog as w
from watchdog import WatchDogMode

w.timeout = 5.0
w.mode = WatchDogMode.RESET

tenths_count = 400  # tenths of seconds

w.feed()
for i in range(tenths_count):
...
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

I get a crash with just import wifi in code.py, after code execution stops entering and exiting the repl results in a crash. No idea how to debug this as it doesn't happen in a debug build.

I added a lot of ESP_LOGI() statements once to track down exactly what was going wrong when I was debugging the I2C/wifi hangs. Can you do that without invoking the rest of the debug build?

lone axle