upm
0.3.1
Sensor/Actuator repository for libmraa (v0.7.2)
|
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 will measure a load up to 30 Amps 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 | ) |
Instanciates a ECS1030 (current sensor) object
pinNumber | number of the data pin |
double getCurrency_A | ( | ) |
Return currency data for the sampled period
double getPower_A | ( | ) |
Return power data for the sampled period
double getCurrency_B | ( | ) |
Return currency data for the sampled period
double getPower_B | ( | ) |
Return power data for the sampled period
|
inline |
Return name of the component