Skip to content

Commit 9fd5e79

Browse files
committed
Fixed links, added Inkplate6PLUS simple deep sleep example.
1 parent 9fba273 commit 9fd5e79

File tree

12 files changed

+25618
-10
lines changed

12 files changed

+25618
-10
lines changed

examples/Inkplate10/Advanced/WEB_WiFi/Inkplate10_Show_JPG_With_HTTPClient/Inkplate10_Show_JPG_With_HTTPClient.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ char *ssid = ""; // Your WiFi SSID
3333
char *pass = ""; // Your WiFi password
3434

3535
// Add the URL of the image you want to show on Inkplate
36-
String url = "https://raw.githubusercontent.com/SolderedElectronics/Inkplate-Arduino-library/dev/examples/Inkplate10/Advanced/WEB_WiFi/Inkplate10_Show_JPG_With_HTTPClient/image.jpg";
36+
String url = "https://raw.githubusercontent.com/SolderedElectronics/Inkplate-Arduino-library/master/examples/Inkplate10/Advanced/WEB_WiFi/Inkplate10_Show_JPG_With_HTTPClient/image.jpg";
3737

3838
/***********************************************/
3939

examples/Inkplate2/Advanced/WEB_WiFi/Inkplate2_Show_JPG_With_HTTPClient/Inkplate2_Show_JPG_With_HTTPClient.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ char *ssid = ""; // Your WiFi SSID
3232
char *pass = ""; // Your WiFi password
3333

3434
// Add the URL of the image you want to show on Inkplate
35-
String url = "https://raw.githubusercontent.com/SolderedElectronics/Inkplate-Arduino-library/dev/examples/Inkplate2/Advanced/WEB_WiFi/Inkplate2_Show_JPG_With_HTTPClient/image.jpg";
35+
String url = "https://raw.githubusercontent.com/SolderedElectronics/Inkplate-Arduino-library/master/examples/Inkplate2/Advanced/WEB_WiFi/Inkplate2_Show_JPG_With_HTTPClient/image.jpg";
3636

3737
/***********************************************/
3838

examples/Inkplate2/Advanced/WEB_WiFi/Inkplate2_Show_Pictures_From_Web/Inkplate2_Show_Pictures_From_Web.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ void setup()
6868
display.clearDisplay();
6969

7070
if (!display.drawImage("https://raw.githubusercontent.com/SolderedElectronics/Inkplate-Arduino-library/"
71-
"Inkplate2-DrawImage3Color-And-Examples/examples/Inkplate2/Advanced/WEB_WiFi/"
71+
"master/examples/Inkplate2/Advanced/WEB_WiFi/"
7272
"Inkplate2_Show_Pictures_From_Web/cat_dithered.jpg",
7373
0, 0, false, false))
7474
{
@@ -87,7 +87,7 @@ void setup()
8787
http.getStream().setTimeout(1);
8888

8989
http.begin("https://raw.githubusercontent.com/SolderedElectronics/Inkplate-Arduino-library/"
90-
"Inkplate2-DrawImage3Color-And-Examples/examples/Inkplate2/Advanced/WEB_WiFi/"
90+
"master/examples/Inkplate2/Advanced/WEB_WiFi/"
9191
"Inkplate2_Show_Pictures_From_Web/car.bmp");
9292

9393
// Check response code.
@@ -129,7 +129,7 @@ void setup()
129129
// true will flip all colors on the image, making black white and white black. fourth parameter will dither the
130130
// image.
131131
if (!display.drawImage("https://raw.githubusercontent.com/SolderedElectronics/Inkplate-Arduino-library/"
132-
"Inkplate2-DrawImage3Color-And-Examples/examples/Inkplate2/Advanced/WEB_WiFi/"
132+
"master/examples/Inkplate2/Advanced/WEB_WiFi/"
133133
"Inkplate2_Show_Pictures_From_Web/mountain.png",
134134
0, 0, true, false))
135135
{

examples/Inkplate4TEMPERA/Advanced/WEB_WiFi/Inkplate4TEMPERA_Show_JPG_With_HTTPClient/Inkplate4TEMPERA_Show_JPG_With_HTTPClient.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ char *ssid = ""; // Your WiFi SSID
3232
char *pass = ""; // Your WiFi password
3333

3434
// Add the URL of the image you want to show on Inkplate
35-
String url = "https://raw.githubusercontent.com/SolderedElectronics/Inkplate-Arduino-library/dev/examples/"
35+
String url = "https://raw.githubusercontent.com/SolderedElectronics/Inkplate-Arduino-library/master/examples/"
3636
"Inkplate4TEMPERA/Advanced/WEB_WiFi/Inkplate4TEMPERA_Show_JPG_With_HTTPClient/image.jpg";
3737

3838
/***********************************************/

examples/Inkplate5/Advanced/WEB_WiFi/Inkplate5_Show_JPG_With_HTTPClient/Inkplate5_Show_JPG_With_HTTPClient.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ char *ssid = ""; // Your WiFi SSID
3232
char *pass = ""; // Your WiFi password
3333

3434
// Add the URL of the image you want to show on Inkplate
35-
String url = "https://raw.githubusercontent.com/SolderedElectronics/Inkplate-Arduino-library/dev/examples/Inkplate5/Advanced/WEB_WiFi/Inkplate5_Show_JPG_With_HTTPClient/image.jpg";
35+
String url = "https://raw.githubusercontent.com/SolderedElectronics/Inkplate-Arduino-library/master/examples/Inkplate5/Advanced/WEB_WiFi/Inkplate5_Show_JPG_With_HTTPClient/image.jpg";
3636

3737
/***********************************************/
3838

examples/Inkplate6/Advanced/WEB_WiFi/Inkplate6_Show_JPG_With_HTTPClient/Inkplate6_Show_JPG_With_HTTPClient.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ char *ssid = ""; // Your WiFi SSID
3333
char *pass = ""; // Your WiFi password
3434

3535
// Add the URL of the image you want to show on Inkplate
36-
String url = "https://raw.githubusercontent.com/SolderedElectronics/Inkplate-Arduino-library/dev/examples/Inkplate6/Advanced/WEB_WiFi/Inkplate6_Show_JPG_With_HTTPClient/image.jpg";
36+
String url = "https://raw.githubusercontent.com/SolderedElectronics/Inkplate-Arduino-library/master/examples/Inkplate6/Advanced/WEB_WiFi/Inkplate6_Show_JPG_With_HTTPClient/image.jpg";
3737

3838
/***********************************************/
3939

examples/Inkplate6COLOR/Advanced/WEB_WiFi/Inkplate6COLOR_Show_JPG_With_HTTPClient/Inkplate6COLOR_Show_JPG_With_HTTPClient.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ char *ssid = ""; // Your WiFi SSID
3232
char *pass = ""; // Your WiFi password
3333

3434
// Add the URL of the image you want to show on Inkplate
35-
String url = "https://raw.githubusercontent.com/SolderedElectronics/Inkplate-Arduino-library/dev/examples/Inkplate6COLOR/Advanced/WEB_WiFi/Inkplate6COLOR_Show_JPG_With_HTTPClient/image.jpg";
35+
String url = "https://raw.githubusercontent.com/SolderedElectronics/Inkplate-Arduino-library/master/examples/Inkplate6COLOR/Advanced/WEB_WiFi/Inkplate6COLOR_Show_JPG_With_HTTPClient/image.jpg";
3636

3737
/***********************************************/
3838

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/*
2+
Inkplate6PLUS_Simple_Deep_Sleep example for Soldered Inkplate 6Plus
3+
For this example you will need USB cable and Inkplate 6Plus
4+
Select "e-radionica Inkplate 6Plus" or "Soldered Inkplate 6Plus" from Tools -> Board menu.
5+
Don't have "e-radionica Inkplate 6Plus" or "Soldered Inkplate 6Plus" option? Follow our tutorial and add it:
6+
https://soldered.com/learn/add-inkplate-6-board-definition-to-arduino-ide/
7+
8+
This example will show you how you can use low power functionality of Inkplate board.
9+
In deep sleep, whole board will consume about 25uA from battery.
10+
Inkplate will wake every 20 seconds change content on screen.
11+
12+
NOTE: Because we are using deep sleep, everytime the board wakes up, it starts program from begining.
13+
Also, whole content from RAM gets erased, so you CAN NOT use partial updates.
14+
15+
Want to learn more about Inkplate? Visit www.inkplate.io
16+
Looking to get support? Write on our forums: https://forum.soldered.com/
17+
11 February 2021 by Soldered
18+
*/
19+
20+
// Next 3 lines are a precaution, you can ignore those, and the example would also work without them
21+
#if !defined(ARDUINO_INKPLATE6PLUS) && !defined(ARDUINO_INKPLATE6PLUSV2)
22+
#error \
23+
"Wrong board selection for this example, please select e-radionica Inkplate 6Plus or Soldered Inkplate 6Plus in the boards menu."
24+
#endif
25+
26+
#include "Inkplate.h" //Include Inkplate library to the sketch
27+
#include "driver/rtc_io.h" //ESP32 library used for deep sleep and RTC wake up pins
28+
#include "picture1.h" //Include .h files of 3 pictures. All three pictures were converted using Inkplate Image Converter
29+
#include "picture2.h"
30+
#include "picture3.h"
31+
const uint8_t *pictures[] = {picture1, picture2,
32+
picture3}; // This array of pinters holds address of every picture in the memory,
33+
// so we can easly select it by selecting index in array
34+
35+
#define uS_TO_S_FACTOR 1000000 // Conversion factor for micro seconds to seconds
36+
#define TIME_TO_SLEEP 20 // How long ESP32 will be in deep sleep (in seconds)
37+
RTC_DATA_ATTR int slide = 0;
38+
39+
Inkplate display(INKPLATE_3BIT); // Create an object on Inkplate library and also set library into 3 Bit mode (gray)
40+
41+
void setup()
42+
{
43+
display.begin(); // Init Inkplate library (you should call this function ONLY ONCE)
44+
display.clearDisplay(); // Clear frame buffer of display
45+
display.drawImage(
46+
pictures[slide], 0, 0, 1100,
47+
825); // Display selected picture at location X=0, Y=0. All three pictures have resolution of 1100x825 pixels
48+
display.display(); // Refresh the screen with new picture
49+
slide++; // Update counter for pictures. With this variable, we choose what picture is going to be displayed on
50+
// screen
51+
if (slide > 2)
52+
slide = 0; // We do not have more than 3 images, so roll back to zero
53+
54+
// Uncomment this line if your Inkplate is older than Aug 2021 as older Inkplates have ESP32 wrover-e chips
55+
// rtc_gpio_isolate(GPIO_NUM_12); // Isolate/disable GPIO12 on ESP32 (only to reduce power consumption in sleep)
56+
esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR); // Activate wake-up timer -- wake up after 20s here
57+
esp_deep_sleep_start(); // Put ESP32 into deep sleep. Program stops here.
58+
}
59+
60+
void loop()
61+
{
62+
// Nothing! If you use deep sleep, whole program should be in setup() because each time the board restarts, not in a
63+
// loop()! loop() must be empty!
64+
}

0 commit comments

Comments
 (0)