pyupm_ta12200 module

class pyupm_ta12200.TA12200(pin)[source]

Bases: object

API for the TA12-200 Current Transformer.

ID: ta12200

Name: AC Current Sensor

Other Names: Grove Electricity Sensor

Category: electric

Manufacturer: seeed

Link:http://www.seeedstudio.com/wiki/Grove_-_Electricity_Sensor

Connection: analog 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.

C++ includes: ta12200.hpp

getMillis()[source]

uint32_t getMillis()

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

Elapsed milliseconds

highestValue()[source]

int highestValue()

Gets the conversion value from the sensor

Highest value obtained over 1 second of measuring or -1 if error

initClock()[source]

void initClock()

Resets the clock

milliAmps(val, res=1024)[source]

float milliAmps(unsigned int val, int res=TA12200_ADC_RES)

Computes the measured voltage

val: Value measured by highestValue()

res: ADC resolution

Measured current in mA