WebbotLib AVR library
WebbotLib It just does it
  C++ documentation  C documentation

Phidget/30V.h

Phidget DC voltage sensor measuring from -30v to +30v.
phidget voltage.jpg
This must be connected to an ADC pin. It may be defined using:
Phidget_30V sensor = MAKE_Phidget_30V(ADC0);
Where ADC0 is changed to be the required ADC input channel.
The sensor should be initialised in appInitHardware using:-
voltageInit(sensor);
The sensor can then be read using:-
voltageRead(sensor);
and then the voltage will be in sensor.voltage.volts

Valid XHTML 1.0 Transitional