FEAT : pas de temps
This commit is contained in:
parent
30509b7f2c
commit
06a5672f52
6
main.py
6
main.py
@ -18,6 +18,8 @@ ntp_ttl = 3600
|
||||
ntp_attente = ntp_ttl
|
||||
rtc = RTC()
|
||||
|
||||
pas_temps = 1
|
||||
|
||||
def button_jaune_presse(pin):
|
||||
print("Bouton jaune pressé !")
|
||||
led_jaune.on()
|
||||
@ -69,7 +71,7 @@ def ntp():
|
||||
if (ntp_ok):
|
||||
date_heure = time.localtime()
|
||||
print(f"Date et heure : {date_heure[3]}:{date_heure[4]}:{date_heure[5]} ({ntp_attente}, {HC()})")
|
||||
ntp_attente = ntp_attente - 1
|
||||
ntp_attente = ntp_attente - pas_temps
|
||||
|
||||
# Init
|
||||
set_relays(0b0000)
|
||||
@ -84,5 +86,5 @@ while True:
|
||||
# now = datetime.now()
|
||||
# print("Date et heure :", now)
|
||||
ntp()
|
||||
time.sleep(1)
|
||||
time.sleep(pas_temps)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user