Getting Started with MicroPython
Download MicroPython Firmware
Use the tool below to flash precompiled firmware to your ESP32-C3 TFT Devkit directly in the browser, without installing any software:
ESP32 Flasher (Official API)
Disconnected
Select firmware
Operation log
Instructions and troubleshooting
If flashing fails or you encounter other issues, see the ESP Flasher guide
Connect to the MicroPython REPL
After flashing the firmware, connect to the MicroPython interactive interpreter as described below.
Using a Serial Terminal
- Baud rate: 115200
- Data bits: 8
- Stop bits: 1
- Parity: None
Suggested tools:
- Thonny IDE (a good choice for beginners)
- Arduino IDE Serial Monitor
- PuTTY (Windows)
- Screen (macOS/Linux)
First Connection
python
# Press Enter to display the MicroPython prompt
>>> print("Hello, ESP32-C3!")
Hello, ESP32-C3!
# Display system information
>>> import sys
>>> sys.implementation
(name='micropython', version=(1, 26, 1), _machine='ESP32C3 module with ESP32C3', _mpy=0)Basic Examples
Blink an LED
python
import machine
import time
# Create an LED object (GPIO 2)
led = machine.Pin(2, machine.Pin.OUT)
# Blink repeatedly
while True:
led.on()
time.sleep(0.5)
led.off()
time.sleep(0.5)Wi-Fi Connection
python
import network
# Enable Wi-Fi station mode
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
# Connect to Wi-Fi
wlan.connect('your_wifi_ssid', 'your_wifi_password')
# Wait for the connection
while not wlan.isconnected():
pass
print('Connected! IP address:', wlan.ifconfig()[0])FAQ
Q: Connection fails with "Cannot read properties of undefined"
A: This is usually a compatibility issue with the esptool-js library. Try the following:
- Refresh the page and try again.
- Enter download mode using the BOOT button, then reconnect.
- Try a different USB cable or port.
- Wait for the tool to try its different connection modes.
- If every mode fails, use the conventional esptool.py tool.
Q: The device does not respond after flashing
A:
- Press the RESET button on the board to restart it.
- Check that the firmware was flashed at the correct address (0x0000).
- Unplug and reconnect the USB cable.
- If it still does not respond, try flashing the firmware again.
Q: The MicroPython prompt does not appear
A:
- Make sure your serial terminal is set to 115200 baud.
- Press Enter a few times to wake the REPL.
- Check that you selected the correct serial port.
- Try sending Ctrl+C to interrupt the current program.
Q: How do I flash the firmware again?
A:
- If the device responds normally, use the flashing tool directly.
- If it does not respond, hold BOOT and press RESET to enter download mode.
- Use the flashing tool above again.
Q: The browser does not support the Web Serial API
A:
- Make sure you are using Chrome 88+ or Edge 88+.
- Open
chrome://flags/, search for "Experimental Web Platform features", and enable it. - Alternatively, download and install a conventional ESP32 flashing tool.
Further Learning
Troubleshooting
If you encounter problems:
- Check the hardware connections.
- Make sure you are using the correct serial port and baud rate.
- Try flashing the firmware again.
- Check the LED indicators on the board.