Using MicroPython
MicroPython is a streamlined version of Python designed for microcontrollers. It is ideal for rapidly developing embedded projects, letting you write and debug firmware with familiar Python syntax.
Key features
- Python syntax that is easy to learn and use
- Interactive REPL (read-eval-print loop)
- Rich standard library and hardware driver support
- Fast prototyping without compilation
Use cases
- Rapid prototyping: validate ideas quickly without complex build steps
- Teaching and learning: friendly Python syntax for beginners
- IoT projects: Wi-Fi, Bluetooth, and other wireless connectivity
Montic product support
| W02 | W04 | |
|---|---|---|
| Chip | Expressif ESP32-C6 | WCH CH32V208 |
| Status | ✔ Support | ❌ Not Support |
Install MicroPython on Montic W02
Montic W02 uses the ESP32-C6 microcontroller, which has official MicroPython support.
Download MicroPython firmware for ESP32-C6
Prerequisites
-
Install Python
Download and install Python 3 from the official website.
-
Install esptool
Open Windows
CMD.exeorPowerShell.exeand install esptool with pip:Terminal window pip install esptool -
Download the MicroPython firmware
Get the latest
.binfirmware from the MicroPython download page.We recommend downloading the latest stable release, for example:
ESP32_GENERIC_C6-20251209-v1.27.0.bin.
-
Install Python and esptool
Most Linux distributions ship with Python 3. Install esptool via your package manager:
Terminal window # Install with pippip install esptool# Or use the system package manager (Debian/Ubuntu)sudo apt install esptool -
Configure serial permissions
Add your user to the
dialoutgroup to access serial ports:Terminal window sudo usermod -a -G dialout $USER -
Download the MicroPython firmware
Get the latest
.binfirmware from the MicroPython download page.We recommend downloading the latest stable release, for example:
ESP32_GENERIC_C6-20251209-v1.27.0.bin.
-
Install Python and esptool
macOS usually includes Python 3. Install esptool with pip:
Terminal window pip3 install esptoolIf Python 3 is missing, install it via Homebrew:
Terminal window brew install python3pip3 install esptool -
Download the MicroPython firmware
Get the latest
.binfirmware from the MicroPython download page.We recommend downloading the latest stable release, for example:
ESP32_GENERIC_C6-20251209-v1.27.0.bin.
Flash the MicroPython firmware
-
Connect Montic W02 to your computer
Use a USB-C data cable to connect the board. In Device Manager, locate the COM port (for example
COM4). -
Erase flash (first installation)
If this is your first time installing MicroPython, erase the entire flash first:
Terminal window esptool --port COM4 erase_flash -
Flash the firmware
Run the following command to flash MicroPython:
Terminal window esptool --port COM4 --baud 460800 write_flash 0 ESP32_GENERIC_C6-20251209-v1.27.0.bin
-
Connect Montic W02 to your computer
Use a USB-C data cable to connect the board. The serial port is typically
/dev/ttyUSB0or/dev/ttyACM0.Check with:
Terminal window ls /dev/ttyUSB* /dev/ttyACM* 2>/dev/null -
Erase flash (first installation)
If this is your first time installing MicroPython, erase the entire flash first:
Terminal window esptool.py --port /dev/ttyUSB0 erase_flash -
Flash the firmware
Run the following command:
Terminal window esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash 0 ESP32_GENERIC_C6-20251209-v1.27.0.bin
-
Connect Montic W02 to your computer
Use a USB-C data cable to connect the board. The serial device is usually
/dev/cu.usbmodem01or similar.Check with:
Terminal window ls /dev/cu.usb* -
Erase flash (first installation)
If this is your first time installing MicroPython, erase the entire flash first:
Terminal window esptool.py --port /dev/cu.usbmodem01 erase_flash -
Flash the firmware
Run the following command:
Terminal window esptool.py --port /dev/cu.usbmodem01 --baud 460800 write_flash 0 ESP32_GENERIC_C6-20251209-v1.27.0.bin
Connect to the MicroPython REPL
After flashing, connect to the interactive MicroPython REPL over serial.
We recommend PuTTY or Thonny IDE:
Using PuTTY:
- Connection type: Serial
- Serial line: COM4 (your COM port)
- Speed: 115200
Using Thonny IDE: Thonny is designed for MicroPython and supports editing, uploading, and REPL interaction.
Connect with screen or picocom:
# Using screenscreen /dev/ttyUSB0 115200
# Using picocompicocom -b 115200 /dev/ttyUSB0To exit screen: press Ctrl+A, then K, and confirm with Y.
Connect with screen:
screen /dev/cu.usbmodem01 115200Or use Thonny IDE for a friendly graphical experience on macOS.
Hello World example
After connecting, you will see the MicroPython >>> prompt. Try running:
# Print Hello Worldprint("Hello, Montic W02!")FAQs
Q: What if flashing fails?
A: Try the following:
- Remove the
--baud 460800flag to use the default speed - Make sure you are using a USB data cable, not a charge-only cable
- Hold the BOOT button while flashing
Q: The serial port is missing. What should I check?
A: Depending on your OS:
- Windows: look up the COM port in Device Manager
- Linux: ensure your user is in the
dialoutgroup - macOS: check for
/dev/cu.usb*devices
Q: REPL is unresponsive.
A: Press the RST button to reboot, or confirm the baud rate is 115200.