Skip to content

Adafruit Metro RP2350 analogbufio #10201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mikeysklar opened this issue Mar 30, 2025 · 2 comments · Fixed by #10202
Closed

Adafruit Metro RP2350 analogbufio #10201

mikeysklar opened this issue Mar 30, 2025 · 2 comments · Fixed by #10202

Comments

@mikeysklar
Copy link

mikeysklar commented Mar 30, 2025

CircuitPython version and board name

CircuitPython 9.2.6 on 2025-03-23; Adafruit Metro RP2350

Code/REPL

import board
import analogbufio
import array

length = 1000
mybuffer = array.array("H", [0x0000] * length)
rate = 500000
adcbuf = analogbufio.BufferedIn(board.A0, sample_rate=rate)
adcbuf.readinto(mybuffer)
adcbuf.deinit()
for i in range(length):
    print(i, mybuffer[i])

Behavior

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 8, in <module>
ValueError: Invalid pins

Description

Metro RP2350 fails to run analogbufio example code from the docs.

Code works as expected on Feather RP2040, Feather RP2350 or switching to analogio.

Additional information

Forum issue found by mattblair

@mikeysklar mikeysklar added the bug label Mar 30, 2025
@dhalbert
Copy link
Collaborator

Thanks - I saw that forum post this morning and am working on a fix. It's due to not treating the RP2350B pins properly.

@dhalbert
Copy link
Collaborator

dhalbert commented Apr 1, 2025

Fixed by #10202.

@dhalbert dhalbert closed this as completed Apr 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants