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

Raspberry Pi Pico RP2040 Analog Read and Write Not Working #370

Open
ErinMutchler opened this issue Oct 21, 2022 · 1 comment
Open

Raspberry Pi Pico RP2040 Analog Read and Write Not Working #370

ErinMutchler opened this issue Oct 21, 2022 · 1 comment

Comments

@ErinMutchler
Copy link

ErinMutchler commented Oct 21, 2022

When attempting to perform an analogRead or analogWrite, the Raspberry Pi Pico does not seem to work. analogRead returns a value of 0 always and analogWrite does not actually send anything.

@ghost
Copy link

ghost commented Mar 2, 2023

I've looked into this and I think it's because Pins 26/27 are set up in makecode as 'Analog' but only as regular Analog Pins would be, not actually set to read through the Pico's ADC hardware.

Alternatively if pins A0 / A1 were included, those could be read as Analog, automatically read through the ADC I believe.

It would be great to getting Analog Inputs working on the Pico in MakeCode - if anyone has the ability to update the files, here's the documentation from Pi:

https://www.raspberrypi.com/documentation/pico-sdk/hardware.html#hardware_adc

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

1 participant