We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26db5c3 commit 8c2c1c6Copy full SHA for 8c2c1c6
pio_workspace/lib/power_custom/adc_sensors.cpp
@@ -87,5 +87,5 @@ float ADCSensors::convertVoltage(float adcVoltage) {
87
}
88
89
float ADCSensors::convertCurrent(float adcCurrent) {
90
- return ((adcCurrent / 1024.0) * 3.3) / (0.005 * 50);
+ return (((adcCurrent * 2 ) / 50 ) / 0.005);
91
pio_workspace/lib/power_custom/adc_sensors.h
@@ -5,9 +5,9 @@
5
#include "Wire.h"
6
#include "Adafruit_ADS1X15.h"
7
8
-#define ADC_VOLTAGE_ADDR 0x48
9
-#define ADC_CURRENT1_ADDR 0x49
10
-#define ADC_CURRENT2_ADDR 0x4B
+#define ADC_VOLTAGE_ADDR 0x4B
+#define ADC_CURRENT1_ADDR 0x48
+#define ADC_CURRENT2_ADDR 0x49
11
12
class ADCSensors {
13
public:
0 commit comments