Skip to content

Commit 54592ff

Browse files
authored
Merge pull request #239 from SolderedElectronics/ip6ColorSleepFix
Inkplate6 Color Deep Sleep Fix
2 parents 5479e21 + c0d7cd0 commit 54592ff

File tree

12 files changed

+34
-36
lines changed

12 files changed

+34
-36
lines changed

examples/Inkplate6COLOR/Advanced/DeepSleep/Inkplate6COLOR_Simple_Deep_Sleep/Inkplate6COLOR_Simple_Deep_Sleep.ino

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,14 @@ const uint8_t *pictures[] = {picture1, picture2,
3232
// so we can easly select it by selecting index in array
3333

3434
#define uS_TO_S_FACTOR 1000000 // Conversion factor for micro seconds to seconds
35-
#define TIME_TO_SLEEP 20 // How long ESP32 will be in deep sleep (in seconds)
35+
#define TIME_TO_SLEEP 30 // How long ESP32 will be in deep sleep (in seconds)
3636
RTC_DATA_ATTR int slide = 0;
3737

3838
Inkplate display; // Create an object on Inkplate library and also set library into 3 Bit mode (gray)
3939

4040
void setup()
4141
{
42+
Serial.begin(115200);
4243
display.begin(); // Init Inkplate library (you should call this function ONLY ONCE)
4344
display.clearDisplay(); // Clear frame buffer of display
4445
display.drawImage(
@@ -55,13 +56,13 @@ void setup()
5556

5657
// Activate wake-up timer -- wake up after 20s here
5758
esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR);
58-
59-
// Put ESP32 into deep sleep. Program stops here.
59+
60+
// Put ESP32 into deep sleep. Program stops here.
6061
esp_deep_sleep_start();
6162
}
6263

6364
void loop()
6465
{
6566
// Nothing! If you use deep sleep, whole program should be in setup() because each time the board restarts, not in a
6667
// loop()! loop() must be empty!
67-
}
68+
}

examples/Inkplate6COLOR/Diagnostics/Inkplate6COLOR_Gallery/Inkplate6COLOR_Gallery.ino

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,11 @@ void setup()
8080
// Go to sleep for DELAY_MS
8181
esp_sleep_enable_timer_wakeup(1000L * DELAY_MS);
8282

83-
84-
8583
// Put SD card into deep sleep
8684
display.sdCardSleep();
8785

8886
// Start deep sleep (this function does not return). Program stops here.
89-
(void)esp_deep_sleep_start();
87+
esp_deep_sleep_start();
9088
}
9189

9290
void loop()

examples/Inkplate6COLOR/Diagnostics/Inkplate6COLOR_Mapbox_API/Inkplate6COLOR_Mapbox_API.ino

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ void setup()
6161
// Go to sleep for DELAY_MS
6262
esp_sleep_enable_timer_wakeup(1000L * DELAY_MS);
6363

64-
65-
6664
// Start deep sleep (this function does not return). Program stops here.
6765
esp_deep_sleep_start();
6866
}

examples/Inkplate6COLOR/Projects/Inkplate6COLOR_Crowdsupply_Campaing_Tracker/Inkplate6COLOR_Crowdsupply_Campaing_Tracker.ino

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,6 @@ void setup()
119119

120120
// Go to sleep
121121
esp_sleep_enable_timer_wakeup(1000LL * DELAY_MS);
122-
123-
124122

125123
// Start deep sleep (this function does not return). Program stops here.
126124
esp_deep_sleep_start();

examples/Inkplate6COLOR/Projects/Inkplate6COLOR_Crypto_Currency_Tracker/Inkplate6COLOR_Crypto_Currency_Tracker.ino

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ void loop()
145145
// Go to sleep before checking again
146146
esp_sleep_enable_timer_wakeup(1000L * DELAY_MS);
147147

148-
149148
// Start deep sleep (this function does not return). Program stops here.
150149
esp_deep_sleep_start();
151150
}

examples/Inkplate6COLOR/Projects/Inkplate6COLOR_Daily_Weather_Station/Inkplate6COLOR_Daily_Weather_Station.ino

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,6 @@ void setup()
139139

140140
// Activate wakeup timer
141141
esp_sleep_enable_timer_wakeup(1000L * DELAY_MS);
142-
143-
144142

145143
// Start deep sleep (this function does not return). Program stops here.
146144
esp_deep_sleep_start();

examples/Inkplate6COLOR/Projects/Inkplate6COLOR_Google_Calendar/Inkplate6COLOR_Google_Calendar.ino

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,6 @@ void setup()
130130

131131
// Go to sleep before checking again
132132
esp_sleep_enable_timer_wakeup(1000L * DELAY_MS);
133-
134-
135133

136134
// Start deep sleep (this function does not return). Program stops here.
137135
esp_deep_sleep_start();

examples/Inkplate6COLOR/Projects/Inkplate6COLOR_Hourly_Weather_Station/Inkplate6COLOR_Hourly_Weather_Station.ino

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,6 @@ void loop()
162162

163163
// Activate wakeup timer
164164
esp_sleep_enable_timer_wakeup(1000L * DELAY_MS);
165-
166-
167165

168166
// Start deep sleep (this function does not return). Program stops here.
169167
esp_deep_sleep_start();

examples/Inkplate6COLOR/Projects/Inkplate6COLOR_Image_Frame_From_SD/Inkplate6COLOR_Image_Frame_From_SD.ino

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,6 @@ void deepSleep()
179179
// Turn off the power supply for the SD card
180180
display.sdCardSleep();
181181

182-
183-
184182
// Enable wakeup from deep sleep on GPIO 36 (wake button)
185183
esp_sleep_enable_ext0_wakeup(GPIO_NUM_36, LOW);
186184

examples/Inkplate6COLOR/Projects/Inkplate6COLOR_Image_Frame_From_Web/Inkplate6COLOR_Image_Frame_From_Web.ino

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ void setup()
4242

4343
// Activate wakeup timer
4444
esp_sleep_enable_timer_wakeup(15ll * 60 * 1000 * 1000);
45-
46-
4745

4846
// Start deep sleep (this function does not return). Program stops here.
4947
esp_deep_sleep_start();

0 commit comments

Comments
 (0)