Skip to content

Commit 8176dbc

Browse files
committed
2 parents 9a7d319 + 958cfcd commit 8176dbc

File tree

14 files changed

+1281
-1
lines changed

14 files changed

+1281
-1
lines changed
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
/*
2+
Inkplate10_Download_Files_With_Certificate example for Soldered Inkplate 7
3+
For this example you will need a micro USB cable, Inkplate 7, and an available WiFi connection.
4+
Select "Soldered Inkplate 7" from Tools -> Board menu.
5+
6+
You can open .bmp files that have color depth of 1 bit (BW bitmap), 4 bit, 8 bit and
7+
24 bit
8+
9+
This example will show you how you can download a .bmp file (picture) from the web securely by providing a
10+
certificate for the website that will be validated upon conncection and
11+
display that image on e-paper display.
12+
13+
Want to learn more about Inkplate? Visit www.inkplate.io
14+
Looking to get support? Write on our forums: https://forum.soldered.com/
15+
15 March 2024 by Soldered
16+
*/
17+
18+
// Next 3 lines are a precaution, you can ignore those, and the example would also work without them
19+
#if !defined(ARDUINO_INKPLATE10) && !defined(ARDUINO_INKPLATE10V2)
20+
#error "Wrong board selection for this example, please select e-radionica Inkplate10 or Soldered Inkplate10 in the boards menu."
21+
#endif
22+
23+
#include "Inkplate.h" //Include Inkplate library to the sketch
24+
Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1 Bit mode (BW)
25+
26+
const char ssid[] = ""; // Your WiFi SSID
27+
const char *password = ""; // Your WiFi password
28+
29+
//This is the certificate for the website https://varipass.org
30+
//You can find information on how to get the certificate of a website
31+
//as well as how to format it here: https://randomnerdtutorials.com/esp32-https-requests/
32+
33+
const char* certificate = \
34+
"-----BEGIN CERTIFICATE-----\n" \
35+
"MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAw\n" \
36+
"TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh\n" \
37+
"cmNoIEdyb3VwMRUwEwYDVQQDEwx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\n" \
52+
"HRMBAf8EBTADAQH/MB0GA1UdDgQWBBR5tFnme7bl5AFzgAiIyBpY9umbbjANBgkq\n" \
53+
"hkiG9w0BAQsFAAOCAgEAVR9YqbyyqFDQDLHYGmkgJykIrGF1XIpu+ILlaS/V9lZL\n" \
54+
"ubhzEFnTIZd+50xx+7LSYK05qAvqFyFWhfFQDlnrzuBZ6brJFe+GnY+EgPbk6ZGQ\n" \
55+
"3BebYhtF8GaV0nxvwuo77x/Py9auJ/GpsMiu/X1+mvoiBOv/2X/qkSsisRcOj/KK\n" \
56+
"NFtY2PwByVS5uCbMiogziUwthDyC3+6WVwW6LLv3xLfHTjuCvjHIInNzktHCgKQ5\n" \
57+
"ORAzI4JMPJ+GslWYHb4phowim57iaztXOoJwTdwJx4nLCgdNbOhdjsnvzqvHu7Ur\n" \
58+
"TkXWStAmzOVyyghqpZXjFaH3pO3JLF+l+/+sKAIuvtd7u+Nxe5AW0wdeRlN8NwdC\n" \
59+
"jNPElpzVmbUq4JUagEiuTDkHzsxHpFKVK7q4+63SM1N95R1NbdWhscdCb+ZAJzVc\n" \
60+
"oyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq\n" \
61+
"4RgqsahDYVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPA\n" \
62+
"mRGunUHBcnWEvgJBQl9nJEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57d\n" \
63+
"emyPxgcYxn/eR44/KJ4EBs+lVDR3veyJm+kXQ99b21/+jh5Xos1AnX5iItreGCc=\n" \
64+
"-----END CERTIFICATE-----\n";
65+
66+
void setup()
67+
{
68+
display.begin(); // Init Inkplate library (you should call this function ONLY ONCE)
69+
display.clearDisplay(); // Clear frame buffer of display
70+
display.display(); // Put clear image on display
71+
72+
display.print("Connecting to WiFi...");
73+
display.partialUpdate();
74+
display.connectWiFi(ssid, password);
75+
76+
while (!display.isConnected())
77+
{
78+
delay(500);
79+
display.print(".");
80+
display.partialUpdate();
81+
}
82+
display.println("\nWiFi OK! Downloading...");
83+
display.partialUpdate();
84+
85+
//Apply the certificate previously defined
86+
display.applyCertificate(certificate);
87+
//Here we will draw the image using a valid certificate. Photo taken by: Roberto Fernandez
88+
if (!display.drawImage("https://varipass.org/neowise_mono.bmp", 0, 0, false, true))
89+
{
90+
// If is something failed (wrong filename or wrong bitmap format), write error message on the screen.
91+
// REMEMBER! You can only use Windows Bitmap file with color depth of 1, 4, 8 or 24 bits with no compression!
92+
display.println("Image open error");
93+
display.display();
94+
}
95+
display.display();
96+
delay(3000);
97+
display.clearDisplay();
98+
//Next we will try to load an image from a different website, which will not work as the certificate is
99+
//not valid for this page
100+
if (!display.drawImage("https://raw.githubusercontent.com/SolderedElectronics/Inkplate-Arduino-library/master/examples/Inkplate5V2/Advanced/WEB_WiFi/Inkplate5V2_Show_JPG_With_HTTPClient/image.jpg", 0, 100, true, false))
101+
{
102+
display.println("This image wont load as the certificate is invalid");
103+
display.display();
104+
}
105+
display.display();
106+
107+
display.disconnect();
108+
}
109+
110+
void loop()
111+
{
112+
// Nothing...
113+
}
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
/*
2+
Inkplate2_Download_Files_With_Certificate example for Soldered Inkplate 2
3+
For this example you will need a micro USB cable, Inkplate 2, and an available WiFi connection.
4+
Select "Soldered Inkplate 2" from Tools -> Board menu.
5+
6+
You can open .bmp files that have color depth of 1 bit (BW bitmap), 4 bit, 8 bit and
7+
24 bit
8+
9+
This example will show you how you can download a .bmp file (picture) from the web securely by providing a
10+
certificate for the website that will be validated upon conncection and
11+
display that image on e-paper display.
12+
13+
Want to learn more about Inkplate? Visit www.inkplate.io
14+
Looking to get support? Write on our forums: https://forum.soldered.com/
15+
15 March 2024 by Soldered
16+
*/
17+
18+
// Next 3 lines are a precaution, you can ignore those, and the example would also work without them
19+
#ifndef ARDUINO_INKPLATE2
20+
#error "Wrong board selection for this example, please select Inkplate 2 in the boards menu."
21+
#endif
22+
23+
#include "Inkplate.h" //Include Inkplate library to the sketch
24+
Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1 Bit mode (BW)
25+
26+
const char ssid[] = ""; // Your WiFi SSID
27+
const char *password = ""; // Your WiFi password
28+
29+
//This is the certificate for the website https://varipass.org
30+
//You can find information on how to get the certificate of a website
31+
//as well as how to format it here: https://randomnerdtutorials.com/esp32-https-requests/
32+
33+
const char* certificate = \
34+
"-----BEGIN CERTIFICATE-----\n" \
35+
"MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAw\n" \
36+
"TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh\n" \
37+
"cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMTUwNjA0MTEwNDM4\n" \
38+
"WhcNMzUwNjA0MTEwNDM4WjBPMQswCQYDVQQGEwJVUzEpMCcGA1UEChMgSW50ZXJu\n" \
39+
"ZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMTDElTUkcgUm9vdCBY\n" \
40+
"MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK3oJHP0FDfzm54rVygc\n" \
41+
"h77ct984kIxuPOZXoHj3dcKi/vVqbvYATyjb3miGbESTtrFj/RQSa78f0uoxmyF+\n" \
42+
"0TM8ukj13Xnfs7j/EvEhmkvBioZxaUpmZmyPfjxwv60pIgbz5MDmgK7iS4+3mX6U\n" \
43+
"A5/TR5d8mUgjU+g4rk8Kb4Mu0UlXjIB0ttov0DiNewNwIRt18jA8+o+u3dpjq+sW\n" \
44+
"T8KOEUt+zwvo/7V3LvSye0rgTBIlDHCNAymg4VMk7BPZ7hm/ELNKjD+Jo2FR3qyH\n" \
45+
"B5T0Y3Hs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dWhscdCb+ZAJzVc\n" \
60+
"oyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq\n" \
61+
"4RgqsahDYVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPA\n" \
62+
"mRGunUHBcnWEvgJBQl9nJEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57d\n" \
63+
"emyPxgcYxn/eR44/KJ4EBs+lVDR3veyJm+kXQ99b21/+jh5Xos1AnX5iItreGCc=\n" \
64+
"-----END CERTIFICATE-----\n";
65+
66+
void setup()
67+
{
68+
display.begin(); // Init Inkplate library (you should call this function ONLY ONCE)
69+
display.clearDisplay(); // Clear frame buffer of display
70+
display.display(); // Put clear image on display
71+
72+
display.print("Connecting to WiFi...");
73+
display.partialUpdate();
74+
display.connectWiFi(ssid, password);
75+
76+
while (!display.isConnected())
77+
{
78+
delay(500);
79+
display.print(".");
80+
display.partialUpdate();
81+
}
82+
display.println("\nWiFi OK! Downloading...");
83+
display.partialUpdate();
84+
85+
//Apply the certificate previously defined
86+
display.applyCertificate(certificate);
87+
//Here we will draw the image using a valid certificate. Photo taken by: Roberto Fernandez
88+
if (!display.drawImage("https://varipass.org/neowise_mono.bmp", 0, 0, false, true))
89+
{
90+
// If is something failed (wrong filename or wrong bitmap format), write error message on the screen.
91+
// REMEMBER! You can only use Windows Bitmap file with color depth of 1, 4, 8 or 24 bits with no compression!
92+
display.println("Image open error");
93+
display.display();
94+
}
95+
display.display();
96+
delay(3000);
97+
display.clearDisplay();
98+
//Next we will try to load an image from a different website, which will not work as the certificate is
99+
//not valid for this page
100+
if (!display.drawImage("https://raw.githubusercontent.com/SolderedElectronics/Inkplate-Arduino-library/master/examples/Inkplate5V2/Advanced/WEB_WiFi/Inkplate5V2_Show_JPG_With_HTTPClient/image.jpg", 0, 100, true, false))
101+
{
102+
display.println("This image wont load as the certificate is invalid");
103+
display.display();
104+
}
105+
display.display();
106+
107+
display.disconnect();
108+
}
109+
110+
void loop()
111+
{
112+
// Nothing...
113+
}
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
/*
2+
Inkplate4_Download_Files_With_Certificate example for Soldered Inkplate 2
3+
For this example you will need a micro USB cable, Inkplate 2, and an available WiFi connection.
4+
Select "Soldered Inkplate 2" from Tools -> Board menu.
5+
6+
You can open .bmp files that have color depth of 1 bit (BW bitmap), 4 bit, 8 bit and
7+
24 bit
8+
9+
This example will show you how you can download a .bmp file (picture) from the web securely by providing a
10+
certificate for the website that will be validated upon conncection and
11+
display that image on e-paper display.
12+
13+
Want to learn more about Inkplate? Visit www.inkplate.io
14+
Looking to get support? Write on our forums: https://forum.soldered.com/
15+
15 March 2024 by Soldered
16+
*/
17+
18+
// Next 3 lines are a precaution, you can ignore those, and the example would also work without them
19+
#ifndef ARDUINO_INKPLATE4
20+
#error "Wrong board selection for this example, please select Inkplate 2 in the boards menu."
21+
#endif
22+
23+
#include "Inkplate.h" //Include Inkplate library to the sketch
24+
Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1 Bit mode (BW)
25+
26+
const char ssid[] = ""; // Your WiFi SSID
27+
const char *password = ""; // Your WiFi password
28+
29+
//This is the certificate for the website https://varipass.org
30+
//You can find information on how to get the certificate of a website
31+
//as well as how to format it here: https://randomnerdtutorials.com/esp32-https-requests/
32+
33+
const char* certificate = \
34+
"-----BEGIN CERTIFICATE-----\n" \
35+
"MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAw\n" \
36+
"TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh\n" \
37+
"cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMTUwNjA0MTEwNDM4\n" \
38+
"WhcNMzUwNjA0MTEwNDM4WjBP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n" \
53+
"hkiG9w0BAQsFAAOCAgEAVR9YqbyyqFDQDLHYGmkgJykIrGF1XIpu+ILlaS/V9lZL\n" \
54+
"ubhzEFnTIZd+50xx+7LSYK05qAvqFyFWhfFQDlnrzuBZ6brJFe+GnY+EgPbk6ZGQ\n" \
55+
"3BebYhtF8GaV0nxvwuo77x/Py9auJ/GpsMiu/X1+mvoiBOv/2X/qkSsisRcOj/KK\n" \
56+
"NFtY2PwByVS5uCbMiogziUwthDyC3+6WVwW6LLv3xLfHTjuCvjHIInNzktHCgKQ5\n" \
57+
"ORAzI4JMPJ+GslWYHb4phowim57iaztXOoJwTdwJx4nLCgdNbOhdjsnvzqvHu7Ur\n" \
58+
"TkXWStAmzOVyyghqpZXjFaH3pO3JLF+l+/+sKAIuvtd7u+Nxe5AW0wdeRlN8NwdC\n" \
59+
"jNPElpzVmbUq4JUagEiuTDkHzsxHpFKVK7q4+63SM1N95R1NbdWhscdCb+ZAJzVc\n" \
60+
"oyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq\n" \
61+
"4RgqsahDYVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPA\n" \
62+
"mRGunUHBcnWEvgJBQl9nJEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57d\n" \
63+
"emyPxgcYxn/eR44/KJ4EBs+lVDR3veyJm+kXQ99b21/+jh5Xos1AnX5iItreGCc=\n" \
64+
"-----END CERTIFICATE-----\n";
65+
66+
void setup()
67+
{
68+
display.begin(); // Init Inkplate library (you should call this function ONLY ONCE)
69+
display.clearDisplay(); // Clear frame buffer of display
70+
display.display(); // Put clear image on display
71+
72+
display.print("Connecting to WiFi...");
73+
display.partialUpdate();
74+
display.connectWiFi(ssid, password);
75+
76+
while (!display.isConnected())
77+
{
78+
delay(500);
79+
display.print(".");
80+
display.partialUpdate();
81+
}
82+
display.println("\nWiFi OK! Downloading...");
83+
display.partialUpdate();
84+
85+
//Apply the certificate previously defined
86+
display.applyCertificate(certificate);
87+
//Here we will draw the image using a valid certificate. Photo taken by: Roberto Fernandez
88+
if (!display.drawImage("https://varipass.org/neowise_mono.bmp", 0, 0, false, true))
89+
{
90+
// If is something failed (wrong filename or wrong bitmap format), write error message on the screen.
91+
// REMEMBER! You can only use Windows Bitmap file with color depth of 1, 4, 8 or 24 bits with no compression!
92+
display.println("Image open error");
93+
display.display();
94+
}
95+
display.display();
96+
delay(3000);
97+
display.clearDisplay();
98+
//Next we will try to load an image from a different website, which will not work as the certificate is
99+
//not valid for this page
100+
if (!display.drawImage("https://raw.githubusercontent.com/SolderedElectronics/Inkplate-Arduino-library/master/examples/Inkplate5V2/Advanced/WEB_WiFi/Inkplate5V2_Show_JPG_With_HTTPClient/image.jpg", 0, 100, true, false))
101+
{
102+
display.println("This image wont load as the certificate is invalid");
103+
display.display();
104+
}
105+
display.display();
106+
107+
display.disconnect();
108+
}
109+
110+
void loop()
111+
{
112+
// Nothing...
113+
}

0 commit comments

Comments
 (0)