Skip to main content

Inkplate 5v2 MicroPython - Initialization and display update

Initializing Inkplate

Every example in the following tutorials starts the same way: create an Inkplate object and initialize the display.

from inkplate5v2 import Inkplate

# Create Inkplate object
inkplate=Inkplate(Inkplate.INKPLATE_1BIT)

# Initialize the display, needs to be called only once
inkplate.begin()

# Clear the display buffer
inkplate.clear_display()

# Draw what is currently stored in frame buffer, needs to be called to update the display
inkplate.display()

Inkplate()

Creates the Inkplate object. This example uses the enum Inkplate.INKPLATE_1BIT to set the display to black and white mode.

Function parameters:

TypeNameDescription
NumbermodeEnum representation of an integer value that sets the display mode to either black-white or grayscale.
ℹ️
To learn more about grayscale mode, see this page
ℹ️
VALUEENUM
Black-White modeINKPLATE_1BIT
GrayscaleINKPLATE_2BIT

inkplate.begin()

Initializes the display, this must be called only once after creating the Inkplate object.

inkplate.clear_display()

Clears the internal frame buffer (does not change the panel until you update).

inkplate.display()

Performs a full-screen refresh, sending the current frame buffer to the panel.


Full example

hello_world.py

Display text on the screen.