Simple test

Ensure your device works with this simple test.

examples/trellism4_simpletest.py
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT

import adafruit_trellism4

trellis = adafruit_trellism4.TrellisM4Express()

while True:
    pressed = trellis.pressed_keys
    if pressed:
        print("Pressed:", pressed)