Question about class AnalogIn function read()

08 Nov 2010

The usage notes for read() says:

Read the input voltage, represented as a float in the range [0.0, 1.0]

Is the range [0.0, 1.0] a percentage referenced to the max. voltage that can be applied to the pin?

Further for the value returned, is that a percentage too referenced to the max. voltage that can be applied to the pin?

Thanks

08 Nov 2010

Hi,

It is a percentage of the supply/reference voltage, which is 3.3v. So 0.0 == 0v, and 1.0 == 3.3v.

Thanks,

Simon