Skip to content
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

ADC(pin) needs to be ADC(machine.Pin(pin)) in recent versions of MicroPython #965

Open
helgibbons opened this issue Jul 2, 2024 · 1 comment
Assignees

Comments

@helgibbons
Copy link
Contributor

helgibbons commented Jul 2, 2024

When using high ADC pin numbers, you now need to init ADC(machine.Pin(29)) instead of ADC(29), for example.

As per: https://forums.pimoroni.com/t/pico-lipo-not-reading-battery-voltage/25060/

More info/discussion at micropython/micropython#10947

@helgibbons helgibbons changed the title ADC(29) needs to be ADC(Pin.29) in recent versions of MicroPython ADC(pin) needs to be ADC(machine.Pin(pin)) in recent versions of MicroPython Jul 2, 2024
@helgibbons helgibbons self-assigned this Jul 2, 2024
@Gadgetoid
Copy link
Member

I think this might be fixed at the MicroPython level now: micropython/micropython@2b8de74

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants