Skip to main content

Inkplate 6FLICK MicroPython - Frontlight

Inkplate 6FLICK includes a built-in frontlight that can be enabled, disabled, and adjusted in brightness. This example shows how to control the frontlight programmatically.

⚠️
Excessive use of maximum brightness can reduce battery life. Adjust brightness based on your application needs.

Controlling the frontlight

from inkplate6FLICK import Inkplate
import time

# Create Inkplate object in 1-bit (black and white) mode
display = Inkplate(Inkplate.INKPLATE_1BIT)

# Initialize the display
display.begin()

# Clear display buffer and refresh once
display.clearDisplay()
display.display()

# Enable the frontlight
display.frontlight(True)
display.display()

# Set frontlight brightness (0–64)
display.setFrontlight(0)

# Gradually increase brightness
for i in range(0, 64):
display.setFrontlight(i)
time.sleep(0.5)

# Gradually decrease brightness
for v in range(0, 64):
display.setFrontlight(60 - v)
time.sleep(0.5)

# Turn off the frontlight
display.frontlight(False)

display.frontlight(state)

Enable or disable the frontlight on the Inkplate board.

Function parameters:

TypeNameDescription
boolstatePass True to turn on the frontlight, or False to turn it off.

display.setFrontlight(level)

Set the frontlight brightness level.

Function parameters:

TypeNameDescription
intlevelBrightness value between 0 (off) and 64 (maximum brightness).
Inkplate 6flick running the example code
Displaying battery and temperature data on Inkplate display.