upm
0.5.1
Sensor/Actuator repository for libmraa (v0.9.1)
|
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 |