VDiv Class
- ID: vdiv
- Name: Analog Voltage Divider Sensor
- Other Names: Grove Voltage Divider
- Category: electric
- Manufacturer: seeed
- Connection: analog
- Kit: robok
UPM module for the Voltage Divider sensor
Item Index
Methods
Methods
VDiv
(
Number
-
pin
Voltage Divider sensor constructor
Parameters:
-
pin
NumberAnalog pin to use
Returns:
Number:
value
(
Number
-
samples
Gets the conversion value from the sensor
Parameters:
-
samples
NumberSpecifies how many samples to average over
Returns:
Number:
Average ADC conversion value
computedValue
(
Number
-
gain
-
val
-
vref
-
res
Computes the measured voltage
Parameters:
-
gain
NumberGain switch, example: either 3 or 10 grove vdiv
-
val
NumberMeasured voltage (from value() )
-
vref
NumberReference voltage in millivolts
-
res
NumberADC resolution
Returns:
Number:
Measured voltage