This commit is contained in:
2026-03-30 23:17:08 +02:00
parent 703f7df12f
commit bb566f7da2
9 changed files with 41 additions and 161 deletions

View File

@@ -1,22 +1,16 @@
import tm1637
import time as t
# attention : mode BOARD
display = tm1637.TM1637(clk=4, dio=17)
display.brightness = 5
display.brightness(2)
def afficher_temperature(temperature):
print("Test affichage...")
print(f"Test affichage: {temperature}")
try:
while True:
display.show(temperature)
print(temperature)
t.sleep(2)
except KeyboardInterrupt:
display.show("----")
print("Stop")
temp_entiere = int(temperature)
texte_ecran = f"{temp_entiere} C"
display.show(texte_ecran)
except Exception as e:
print(f"Erreur d'affichage : {e}")