#circuitpython-dev

1 messages ยท Page 401 of 1

manic glacierBOT
#

.. which is what the addition of cmd25 made happen. We still signal an error when failing to reach the idle state at any other time, which is different than adafruit_sdcard but I think that it is correct.

This fixes #5600 according to Dan's testing on a GCM4 on the internal SD card slot. There are still some ambiguous results on the MM4 with external SD card slot on 6" jumper wires.

sharp jacinth
#

2 mic inputs and one AUX input

tulip sleet
#

which circuitpython boards do you have?

#

do have any SAMD21 or SAMD51? They have DAC's, and you can test them into the amp.

sharp jacinth
#

I may at home, I'd need a headphone jack right?

tulip sleet
#

@onyx hinge I am wondering if the CS timing is marginal, etc.

tulip sleet
onyx hinge
#

@tulip sleet yeah there's no particular delay from CS going low to the start of the SPI traffic

#

in the python code I transcribed that wouldn't matter

tulip sleet
#

you mean any delay is really short? Maybe adding a little delay of pulling CS low would make a diff?

#

i will test that later (or look at the waveforms)

sharp jacinth
tulip sleet
#

right

#

so do you have such a cable with plugs on both ends?

sharp jacinth
#

I did haha until I cut it, I can get another.

onyx hinge
#

@tulip sleet your other error is "couldn't determine SD card version"?

tulip sleet
#

well, you could strip the wires on the cut end, but if it's not urgent I would say get another. You need mini alligator clip leads too, or you need a jack

tulip sleet
#

i haven't gotten "no SD card" on the breakout at all

#

and weirdly, as i mentioned, one that failed on the GC4, works on the MM4 with breakout, but another that works on the GC4 gets the version error on the MM4

#

no wait, I think that's wrong

#

I have little boxes with SD cards in them and notes. They all look alike ๐Ÿ™‚

onyx hinge
#

I think it's less likely that it's a CS timing issue, I think that CS is asserted (false level) all the way from the start of detect to where CMD 8 is ussued

#

weirdly this document never talks about the time from CS to data, except that you have to clock out N_CS "H" bits. N_CS is min 0, max โ€”, in units of 8 clock cycles (even though 4 cycles are shown above)

manic glacierBOT
onyx hinge
#

that's what "wait for idle" does, it it clocks out 0xffs until it gets an 0xff back in

#

these cards are black magic to me ๐Ÿ˜•

tulip sleet
#

I didn't know you had to toggle CS like that. I might try the breakout with shorter wires

#

or maybe an adalogger featherwing

onyx hinge
#

you can put 30 SD cards on one bus? ๐Ÿคฃ

onyx hinge
#

another weird CI fail on my PR .. https://github.com/adafruit/circuitpython/pull/5688 "fatal: No tags can describe '8d2a4168454ae5c7786a478fd8876c8bbfe0ec37'." it's targeted to 7.1.x, maybe that matters? @slender iron did you arrive at an understanding of this?

GitHub

.. which is what the addition of cmd25 made happen. We still signal an error when failing to reach the idle state at any other time, which is different than adafruit_sdcard but I think that it is c...

#

or is that what your just merged PR is about?

slender iron
#

ya, I fixed espressif in a follow up

onyx hinge
#

thank you!

slender iron
#

I could have sworn I had grepped for each spot

onyx hinge
#

is the best thing to do create an empty commit?

slender iron
#

I think you should be able to rerun

#

I think rerun uses a newer merge commit

onyx hinge
#

interesting, I didn't know and didn't want to guess

slender iron
#

you can check to see if that command has a new sha / is correct in a rerun

onyx hinge
slender iron
#

ya, I think so

#

I'm pro-lots of boards

onyx hinge
#

OK. does it matter for your purposes that espressif didn't want to allocate different PIDs for the two versions of the esp32-c3 board (psram / no psram)?

#

we can just allow that duplicate PID right?

slender iron
#

ya, we can allow it

onyx hinge
#

okay, great

manic glacierBOT
manic glacierBOT
manic glacierBOT
crimson ferry
#

lol, that's concurrent execution for you

onyx hinge
#

oof sorry if I'm stepping on your toes!

crimson ferry
#

we needed a semaphore

#

yours has both, I'll close mine

onyx hinge
#

Not exactly circuitpython-dev material, until it is. In a personal python project, I had pre-commit suddenly start failing even though nothing had changed. turns out what changed was the github default Python3 version (installed by actions/setup-python), as far as I can tell. Whatever exactly happened, the consequence was a new pylint diagnostic, wwvb/updateiers.py:90:19: E0602: Undefined variable 'wwvb_start' (undefined-variable) -- now I specify a version of python to install within github actions for pre-commit, but of course developers might have different python versions themselves ... ๐Ÿ˜•

#

(not that anyone develops this project with me, mind you)

manic glacierBOT
manic glacierBOT
teal thorn
#

I'm looking to add some new NXP ports and looking for some advice. Can we rename the mimxrt10xx directory to NXP since these share a common SDK, or is it better to add a parallel nxp directory? I may start in a new nxp directory using the official SDK git repo, but I will need to copy most of the files from the mimxrt10xx port to start. Does anyone have any suggestions before I start?

sharp jacinth
#

@tulip sleet I should clarify, I'm blaming the stuttering in audio I experience with the pi on the OS/Pygame. I'm not using baremetal cp as I deployed this product before that was available. I think the audio is just cutting out now and again because the OS is busy. I look forward to trying baremetal cp on the pi soon though

#

Just wanted to make sure I didn't miscommunicate

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

If these are the components of an RGB LED, and not independent "red LED", "green LED" and "blue LED", I believe it is customary to call the components LED_R, LED_G, LED_B (or possibly LED_RED, LED_GREEN, LED_BLUE). There doesn't seem to be strong conventions though. This is how it's done on the Pimoroni Tinny 2040 for example:

https://github.com/adafruit/circuitpython/blob/8eee16c7aad035388fcf895e3aebb098c2c53661/ports/raspberrypi/boards/pimoroni_tiny2040/pins.c#L15-L17

viscid pine
#

this one calls it LED/BLUE_LED

jaunty juniper
#

it's an LED that is blue

#

the xiao M0 doesn't have an RGB LED

#

but I mean, there isn't a strong rule, it's just RED_LED looks to me like it designates a red LED, while LED_R designates the R of the RGB LED

viscid pine
#

it could be argued that it's best to keep it more compatible with the xiao m0, since it's already using the xiao pin naming (D0, D1 ...)

manic glacierBOT
#

Quick update on this...

I was able to retain the bootloader if I bypassed the SD flash step and did it manually as such:

nrfjprog --family NRF52 --eraseall
nrfjprog --family NRF52 --program "bootloader" --chiperase --reset
nrfjprog --family NRF52 --program "softdevice" --sectorerase --reset

Followed by

make V=1 BOARD=bluemicro833 flash

this called

nrfjprog --program build-bluemicro833/firmware.hex --sectorerase -f nrf52
nrfjprog --erasepage 0x7F000 ...
viscid pine
#

now i'm wondering why the m0 doesn't have pin defs for the tx and rx leds

#

i can't decide @jaunty juniper

jaunty juniper
#

so, I don't have the board, what you are saying according to your PR is that there isn't a neopixel on the board, but an RGB LED with 3 PWM component ?

viscid pine
#

there is a neopixel and an RGB led, both

jaunty juniper
#

ahhh ok

viscid pine
#

the old code was referring to stuff in seeed's schematic, which isn't right

#

I guess they were originally going to make it with the same LEDs as the xiao m0, then decided to do RGB instead

jaunty juniper
#

yeah the way you named the pins makes sense to me now

viscid pine
#

i should contact them about that schematic

jaunty juniper
#

hey, when cloning Circuitpython main, initing the submodules with: git submodule sync --quiet --recursive && git submodule update --init pulls a whole whooping 23 GB for ports/broadcom/firmware would there be a trick to avoid that ?

jaunty juniper
manic glacierBOT
#

Re @Neradoc's comment: there is no strong consistency in the LED naming. For separate LED's, we would veer toward GREEN_LED``. For a single RGB LED, we would veer toward LED_GREENorLED_G`, because there is a green "channel", and illuminating that channel does not necessarily make visible green if other colors are also illuminated.

Spelling out the full color name, 'GREEN'rather thanG` is slightly preferred.

    { MP_ROM_QSTR(MP_QSTR_LED_GREEN), MP_ROM_PTR(&pin_G...
#

Some more updates...
After a massive sense of dรฉjร  vu, I dug back to the work I did years ago on the nRF52832 and found that if I perform the following steps:

nrfjprog --family NRF52 --eraseall
nrfjprog --family NRF52 --program "bootloader.hex" --chiperase --reset
nrfjprog --family NRF52 --program "softdevice.hex" --sectorerase --reset
nrfjprog --family NRF52 --program "app_valid_setting_apply_nRF52832.hex" --sectorerase --reset

I was able to drag/drop the CP UF2 file and ...

solar whale
#

@idle owl FYI -- THe PyLeap App has been updated, and I tried some of the new demos but I can't get them to load - I tried the Light Meter and Sound Meter. They start to load then hang - the CPB starts to blink red every 5 or so secs. I looked a the files with File Glider and I can see that the new code.py has been loaded, but not the rest of the files. the older demos like Blink and Glide Rainbow still load and run OK. I opened an issue on the PLeap-IOS repo, but I thought you's be interested. Have you tried it recently. I am using the latest build of CPB.

tulip sleet
#

@onyx hinge Have you noticed that the linked issues stuff does not seem to be linking or closing issues? I have seen this in a number of recent PR's. Maybe it is because the PR's are not on main.

onyx hinge
#

that might be why

onyx hinge
#

"Successfully merging this pull request may close these issues." that's confidence-inspiring ๐Ÿ™‚

solar whale
#

Will it also get in to main?

onyx hinge
#

Note: The special keywords in a pull request description are interpreted when the pull request targets the repository's default branch. However, if the PR's base is any other branch, then these keywords are ignored, no links are created and merging the PR has no effect on the issues. If you want to link a pull request to an issue using a keyword, the PR must be on the default branch.
https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue

tulip sleet
#

aha, thanks. I guess the idea is that the issue isn't necessarily fixed until the fix is in the main branch. I can understand being annoyed if it were just fixed in a dev branch or even a PR to a fix branch

onyx hinge
#

that doesn't quite describe what happened, because the link was created, but merging the PR didn't affect the state of the issue

tulip sleet
#

I have seen the link not created also.

onyx hinge
#

ahh in this case I created the PR to main and then changed what they call its "base"

#

using the webui

tulip sleet
solar whale
#

Yeas -- I saw that -- too bad this one missed the cut....

tulip sleet
#

is it easy for you to test the SD/ESP32SPI issue on 7.1.x? (Do you have time?) Or I can make another merge PR.

solar whale
#

I can test it on 7.1x, but my previous testing was with 7.2 so I wanted to keep it the same.

#

I should be able to pull it in myself to try it.

tulip sleet
#

@onyx hinge so you can repoint an existing PR to merge against a different branch? I would want to do that for https://github.com/adafruit/circuitpython/pull/5693, for example. I don't see that I can do it, but I may be missing where. Or maybe the submitter needs to do it.

solar whale
#

hmm -- the pr has different version of several submoduled from 7.2 -- not sure if I should fetch tem or not ```remote: Enumerating objects: 10, done.
remote: Counting objects: 100% (10/10), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 10 (delta 6), reused 10 (delta 6), pack-reused 0
Unpacking objects: 100% (10/10), 2.73 KiB | 465.00 KiB/s, done.
From https://github.com/adafruit/circuitpython

  • [new ref] refs/pull/5688/head -> pr_5688
    jerryneedell@jerryneedell-ubuntu-macmini:~/projects/circuitpython$ git checkout pr_5688
    M data/nvm.toml
    M ports/broadcom/firmware
    M ports/broadcom/peripherals
    M ports/espressif/esp-idf
    Switched to branch 'pr_5688'
onyx hinge
#

@tulip sleet there's a thing you can click, but it's only part of the story, because the ref where the PR starts needs to be appropriate... anyway, on an open PR, click the "edit" button that is used for editing the PR title and then the base becomes editable

#

so to do it on my end I also rebased & force-pushed my changes, which would be up to the PR originator..

tulip sleet
#

aha, great, I will try that. That PR is very simple. I can flip it back if it looks bad.

#

oh, ugh, it was bad, I see; I changed it back

#

ok, never mind.

onyx hinge
#

yeah...

manic glacierBOT
tulip sleet
#

ty ^^

onyx hinge
#

I guess it would automatically pick up any other 7.1.x additions until it is merged, just like any other PR...

main furnace
#

I'd like to try the sdcard fix on the feather m4 express. Do I need the 7.2 build or 7.1? My sd card is on the TFTFeatherWing 3.5.

solar whale
#

Is this expected -- I was going to try pr 5694 --- why the new submodules ```jerryneedell@jerryneedell-ubuntu-macmini:~/projects/circuitpython$ git fetch origin pull/5694/head:pr_5694
remote: Enumerating objects: 11, done.
remote: Counting objects: 100% (11/11), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 11 (delta 6), reused 10 (delta 6), pack-reused 0
Unpacking objects: 100% (11/11), 3.35 KiB | 3.35 MiB/s, done.
From https://github.com/adafruit/circuitpython

  • [new ref] refs/pull/5694/head -> pr_5694
    jerryneedell@jerryneedell-ubuntu-macmini:~/projects/circuitpython$ git checkout pr_5694
    M data/nvm.toml
    M ports/broadcom/firmware
    M ports/broadcom/peripherals
    M ports/espressif/esp-idf
    Switched to branch 'pr_5694'
tulip sleet
#

the submodules are not in sync between 7.1.x and main right now. You can just git submodule update --init

#

It will not fetch the whole broadcom/firmware thing

#

maybe git submodule sync also

solar whale
#

git submodule update --init

#

oops wrong screen

#

willt that use the correct submodules for 7.2 and not 7.1.x?

tulip sleet
#

it will use the right submodules for whatever the git tree says?

solar whale
#

I am trying 5694 on 7.2

tulip sleet
#

i think it will be ok if you are not going to be testing on espressif or broadcom it doesn't really matter

solar whale
#

true -- it still ends up with ```erryneedell@jerryneedell-ubuntu-macmini:~/projects/circuitpython$ git diff
diff --git a/ports/espressif/esp-idf b/ports/espressif/esp-idf
--- a/ports/espressif/esp-idf
+++ b/ports/espressif/esp-idf
@@ -1 +1 @@
-Subproject commit e493a4c30e1b2f7c54a376327388b9e12262cbbf
+Subproject commit e493a4c30e1b2f7c54a376327388b9e12262cbbf-dirty

tulip sleet
#

you can update so you don't see that and then go back again

solar whale
#

pr 5694 is working fine with sdcardio on my pigamer with the ariflift feather wing and a variety of different SDCards

tulip sleet
#

was it not working before with the same combos?

#

I can't remember whether you could reproduce that or not

solar whale
#

At mylat test, it was also working -- I did not know why it started working.. I never had any issue with the esp32spi -- only the SDCards

#

I am "hot swaping" the SDCards and doing a soft reboot -- still working

manic glacierBOT
tulip sleet
#

@onyx hinge did you cancel the previous merge build just to save time? Fine with me.

solar whale
#

previously I had SDCard issues with 7.1x -- not 7.2

onyx hinge
#

@tulip sleet no...?

tulip sleet
#

"request to deprovision" I have never seen that before. Maybe a CI glitch

analog bridge
tulip sleet
#

well, it will save time, since it's superseded anyway

solar whale
#

If I check out 7.1.x -- it does not show the latest merge -- I don't think.

tulip sleet
solar whale
#
M    data/nvm.toml
M    ports/broadcom/firmware
M    ports/broadcom/peripherals
M    ports/espressif/esp-idf
Note: switching to 'origin/7.1.x'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at cd47941c7 Merge pull request #5687 from tannewt/more_shas
tulip sleet
#

is origin you or adafruit?

solar whale
#

adafruit -- I am not on my fork

tulip sleet
#

i am not sure why you would see that, it's a branch, not a tag

#

if you just git checkout 7.1.x does it make any difference?

#

or you need to pull

solar whale
#

maybe ```origin https://github.com/adafruit/circuitpython.git (push)
jerryneedell@jerryneedell-ubuntu-macmini:~/projects/circuitpython$ git checkout 7.1.x
M data/nvm.toml
M ports/broadcom/firmware
M ports/broadcom/peripherals
M ports/espressif/esp-idf
Branch '7.1.x' set up to track remote branch '7.1.x' from 'origin'.
Switched to a new branch '7.1.x'

#

ah -- then a git pull brings it in

#
remote: Enumerating objects: 24, done.
remote: Counting objects: 100% (24/24), done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 24 (delta 13), reused 18 (delta 13), pack-reused 0
Unpacking objects: 100% (24/24), 10.50 KiB | 1.17 MiB/s, done.
From https://github.com/adafruit/circuitpython
   cd47941c7..8bd35d954  7.1.x      -> origin/7.1.x
   8eee16c7a..3bdf2a5cd  main       -> origin/main
Updating cd47941c7..8bd35d954
Fast-forward
 shared-module/sdcardio/SDCard.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
#

ok -- now I'll build and try it on the pygamer

manic glacierBOT
#

A few times we've had folks come into the discord and ask about changing the size of shapes created with the display_shapes library. Those currently have immutable sizes and it would somewhat difficult to allow them to get resized bigger because they would need to allocate a new Bitmap object (unless Bitmap also got mutable height and width).

We've been directing folks to try out vectorio when they need to change the size of their shapes. vectorio.Circle has a radius property that ca...

solar whale
#

unfortunately, the released 7.1.0.-beta.1 is also now working for me....

tulip sleet
#

ok, we need to ask the other people with this issue if the latest ones work for them now

solar whale
#

FWIW -- 7.1.x works as well with the PR

analog bridge
tulip sleet
#

thanks for looking

main furnace
#

Tried Adafruit CircuitPython 7.2.0-alpha.0-85-g3bdf2a5cd on 2021-12-09; Adafruit Feather M4 Express with samd51j19.
Result: No SD card found.
-- It does work with the 7.0.0 release.

tulip sleet
lone sandalBOT
main furnace
#

Okay it is working on Adafruit CircuitPython 7.1.0-beta.1-61-gcc4e7f868 on 2021-12-09. Now I can save more screenshots!

manic glacierBOT
orchid basinBOT
slender iron
solar whale
#

WEll, I guess that's good....

idle owl
#

I'll ping Trevor. The "Downloaded files" looks suspect, but I don't know how it lists things. It has all the files listed separately from the directory, and maybe that's by design, or maybe the Bundle isn't right.

solar whale
#

Thanks!

#

I created the issue and left feedback on the guide Trevor just posted.

idle owl
#

So something is up with latest. beta1 included

manic glacierBOT
solar whale
idle owl
#

Heh yeah. I told Trev to ping Scott because I'm of no use here. I replied to the issue and said I replicated it on the beta but not on stable.

solar whale
#

Thanks

idle owl
#

You're welcome! Thanks for reporting it.

slender iron
#

I just pinged trev about it on iosdev too

idle owl
slender iron
#

I read the channels in the wrong order ๐Ÿ™‚

idle owl
#

There's a GItHub issue for it as well.

slender iron
#

ya, I saw that but no one had responded when I looked

idle owl
#

Fair enough. Updated now!

#

I asked Trev to reply to it as well, but I know he's not as comfortable with GitHub.

slender iron
#

thanks for helping him with it

solar whale
#

I just confirmed the same behavior with the latest tip of main 7.2...

slender iron
#

I asked trev to make a cp issue and I'll look to fix it for 7.1

solar whale
#

7.0.0 fails for me as well -- with Sound Meter anyway

idle owl
manic glacierBOT
idle owl
solar whale
#

so does Light Meter, hmmmm

orchid basinBOT
slender iron
#

is the drive already full?

solar whale
#

Il'' try eraseing

slender iron
#

maybe its not handling the case of running out of space

idle owl
#

Does it not overwrite existing files?

#

if they are the same

solar whale
#

nevermind -- I hade it l=plugged into my computer...USB

slender iron
#

it does but it won't remove unused files

idle owl
slender iron
#

does it not have an error when on usb?

solar whale
#

it just hangs

idle owl
#

^^

slender iron
#

I thought we had added that

#

maybe just in file glider

#

CP definitely returns an error code to the client

#

specific to usb being connected

solar whale
#

still not working for me ๐Ÿ˜ฆ

slender iron
#

hrm. ok

#

so it isn't that the disk is full

idle owl
solar whale
#

no - I did storage.erase_filesystem()

slender iron
#

no worries @idle owl

solar whale
#

I can only use glide to rainbow and blink

#

on 7.0 or 7.2

slender iron
#

I think I had to send the glasses one twice when I did it

solar whale
#

glasses transfers OK but does not work on the CPB

slender iron
#

huh, that's weird

#

it shouldn't vary per board

solar whale
#

it does the 2 red blinks like it did when the other trasnfers failed

slender iron
#

2 red blinks is a error probably due to a partial transfer

#

you can do storage.disable_usb_drive() in boot.py to get usb serial output plus BLE

solar whale
#

Ok -- will try that in a bit.

slender iron
#

thank you

manic glacierBOT
solar whale
#

after disabling the USB drive -- I loaded blink. it worked ok -- tried loading sound meter and I get ```Adafruit CircuitPython 7.0.0 on 2021-09-20; Adafruit Circuit Playground Bluefruit with nRF52840

soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Traceback (most recent call last):
File "code.py", line 10, in <module>
ImportError: no module named 'adafruit_circuitplayground'

Code done running.

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

#

which agrees with a partial load

#

@idle owl must have a magic touch....

#

BTW -- I have IOS 15.1 on my iPhone

manic glacierBOT
#

Thanks for the clarification I missed the connection between pin number on
the board and other naming conventions.

On Thu, Dec 9, 2021 at 1:55 PM Dan Halbert @.***> wrote:

D0 is GPIO1, and is marked as RX on the board (and GPIO1 on the bottom).
D1 is GPIO0 and is marked as TX on the board. I'm not sure, were you
expecting GPIO0 to be marked as D0 http://url? The Dn http://url pins
are consistent across ItsyBitsy boards, but don't correspond to the GPIOn
pins. D4 happens ...

slender iron
#

@solar whale did the sound meter actually finish the "please wait" prompt?

solar whale
#

No -- just hangs partway through

slender iron
#

ok, I see that too on both 7.0 and main

solar whale
slender iron
#

yup, I see that too

solar whale
#

Glad I'm not the only one!

idle owl
slender iron
#

@idle owl did you already have some folders on your drive?

#

I'm not sure the ios app is making folders before trying to write to them

idle owl
#

I can erase, but I probably had folders yes.

#

Hangs on 7.x now.

idle owl
teal thorn
slender iron
#

makes sense to me. anything that needs a folder won't work

slender iron
#

probably not worth doing due to limited ram. we are trying to dissuade people away from samd21

lone axle
#

Is there a CircuitPython driver that works with: https://www.adafruit.com/product/5146 ? I don't see it mentioned on the product page so I am guessing not. But I did notice the default I2C address is 0x50 and found that is the address used by default in the Adafruit_CircuitPython_FRAM
library for I2C connected devices. I'm not really familiar with FRAM and EEPROM are those different enough that they would need different drivers? I see the arduino driver linked covers both but has different classes for them.

manic glacierBOT
#

The defined maximum length of the name is 248 bytes, but whether you can use that depends on the advertising capabilities of the peripheral. The actual length that fits depends on what else is in the advertising packet (e.g. various UUIDs), including in the extended advertisement. So I don't think we can validate the length when .name is set. We could possibly throw a better error instead of Invalid BLE parameter.

The nRF SD adds the default name to the advertisement by itself, so it's...

manic glacierBOT
#

displayio_tilegrid_fill_area() gets called, which calls common_hal_displayio_ondiskbitmap_get_pixel() for each pixel. A pixel read does a seek and a read of the OnDiskBitmap file. If the file sector is cached, it's fast, but otherwise it could take a long time.

Somewhere, the code should notice that it took a long time, and do usb_background() or the equivalent. There may be other high-priority background tasks to do as well.

I don't see an easy general solution to this. `commo...

#

Re 1.: There were some proposed changes in one of the commits in #4488: https://github.com/adafruit/circuitpython/pull/4488/commits/29bf9e71a0a9e75c2f771077c9b36af3af041297. That code was never added.

Re 2.: If internal pullups are enabled, we don't need to check for pullups. See the code in 1.

Re 3.: The bitbangio stuff is separate, it's about a flaw in the RP2040 I2C peripheral, and isn't relevant to nRF. By the way, bitbangio is in shared-module, because it's not port-dependent.

#

Thanks for getting back @dhalbert. Still a little confused, and thinking I'm not being clear. Apologies - I'll try to do better:

It's my understanding that the board I'm using requires us to set pulls up or down in code - they aren't set up by default. This is the feature I'm requesting.

I'm getting this from Nordic's forums, and their manuals. There are a ton of questions, but a really high-level one can be found [here](https://devzone.nordicsemi.com/f/nordic-q-a/77409/how-to-pull-d...

teal thorn
slender iron
#

@teal thorn I don't think it's super clear either way. Sharing the same port directory should be fine

#

within a port we use ifdefs to switch chip family

teal thorn
#

I'll probably create a new nxp directory for this work. Then we can migrate the mimxrt parts to the updated SDK later.

slender iron
#

sure, that works too

manic glacierBOT
viscid pine
#

nothing like a morning fight with git

stuck elbow
#

who won?

viscid pine
#

it's ongoing

stuck elbow
#

it's like sparring with a pig in mud: halfway through you realize the pig enjoys it

idle owl
#

@tulip sleet TimeoutError: Clock stretch too long on RP2040 with NeoSlider. You had to make a build for JP, right? Is it in latest on S3, or still in the magical world of Dan only?

#

Or is this something different

tulip sleet
tulip sleet
#

that is the error you would get

viscid pine
#

@tulip sleet you requested that I PR against 7.1.x, but the xiao rp2040 isn't in the branch yet. How should I proceed?

idle owl
tulip sleet
manic glacierBOT
manic glacierBOT
#

That's fine. I understand, and the example I pointed to you was for "all time" setting. So what would make sense is to add an optional pullup argument to busio.I2C() and bitbangio.I2C(), that defaults to False. It would get passed to all the common_hal I2C creation routines.

Is there any case where you want a pull-down? For I2C, no, but are there other peripherals for which you want a pull-down?

manic glacierBOT
#

I agree with your thoughts here (and would defer to your better knowledge and experience anyway).

I'm trying to imagine a place where someone might want to change a pullup to a pulldown, but I'm not experienced enough here. I defer to the better experience and knowledge of the community - would love to hear their thoughts on this.

I'm going to clone a fresh copy of CPY (mine is quite dirty as I've played with the code over the past month). I'll play around with it and see if I can come ...

manic glacierBOT
tulip sleet
#

@slender iron @idle owl I think I will make a 7.1.0-beta.2 tomorrow, since we have several fixes that people are expecting (NeoSlider, SD card fix, bleio HCI, board fixes, etc.). Draft release notes are done. I also started draft notes (not yet on GitHub) for the first 7.2.0-alpha (or maybe it will be beta) release, because it's easier to add PR's to those release notes now as I review the PR's in the last few weeks.

slender iron
#

Sounds good. Thank you!

manic glacierBOT
manic glacierBOT
#

Ok. I've reviewed what I think is the relevant code.

If I'm understanding the process correctly, i2c implementations rely on definitions for the DEFAULT_I2C_BUS_ values for the Data and Clock channels to be declared in the boards mpconfigboard.h file.

That doesn't happen in the pca10100 mpconfig, which makes sense when there are no predefined i2c channels on the board.

As @dhalbert mentioned, an ideal next step is to pass an optional parameter for the i2c on pca10100 that allows...

manic glacierBOT
#

The following changes are done:

  • update to PyKey60 board to enable support of the entire family of PyKey keyboards (see here to see what they look like)
  • Update to build matrix to enable builds for the entire family of boards

I assumed the following from shared_bindings_matrix.py:

  • aliases_brand_names replaces MICROPY_HW_BOARD_NAME
  • aliases_by_board replaces board_id
  • nothing replaces USB_PRODUCT

Let me know is I have as...

manic glacierBOT
#

Dear Sir
BAUN ROBOTICS Limited of Nigeria is configuring a school security solution
for offline remote locations in Nigeria.
Target schools are located in areas without* INTERNET,* Electricity and
patchy mobile cellular networks
Schools will be equipped with WIFI enabled switches to raise alarm, if
attacked, under siege or challenged, for help.
Solarpowered Raspberry Pi 3 server based will manage the alert trigger
Alert via offline WIFI will be sent to preconfigured first responders
within 3...

solar whale
tulip sleet
#

thanks for the reminder. It should just be part of the release process.

manic glacierBOT
#

I was thinking of something simpler:

i2c = busio.I2C(board.SCL, board.SDA, pullup=True)

So the Python interface in shared_bindings/busio/I2C.c would add an optional keyword argument. Pass that on to common_hal_busio_i2c_construct(), which would take care of setting the pullups when it set up the pins, using the specific mechanisms provided by the HAL for the chip.

The busio_i2c_obj_t struct contains two digitalio_digitalinout_obj structs
You are suggesting adding that,...

#

At what point does the shared_bindings_matrix.py get used? I didn't see any of the other boards artifacts get built both for my fork push build action and the main repo PR build action.

It is invoked in tools/build_board_info.py, which is invoked by a CI build in .github/workflows/create_website_pr.yml, and in conf.py, which is invoked (indirectly) by a CI build in build-doc in .github/workflows/build.yml.

timber mango
#

hi, I tried to build circuitpython on ubuntu to add board Elecfreaks pico:ed (microbit edge) but of course, I am not maker of this board and was stopped by usb pid thing ... all the work is documented here, but may be come clarification note for such efforts in the begining of "adding board doc" will be better? how its OK to try such things? it seems that manufacturer of this board is not responing and I am not sure of usb vid/pid for this - as I initially flashed generic rpi pico firmware there, it reported theirs usb vid/pid on COM port in windows - may be that with stock micropython fw it will report something other? I doubt, I remember it also had rpi pico micropython / uf2 bootloader probably... my work is here: https://github.com/elecfreaks/pico_ed/issues/1

GitHub

Hi, I want to try to add pico:ed board to circuitpython rp2040 boards to have mapped pins compatible with micro:bit, together with default I2C, UART, SPI mapping. Till now, I found that there is un...

#

when I left entire usb config as-is for generic rpi pico, cp was built without any duplicity report, so here I dont understand properly this

timber mango
# tulip sleet is your issue mostly deciding pin mapping?

umm, dealing with usb PID mostly - I already did P0-P16, P19/SCL P20/SDA (comparing pinouts of microbit, CLUE ... here is not well placed compatible hw SPI only) ... its working but with raspberry pi pico usb settings .... everything is in attached zip, together with IS31FL3731 new pico_ed module

tulip sleet
timber mango
tulip sleet
#

I cannot find the pico:ed product

timber mango
# tulip sleet I looked at their site: they sell add-on's, but the base board is a micro:bit, r...

no no, its this rp2040 based board https://www.elecfreaks.com/picoed.html

timber mango
tulip sleet
#

how are you trying to communicate with them?

#

could try twitter, etc.

#

but if they are uninterested, it is their loss

timber mango
manic glacierBOT
#
[adafruit/circuitpython] New tag created: 7\.1\.0\-beta\.2
#

Ah, I see.

Along with solving the issue, I'm also trying to think about how people will use the interface - which I understand you're concerned about too, from your response.

I don't know about all cases, but that wouldn't help in my case since there are no pre-defined SCL and SDA channels (which partly inspired this feature request).

This could be gotten around by allowing board.SCL and board.SDA arguments to be substituted with microcontroller.pin.<pin> but that takes us ba...

manic glacierBOT
#

board.SCL and board.SDA are just pin names, based on the silkscreen markings on the board. They could be D0 and D1, GPIO8 and GPIO9, etc. The pin objects in microcontroller.Pin are the same kinds of pin objects as in board.

Does implementing the solution at such a high level create a possible danger for people who aren't using mcus with internal pullups/pulldowns, and may try to use that call in ignorance (as I did)?

All microcontrollers I know have at least pull-ups. ...

slender iron
#

@timber mango I've given out PIDs under pid.codes for open source hardware on closed source hardware

orchid basinBOT
manic glacierBOT
#

board.SCL and board.SDA are just pin names, based on the silkscreen markings on the board. They could be D0 and D1, GPIO8 and GPIO9, etc. The pin objects in microcontroller.Pin are the same kinds of pin objects as in board.

Yes, I understand. That said, there is an issue with this for the 52833 (or at least my DK): D0 does not necessarily correspond to P0_00. (For example, on my board P0_20 is addressed by board.D11.) I haven't mapped out all of the correspondences ...

#

Here is a video showing the functionality of keys 12-15: https://www.youtube.com/watch?v=sJZyv5DZECY

To help narrow it down, I rewrote it so that I didn't import usb_midi or adafruit_midi. I kept the modifier key combos the same, but programmed it to just change the colour of the keys rather than play midi notes/chords:

import time
time.sleep(5)
from keybow2040 import Keybow2040
from keybow_hardware.pim56x import PIM56X as Hardware

keybow = Keybow2040(Hardware())
keys = keybow.k...

#

I haven't mapped out all of the correspondences yet, but can do that.

Yes, you have to do that by reading the schematic to make up the pins.c file. Look at the nRF52840 DK board for something similar.

This is confusing. I'm looking at the definition for busio_i2c_obj_t right now, and it appears in circuitpython/shared-module/busio/I2C.h

Ah, OK, that file is only for the case where there is no implementation of busio.I2C. In that case we fall back to bitbangio.I2C. The i...

manic glacierBOT
#

I haven't mapped out all of the correspondences yet, but can do that.

Yes, you have to do that by reading the schematic to make up the pins.c file. Look at the nRF52840 DK board for something similar.

Can do. Will get back to you on this.

This is confusing. I'm looking at the definition for busio_i2c_obj_t right now, and it appears in circuitpython/shared-module/busio/I2C.h

Ah, OK, that file is only for the case where there is no implementation of busio.I2C...

#

I haven't mapped out all of the correspondences yet, but can do that.

Yes, you have to do that by reading the schematic to make up the pins.c file. Look at the nRF52840 DK board for something similar.

Can do - will get back to you on this.

Ah, OK, that file is only for the case where there is no implementation of busio.I2C. In that case we fall back to bitbangio.I2C. The include guards are wrong, and should say SHARED_MODULE.

Look instead at say `ports/nrf/co...

tulip sleet
#

afk - back in a while and will do the 7.1.0-beta.2 blog and forum posts

slender iron
#

thanks dan!

tulip sleet
#

the circuitpython.org PR action failed yet again. adabot Python code not available, though it is cloned (but not installed via requirements??)

#

i did it by hand yet again. This time I wrote down how I did it

slender iron
#

I can take a peek

manic glacierBOT
#

Ah, I see it now. It seems like this struct only stores a uint8 with the pin number. Is it safe/wise to change that to a digitalio_digitalinout_obj_t, or is there a better/safer way to add the ability to set the pull up (maybe somewhere further up or down the hal)?

I'd just copy how digitalio does it. No need to have a full object. common-hal can do whatever it wants to the mcu hal.

#
[adafruit/circuitpython] New branch created: tannewt\-patch\-1
#
[adafruit/circuitpython] New branch created: tannewt\-patch\-2
lime trellis
#

so far sd card fix is working great on 7.2. Thx @tulip sleet !

manic glacierBOT
tulip sleet
manic glacierBOT
proven garnet
#

How are the hex numbers for ManufacturerDataFields determined in this library? I want to start getting into BLE libraries, and there's an issue to add sound to this library but I'm not sure where to start, if it's even possible at this point: https://github.com/adafruit/Adafruit_CircuitPython_BLE_BroadcastNet/blob/main/adafruit_ble_broadcastnet.py

GitHub

This is a simple BLE broadcast based sensor net. It is not secure at all. - Adafruit_CircuitPython_BLE_BroadcastNet/adafruit_ble_broadcastnet.py at main ยท adafruit/Adafruit_CircuitPython_BLE_Broa...

#

Asking specifically for the AdafruitSensorMeasurement class

orchid basinBOT
tulip sleet
proven garnet
#

Thanks for the explanation! Is there a place where info on what currently makes up this working standard is stored?

tulip sleet
orchid basinBOT
manic glacierBOT
#

kind wizards, I am probably doing something stupid but I seem to have the same response: Might I be missing an updated library??

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Traceback (most recent call last):
File "code.py", line 49, in <module>
File "/lib/adafruit_airlift/esp32.py", line 193, in start_bluetooth
_bleio.BluetoothError: Timeout waiting for HCI response

Code done running.

Press any key to enter the REPL. U...

manic glacierBOT
orchid basinBOT
solar whale
manic glacierBOT
#

From https://learn.adafruit.com/adafruit-metro-m4-express-airlift-wifi/circuitpython-ble

If you are using an AirLift Breakout, check that these

choices match the wiring to your microcontroller board,

or change them as appropriate.

esp32 = ESP32(
reset=board.D12,
gpio0=board.D10,
busy=board.D11,
chip_select=board.D13,
tx=board.TX,
rx=board.RX,

`import board

from adafruit_ble import BLERadio
from adafruit_ble.advertising.standard imp...

proven garnet
tulip sleet
#

they are approximately consecutive, I think

#

Or if you want yours not to interfere, pick something way out of range

proven garnet
tulip sleet
#

there may just not be any library code written for some of them. I'm not sure. Scott is the one who worked on this

proven garnet
#

Thank! Appreciate the explanation!

manic glacierBOT
manic glacierBOT
manic glacierBOT
idle owl
#

@lone axle I trust your judgement. If you think a PR should be closed, you can close it. Worst case, it can always be reopened with the click of a button.

#

You can still tag me if you like so it's on the record and more readily available in my email.

lone axle
blissful pollen
#

@idle owl Here is the branch for what I was thinking of for the native IS31FL3741 support helper libraries. No rush I know it is the weekend.

idle owl
#

The oldest PR we have was still being worked on every so often by the author, for example. Worth tagging them when you get to it. It's in a repo that starts with T, so end of the list somewhere.

manic glacierBOT
idle owl
manic glacierBOT
#

Ok.

I've written two test methods to see how they work. Posting here for some initial feedback.

Within ports/nrf/shared-bindings/board/__init__.c:

#if BOARD_I2C
#include "shared-bindings/busio/I2C.h"
#include "shared-bindings/digitalio/DigitalInOut.h"
#endif

(...) 


#if BOARD_I2C
(...)
mp_obj_t board_i2c_with_pins(digitalio_digitalinout_obj_t scl_pin, digitalio_digitalinout_obj_t sda_pin) {
    mp_obj_t singleton = common_hal_board_get_i2c();
    if (singleton != ...
manic glacierBOT
#

Don't add this to board. I am proposing to add an extra optional argument to shared-bindings/busio/I2C.c. That argument would then passed to the common-hal routines in busio/I2C.c in each port. You would not call common_hal_digitalio_digitalinout_set_pull(). Instead you would use the port-specific way of setting a pullup for each port. That is, it would be the code inside common_hal_digitalio_digitalinout_set_pull().

meager adder
#

I'm trying to build circuitpython for the raspberry pi pico from 7.0.0 in WSL. It's returning a TypeError.

> git checkout 7.0.0
HEAD is now at 42523a183 Merge pull request #5357 from dhalbert/revert-5341

> git status
HEAD detached at 7.0.0
nothing to commit, working tree clean

> cd ports/raspberrypi
> make V=1 BOARD=raspberry_pi_pico
GEN build-raspberry_pi_pico/genhdr/mpversion.h
CC ../../py/builtinhelp.c
CC ../../py/modsys.c
CC ../../main.c
CC supervisor/port.c
GEN flash_info.h.jinja
Traceback (most recent call last):
  File "gen_stage2.py", line 96, in <module>
    typer.run(main)
  File "/home/me/.local/lib/python3.8/site-packages/typer/main.py", line 864, in run
    app()
  File "/home/me/.local/lib/python3.8/site-packages/typer/main.py", line 214, in __call__
    return get_command(self)(*args, **kwargs)
  File "/home/me/.local/lib/python3.8/site-packages/typer/main.py", line 239, in get_command
    click_command = get_command_from_info(typer_instance.registered_commands[0])
  File "/home/me/.local/lib/python3.8/site-packages/typer/main.py", line 427, in get_command_from_info
    command = cls(
TypeError: __init__() got an unexpected keyword argument 'no_args_is_help'
make: *** [Makefile:265: build-raspberry_pi_pico/genhdr/flash_info.h] Error 1

Can I get some help troubleshooting this issue?

viscid pine
#

looks like the typer library might be out of date?

#

try pip install --user --upgrade typer

meager adder
lone sandalBOT
lone sandalBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.0.0 on 2021-09-20; FeatherS2 with ESP32S2
Adafruit CircuitPython 7.1.0-beta.2 on 2021-12-10; FeatherS2 with ESP32S2

Code/REPL

import traceback

class UserDefinedException(Exception):
    pass

try:
    raise UserDefinedException("test")
except Exception as e:
    traceback.print_exception(None, e, e.__traceback__)

Behavior

CircuitPython crashes and reboots on the traceback.print_exception ca...

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.1.0-beta.2 on 2021-12-10; Adafruit PyPortal with samd51j20
Board ID:pyportal

Code/REPL

All displayio example code that I have tried does not show anything on the screen.

label simpletest:


import board
import terminalio
from adafruit_display_text import label


text = "Hello world"
text_area = label.Label(terminalio.FONT, text=text)
text_area.x = 10
text_area.y = 10
board.DISPLAY.show(text_area...
manic glacierBOT
#

I have done some bisecting and determined that this is the most recent build which works correctly:

Adafruit CircuitPython 7.1.0-beta.1-14-gfea0103ff on 2021-12-01; Adafruit PyPortal with samd51j20
Board ID:pyportal

And this is the first build which starts failing as described above:

Adafruit CircuitPython 7.1.0-beta.1-17-g8cf269d2a on 2021-12-01; Adafruit PyPortal with samd51j20
Board ID:pyportal

At present time all builds above 8cf269d.uf2 in the PyPortal US ...

lone axle
#

It seems like there was something in commit 8cf269d2a which has caused some trouble. On a PyPortal I'm noticing that starting with that build displayio examples are no longer working properly and going to REPL and running commands is not printing the >>> and commands that are run onto the screen.

Dexter Starboard tested the same things and found that on PyBadge displayio does not have the same problem. But that starting with that same build the auto-reload functionality stops working, so saving a file change does not re-run code.py.

Possibly these are two different symptoms of the same root cause. There are some more details in the issue linked above this message.

#

Well the name of the build has 8cf269d2a in it. I'm not sure if that correlates exactly with the commit hash.

manic glacierBOT
#

This is the commit where the behavior changes I think:
https://github.com/adafruit/circuitpython/commit/8cf269d2a071a59314a6f07bf497b444af2264e5

Of the changes in there my guess was that the high level switch here was related:
https://github.com/adafruit/circuitpython/blob/b50443240f762b84616eed77d928fe26b056638a/ports/atmel-samd/mpconfigport.mk#L123

Setting that back to 0 and re-building does seem to make the display go back to behaving normally. The REPL does keep printing new thi...

tough flax
#

@slender iron - watching your deep dive... on line 56 of your neopixel code, do you have an extra "=" in that operator? My eyes are old, but it looks like you have a "<<==" instead of "<<=". Not sure if that's intentional (or why that builds). Just thought I'd share that it caught my eye.

manic glacierBOT
manic glacierBOT
#

I am able to build and load CP to a raspberry pi4b but very often when I disconnect the USB port (and power)
the next time I try to power it up, the SDCard is corrupted .
The Green LED blinks 4 times and the Pi doe snot boot.
If I refresh CP to the SD Card, it boot OKs.

With the current build, the CIRCUITPY drive does not mount so I can't "eject" it before unplugging.
Is this related? Is there something I should be doing before unplugging to prevent this?

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.2.0-alpha.0-107-g05e073415 on 2021-12-12; Adafruit PyPortal Titano with samd51j20

Code/REPL

import audioio
import board
import synthio
import digitalio

en = digitalio.DigitalInOut(board.SPEAKER_ENABLE)
en.switch_to_output(True)
dac = audioio.AudioOut(board.SPEAKER)
melody = synthio.MidiTrack(b"\0\x90H\0*\x80H\0\6\x90J\0*\x80J\0\6\x90L\0*\x80L\0\6\x90J\0" +
                           b"*\x80J\0\6\x90H\...
manic glacierBOT
lone axle
#

I wonder if it would be helpful to make some code that parses the pins.c file in each device in the circuitpython repo and generates a simulated screenshot of what running

import board
dir(board)

would look like on each device similar to how we generate screenshots of what the drive looks like with files loaded for learn guide projects and library examples.

#

I'm not sure where would be the best place that could make use of them, but might be interesting if some guide or docs page for the various different devices could have an image depicting it for the specific device the page is talking about.

manic glacierBOT
tulip sleet
lime trellis
#

Question: does each microcontroller.nvm write cause an erase cycle for the entire NVM block (minimum still one memory page?). That's how I'm interpreting the docs

tulip sleet
lone axle
#

I do think it has logic like that. I recall seeing it recently working on rp2040, don't know if it is the same on all devices though.

lime trellis
manic glacierBOT
#
  • Fixes #5705.

  • In SAMD, alarm_pin_pinalarm_reset() was clearing the TAMPER interrupt flag with a bitwise operation, instead of just writing a 1 to the right bit, with the rest zeros, using a full register write. The bitwise operation apparently caused the other RTC interrupts to be messed up in some way, and then caused problems with other timing-based operations (probably background task handling), and showed up as displayio problems.

  • Based on the error above, looked for and fi...

tulip sleet
# lime trellis I'm more worried about repeated rewrites to all 8192 bytes. I use all sorts of b...

On SAMx5, the minimum write-size is a quad-word. You can't write individual bytes. The minimum erase size is 8k. We don't try to optimize quad-word writes to avoid erases.

If you are writing config data between deep sleeps, you could use alarm.SleepMemory, which does not use flash.

SAMx5 has a "SmartEEPROM" facility which we don't use, which does remapping to avoid erases. The nvm implementation could be changed to use that facility.

SAMD21 does not have that, but has an "EEPROM emulation" facility, which has a cache, and writes to flash on power fail as soon as possible (I think - I only looked briefly). The writing is handled by software, not hardware. http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42125-SAM-EEPROM-Emulator-Service-EEPROM_ApplicationNote_AT03265.pdf

On nRF, in the bonding/pairing storage. I did try to avoid erases, and came up with a somewhat tricky data structure of valid and invalid data blocks, which are scanned in sequence to skip invalid entries

lime trellis
lime trellis
manic glacierBOT
manic glacierBOT
#

This PR fixes the size calculation of struct in NATIVE mode of uctypes. In NATIVE mode, uctypes try to add padding bytes automatically to align struct in 2/4 byte boarder if necessary. Different from ctypes of CPython, however, the memory layout of struct is defined explicitly by users in uctypes, so that the automatic padding is not necessary. The padding action is especially harmful when using an array of struct: the stride is determined by sizeof(struct), which depends on the order of d...

manic glacierBOT
tulip sleet
# lime trellis <@!329766224093249548> I'm now to the point where I'm seriously considering impl...

We are using both banks. You would lay out the SmartEEPROM usage in the 'ports/atmel-samd/common.template.md' file. Another alternative is to use my nRF technique of writing small chunks, and invalidating the old chunks. I have a flag and length field at the beginning of each chunk. When a chunk is invalidated, the flag is set to 0. There's a linear search of blocks to find the first valid one. See ports/nrf/common-hal/_bleio/bonding.h and .c. There is a mix of specific (related to bonding) and general in there. The mechanism could be generalized.

Disadvantage of using SmartEEPROM is that it's SAMx5x-specific. Advantage is that it takes care of stuff for you (I don't know how well).

#

i looked in the errata but fortunately didn't see any cautions about the SmartEEPROM

manic glacierBOT
#

I have "hardened" the Feather M4 Express, Air Lift, GPS, and SD breakout to a non-breadboard assembly to reduce transient SPI and RX/TX interferences (if any). Additionally, I have tested any BLE modules from the latest "package(s)" with the same HCI response issues. These issues include "no adapter found" in some of the tested modules. I have updated the Adafruit ESP32 Coprocessor with the latest known code as 1.7.4 as documentation prescribes.

All other WiFi tests succeed including co...

tulip sleet
#

@onyx hinge @slender iron I am going out for a walk but I think I will make a beta.3 this morning, since the #5705/#5708 regression was major and is now fixed.

onyx hinge
#

@tulip sleet sounds good to me! .. just stopping in for a second, back to hiking soon. ๐Ÿšถ ๐Ÿฅพ

tulip sleet
#

thanks for the time, enjoy yourself!

manic glacierBOT
lone axle
#

@idle owl If you end up having a moment today I'm interested to get your thoughts on: https://github.com/adafruit/Adafruit_CircuitPython_PyPortal/pull/116 this PR would essentially revert one of recent changes to use the with context processor in this library. But it turns out that using that with context was causing an issue where it won't be able to play the wav file if wait_to_finish argument is set to False This issue has some more details about it: https://github.com/adafruit/Adafruit_CircuitPython_PyPortal/issues/118 Can also make a note for 'in the weeds' if you think it would benefit from more discussion.

manic glacierBOT
idle owl
#

If that's the best way to do it, then roll with it.

lone axle
#

Okay, sounds good. I do recall a similar situation arising in a different library but not certain which one it was. Thank you.

idle owl
#

Do you want me to merge the PR?

lone axle
idle owl
#

@tulip sleet FYI, editing a proper username into a post doesn't tag anyone. It only tags on sending.

tulip sleet
#

ugh, thanks, I forgot that.

#

@lone axle those that can be changed to take a filename instead of an open file handle should do that. Does that make sense in the place you are mentioning?

lone axle
tulip sleet
#

hmm, yes, we should probably add that

lone axle
#

audiocore.WaveFile(wavfile) is the one having the issue. Though in the longer term it might be nice if that allowed a filename.

#

Although it may still need to have the option of using an open buffer like object as well. Because there are some RawSample examples that use that functionality I think to play sounds that don't originate from a file.

#

Oh, maybe those don't use WaveFile actually

#

I can take a look into it this week to see how OnDiskBitmap handles it and see if I can replicate it over into audiocore.WaveFile. If/When we do make that change in the core we'll be able to remove the pylint exception in PyPortal library which will be nice.

tulip sleet
#

feel free to open a tentative "Long Term" issue for that enhancement

#

there may even be one already

manic glacierBOT
#
[adafruit/circuitpython] New tag created: 7\.1\.0\-beta\.3
manic glacierBOT
#

Recent changes in the core allowed OnDiskBitmap to be passed the file path of an image file instead of user code needing to open the file and then pass the open buffer. This is helpful because it allows user code not to worry about opening and closing the file and negates the need for (and pylint error about) using with context processor.

We could add similar functionality. for WaveFile to accept the filepath

proven garnet
#

Question for anyone that knows displayio: Is this a bug, a lack of a feature, or something else:

manic glacierBOT
#

Erasing for tidy install, and collection and install of "adafruit-circuitpython-feather_m4_express-en_US-6.3.0.uf2" I seem to have the very same challenge with HCI response. (??)

Traceback (most recent call last):
File "code.py", line 49, in <module>
File "adafruit_airlift/esp32.py", line 193, in start_bluetooth
_bleio.BluetoothError: Timeout waiting for HCI response

Re-applying your "version test" it affirms following:

code.py output:
ESP32 SPI hardware test
ESP32 found and...

lone axle
#

So if initializing the SSD1306 displayio driver and then attempting to set display.brightness raises an exception I would think that is a bug, I'm not sure if that is what is happening in this case though.

idle owl
#

@lone axle PyBadger wasn't working on 7.1.0 beta whatever. Simpletest complained about things. 7.0.0 works. Probably someone should look into it, I don't have time to. Could be a me-issue though.

lone axle
#

I can try it out on an Edge badge to see if anything shakes out on that device.

crimson ferry
#

strictly speaking, OLEDs don't have brightness, so a contrast control is used to simulate it

slender iron
#

right, but it's hooked up to brightness in displayio because it gives a similar effect

manic glacierBOT
#

Erasing for tidy install, and collection and install of "adafruit-circuitpython-feather_m4_express-en_US-6.3.0.uf2" and the 6.0 library collections, I seem to have the very same challenge with HCI response. (??)

Traceback (most recent call last):
File "code.py", line 49, in
File "adafruit_airlift/esp32.py", line 193, in start_bluetooth
_bleio.BluetoothError: Timeout waiting for HCI response

Re-applying your "version test" it affirms following:

code.py output:
ESP32 SPI hardware t...

manic glacierBOT
proven garnet
#

So it sounds like a bug, I can try and look into this

idle owl
#

<@&356864093652516868> Meeting in 30 minutes. If you're planning to participate or want your notes read off, please add your hug reports and status updates to the notes doc. Thanks and chat soon! https://docs.google.com/document/d/1Bwnt-pbFcrfo1gn_tH4L0HXkMXZbcqG5eoAOfPK1xco/edit#

formal summit
#

can circuitpython use SPI flash for storage? as the disk drive to run code from?

stuck elbow
#

@formal summit yes, that is what it does by default

formal summit
#

ok thanks, just wanted to confirm

#

because I'm currently running from the QSPI flash, and can't write to it

#

Are there any docs for using external memory?

tulip sleet
formal summit
#

I want to replace the fs

manic glacierBOT
formal summit
#

that shows up as the USB disk

lone axle
#

I cannot run a backup recording today. I have some electrical work being done at the house. Would likely be lots of extra noise in the recording if I tried to do one.

idle owl
tulip sleet
idle owl
#

brb!

formal summit
idle owl
#

@turbid radish You're unmuted.

tulip sleet
#

also I think there is a Discovery board with external flash

lone axle
turbid radish
#

Please consider contributing

tulip sleet
#

@formal summit we are having an audio meeting at the moment, hence all the other posts

formal summit
hidden oxide
#

I guess I won't be missing some of the meeting after all

tulip sleet
tulip sleet
#

skip me for now

gilded cradle
#

no

turbid radish
#

Welcome Tim!

tulip sleet
#

you can read my notes

lone axle
hidden oxide
#

Sorry, gotta go - just wanted to drop in and say hi

errant grail
#

Another hug to @lone axle for the NVM storage library. Already incorporated it into the espresso scale project to remember tare and alarm settings.

lone axle
#

Amazing photo from Jeff:

errant grail
#

Thank you!

gilded cradle
#

๐Ÿ‘‹

ember iris
#

Thanks all!

blissful pollen
#

I have a new core addition for the IS31 work (that goes along with the python libraries that are in progress). The core PR is a pre-req to the python library. Should I be pushing this to the latest branch or? Just unsure with the beta releases going on

slender iron
#

if it's minor you could do it to the 7.1.x branch

#

that way it'll get out sooner

blissful pollen
#

thanks, it's a small bug fix and the equivalent of neopixel_write added to the module

slender iron
#

๐Ÿ‘

#

once it's in 7.1.x we can merge it back into main

manic glacierBOT
#

@dhalbert I think you want the parameter added to busio_i2c_make_new in /shared-bindings/busio/I2C.c. This means the new method would look like this:

STATIC mp_obj_t busio_i2c_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
    busio_i2c_obj_t *self = m_new_obj(busio_i2c_obj_t);
    self->base.type = &busio_i2c_type;
    enum { ARG_scl, ARG_sda, ARG_frequency, ARG_timeout };
    static const mp_arg_t allowed_args[] = {
        { MP_...
solar whale
#

@slender iron ```Adafruit CircuitPython 7.2.0-alpha.0-104-g568c281fd on 2021-12-11; Raspberry Pi 4B with bcm2711

import os
os.listdir()
['.fseventsd', '.metadata_never_index', '.Trashes', 'code.py', 'lib', 'boot_out.txt']
f = open("boot_out.txt")
f.readline()
'Adafruit CircuitPython 7.2.0-alpha.0-104-g568c281fd on 2021-12-11; Raspberry Pi 4B with bcm2711\r\n'

slender iron
#

๐ŸŽ‰

solar whale
#

At first os.listdir did not show the boot_out.txt, but after a pwer cycle it appeared...

blissful pollen
#

So git question.. when I try to PR the 3 commits I have to the 7.1.x branch the PR tries to include a load of commits that I did not do. Anyone know if I'm missing something obvious? Do I have to somehow set my branch start to the 7.1.x start?

slender iron
#

make sure the PR view is based on 7.1.x

#

(it's at the top of the page)

tulip sleet
#

e.g. in this non-CPy example, the "base:" dropdown on the left would be set to 7.1.x:

blissful pollen
#

I switched the base to 7.1.x but then I see "commits 58" most are not mine of course

solar whale
#

hmm - setback. still booting ok but now os.listdir() returns an empty list ....

tulip sleet
#

so was your PR branch not started from 7.1.x?

solar whale
#

even after earse_filesystem()

blissful pollen
#

Probably not as I started on the branch before 7.1.x

#

(sorry git newbie still - as much as I think I keep learning more ๐Ÿ™‚ )

#

do i rebase my branch to the 7.1.x and then PR that?

slender iron
#

that's what I usually do

slender iron
blissful pollen
#

okay thanks I think I can figure that out

orchid basinBOT
slender iron
#

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/1L-I0fOE6yrnv7OV_jQZZiFGtgWmc86GiGP6_ecpnGQs/edit?usp=sharing

manic glacierBOT
solar whale
turbid radish
#

? serverinfo

#

?serverinfo

digital shoreBOT
#
adafruit
Owner

adafruit#3230

Category Channels

8

Text Channels

61

Voice Channels

6

Members

32193

Roles

36

manic glacierBOT
#

Are you seeing errors in the REPL (serial) with 6.3.0)?

The blinking lights codes changed between 6.x and 7.x: https://learn.adafruit.com/welcome-to-circuitpython/troubleshooting#circuitpython-rgb-status-light-2978455-19

Based on the issues you are having, I am thinking there may be a hardware problem, possibly with the AirLift breakout board. You don't have other boards, is that right?

Let us move this discussion to the forums, because at this point I don't think this is a bug, sinc...

manic glacierBOT
#

Blinking codes exhibit on non-working modules, so probably historically OK.

I only have one Air Lift module but have recently upgraded to an M4 Express for both speed and compatibility with BLE from Air Lift ESP32 Coprocessor-breakout.

In the previous version 7.1.0, followed by 7.1.0-beta2, the relevant WiFi modules worked just fine on this Adafruit ESP32 Coprocessor-breakout. Clearly with some assumptions the "hardware" and connections function as advertised with selected modules. No...

#

@scath999 I'd suggest opening a draft PR with your potential changes. It's much easier for us to comment on code changes in a PR.

I think about you want MP_QSTR_internal_pull instead of MP_QSTR_bool because that's the name you'll use from Python. Then, you want to pass its value into common_hal. This is shared-bindings code that is port independent. common-hal code is port specific.

#

I got the PCBs today and am testing them all out. The 18 has 5 rows and 4 columns and an encoder, a small display (I2C).

The 87 has 6 rows and 17 columns and no encoders and a connector for I2C. These are the two extremes. They all use the same mapping. It's just that the others are a subset of the "big one".

The Board ID is what the software can use to differentiate between boards.

I was planning to trim the unconnected pins once everything passes the hardware checks.

#

I did some more debugging on this. It also affects RP2040 (and maybe others) but only caused a hard crash on espressif. On RP2040 it finds that exc->traceback is NULL (or corrupt) and only fails to print the traceback.

I believe the cause is related to the way that mp_obj_exception_add_traceback and mp_obj_exception_get_traceback both operate on the native exception object (by calling get_native_exception) but the traceback module attaches the traceback directly to the exception it is give...

blissful pollen
#

Sorry lost in git again. I'm missing something to rebase my branch onto the latest 7.1.x branch. I tried git rebase adafruit/7.1.x but the parent commit is still a few days off the latest 7.1.x branch like it rebased to the start of 7.1.x

crimson ferry
#

my build environment is completely messed up since esp-idf 4.4, I'll probably burn it all to the ground and start clean

lunar gull
manic glacierBOT
#

@LAWBear When the module is used in WiFi mode, the communication is over the SPI pins. When it is used in BLE mode, the communication is over the TX and RX pins. The module switches modes on reset, based on the state of the CS pin. You can see the code here (and see the whole file, for how the reset is done as well):
https://github.com/adafruit/Adafruit_CircuitPython_AirLift/blob/91740c71c0a0248ca620c78577dda52c7d26a9bf/adafruit_airlift/esp32.py#L118-L121.

The Airlift is product https://w...

#

Iยดm trying latest build and I can connect to REPL but I can not see CP drive. Iยดm on Windows 10.

If I try same what @jerryneedell posted at the Discord I do not see any files.

Adafruit CircuitPython 7.2.0-alpha.0-107-g05e073415 on 2021-12-12; Raspberry Pi 4B with bcm2711
>>> 
>>> import os
>>> os.listdir()
[]
>>> 

I wanted to try another SD card and when I put it in my SD card reader and fired up RPi Imager, I could see this poping up and hiding when I was selecting ...

slender iron
manic glacierBOT
#

Documentation fixed for wrap_socket (indentation to place it under the correct class, and added the self argument).

SSLContext.wrap_socket now accepts server_hostname=None (the default value). This previously returned an error (TypeError: Can't convert 'NoneType' object to str implicitly).

Implemented the server_hostname argument which was previously ignored. This is done by giving the SSLSocket it's own copy of the ESP-TLS config structure so that we can set the common_name value withi...

sharp jacinth
#

Are some circuitpython libraries likely to be re-written now that asyncio is becoming a thing?

slender iron
#

generally no

#

a few may have alternatives made though

sharp jacinth
#

ahh ok

#

thanks

blissful pollen
slender iron
#

I recommend git rebase -i for interactive

#

it'll show you want it's moving over

manic glacierBOT
#

You are right. The problem is the same as discussed in the link. They resolved the issue by specifying the non-native layout type, which is the same as my first try. The problem is, the native layout is required for the atomic access of registers, as was noted at the end of the PR.

As discussed in the link, the padding is intended to mimic the C structure. As far as I have investigated the code, however, it seems to be done in a wrong manner. As a result, sizeof(struct) varies depend...

manic glacierBOT
#

Tested successfully on PyPortal with:

import time
import displayio
import vectorio
import board

display = board.DISPLAY
group = displayio.Group()

palette = displayio.Palette(1)
palette[0] = 0x125690
rectangle = vectorio.Rectangle(pixel_shader=palette, width=40, height=30, x=55, y=45)
group.append(rectangle)

display.show(group)

while True:
    for i in range(30, 150, 10):
        rectangle.width = i + 40
        rectangle.height = i
        time.sleep(0.3)
#

This is consistent with what I have been seeing. Sometimes I can see the file system via os.listdir() other times it is empty. Sometimes a Mass Storage device is reported by my host computer but it is not accessible.

I have not seen the SDCard corruption since running storage.erase_filesystem() but that does not restore the file system when I run os.listdir()

I have also tried booting CP from a USB drive and that works as far as getting the REPL but I have not seen any filesystem on the SD...

proven garnet
#

Catching up on the meeting today, congrats @lone axle!

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.0.0 on 2021-09-20; Adafruit Feather Bluefruit Sense with nRF52840

Code/REPL

"""CircuitPython Essentials Storage logging example"""
import time
import board
import digitalio
import microcontroller
import neopixel
import storage

import array
import math
import audiobusio
import adafruit_apds9960.apds9960
import adafruit_bmp280
import adafruit_lis3mdl
import adafruit_lsm6ds.lsm6ds33
import adafruit...
manic glacierBOT
#

Not a full PR - only outlining suggested edits to limited number of files in support of internal pullups on certain NRF boards.

@dhalbert notified me that all instances of common_hal_busio_i2c_construct would need an extra parameter added. Accepting this as true, I didn't feel comfortable making that many changes before receiving guidance from the project owners.

I wasn't able to figure out the proper parameter to pass - @tannewt suggested MP_QSTR_internal_pullup, but this isn't a ...

manic glacierBOT
manic glacierBOT
#

Mr. Dan:

With MOST SINCERE appreciation for your exceptional support and detail. We found the issue!

**Code stopped by auto-reload.
soft reboot

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

The current hardware seems to be fine, however I had forgotten that the GPS Featherwing is also using the RX/TX. I guess more determined study is needed to discover IF there MAY be a way to use these two ser...

manic glacierBOT
#

Glad you tracked down the problem!

the GPS Featherwing is also using the RX/TX. I guess more determined study is needed to discover IF there MAY be a way to use these two serial modules at the same time.

You can use some other UART for the GPS, or some other UART for the BLE connection, assuming you have some spare pins. To find out which other pins can be used for a second UART, read about using a small script to determine the available pins here: https://learn.adafruit.com/circuitpy...

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.0.0 on 2021-09-20; Adafruit Feather M4 Express with samd51j19

Code/REPL

import time
import board
import displayio
import adafruit_displayio_ssd1306

i2c = board.I2C()

displayio.release_displays()

display_bus = displayio.I2CDisplay(i2c, device_address=0x3c)
display = adafruit_displayio_ssd1306.SSD1306(display_bus, width=128, height=32)

splash = displayio.Group()

background_bitmap = displayio.Bi...
analog bridge
#

@tulip sleet Thanks for your suggestions on #5422, I think it should be good to go now.

tulip sleet
manic glacierBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.1.0-beta.2 on 2021-12-10; MakerDiary nRF52840 MDK USB Dongle with nRF52840

Code/REPL

import board

help(board)

Behavior

Adafruit CircuitPython 7.1.0-beta.2 on 2021-12-10; MakerDiary nRF52840 MDK USB Dongle with nRF52840
>>> import board
>>> help(board)
object  is of type module
  __name__ -- board
  board_id -- makerdiary_nrf52840_mdk_usb_dongle
  AIN0 -- board.AIN0
  AIN1 -- boar...
orchid basinBOT
manic glacierBOT
proven garnet
#

Oh @tulip sleet just wanted to say that asyncio is working great on that self-lighting menorah project. It seems that connecting to the Wi-Fi network is synchronous but that's not a huge issue and makes sense, but I love that connecting to the NTP server (which is the bulk of the time honestly) works very well asynchronously. If you want to look at the implementation, here it is, but if not then just a general thanks again for all of this! https://github.com/tekktrik/auto-menorah

#

Also, the guide you wrote helped a lot, I meant to mention that, especially how to keep track of a "status-like" object instance between coroutines

tulip sleet
proven garnet
# tulip sleet Glad the guide was helpful! If you wrote `setup_menorah()` as non-async, would i...

No it wouldn't, it would still work. The major benefit is that setup_menorah() allows me to manipulate the "candes" with display_loading() while I run setup_connections() which connects to Wi-Fi then NTP server for time. This is because the latter takes some time so manipulating the lights lets the user know that the menorah is alive and actively working on things and not just kaput haha

#

After all that's done, I move into main() to figure out which candles to light

tulip sleet
#

Ahl, got it, I didn't know that was your goal. It's a "Loading" status bar ๐Ÿ™‚

tulip sleet
#

Honestly, I don't have much experience writing async task programs, but I tried to come up with the cleanest coding styles I could think of. A lot of the examples I have seen are distressingly confusing (like bad threading code)

proven garnet
#

I think you succeeded; I had never written async task programs (only limited knowledge of the concept too) and was able to get what I needed up and running!

lone axle
manic glacierBOT
#

I'm still not sold on the idea of a user-facing parameter to board.I2C (and others). For me it is a name for the pins marked SDA and SCL on the silkscreen for convenience, like other entries in board are names for pins, not a function for making I2C buses. board.I2C(1) looks more like it's giving a parameter to the default I2C bus, not a whole different instance on a different set of pins which have a different name.
Also I have seen confusion between board.I2C and busio.I2C, and I feel li...

lone axle
#

I see the listing page links to an Arduino FRAM/EEPROM library. I know there is a CircuitPython FRAM library, but it doesn't seem to have any references to this EEPROM breakout in it.

If there isn't currently a CircuitPython driver (and no one is already working on it) I may make an attempt at creating one. Would be my first time working on lower level I2C or SPI communication so not sure if I'll get it working.

Would it make sense to add that to the existing CircuitPython FRAM library since the Arduino library does seem to bundle them together? Or should it be a completely separate library?

jaunty juniper
lone axle
#

LadyAda mentioned a CircuitPython driving coming for it in the video introducing it I think. My guess is it's not created yet. But I also don't have any experience with FRAM or EEPROM breakouts. Maybe there is some chance that the existing FRAM library does already work with it.

manic glacierBOT
#

@microDev1 Any idea? You've been in the exception code most recently.

I took a look at this but I have no idea what is going on here.

On rp2040:

  • UserDefinedException: test is printed in REPL and CPY doesn't crash.

On espressif:

  • In normal build, CPY crashes and reboots.
  • In debug build, no backtrace is available and <traceback object at 0x...> is printed in REPL and CPY doesn't crash.
jaunty juniper
#

yeah I was thinking of looking at the FRAM library too

formal summit
#

Hey @tulip sleet , thanks for your help. filesystem_init isn't failing anymore

tulip sleet
#

excellent

formal summit
#

The whole SPI flash selection was surprisingly easy. I'm a big fan of the code

tulip sleet
#

thanks! we had to support so many chips, we really needed to parameterize it

#

tannewt did nearly all of that

formal summit
#

It's magic ๐Ÿ˜„

manic glacierBOT
#

@dhalbert @microDev1 Thank you so much!

If I can ask a couple of questions, to be answered when you guys have time:

  1. I'm confused about MP_QSTRs - these look like predefined types that are set somewhere else in the code. Is this true, or are they more-or-less arbitrary (like variable names)?

  2. @dhalbert has mentioned that this feature requires the new parameter be added in many places, even to bitbangio.I2C. Is there a way I can find where the changes need to be made, other t...

#

Can do. If I take your meaning correctly, you're suggesting something like:

// Set pulls up if setpullup is 1
    if (internal_pullup){
        nrf_gpio_pin_pull_t hal_pull = NRF_GPIO_PIN_PULLUP;

        nrf_gpio_cfg_input(scl->number, hal_pull);
        nrf_gpio_cfg_input(sda->number, hal_pull);
    }
    else if (!nrf_gpio_pin_read(sda->number) || !nrf_gpio_pin_read(scl->number)) {
        reset_pin_number(sda->number);
        reset_pin_number(scl->number);
        mp_rais...
#

CircuitPython version

https://circuitpython.readthedocs.io/en/7.0.x/shared-bindings/displayio/index.html

Code/REPL

from displayio import OnDiskBitmap

Behavior

The imageโ€™s pixel_shader. The type depends on the underlying bitmapโ€™s structure. The pixel shadder can be modified (e.g., to set the transparent pixel or, for paletted images, to update the palette

Description

  • "shadder"
  • Need punctuation at the end of the sentence.

Additional...

#
  1. I'm confused about MP_QSTRs - these look like predefined types that are set somewhere else in the code. Is this true, or are they more-or-less arbitrary (like variable names)?

MP_QSTR is a tricky way of providing predefined "interned" strings for parameter names, etc. There is a pre-processing step that searches for all of them and generates a big unique table of these strings. The part of the name after MP_QSTR_ is used as the string, with special escape hacks for non-name char...

#
   else if (!nrf_gpio_pin_read(sda->number) || !nrf_gpio_pin_read(scl->number)) {
        reset_pin_number(sda->number);
        reset_pin_number(scl->number);
        mp_raise_RuntimeError(translate("No pull up found on SDA or SCL; check your wiring"));
    }

Not just those lines: pull the if and else further up so the else starts at line 124. You don't want to do any of the checking code if you are enabling internal pullups.

#

MP_QSTR is a tricky way of providing predefined "interned" strings for parameter names, etc. There is a pre-processing step that searches for all of them and generates a big unique table of these strings. The part of the name after MP_QSTR_ is used as the string, with special escape hacks for non-name characters.

You can just think of it as a way of creating the name internal_pullups (or whatever) for use in argument lists, etc.

I see - thank you! If I can ask a quick fo...

lone axle
#

Was there a newer revision of the MagTag silkscreen that labels the buttons with letters A thru D? I noticed on board that there are pins labeled that way:

'BUTTON_A', 'BUTTON_B', 'BUTTON_C', 'BUTTON_D',

But on the silkscreen of mine and all of the images I can find I don't see any label letters. They have labels with the IO pin # i.e. D15, D14 etc.

proven garnet
#

So this makes me happy

tulip sleet
#

the prettypins diagram does have (because it's generated partly from pins.c)

lunar gull
#

and if I remember correctly they're left to right, whereas the D pins are reversed, and they skip D13 (for obvious reasons, can't go inviting bad luck like that ๐Ÿ˜‰ )

ember iris
lone axle
#

board does also have properties for them as labeled on the silkscreen so folks could still have code match the silkscreen. I do like the existence of button_A, button_B etc.. as well because many of the other devices with multiple buttons do use those like pybadge and CPX/CPB so I could see folks naturally assuming they exist like that.

lone axle
lunar gull
#

if I remember, D13 is mapped to something else, as is standard on a lot of boards... ugh

lone axle
#

I will make a note to update the pinouts page buttons section to add the mapping there as well so it's an extra place people can find it. Really neat that pretty pins pulls from pins.c so they should always match.

manic glacierBOT
#

I see - thank you! If I can ask a quick followup, what do underscores in variable names do in this context? I'm concerned that this will create and expose a variable with a space in the API. (e.g. internal_pullup becomes internal pullup) That can't be correct, but it would increase understanding to know.

Underscores become underscores. We have plenty of MP_QSTRs with underscores in them, don't worry. There are a bunch of escapes for such characters: see py/makeqstr*.py

Yikes! ...

lone axle
#

Yeah D13 is often an on-board LED for lots of devices.

ember iris
lone axle
ember iris
#

Neopixels are labeled as #, Neopix is a different digital pin, buttons are labeled identically

#

Oh I've got a bit of tape over the 'ON' LED on the black one--that LED is there

#

I can also try any script you need on the two magtags

manic glacierBOT
lone axle
tulip sleet
#

i was just starting to review it when you changed it out from under me ๐Ÿ™‚

lone axle
#

(testing on either one of them should be suffecient, no need for both.)

tulip sleet
#

@ember iris if you can test that would be great. I was not going to test on real hw

lone axle
#

Whoops sorry about that. I ran pre-commit locally the first time but didn't notice until too late that sphinx failed. new commit gets it back to happy I think.

manic glacierBOT
lone axle
#

I wonder if we could fold the sphinx build into pre-commit (or even if we would want to if so). I seem to forget one or the other sometimes.

manic glacierBOT
#

Does this mean I'll need to change calls for common_hal_board_create_i2c()? I hope not, but unsure how to proceed.

There's only one call to that routine anyway. You'll need to add the extra argument inside this call. But you don't need to add an extra argument to common_hal_board_create_i2c() itself. The value of that argument would be a compile-time constant which defaults to false except for boards that need to use internal pullups.

Now you have to understand how various compile...

ember iris
lone axle
#

and no worries about pace.

manic glacierBOT
#

Thanks for the PR @timhawes.

The reason for copying data from the pointer instead of pointing to the address is to avoid alteration of the traceback that is originally linked with the exception when a different traceback is supplied as a parameter.

Your changes gave me a hint regarding what is actually wrong here which is that native and non-native exceptions have different structures and the code is currently trying to copy the non-native exception on to a native exception struct, fol...

#

I agree with @Neradoc.

board.I2C() and friends shouldn't take in a parameter because instance ID is meaningless. (It could also be confused with the peripheral instance number that MP uses too.) The purpose of board isn't to replace busio.I2C(). board is about reflecting the physical API of the board and shared board design pattern benefits. I like board.STEMMA_I2C() instead because it clearly designates a feature of a board that may be uniform across multiple boards and therefor...

#

There's only one call to that routine anyway. You'll need to add the extra argument inside this call. But you don't need to add an extra argument to common_hal_board_create_i2c() itself. The value of that argument would be a compile-time constant which defaults to false except for boards that need to use internal pullups.

Now you have to understand how various compile options are passed along. You can study py/circuitpy_mpconfig.{h,mk}, the various mpconfigport.{h,mk} files, and ...

lone axle
#

I think circup might be having trouble installing libraries ATM. Possibly something related to removing support for 6.X bundle recently?

โฏ circup install adafruit_io
Found device at /media/timc/CIRCUITPY, running CircuitPython 7.1.0-beta.3-86-gf6de956c5-dirty.
Downloading latest version for adafruit/Adafruit_CircuitPython_Bundle.

  [####################################]  100%
There was a problem downloading the bundle. Please try again in a moment.
tulip sleet
#

but I don't know what it is trying to download

lone axle
#

Maybe it's stuck trying to fetch the deleted one and it will go back to normal / notice that it doesn't need to tomorrow. I'll see if I can narrow it down to the specific part within circup rasing the error.

tulip sleet
#

i am going for a walk but will be back in an hour or so or less

lone axle
#

I'll open an issue on circup repo as well and we can see if other folks are noticing it. I've only tried a few times today so it could possibly be something on my end as well.

tulip sleet
lone axle
#

ooh nice didn't know about that flag. Thank you.

ember iris
# lone axle and no worries about pace.

Ok I've tested it on both magtags, and the test worked identically and correctly on both. I did hit some odd errors, but they don't seem to be pybadger related.

#

Since they're not really pybadger related, I figured I'd bring them up here not on the pull request unless you think otherwise is best

main furnace
jaunty juniper
#

I believe it's just a matter of updating the PLATFORMS config variable

lone axle
lone axle
ember iris
manic glacierBOT
#

A lot of boards have buses with pin names TX0/RX0, TX1/RX1 and so on, the instance id parameter could work nicely here.

I'm ok using numbers internally but would prefer a text identifier. Perhaps use the QSTR instead of an instance ID.

Yes, we are already doing this, for example on adafruit_qtpy_rp2040:

board.STEMMA_I2C() = board.I2C(1)

The numerical parameter is a secondary and hidden way of interacting with the buses.

Which of the following is a better way ha...

lone axle
jaunty juniper
#

maybe in the future that could be something that is retrieved from the bundle repo or something

manic glacierBOT
ember iris
# lone axle Yep that sounds good to me. Can start the discussion here and then open a new is...

When transferring code, (my old code to pybadge, and pybadge to my old code) I'd end up with OSError: [Errno 5] Input/output error. To get this I'd delete everything and copy/paste the new code in. It would hit the error, then try again, and hit the error every couple of seconds. To get out of the loop I'd have to open code.py and save a change. I imagine this is standard circuit python behavior when you delete the code.py file and copy a new one in, but I hadn't run into it.

The other error was an invalid bmp format, the first time I tried to display the image card. I tried again and it worked. that only happened once on one device so it's probably more likely that something like a code reload happened and messed it up.

lone axle
#

I am unsure about the Input/Output error. With regards to the bmp card though I can think of 2 things that may be relavent:

  1. If you pasted every thing "at the same time" the OS may have actually pasted them sequentially. If code.py went first it would cause a reset and the bmp file might not be finished pasting completely yet so it could think it's an invalid bitmap if it tries showing it before it has the complete file.
  2. the image badge is the one type where the display.refresh() call happens internally in the library. On EInk displays if you call refresh() too soon after a previous refresh it will raise an exception (though the text in it should be more specifically about refreshing too soon). The magtag example script works around this for the other types of badges by implementing it's on try/except logic.
#

We should probably either make the library use the same refresh behavior with all types and adjust the example as necessary to reflect that. OR maybe just add the slightly different try/except logic for the bmp type badge in the magtag example.

ember iris
#

I think 1 is probably what occurred, it was after a copy paste. I tried to stress it with the refreshing too soon and it handled that portion gracefully

manic glacierBOT
#

Seems like I'll need to explicitly set CIRCUITPY_BOARD to 0, since it appears to default to 1 in circuitpy_mpconfig.mk.

Don't turn off CIRCUITPY_BOARD -- everyone expects it to be there. You need it for pins.c.

Also, is it wise to #define another constant like CIRCUITPY_INTERNAL_PULLUPS in the appropriate .mk files, defaults to 0, and reference that?

Yes, make it more specific: CIRCUITPY_I2C_INTERNAL_PULLUPS.

In the case of the 52833, I would then add something like C...

#

Make File Changes

  • Created new compile time flag CIRCUITPY_INTERNAL_PULLUPS: defaults to 0
  • Created new #define for HAS_INTERNAL_PULLUPS: set to true if CIRCUITPY_INTERNAL_PULLUPS is 1, false otherwise
  • Added CIRCUITPY_INTERNAL_PULLUPS = 1 to ports/nrf/mpconfigport.mk to take advantage of extended functionality.

Code level changes

  • Added boolean MP_QSTR_internal_pullup as optional argument for i2c related construction calls: defauls to false.
  • Modified funct...
#

The nrf52833 series of boards uses internal pull ups and pull downs to configure its pins for use with peripherals.

When you say this, what do you mean? Do you mean the nRF52833 DK (PCA10100)? That board has no on-board I2C peripherals that I see. It resembles the other nRF DK boards, I think.

In general, external I2C breakouts have pull-ups provided. Adafruit's breakouts all have pullups. We don't put I2C pullups on our microcontroller dev boards unless there are on-board I2C periphe...

idle wharf
#

Are there any repos in the Adafruit managed repos or CP_org that create PRs from GH Actions? There's a host of ways, and I wanted to see if there's some way its already being done as I work to wrap up show-note automation for Deep Dive repo.

manic glacierBOT
idle wharf
#

Thank you @tulip sleet I'll take a look at that one!

tulip sleet
#

when there is a new release

proven garnet
#

Is there any value in doing typing for things not already tagged with the associated issue? Was curious about PlatformDetect and noticed it didn't have typing or the issue.

tulip sleet
manic glacierBOT
#

Don't turn off CIRCUITPY_BOARD -- everyone expects it to be there. You need it for pins.c.

Yes, I see that now. Better to have a different define to work with and leave that high-level define alone.

Yes, make it more specific: CIRCUITPY_I2C_INTERNAL_PULLUPS.

Can do. That said, I found something interesting the busio/I2C.c belonging to the espressif port (lines 61-64):

#if CIRCUITPY_I2C_ALLOW_INTERNAL_PULL_UP 
    gpio_pullup_en(sda->number);
    gpio_pullup_en(scl->...
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.0.0 but probably affects all versions.

Code/REPL

import board
import neopixel

pixels = neopixel.NeoPixel(board.D5, 8, brightness=1.0, auto_write=False, pixel_order=neopixel.GRBW)

pixels[0] = 0x40FF0000       # Should be white+red
pixels[1] = 0x4000FF00       # Should be white+green
pixels[2] = 0x400000FF       # Should be white+blue
pixels[3] = 0x40000000       # Should be white
pixels[4] = (255, 0, ...
#

Added new functions to the is31fl3741 module similar to neopixel_write but for is31fl3741 LEDs. Included an initialize function as well. These two functions are used with a yet to be submitted python library to use with with the adafruit_pixelbuf class.

Also includes a small bug fix to the existing library and changes the map from list to tuple upon advice I was given. There are no libraries released that were lists so best to do so now.

manic glacierBOT
#

I'm including comments from the PR, from this comment: https://github.com/adafruit/circuitpython/pull/5718#issuecomment-994120624

Don't do this for all 52833 builds. I thought the reason for this was just that your particular board had no pullups for on-board I2C peripherals. Is that the case?

I see your point. It was my understanding that all 52833 boards have this functionality, which appears to be a wrong assumption.

Ideally the [sensor] board would have on-board pullups.

...

tulip sleet
#

@daring pumice I'd be happy to have audio conversation about the pullups issue and the PR during the day on Wednesday. We might save some time that way, both to discuss the general issue and the technical details.

manic glacierBOT
#

I do not know if there was some change in the code (I can not see any), but I can see some changes with last build.

Adafruit CircuitPython 7.2.0-alpha.0-120-gaee80d67b on 2021-12-14; Raspberry Pi 4B with bcm2711
>>> import os
>>> os.listdir()
['AdafruitCi', 'ha.0-120.-ga', '4;Raspb.err', '\nBoardI.d:r', '~1.MET', '.Trashes', 'code.py', 'lib', 'boot_out.txt', 'System Volume Information']
>>> f = open("boot_out.txt")
>>> f.readline()
''
>>>

![image](https://user-images.git...

vague thicket
#

@slender iron what approach would you recommend please, if I would like to try make touchscreen working with ads7846 driver IC and RPi? I tried it with adafruit_touchscreen, but it does complain that there is no analogio module. Thanks

slender iron
#

sounds like touchscreen should be reworked to pass in the analogin object

#

that way you could pass in something that does ADC over a bus rather than just native

vague thicket
#

by touchscreen you mean physical touchscreen or the library?

slender iron
#

the library

vague thicket
slender iron
#

yup, that's the right spot

#

looks a bit trickier than I expected due to the digitalio stuff

manic glacierBOT
manic glacierBOT
#

When you say this, what do you mean? Do you mean the nRF52833 DK (PCA10100)? That board has no on-board I2C peripherals that I see. It resembles the other nRF DK boards, I think.

In general, external I2C breakouts have pull-ups provided. Adafruit's breakouts all have pullups. We don't put I2C pullups on our microcontroller dev boards unless there are on-board I2C peripherals.

So before we go further with the PR, could I understand the initial requirements? This would be a worthy featu...

manic glacierBOT
#

The sensors we're using don't appear to have pullups attached - I am confirming this with hardware, but this is my suspicion given my experience so far: if the pullups were already integrated into the POC, wouldn't CPY have detected them?

I haven't seen any external sensors incorporate pullups on chip: they are always supplied externally. So this makes sense.

There is some discussion of using the internal pullups on nRF chips in these Nordic DevZone threads (and others, but these are ...

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.0.0 on 2021-09-20; Adafruit Feather M4 Express with samd51j19
Board ID:feather_m4_express

I have been using Arduino boards and their version of the C language for years. Communication through the USB jack (programming port) has always been simple using the Serial module (Serial.begin, Serial.available, Serial.read, Serial.println etc.) I have a customer who requires that I use an Adafruit Feather M4 Express with circuit Python ...
jaunty juniper
#

I have seen a few people being confused because they couldn't find "boot.py", not aware that it's just a file they can create, I wonder if there is some wording in some guide(s) that could be adjusted to clarify that or if it's just some random chance.

manic glacierBOT
jaunty juniper
#

like the customizing USB devices guide says "you can write code in the boot.py file", or the code "must be put in boot.py". It seems obvious to me that you can create it if absent, but to some people it might sound like telling them to edit some existing file they can't find ? (Like editing some ini file on windows or something)

viscid pine
#

i see how that could be confusing if they are used to there just being one .py file

meager adder
#

The latest 20211215 bundle is missing the zipped assets: https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/tag/20211215
vscode-circuitpython (https://github.com/joedevivo/vscode-circuitpython) detects an update but there is no zipped asset to download so it gets stuck and nothing works, not even the serial monitor.

Is this normal and the zipped assets just gets uploaded at a later time?

GitHub

Updated libraries: max7219, pybadger
As always, thank you to all of our contributors: @FoamyGuy, @FlantasticDan, @dhalbert, @adafruit-adabot, @kattni

The libraries in each release are compiled for...

GitHub

VSCode extension for Adafruit's CircuitPython. Contribute to joedevivo/vscode-circuitpython development by creating an account on GitHub.

crimson ferry
#

@meager adder It just takes a little time

meager adder
# crimson ferry sometimes it does need some manual nudging... <https://github.com/adafruit/Adafr...

It looks like upload-release-assets failed. I guess this means it will never upload the assets until someone rolls back or tries to run it again?

Building mpy-cross for circuitpython 6.2.0

==========================================
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.6.15/x64/bin/circuitpython-build-bundles", line 11, in <module>
    load_entry_point('circuitpython-build-tools==1.8.5', 'console_scripts', 'circuitpython-build-bundles')()
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/circuitpython_build_tools/scripts/build_bundles.py", line 264, in build_bundles
    mpy_cross=mpy_cross, build_tools_version=build_tools_version)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/circuitpython_build_tools/scripts/build_bundles.py", line 154, in build_bundle
    mpy_cross=mpy_cross, example_bundle=example_bundle)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/circuitpython_build_tools/build.py", line 257, in library
    raise RuntimeError("mpy-cross failed on", full_path)
RuntimeError: ('mpy-cross failed on', '/home/runner/work/Adafruit_CircuitPython_Bundle/Adafruit_CircuitPython_Bundle/libraries/helpers/asyncio/asyncio/funcs.py')
Error: Process completed with exit code 1.
crimson ferry
#

I suspect it will get addressed in the morning, or deferred to the next evening for a good run

#

depending on what's needed to fix

#

looks like maybe the prior day manual asyncio fix is needed again?

meager adder
#

Ah ok. I'm kind of stuck right now because vscode-circuitpython refuses to do anything (not even serial monitor) until the new bundle is downloaded, but there is no new bundle to download. But I guess that is also more an issue with the extension and not with circuitpython specifically

crimson ferry
#

this is kind of unusual, but I wonder if there's a way to file an issue with vscode

meager adder
#

The issue will probably be gone by the time someone looks at it

#

Is it possible to have the release pipeline start with a private release and only promote it to public iff all steps in the pipeline pass (including asset upload)?
There are probably other external processes that rely on bundle updates and rather than fixing them individually by every consumer, addressing this upstream in the circuitpython pipeline might be easier

jaunty juniper
#

hmmm why does it say Building mpy-cross for circuitpython 6.2.0 ?

manic glacierBOT
main furnace
#

pi zero 2w: Can't read from SD card
Adafruit CircuitPython 7.2.0-alpha.0-127-gcad8c1fcd on 2021-12-15; Raspberry Pi Zero 2W with bcm2837
I'm booting untethered (using the serial console).
Works if I revert to alpha.0-50-g8eee16c7a 12-08 build.

#

read sectors result 3 when reading block 531865 for 1

tulip sleet
#

@meager adder @crimson ferry I am working on the bundle build failure. It was still trying to build 6.x stuff.

solar whale
manic glacierBOT
manic glacierBOT
#

Neopixels don't support setting the white pixel explicitly when setting with a number. You can set it implicitly if you set each rgb value equal to each other (i.e. 0xffffff), as then the library will turn off the color pixels and set the white pixel to that value. So:

>>> pixels[0] = 0xffffff
>>> pixels[0]
(0, 0, 0, 255)

If you'd like to explicitly set the white pixel, you need to set it as a tuple.

So most of the behavior you are describing makes sense. However, what's ha...

tidal kiln
#

anyone here on MacOS and using a board with a CP2104 USB-to-TTL chip?

solar whale
tidal kiln
#

thanks. doesn't matter. just wanting to know what it shows up as in /dev

#

so any CP2104 board should be fine

solar whale
#

cu.SLAB_USBtoUART cu.usbserial-015F6CBB

#

this is an esp32

tidal kiln
#

hmm. it creates two entries?

solar whale
#

yes -- both work -- to get to REPL on MicroPyhton anyway.

#

I "think" it is a CP2104

#

yes -- chip says SIL 2104

tidal kiln
#

feather esp32?

solar whale
#

yes

tidal kiln
#

yep. it has one.

solar whale
#

any other info/tests you need?

tidal kiln
#

@solar whale nope. thanks. not unless you know of reasons only the SLAB entry would show up.

solar whale
proven garnet
#

@gilded cradle I'm adding licenses to PlatformDetect, should I add your name to them or is there someone better. Doing as part of getting pre-commit running.

slender iron
#

@crude blaze do you have a USB PID for piunora? Are you planning to open source the design? I started making a board def for it in CP.

crude blaze
#

def. yes on open source design, I just have to find the time to clean up the Eagle files
will apply for oshwa cert then

#

I do not have PID for Piunora. I would still need one for CPY

slender iron
#

right, you can get a pid.codes one once you post the hardware files

crude blaze
#

right

slender iron
#

I have it using a test pid at the moment

crude blaze
#

I'll try to get around to it soon

slender iron
#

ty

#

having the files will help me get the pinout right too

crude blaze
slender iron
#

oh great!

#

definitely

slender iron
crude blaze
#

awesome, thank you for doing this. I'll try to check it out this week

manic glacierBOT
#

@tannewt I checked the pixelbuf code, the problem only happens when using the CP version, the python version spits out an error.

Since it is only when using a number and not a tuple, the only line I can think that would be the culprit is:
https://github.com/adafruit/circuitpython/blob/02926228b343a5f69fa09f7abedb13253e04db88/shared-module/adafruit_pixelbuf/PixelBuf.c#L166

I could be wrong about that line being the problem, but either way I'd be happy to try and debug it later. Is there...

manic glacierBOT
main furnace
#

Git help? I did checkout -b mybranch origin/7.1.x, now I have a heap of 'changes not staged for commit'. I just want to fix a typo in one file, this doesn't look right.

jaunty juniper
#

is it submodules ?

#

try make fetch-submodules

main furnace
#

Everything is frozen|lib|ports|tools|data|extmod.

#

Fetch-submodules cleaned up most of it.

main furnace
#

Plan B: edit files on GitHub.

tulip sleet
#

then

git checkout -b name-of-pr-branch
#

you would already have done:

git remote add adafruit https://github.com/adafruit/circuitpython
slender iron
#

My process for a new change is:

#
git fetch adafruit
git checkout adafruit/7.1.x
git switch -c my_branch_name
git status
make fetch-submodules
git status
manic glacierBOT
#

Why does this need to be done in C? Can't write be done from Python alone?

I did it in C as I thought it would need it for speed (especially the mapping) and for coordination with the displayio work I did. I will do a test of C vs Python to see if it is required. Now that I understand how all the parts work doing it in Python may make sense.

manic glacierBOT
#

I tried adding the memory barriers but still saw SD card timeouts (error 3) on Zero 2W. I've got a branch with SD card debugging on here: https://github.com/tannewt/circuitpython/tree/rpi_flash_dmb

If you can, please try that and post the error messages. Here is what I see:

found partition
start 524288 count 14997504
sending cmd slot=0 op=17 arg=80000 flags=1c50 data=0x201b98 blklen=512 datalen=512 timeout=1000
cmd response 00000900 00000000 00000000 00000000 err=0x0 state=4
send...
daring pumice
#

Evening, everyone ๐Ÿ™‚

manic glacierBOT
#
[adafruit/circuitpython] New branch created: tannewt\-patch\-1
manic glacierBOT
main furnace
#

Guess I need to update my build tools. Uncrustify 0.68_f can't do it.

manic glacierBOT
#

I've managed to get a version that incorporates all the changes suggested by @dhalbert and @microDev1 and updated my draft PR - it's going through checks right now.

Testing it locally, the new method signature works and I'm able to get an i2c interface using busio.i2c(scl, sda, internal_pullup = True)

However, when I run i2c.scan() I get an empty array back. Not sure what I've missed here, but pretty darn skippy I should get something back from that call.

Thoughts (when you hav...

manic glacierBOT
onyx hinge
#

A job matrix can generate a maximum of 256 jobs per workflow run. This limit also applies to self-hosted runners.
We may hit this limit sometime in the next year, as all our "arm" builds are from one "matrix".

manic glacierBOT
manic glacierBOT
#

Move this down to line 124, and add an else for lines 125-136; do the check for external pullups only if internal_pullup is false.

Take away the #if CIRCUITPY_REQUIRE_I2C_PULLUPS; it is superseded by the passed-in boolean.

You don't need the hal_pull variable: you can use the constant:

    // Set pulls on I2C pins up if setpullup is 1 - this supports boards with internal pullups
    if (internal_pullup){
        nrf_gpio_cfg_input(scl->number, NRF_GPIO_PIN_PU...
manic glacierBOT
#

Yup, this is definitely a thing. I found that if I do something along these lines:

def deep_sleep():
    print("Sleeping for %d minutes" % REFRESH_TIME)
    magtag.peripherals.neopixel_disable = True
    magtag.peripherals.speaker_disable = True
    alarm.exit_and_deep_sleep_until_alarms(pin_alarm, time_alarm)


# Set up alarms for the different buttons and timer
pin_alarm = alarm.pin.PinAlarm(board.D14, value=False)
time_alarm = alarm.time.TimeAlarm(monotonic_time=int(...
manic glacierBOT
#

To further shed some light on this, I found that I can access the type of alarm.wake_alarm from boot.py.

This code:

# SPDX-FileCopyrightText: 2021 Torgny Bjers, written for THE LULZ
#
# SPDX-License-Identifier: Unlicense

import alarm
import storage
import time

if alarm.wake_alarm:
    try:
        storage.remount("/", readonly=False)
        with open("/log.txt", "a") as fp:
            test = dir(alarm.wake_alarm)
            for s in test:
              ...
manic glacierBOT
#

on the pi4b I get

Earlier output similar -- not captured

md response 0a400000 3b7f7f80 5b590000 400e0032 err=0x0 state=0
sending cmd slot=0 op=7 arg=10000 flags=1c00 data=0x0 blklen=0 datalen=0 timeout=1000
cmd response 00000700 00000000 00000000 00000000 err=0x0 state=3
sending cmd slot=0 op=55 arg=10000 flags=1c00 data=0x0 blklen=0 datalen=0 timeout=1000
cmd response 00000920 00000000 00000000 00000000 err=0x0 state=4
sending cmd slot=0 op=51 arg=0 flags=1c50 data=0x7f880 bl...
#

hmmm -- the trial on the 4B above was booted from a USB drive.
when I tried booting from an SD Card I just get continuous spewing of errors

sending cmd slot=0 op=24 arg=802e4 flags=1c10 data=0x7fd40 blklen=512 datalen=512 timeout=5000
cmd response 00000900 00000000 00000000 00000000 err=0x0 state=4
sending cmd slot=0 op=13 arg=aaaa0000 flags=1c00 data=0x0 blklen=0 datalen=0 timeout=1000
cmd response 00000900 00000000 00000000 00000000 err=0x0 state=4
sending cmd slot=0 op=24 arg=80...
manic glacierBOT
onyx hinge
#

testing this morning with an up-to-the-second circup [with removed 6.x bundle support] & it works again. yay.

jaunty juniper
#

are you making a (circup) release then ?

onyx hinge
#

As requirements file, enter rtd_requirements.txt. RTD will pip install -r rtd_requirements.txt. The rtd_requirements.txt of the template references the optional dev dependencies, so you can forget about this file and add doc dependencies to extras_require['dev'] in setup.py.

#

should be available on pypi within the hour ๐Ÿ™‚

jaunty juniper
#

thanks !

tulip sleet
onyx hinge
#

@tulip sleet I think one element of this issue is that esp-idf renamed registers. If you turn RGBMATRIX on and build for kaluga (previously supported), you get ```In file included from ../../lib/protomatter/src/arch/arch.h:168,
from ../../lib/protomatter/src/core.c:33:
../../lib/protomatter/src/arch/esp32.h: In function '_PM_timerGetCount':
../../lib/protomatter/src/arch/esp32.h:192:42: error: 'timg_txupdate_reg_t' {aka 'volatile union <anonymous>'} has no member named 'update'; did you mean 'tx_update'?
timer->hw->hw_timer[timer->idx].update.update = 1;
^~~~~~
tx_update
../../lib/protomatter/src/arch/esp32.h:193:41: error: 'timg_hwtimer_reg_t' {aka 'volatile struct <anonymous>'} has no member named 'cnt_low'
return timer->hw->hw_timer[timer->idx].cnt_low;
^
../../lib/protomatter/src/arch/esp32.h:194:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
cc1: all warnings being treated as errors

tulip sleet
#

yup, the PR just seems to change some names.

onyx hinge
#

looks like the related header just got fully rewritten in esp-idf, with incompatible names. so the esp32s2 part should be perfectly safe to take. we can leave RGBMATRIX disabled on s3 & c3 until someone actually tests it on a panel.

manic glacierBOT
solar whale
#

FYi -- from mouser --- looks like the SAOLA is nearing end of life --- time to move on....it was worth the $8 (now 9)