29 #include <mraa/gpio.h> 33 #define NUMBER_OF_SAMPLES 500 34 #define ADC_RESOLUTION 1024 35 #define SUPPLYVOLTAGE 5100 36 #define CURRENT_RATIO 2000.0 77 static const uint8_t DELAY_MS = 20000 / NUMBER_OF_SAMPLES;
78 static const uint8_t VOLT_M = 5.1 / 1023;
79 static const uint8_t R_LOAD = 2000.0 / CURRENT_RATIO;
121 mraa_aio_context m_dataPinCtx;
123 double m_calibration;
127 double m_filteredSample;
~ECS1030()
Definition: ecs1030.cxx:45
double getPower_B()
Definition: ecs1030.cxx:98
C++ API wrapper for the bh1749 driver.
Definition: a110x.hpp:29
double getCurrency_A()
Definition: ecs1030.cxx:54
ECS1030(int pinNumber)
Definition: ecs1030.cxx:35
double getCurrency_B()
Definition: ecs1030.cxx:75
std::string name()
Definition: ecs1030.hpp:116
API for the ECS1030 Non-Invasive Current/Electricity Sensor.
Definition: ecs1030.hpp:75
double getPower_A()
Definition: ecs1030.cxx:93