FEAT : Webrepl
This commit is contained in:
parent
4fb489036f
commit
4a9d161286
6
main.py
6
main.py
@ -3,7 +3,10 @@ import network
|
||||
import time
|
||||
import ntptime
|
||||
import urequests
|
||||
import localtime_fr
|
||||
import localtime_fr # TODO : Lire info HP.. HC.. sur HA > sensor.compteur_linky_ptec
|
||||
import webrepl
|
||||
|
||||
# Capter exception pour éviter les sorties intempestives (comme timeout sur ntp)
|
||||
|
||||
led_jaune = Pin(0, Pin.OUT)
|
||||
led_bleue = Pin(2, Pin.OUT)
|
||||
@ -72,6 +75,7 @@ def ntp():
|
||||
ntptime.settime()
|
||||
ntp_ok = True
|
||||
ntp_attente = ntp_ttl
|
||||
webrepl.start()
|
||||
if (ntp_ok):
|
||||
date_heure = localtime_fr.localtime()
|
||||
print(f"Date et heure : {date_heure[3]}:{date_heure[4]}:{date_heure[5]} ({ntp_attente}, {HC(date_heure)})")
|
||||
|
||||
10
notes.md
10
notes.md
@ -1,7 +1,15 @@
|
||||
# Notes
|
||||
|
||||
## Mise en place micropython
|
||||
|
||||
esptool --port /dev/ttyACM0 erase-flash
|
||||
|
||||
cd tmp
|
||||
wget https://micropython.org/resources/firmware/ESP32_GENERIC_C6-20250911-v1.26.1.bin
|
||||
cd -
|
||||
|
||||
esptool --port /dev/ttyACM0 --baud 460800 write-flash 0 ./tmp/ESP32_GENERIC_C6-20250911-v1.26.1.bin
|
||||
esptool --port /dev/ttyACM0 --baud 460800 write-flash 0 ./tmp/ESP32_GENERIC_C6-20250911-v1.26.1.bin
|
||||
|
||||
## Webrepl
|
||||
|
||||
init via un run sur utils/webrepl_setup.py
|
||||
1
utils/webrepl_setup.py
Normal file
1
utils/webrepl_setup.py
Normal file
@ -0,0 +1 @@
|
||||
import webrepl_setup
|
||||
Loading…
Reference in New Issue
Block a user