Skip to content

Commit a30ab39

Browse files
committed
2 parents c8057de + b83af56 commit a30ab39

File tree

17 files changed

+2497
-32
lines changed

17 files changed

+2497
-32
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/*
2+
Inkplate4_Burn_In_Clean example for Soldered Inkplate 4
3+
For this example you will need only USB cable and Inkplate 4.
4+
Select "Soldered Inkplate4" from Tools -> Board menu.
5+
Don't have "Soldered Inkplate4" 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 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: https://forum.soldered.com/
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_INKPLATE4
18+
#error "Wrong board selection for this example, please select Soldered Inkplate4 in the boards menu."
19+
#endif
20+
21+
#include "Inkplate.h" //Include Inkplate library to the sketch
22+
Inkplate display; // Create object on Inkplate library
23+
24+
// Nubmer of clear cycles.
25+
#define CLEAR_CYCLES 5
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+
int cycles = CLEAR_CYCLES; // Set the number of clear cycles
36+
37+
// Clean it by writing clear sequence to the panel.
38+
while (cycles)
39+
{
40+
cycles--;
41+
display.display();
42+
delay(CYCLES_DELAY);
43+
}
44+
45+
// Print text when clearing is done.
46+
display.setTextSize(4);
47+
display.setCursor(30, 130);
48+
display.setTextColor(INKPLATE_RED, INKPLATE_WHITE);
49+
display.print("Clearing done.");
50+
display.display();
51+
}
52+
53+
void loop()
54+
{
55+
// Empty...
56+
}

0 commit comments

Comments
 (0)