# This file is executed on every boot (including wake-boot from deepsleep) # boot.py für WLAN Verbindung # Import der Socket-Bibliothek: try: import usocket as socket except: import socket # Import der Netzwerkbibliothek: import network # Aktivierung der Debugging-Meldungen #import esp #esp.osdebug(None) #Import der Bibliotheken machine und uos import uos, machine #uos.dupterm(None, 1) # disable REPL on UART(0) # Import des "Müllsammlers" (garbage collector) zur Speicherverwaltung import gc #import webrepl #webrepl.start() gc.collect() #SSID und Kennwort für WLAN festlegen: ssid = "V200-WLAN" password = "password" #WLAN als AccessPoint (AP) starten: ap = network.WLAN(network.AP_IF) ap.active(True) ap.config(essid=ssid, password=password) while ap.active() == False: pass #Ausgabe IP-Adresse des APs: print("Verbindung erfolgreich: ") print(ap.ifconfig())