MQTT esp_wifi
Build, push image, and notify Watchtower / build-image (push) Successful in 51s
Build, push image, and notify Watchtower / notify (push) Successful in 1m40s

This commit is contained in:
2026-07-17 18:50:53 +02:00
parent 77872d183b
commit 0e89e42b48
9 changed files with 207 additions and 29 deletions
+19
View File
@@ -0,0 +1,19 @@
# This file is executed on every boot (including wake-boot from deepsleep)
#import esp
#esp.osdebug(None)
#import webrepl
#webrepl.start()
def do_connect(ssid, pwd):
import network
sta_if = network.WLAN(network.STA_IF)
if not sta_if.isconnected():
print('connecting to network...')
sta_if.active(True)
sta_if.connect(ssid, pwd)
while not sta_if.isconnected():
pass
print('network config:', sta_if.ifconfig())
# Attempt to connect to WiFi network
do_connect("Smartwave-1", 'Smartwave-prot-1')