Wzbogacenie o sleep
This commit is contained in:
@@ -2,7 +2,9 @@
|
|||||||
#include <Wire.h>
|
#include <Wire.h>
|
||||||
#include <Adafruit_GFX.h>
|
#include <Adafruit_GFX.h>
|
||||||
#include <Adafruit_SSD1306.h>
|
#include <Adafruit_SSD1306.h>
|
||||||
#define Version "0.2"
|
#include <esp_sleep.h>
|
||||||
|
|
||||||
|
#define Version "0.3"
|
||||||
#define SCREEN_WIDTH 128
|
#define SCREEN_WIDTH 128
|
||||||
#define SCREEN_HEIGHT 32
|
#define SCREEN_HEIGHT 32
|
||||||
#define OLED_RESET -1
|
#define OLED_RESET -1
|
||||||
@@ -104,6 +106,9 @@ if (moisture < minValue){
|
|||||||
Serial.println();
|
Serial.println();
|
||||||
|
|
||||||
display.fillCircle(110, 12, 5, SSD1306_BLACK);
|
display.fillCircle(110, 12, 5, SSD1306_BLACK);
|
||||||
|
|
||||||
display.display();
|
display.display();
|
||||||
delay(waitMs);
|
esp_sleep_enable_timer_wakeup(waitSec * 1000000ULL); // 5s w mikrosekundach
|
||||||
|
esp_light_sleep_start();
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user