diff --git a/src/main.cpp b/src/main.cpp index a9fa3e0..cb738df 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -36,10 +36,10 @@ void loop() { double watt = current * voltage; double amphours = current / (3600.0 / INTERVALTIME); // every 10secs is a measurement point... all += amphours; - Serial.print(all * 1000.0, 5); + Serial.print(all * 1000.0, 2); Serial.print("mA/h already captured after - "); - Serial.print(time * INTERVALTIME); - Serial.println("s"); + Serial.print((time * INTERVALTIME) / 60); + Serial.println("min"); Serial.print("Watts: "); Serial.println(watt); @@ -49,7 +49,7 @@ void loop() { } else if (voltage <= MINVOLTAGE) { digitalWrite(MOSFETPIN, LOW); Serial.print("FINISHED voltage below minvoltage - "); - Serial.print(all * 1000, 5); + Serial.print(all * 1000, 2); Serial.print("mA/h in - "); Serial.print(time * INTERVALTIME); Serial.println("s"); @@ -62,7 +62,6 @@ void loop() { Serial.println(voltage); unsigned int delaytime = (micros() - oldtime) / 1000; - Serial.println(INTERVALTIME * 1000 - delaytime); - delay(INTERVALTIME * 1000 - delaytime); + delay(INTERVALTIME * 1000 - delaytime); // application loops here for ap. 5 secs oldtime = micros(); } \ No newline at end of file