|
upm
0.2.0
Sensor/Actuator repository for libmraa (v0.6.1)
|
C++ API for the TA12-200 current transformer. More...
UPM module for the TA12-200 current transformer, which is found, for instance, in the Grove Electricity Sensor. This module can measure AC current moving through a wire at up to 5A.
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 | ( | ) |
Return the number of milliseconds elapsed since initClock() was last called.
| void initClock | ( | ) |
Reset the Clock
| unsigned int highestValue | ( | ) |
Get the conversion value from the sensor
| float milliAmps | ( | unsigned int | val, |
| int | res = TA12200_ADC_RES |
||
| ) |
Compute the measured voltage
| val | value measured by highestValue() |
| res | ADC resolution |
1.8.9.1