Inkplate 6 MicroPython - Basic RTC usage
Inkplate 6 comes with an onboard RTC (Real-Time Clock), which allows the board to keep track of the time and date even across reboots (as long as the backup battery is present).
To preserve time while the Inkplate is powered off, make sure a coin cell battery (CR2032) is installed in the RTC holder. Without it, the clock will reset when power is lost.
This example shows how to set the RTC time and date, and then continuously display the current time on the screen.
Basic RTC Example
# Include all the required libraries
from inkplate6 import Inkplate
import time
# Create Inkplate object in 1-bit mode, black and white colors only
# For 2-bit grayscale, see basicGrayscale.py
inkplate = Inkplate(Inkplate.INKPLATE_1BIT)
# Initialize the display, needs to be called only once
inkplate.begin()
inkplate.clearDisplay()
inkplate.display()
inkplate.setTextSize(2)
# This is how to set the RTC's time
# Arguments are hour, minute, seconds
inkplate.rtcSetTime(9,39,10)
# And this is the date
# Arguments are weekday, day in month, month and year
inkplate.rtcSetDate(5,9,2,2024)
# Infinite loop
while True:
inkplate.clearDisplay()
rtcData = inkplate.rtcGetData()
hour = rtcData['hour']
minute = rtcData['minute']
second = rtcData['second']
if hour < 10:
hour="0"+str(hour)
if minute < 10:
minute="0"+str(minute)
if second < 10:
second="0"+str(second)
inkplate.setCursor(450,300)
current_time=str(hour)+":"+str(minute)+":"+str(second)
inkplate.print(current_time)
inkplate.partialUpdate()
inkplate.rtcSetTime()
Set the RTC's current time.
Function parameters:
| Type | Name | Description |
|---|---|---|
Number | hour | Hour (0–23). |
Number | minute | Minute (0–59). |
Number | second | Second (0–59). |
inkplate.rtcSetDate()
Set the RTC's current date.
Function parameters:
| Type | Name | Description |
|---|---|---|
Number | weekday | Day of the week (1 = Monday … 7 = Sunday). |
Number | day | Day of the month (1–31). |
Number | month | Month (1–12). |
Number | year | Full year (e.g., 2025). |
inkplate.rtcGetData()
Read the current RTC date and time.
Returns value: Dictionary containing keys: `hour`, `minute`, `second`, `weekday`, `day`, `month`, `year`.

Full example
Inkplate6-RTC.py
An example showing how to set and read time/date using the onboard RTC, and display it continuously on the screen.