29 #include <mraa/gpio.h>
31 #define NUMBER_OF_SAMPLES 500
32 #define ADC_RESOLUTION 1024
33 #define SUPPLYVOLTAGE 5100
34 #define CURRENT_RATIO 2000.0
45 static const uint8_t DELAY_MS = 20000 / NUMBER_OF_SAMPLES;
46 static const uint8_t VOLT_M = 5.1 / 1023;
47 static const uint8_t R_LOAD = 2000.0 / CURRENT_RATIO;
89 mraa_aio_context m_dataPinCtx;
95 double m_filteredSample;
~ECS1030()
Definition: ecs1030.cxx:49
double getPower_B()
Definition: ecs1030.cxx:99
double getCurrency_A()
Definition: ecs1030.cxx:58
double getCurrency_B()
Definition: ecs1030.cxx:78
std::string name()
Definition: ecs1030.h:84
ECS1030(uint8_t pinNumber)
Definition: ecs1030.cxx:40
double getPower_A()
Definition: ecs1030.cxx:94