Analog inputs RP 2040

Can someone please point me in the right direction. I cannot get the rp2040 to display ADC values, it shows 10-15. I'm new to programing just wanting to see voltage on A2 or A3. So far I've been about to print messages, send constant int to IoT cloud. When I apply 2vdc on any input of rp2040 nothing changes. I use my same setup on UNO it works.

Thanks in advance.

A screen shot of code is useless. please post all your code in the correct way.
You may want to read this before you proceed:-
how to get the best out of this forum

A RP 2040 only has 3 useable A/D inputs A0 to A2, there is no A3. Have you tried using the GPIO numbers here GP 26, 27 and 28?

analogReadResolution(12);    //set for 12 bit
volts = analogRead(28);          //ADC2

Worked for me yesterday when using the earlephilhower core on a Pi Pico;

GitHub - earlephilhower/arduino-pico: Raspberry Pi Pico Arduino core, for all RP2040 boards.

Thanks for the help guys, I ended up reinstalling earlephilhower core and it worked!

I want to read the internal temperature but I don´t know how to refer channel 4 for RP2040...

The earlephilhower core has float analogReadTemp() which gives the temperature in degrees Celsius.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.