Burn-in clean
What this example shows
Reducing heavy ghosting (faint traces of old content) with burnInClean(), which repeats full refresh cycles. The sketch runs the cleaning, then shows Clearing done. on the screen. The cleaning can take several minutes.
Example code
This page shows the call at the heart of the example as a short standalone sketch, not the full file, so the cycle count and delay are set at the top. Open the source link for the complete example.
#include "Inkplate.h"
Inkplate display(INKPLATE_1BIT); // Cleaning runs in 1-bit (black and white) mode
#define CLEAR_CYCLES 10 // Number of cleaning refresh cycles
#define CYCLES_DELAY 5000 // Delay between cycles in ms, keep it at 5000 or more
void setup()
{
display.begin();
display.burnInClean(CLEAR_CYCLES, CYCLES_DELAY); // Repeated full refreshes
display.clearDisplay();
display.setCursor(100, 100);
display.setTextSize(4);
display.print("Clearing done.");
display.display();
}
void loop()
{
// Nothing...
}
Functions used
Inkplate(uint8_t mode)returns NoneCreates the Inkplate object. The mode decides how many bits describe each pixel: `INKPLATE_1BIT` for black and white, `INKPLATE_3BIT` for grayscale.
ReturnsConstructor; no return value.
Parameters
| Type | Name | Description |
|---|---|---|
uint8_t | mode | Display mode, INKPLATE_1BIT or INKPLATE_3BIT. |
display.begin()returns voidInitializes the display hardware. Call it once in `setup()` before you draw anything.
ReturnsNothing.
display.burnInClean(uint8_t clear_cycles, uint16_t cycles_delay)returns voidRuns repeated full-refresh cleaning cycles to reduce heavy ghosting on the panel.
ReturnsNothing.
Parameters
| Type | Name | Description |
|---|---|---|
uint8_t | clear_cycles | Number of cleaning cycles. |
uint16_t | cycles_delay | Delay between cycles in milliseconds. The example keeps it at 5000 or more. |
display.clearDisplay()returns voidClears the frame buffer in the ESP32 memory. It does not change what the panel currently shows; call `display()` for that.
ReturnsNothing.
display.setCursor(int16_t x, int16_t y)returns voidSets the position where the next `print()` call starts writing text.
ReturnsNothing.
Parameters
| Type | Name | Description |
|---|---|---|
int16_t | x | Horizontal position in pixels. |
int16_t | y | Vertical position in pixels. |
display.setTextSize(uint8_t s)returns voidSets the text size as a multiple of the default 5 × 7 pixel font.
ReturnsNothing.
Parameters
| Type | Name | Description |
|---|---|---|
uint8_t | s | Magnification factor. 1 is the default size. |
display.print(text)returns size_tPrints text at the cursor position. This is the standard Arduino `Print` function, which the library inherits through the Adafruit GFX base class.
ReturnsNumber of bytes printed.
Parameters
| Type | Name | Description |
|---|---|---|
const char * | text | The text to print. |
display.display(bool _leaveOn = 0)returns voidSends the frame buffer to the panel with a full refresh.
ReturnsNothing.
Parameters
| Type | Name | Description |
|---|---|---|
bool | _leaveOn | Optional. When true, the panel supply stays on after the refresh. Defaults to false. |
What to expect
The panel refreshes again and again during the cleaning, then shows Clearing done. Keep the board powered for the whole run. The example header advises a delay of at least 5 seconds between cycles, and notes that severe cases may need more than one run.
Do not interrupt power during the cleaning sequence.
Start with the example's 10 cycles. If traces remain, raise CLEAR_CYCLES: the earlier Inkplate 10 support advice ran 30 full refresh cycles for persistent artifacts. With the 5 second delay, every cycle adds at least 5 seconds to the run.