Zum Hauptinhalt springen

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.

Select Board
Inkplate10_Burn_In_Clean.ino
#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 None

Creates 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

TypeNameDescription
uint8_tmodeDisplay mode, INKPLATE_1BIT or INKPLATE_3BIT.
display.begin()returns void

Initializes the display hardware. Call it once in `setup()` before you draw anything.

ReturnsNothing.

display.burnInClean(uint8_t clear_cycles, uint16_t cycles_delay)returns void

Runs repeated full-refresh cleaning cycles to reduce heavy ghosting on the panel.

ReturnsNothing.

Parameters

TypeNameDescription
uint8_tclear_cyclesNumber of cleaning cycles.
uint16_tcycles_delayDelay between cycles in milliseconds. The example keeps it at 5000 or more.
display.clearDisplay()returns void

Clears 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 void

Sets the position where the next `print()` call starts writing text.

ReturnsNothing.

Parameters

TypeNameDescription
int16_txHorizontal position in pixels.
int16_tyVertical position in pixels.
display.setTextSize(uint8_t s)returns void

Sets the text size as a multiple of the default 5 × 7 pixel font.

ReturnsNothing.

Parameters

TypeNameDescription
uint8_tsMagnification factor. 1 is the default size.
display.print(text)returns size_t

Prints 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

TypeNameDescription
const char *textThe text to print.
display.display(bool _leaveOn = 0)returns void

Sends the frame buffer to the panel with a full refresh.

ReturnsNothing.

Parameters

TypeNameDescription
bool_leaveOnOptional. 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.