featherwing_minitft_simpletest.py
1 """ 2 This example display a CircuitPython console and 3 print which button that is being pressed if any 4 """ 5 import time 6 from adafruit_featherwing import minitft_featherwing 7 8 minitft = minitft_featherwing.MiniTFTFeatherWing() 9 10 while True: 11 buttons = minitft.buttons 12 13 if buttons.right: 14 print("Button RIGHT!") 15 16 if buttons.down: 17 print("Button DOWN!") 18 19 if buttons.left: 20 print("Button LEFT!") 21 22 if buttons.up: 23 print("Button UP!") 24 25 if buttons.select: 26 print("Button SELECT!") 27 28 if buttons.a: 29 print("Button A!") 30 31 if buttons.b: 32 print("Button B!") 33 34 time.sleep(0.001)