7 years, 11 months ago.

Analog input?

Hello I connected humidity sensor to A1 on the Arduino shield. When I read it from mbed in the following way:

AnalogIn ain(PB_0); ain.read();

I get digital ( 0 or 1). What am I doing wrong?

Also worth mentioning - using A1 (instead of PB_0) doesn't work in the mbed compiler for me.

Thank you,

1 Answer

7 years ago.

Hello,

How are you printing the value?