upm
0.5.1
Sensor/Actuator repository for libmraa (v0.9.1)
|
API for the ECS1030 Non-Invasive Current/Electricity Sensor. More...
This non-invasive current sensor can be clamped around the supply line of an electrical load to tell you how much current is passing through it. It does this by acting as an inductor and responding to the magnetic field around a current-carrying conductor. This particular current sensor measures a load up to 30 A, which makes it great for building your own energy monitors.
ECS1030 Sensor image provided by SparkFun* under CC BY-NC-SA-3.0.
Public Member Functions | |
ECS1030 (uint8_t pinNumber) | |
~ECS1030 () | |
double | getCurrency_A () |
double | getPower_A () |
double | getCurrency_B () |
double | getPower_B () |
std::string | name () |
Static Public Attributes | |
static const uint8_t | DELAY_MS = 20000 / NUMBER_OF_SAMPLES |
static const uint8_t | VOLT_M = 5.1 / 1023 |
static const uint8_t | R_LOAD = 2000.0 / CURRENT_RATIO |
ECS1030 | ( | uint8_t | pinNumber | ) |
Instantiates an ECS1030 object
pinNumber | Number of the data pin |
double getCurrency_A | ( | ) |
Returns electric current data for a sampled period
double getPower_A | ( | ) |
Returns power data for a sampled period
double getCurrency_B | ( | ) |
Returns electric current data for a sampled period
double getPower_B | ( | ) |
Returns power data for a sampled period
|
inline |
Returns the name of the component