8 months, 1 week 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:

The 32L476GDISCOVERY helps users to develop and share applications with the STM32L4 ultra-low-power microcontrollers.
Comment on this question

1 Answer

8 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.


I would suggest you report this as a bug.

Just checked, works fine on Mbed OS5

You need to log in to post a question