Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
5 years, 10 months ago.
Cannot read any values from analogIn pins
I have written a simple little program to print out the float value from any analog input like this:
AnalogIn pot(PA_1);
and in the main inside a while(1) i print pot.read() to tera term
but i only get values like 0.000488 and no matter how much i turn the pot meter it doesnt change.
the program and connection works perfectly with the LPC1768 but it won't work with the L476VG
Question relating to:
1 Answer
5 years, 10 months ago.
If you import this example and don't update the Mbed library it will work, just tried. Stopped working when I updated Mbed Libraries.
https://os.mbed.com/teams/ST/code/STM32_ADC_InternalChannels/
I would suggest you report this as a bug.
Just checked, works fine on Mbed OS5