upm  0.4.1
Sensor/Actuator repository for libmraa (v0.8.0)
Public Member Functions | List of all members

API for the TA12-200 Current Transformer. More...

Detailed Description

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.

ta12200.jpg

Public Member Functions

synchronized void delete ()
 
 TA12200 (int pin)
 
long getMillis ()
 
void initClock ()
 
long highestValue ()
 
float milliAmps (long val, int res)
 
float milliAmps (long val)
 

Constructor & Destructor Documentation

TA12200 ( int  pin)

TA12200 constructor

Parameters
pinAnalog pin to use

Member Function Documentation

long getMillis ( )

Returns the number of milliseconds elapsed since initClock() was last called.

Returns
Elapsed milliseconds
long highestValue ( )

Gets the conversion value from the sensor

Returns
Highest value obtained over 1 second of measuring
void initClock ( )

Resets the clock

float milliAmps ( long  val,
int  res 
)

Computes the measured voltage

Parameters
valValue measured by highestValue()
resADC resolution
Returns
Measured current in mA

The documentation for this class was generated from the following file: