Skip to content

Commit 2a332c7

Browse files
committed
Added Inkplate Clean examples.
Added examples for cleaning epaper panel from burn-in.
1 parent 78bf565 commit 2a332c7

File tree

4 files changed

+260
-0
lines changed

4 files changed

+260
-0
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/*
2+
Inkplate_Clear example for e-radionica.com Inkplate 10
3+
For this example you will need only USB cable and Inkplate 10.
4+
Select "Inkplate 10(ESP32)" from Tools -> Board menu.
5+
Don't have "Inkplate 10(ESP32)" option? Follow our tutorial and add it:
6+
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
7+
8+
This example will try to remove heavy burn-in visible on the panel.
9+
Set number of refresh / clear cycles and upload the program.
10+
11+
Want to learn more about Inkplate? Visit www.inkplate.io
12+
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
13+
12 January 2022 by e-radionica.com
14+
*/
15+
16+
// Next 3 lines are a precaution, you can ignore those, and the example would also work without them
17+
#ifndef ARDUINO_INKPLATE10
18+
#error "Wrong board selection for this example, please select Inkplate 10 in the boards menu."
19+
#endif
20+
21+
#include "Inkplate.h" //Include Inkplate library to the sketch
22+
Inkplate display(INKPLATE_1BIT); // Create object on Inkplate library and set library to work in monochorme mode
23+
24+
// Nubmer of clear cycles.
25+
#define CLEAR_CYCLES 20
26+
27+
// Delay between clear cycles (in milliseconds)
28+
#define CYCLES_DELAY 5000
29+
30+
void setup()
31+
{
32+
display.begin(); // Init library (you should call this function ONLY ONCE)
33+
display.clearDisplay(); // Clear any data that may have been in (software) frame buffer.
34+
35+
display.einkOn(); // Power up epaper power supply
36+
37+
int cycles = CLEAR_CYCLES;
38+
39+
// Clean it by writing clear sequence to the panel.
40+
while (cycles)
41+
{
42+
display.clean(1, 12);
43+
display.clean(2, 1);
44+
display.clean(0, 9);
45+
display.clean(2, 1);
46+
display.clean(1, 12);
47+
display.clean(2, 1);
48+
display.clean(0, 9);
49+
display.clean(2, 1);
50+
51+
delay(CYCLES_DELAY);
52+
cycles--;
53+
}
54+
55+
// Print text when clearing is done.
56+
display.setTextSize(4);
57+
display.setCursor(100, 100);
58+
display.print("Clearing done.");
59+
display.display();
60+
}
61+
62+
void loop()
63+
{
64+
// Empty...
65+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/*
2+
Inkplate_Clean example for e-radionica.com Inkplate 5
3+
For this example you will need only USB cable and Inkplate 5.
4+
Select "Inkplate 5(ESP32)" from Tools -> Board menu.
5+
Don't have "Inkplate 5(ESP32)" option? Follow our tutorial and add it:
6+
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
7+
8+
This example will try to remove heavy burn-in visible on the panel.
9+
Set number of refresh / clear cycles and upload the program.
10+
11+
Want to learn more about Inkplate? Visit www.inkplate.io
12+
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
13+
12 January 2022 by e-radionica.com
14+
*/
15+
16+
// Next 3 lines are a precaution, you can ignore those, and the example would also work without them
17+
#ifndef ARDUINO_INKPLATE5
18+
#error "Wrong board selection for this example, please select Inkplate 5 in the boards menu."
19+
#endif
20+
21+
#include "Inkplate.h" //Include Inkplate library to the sketch
22+
Inkplate display(INKPLATE_1BIT); // Create object on Inkplate library and set library to work in monochorme mode
23+
24+
// Nubmer of clear cycles.
25+
#define CLEAR_CYCLES 20
26+
27+
// Delay between clear cycles (in milliseconds)
28+
#define CYCLES_DELAY 5000
29+
30+
void setup()
31+
{
32+
display.begin(); // Init library (you should call this function ONLY ONCE)
33+
display.clearDisplay(); // Clear any data that may have been in (software) frame buffer.
34+
35+
display.einkOn(); // Power up epaper power supply
36+
37+
int cycles = CLEAR_CYCLES;
38+
39+
// Clean it by writing clear sequence to the panel.
40+
while (cycles)
41+
{
42+
display.clean(1, 17);
43+
display.clean(2, 1);
44+
display.clean(0, 17);
45+
display.clean(2, 1);
46+
display.clean(1, 17);
47+
display.clean(2, 1);
48+
display.clean(0, 17);
49+
display.clean(2, 1);
50+
51+
delay(CYCLES_DELAY);
52+
cycles--;
53+
}
54+
55+
// Print text when clearing is done.
56+
display.setTextSize(4);
57+
display.setCursor(100, 100);
58+
display.print("Clearing done.");
59+
display.display();
60+
}
61+
62+
void loop()
63+
{
64+
// Empty...
65+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/*
2+
Inkplate_Clean example for e-radionica.com Inkplate 6
3+
For this example you will need only USB cable and Inkplate 6.
4+
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
5+
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
6+
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
7+
8+
This example will try to remove heavy burn-in visible on the panel.
9+
Set number of refresh / clear cycles and upload the program.
10+
11+
Want to learn more about Inkplate? Visit www.inkplate.io
12+
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
13+
12 January 2022 by e-radionica.com
14+
*/
15+
16+
// Next 3 lines are a precaution, you can ignore those, and the example would also work without them
17+
#ifndef ARDUINO_ESP32_DEV
18+
#error "Wrong board selection for this example, please select Inkplate 6 in the boards menu."
19+
#endif
20+
21+
#include "Inkplate.h" //Include Inkplate library to the sketch
22+
Inkplate display(INKPLATE_1BIT); // Create object on Inkplate library and set library to work in monochorme mode
23+
24+
// Nubmer of clear cycles.
25+
#define CLEAR_CYCLES 20
26+
27+
// Delay between clear cycles (in milliseconds)
28+
#define CYCLES_DELAY 5000
29+
30+
void setup()
31+
{
32+
display.begin(); // Init library (you should call this function ONLY ONCE)
33+
display.clearDisplay(); // Clear any data that may have been in (software) frame buffer.
34+
35+
display.einkOn(); // Power up epaper power supply
36+
37+
int cycles = CLEAR_CYCLES;
38+
39+
// Clean it by writing clear sequence to the panel.
40+
while (cycles)
41+
{
42+
display.clean(1, 21);
43+
display.clean(2, 1);
44+
display.clean(0, 12);
45+
display.clean(2, 1);
46+
display.clean(1, 21);
47+
display.clean(2, 1);
48+
display.clean(0, 12);
49+
display.clean(2, 1);
50+
51+
delay(CYCLES_DELAY);
52+
cycles--;
53+
}
54+
55+
// Print text when clearing is done.
56+
display.setTextSize(4);
57+
display.setCursor(100, 100);
58+
display.print("Clearing done.");
59+
display.display();
60+
}
61+
62+
void loop()
63+
{
64+
// Empty...
65+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/*
2+
Inkplate_Clean example for e-radionica.com Inkplate 6PLUS
3+
For this example you will need only USB cable and Inkplate 6PLUS.
4+
Select "Inkplate 6PLUS(ESP32)" from Tools -> Board menu.
5+
Don't have "Inkplate 6PLUS(ESP32)" option? Follow our tutorial and add it:
6+
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
7+
8+
This example will try to remove heavy burn-in visible on the panel.
9+
Set number of refresh / clear cycles and upload the program.
10+
11+
Want to learn more about Inkplate? Visit www.inkplate.io
12+
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
13+
12 January 2022 by e-radionica.com
14+
*/
15+
16+
// Next 3 lines are a precaution, you can ignore those, and the example would also work without them
17+
#ifndef ARDUINO_INKPLATE6PLUS
18+
#error "Wrong board selection for this example, please select Inkplate 6PLUS in the boards menu."
19+
#endif
20+
21+
#include "Inkplate.h" //Include Inkplate library to the sketch
22+
Inkplate display(INKPLATE_1BIT); // Create object on Inkplate library and set library to work in monochorme mode
23+
24+
// Nubmer of clear cycles.
25+
#define CLEAR_CYCLES 20
26+
27+
// Delay between clear cycles (in milliseconds)
28+
#define CYCLES_DELAY 5000
29+
30+
void setup()
31+
{
32+
display.begin(); // Init library (you should call this function ONLY ONCE)
33+
display.clearDisplay(); // Clear any data that may have been in (software) frame buffer.
34+
35+
display.einkOn(); // Power up epaper power supply
36+
37+
int cycles = CLEAR_CYCLES;
38+
39+
// Clean it by writing clear sequence to the panel.
40+
while (cycles)
41+
{
42+
display.clean(1, 15);
43+
display.clean(2, 1);
44+
display.clean(0, 5);
45+
display.clean(2, 1);
46+
display.clean(1, 15);
47+
display.clean(2, 1);
48+
display.clean(0, 5);
49+
display.clean(2, 1);
50+
51+
delay(CYCLES_DELAY);
52+
cycles--;
53+
}
54+
55+
// Print text when clearing is done.
56+
display.setTextSize(4);
57+
display.setCursor(100, 100);
58+
display.print("Clearing done.");
59+
display.display();
60+
}
61+
62+
void loop()
63+
{
64+
// Empty...
65+
}

0 commit comments

Comments
 (0)