|
upm
0.4.0
Sensor/Actuator repository for libmraa (v0.8.0)
|
API for the TA12-200 Current Transformer. More...
UPM module for the TA12-200 current transformer found, for instance, in the Grove Electricity Sensor. This module can measure AC moving through a wire at up to 5 A.
Public Member Functions | |
| TA12200 (int pin) | |
| ~TA12200 () | |
| uint32_t | getMillis () |
| void | initClock () |
| unsigned int | highestValue () |
| float | milliAmps (unsigned int val, int res=TA12200_ADC_RES) |
| uint32_t getMillis | ( | ) |
Returns the number of milliseconds elapsed since initClock() was last called.
| void initClock | ( | ) |
Resets the clock
| unsigned int highestValue | ( | ) |
Gets the conversion value from the sensor
| float milliAmps | ( | unsigned int | val, |
| int | res = TA12200_ADC_RES |
||
| ) |
Computes the measured voltage
| val | Value measured by highestValue() |
| res | ADC resolution |
1.8.9.1