Customer:
I’m using the Inkplate 10. Where can I find information on the Arduino API call for clean()? I see that I need to use it, but I don’t understand the parameters or the warning. What do the parameters mean and when should I use the call? Should it be after I clear the buffer or after I do a display update?
Originally submitted via email support on 4 November 2021. Migrated to the forum for community visibility.
Soldered Support:
The documentation for clean() depends on your usage mode. For peripheral mode, see Inkplate Peripheral Mode — Inkplate docs documentation. For Arduino, see Inkplate Arduino — Inkplate docs documentation. After calling clean(), you then call display.display().
Customer:
I’m confused about how to decide what value to use for the first parameter. Should I make this call before or after an update display or a full display()? The documentation shows: Method prototype (as seen in Inkplate.h): void clean(c, rep); Arguments and return value: uint8_t c - one of four posible pixel states (0 will light screen, 1 will darken screen, 2 will discharge screen and 3 will skip). uint8_t rep - number of repetitions. Returns nothing. Description: Cleans the actual screen of any possible burn in. Should not be used in intervals less than 5 seconds. Example: display.clean();
Soldered Support:
display.clean() is a low-level function of the Inkplate library and is not recommended for usual circumstances. What’s recommended is display.clearDisplay(). clearDisplay() makes the buffer empty and display.display() sends that empty buffer to the screen, equivalent to writing a blank picture to the screen:
display.clearDisplay();
display.display();
Customer:
I’m using partialUpdate and getting blurry parts on the display. The documentation says partial update “Updates only the changed parts of the screen (monochrome/INKPLATE_1BIT mode only!) After a few updates creates blurry parts of the screen. Fixed by calling Inkplate::clean();” but you’re saying something different. How do I fix the look of the digits in the time that are being partialUpdated every minute?
Attachment omitted in migration: IMG-3077.jpg
Soldered Support:
When using partial update, you need to do a full refresh every 5-10 partial refreshes to clean blurry parts from the display because a full refresh clears and updates the entire screen.
For partial update, you can look at the Basic_Partial_Update example. First, clear the buffer and then write something to it. After writing to the buffer you can use a partial update or full refresh. Use a partial update a few times, then use a full refresh:
display.clearDisplay();
display.print(text);
if (n > 5)
{
display.display();
n = 0;
}