Loading...
Searching...
No Matches
Potentiometer

The potentiometer (RV1) on A5. More...

Functions

 pot_volts ()
 Reads the potentiometer, RV1, on A5.

Detailed Description

The potentiometer (RV1) on A5.

The wiper goes from 0 V to VIO (JP3). A5 is on the Phyduino's MAX11635, which reads up to 2.048 V.

Function Documentation

◆ pot_volts()

pot_volts ( )

Reads the potentiometer, RV1, on A5.

The wiper goes from 0 V to VIO (set by JP3). A5 is on the Phyduino's MAX11635, which reads at most 2.048 V: with VIO at 3.3 V the last third or so of the turn reads 2.048 V.

Returns
Volts, 0-2.048 V (a float).
Exceptions
OSErrorThe Phyduino's external ADC did not respond.
Example
print(shield.pot_volts())