Micropython Docs
Micropython Firmware
Quick reference for the ESP8266
ESP-01 Micropython Firmware for ESP-01
Nice video on interfacing the ESP-01 and adapting the headers.
Gives a good warning about keeping the pins high to start so it doesn't enter flash mode esp pinout Find the usb port: lsusb -t dmesg | grep ttyUSB rshell: pip install rshell rshell -p /dev/ttyUSB0 -b 115200 ls /pyboard Use Control-D to exit. screen -port /dev/ttyUSB0 115200
Connect button (using the default address of ws:// next to the button). To use the WebREPL on another WiFi network: import network wlan = network.WLAN(network.STA_IF) wlan.connect('ssid', 'password') wlan.ifconfig() webrepl.start() --chip esp32 -p /dev/ttyUSB0 erase_flash --chip esp32 -p /dev/ttyUSB0 write_flash -z 0x1000 ~/Downloads/esp32-20171219-v1.9.2-445-g84035f0f.bin screen /dev/ttyUSB0 115200 WebREPL
>>> import webrepl_setup password micropythoN web client >>> help() >>> import network set hostname: wlan = network.WLAN(network.STA_IF) wlan.config(dhcp_hostname = 'esspressive' ) 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.config(dhcp_hostname="ESP32") sta_if.connect(ssid, pwd) while not sta_if.isconnected(): pass print('network config:', sta_if.ifconfig()) # This file is executed on every boot (including wake-boot from deepsleep) #import esp #esp.osdebug(None) # Attempt to connect to WiFi network do_connect('your_ssid', 'your_password') import webrepl webrepl.start() webrepl from repl prompt: import network wlan = network.WLAN(network.STA_IF) wlan.connect('ssid', 'password') wlan.ifconfig() sta_if.config('dhcp_hostname') web server mqtt
Weather station web server