点灯 - gootoomoon/nodemcu_python GitHub Wiki

help() 【查看相关帮助说明】 Welcome to MicroPython!

For online docs please visit http://docs.micropython.org/en/latest/esp8266/ . For diagnostic information to include in bug reports execute 'import port_diag'.

Basic WiFi configuration:

import network sta_if = network.WLAN(network.STA_IF); sta_if.active(True) sta_if.scan() # Scan for available access points sta_if.connect("<AP_name>", "") # Connect to an AP sta_if.isconnected() # Check for successful connection

Change name/password of ESP8266's AP:

ap_if = network.WLAN(network.AP_IF) ap_if.config(essid="<AP_NAME>", authmode=network.AUTH_WPA_WPA2_PSK, password="")

Control commands: CTRL-A -- on a blank line, enter raw REPL mode CTRL-B -- on a blank line, enter normal REPL mode CTRL-C -- interrupt a running program CTRL-D -- on a blank line, do a soft reset of the board CTRL-E -- on a blank line, enter paste mode

For further help on a specific object, type help(obj)

完整的接口库使用 http://docs.micropython.org/en/latest/esp8266/esp8266/quickref.html

⚠️ **GitHub.com Fallback** ⚠️