Threshold odczytu poziomu baterii
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
#include "SD.h"
|
#include "SD.h"
|
||||||
#include "SPI.h"
|
#include "SPI.h"
|
||||||
|
|
||||||
#define Version "0.29"
|
#define Version "0.30"
|
||||||
#define WIRE Wire
|
#define WIRE Wire
|
||||||
#define DHTTYPE DHT22
|
#define DHTTYPE DHT22
|
||||||
#define DHTPIN 4
|
#define DHTPIN 4
|
||||||
@@ -440,7 +440,7 @@ void loop() {
|
|||||||
|
|
||||||
// Log napiećia docelowoe procent baterii
|
// Log napiećia docelowoe procent baterii
|
||||||
// kiedy zaden przycisk nie jest wcisniety
|
// kiedy zaden przycisk nie jest wcisniety
|
||||||
if (abs (batteryVoltage - currentBatteryVoltage) >= 0.2 && digitalRead(BTN_DOWN) == LOW && digitalRead(BTN_UP) == LOW && digitalRead(BTN_ENTER) == LOW ) {
|
if (abs (batteryVoltage - currentBatteryVoltage) >= 0.14 && digitalRead(BTN_DOWN) == LOW && digitalRead(BTN_UP) == LOW && digitalRead(BTN_ENTER) == LOW ) {
|
||||||
lastBatteryVoltage = currentBatteryVoltage;
|
lastBatteryVoltage = currentBatteryVoltage;
|
||||||
currentBatteryVoltage = batteryVoltage;
|
currentBatteryVoltage = batteryVoltage;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user