Get started with MicroPython [C3 series]

Flash MicroPython firmware

The boards were already flashed with MicroPython firmware. If they lost the firmware or you need the latest version, you can flash MicroPython firmware by yourself.

Requirements

pip3 install esptool

C3 Firmware

Flash firmware

  • Put C3 boards into Device Firmware Upgrade (DFU) mode.

    • Hold Button 9
    • Press Button Reset
    • Release Button 9 when you hear the prompt tone on USB reconnection
  • Flash using esptool.py

    esptool.py --port PORT_NAME erase_flash
    esptool.py --port PORT_NAME --baud 1000000 write_flash -z 0 FIRMWARE.bin
    

Note

Don’t forget to change PORT_NAME and FIRMWARE.bin.

In Linux, PORT_NAME is like /dev/ttyUSB0. In Windows, PORT_NAME is like COM4.

WIFI

You need set WIFI Tx Power to 8.5dBm to use WIFI.

Use sta_if.config(txpower=8.5) after sta_if.active(True)

def do_connect():
  import network
  sta_if = network.WLAN(network.STA_IF)

  if not sta_if.isconnected():
      print('connecting to network...')
      sta_if.active(True)
      sta_if.config(txpower=8.5)
      sta_if.connect('ssid', 'passwd')
      while not sta_if.isconnected():
          pass
  print('network config:', sta_if.ifconfig())