1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
from gpiozero import LEDBoard,Button from time import sleep from signal import pause import tkinter as tk from tkinter import Label button3 = Button(16) button2 = Button(20) button4 = Button(21) button1 = Button(26) leds = LEDBoard(2, 3, 4, 14, 17,27,22,24,active_high=False) leds_PX = LEDBoard(7,8,9,11,active_high=False) M7G= [ (0, 0, 0, 0, 0,0, 0,0), (1, 1, 1, 1,1, 1,0,0), (0, 1, 1, 0, 0,0, 0,0), (1, 1, 0, 1, 1,0, 1,0), (1, 1, 1, 1,0, 0,1,0), (0, 1, 1, 0,0, 1,1,0), (1, 0, 1, 1,0, 1,1,0), (1, 0, 1, 1,1, 1,1,0), (1, 1, 1, 0,0, 0,0,0), (1, 1, 1, 1,1, 1,1,0), (1, 1, 1, 1,0, 1,1,0), ] while True : for n in range(0,4) : leds_PX[n].on() for n in range(0,8) : leds[n].on() sleep(0.2) #leds[n].off() leds.off() leds_PX.off() sleep(1) |