# Wemos D1 Mini import tm1638 from machine import Pin # DIO - green - D12 / GPIO12 # CLK - yellow - D13 / GPIO14 # STB - orange - D11 / GPIO13 tm = tm1638.TM1638(stb=Pin(13), clk=Pin(14), dio=Pin(12)) from time import sleep_ms # cycle through all possible LED combinations on the first segment for i in range(127): tm.write([i], 0) tm.leds(i) sleep_ms(5) tm.scroll("Drücke die Taster") key_code=0 print("Drücke auf dem LED&KEY-Modul einen ode mehrere Taster.") print("Drücke die Taster S1 und S8 zusammen für ENDE.") while key_code != 129: key_code = tm.keys() if key_code != 0: print(key_code) tm.leds(key_code) tm.show(' ENDE ')