Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 1000 Bytes

README.md

File metadata and controls

37 lines (28 loc) · 1000 Bytes

Inkplate6 UART Commander

Send UART commands to your Inkplate6 in UART mode.

Setup

You need to have the Inkplate6 flashed with the example UART mode .ino which can be found in the Inkplate6 Exampls Repository.

Example Usage

from inkplate6_commander import Inkplate6

ink = Inkplate6('COM4')

with ink.cmd() as cmd:
    cmd.set_cursor(0,0)
    cmd.print("Hello World")
with ink.cmd(False) as cmd:
    cmd.read_battery()
    cmd.read_temperature()
    cmd.read_touchpad(1)
print(cmd.results)

prints:

[ReadBatteryResult - 3.74, ReadTemperatureResult - 28, ReadTouchpadResult(pad=1) - True]

Dont forget to close the serial port with:

ink.close()

Details

Coordinates are as follows: (x->from_left_to_right, y->from_top_to_buttom).