Merge branch 'master' of https://gitea.kaczor.it/sieja/Arduino
This commit is contained in:
@@ -47,7 +47,7 @@ DHT dhtL(DHTPIN_L, DHT22);
|
||||
DHT dhtM(DHTPIN_M, DHT22);
|
||||
DHT dhtH(DHTPIN_H, DHT22);
|
||||
|
||||
RTC_DS3231 rtc; // Obiekt dla DS3231
|
||||
RTC_DS1307 rtc; // Obiekt dla RTC_DS1307
|
||||
int menuL0 = 10;
|
||||
int menuL1 = 10;
|
||||
int menuL2 = 10;
|
||||
@@ -204,7 +204,7 @@ void setup() {
|
||||
analogSetAttenuation(ADC_11db);
|
||||
|
||||
if (!rtc.begin()) {
|
||||
Serial.println("Nie znaleziono DS3231 RTC!");
|
||||
Serial.println("Nie znaleziono DS1307 RTC!");
|
||||
}
|
||||
display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // Address 0x3C for 128x32
|
||||
display.setTextSize(1);
|
||||
@@ -235,7 +235,7 @@ void setup() {
|
||||
|
||||
display.println("DHT22");
|
||||
display.setCursor(40, 16);
|
||||
display.println("RTC: DS3231");
|
||||
display.println("RTC: DS1307");
|
||||
display.setCursor(0, 24);
|
||||
display.println("Battery: ");
|
||||
display.setCursor(55, 24);
|
||||
@@ -806,7 +806,8 @@ void loop() {
|
||||
file.print(" V: ");
|
||||
file.println(formatNumber(currentBatteryVoltage, 2));
|
||||
file.close();
|
||||
delay(850);
|
||||
esp_sleep_enable_timer_wakeup(85 * 1000ULL); // 5s w mikrosekundach
|
||||
esp_light_sleep_start();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -864,13 +865,16 @@ void loop() {
|
||||
file.println(formatNumber(humLCalc));
|
||||
file.close();
|
||||
delay(1000);
|
||||
esp_sleep_enable_timer_wakeup(1 * 1000000ULL); // 1s
|
||||
esp_light_sleep_start();
|
||||
}
|
||||
}
|
||||
if (sd_error == 1){
|
||||
display.drawLine(0, 0,128, 32, SSD1306_WHITE);
|
||||
}
|
||||
display.display();
|
||||
delay(150);
|
||||
esp_sleep_enable_timer_wakeup(15 * 10000ULL); // 150ms
|
||||
esp_light_sleep_start();
|
||||
yield();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user