Skip to main content

4. Micropython

Micropython is a programming language that is designed to run on microcontrollers. Micropython is a small and efficient language that is easy to learn and use. Micropython is a good choice for beginners who want to learn how to program microcontrollers.

4.1. Download Micropython Firmware

You can choose the firmware form here Firmware

4.2. Upload Micropython Firmware

I found a peffect tool for flashing the firmware to the XIAO board. You didn't download anything, you just used the web tool.

  • open this link
  • choose <ESP32 COM PORT> from the dropdown menu upload1
  • Select the Firmware we just downloaded upload2
  • Click Flash button
  • Wait for the process to finish
  • Done! upload3

4.3. Connect to Micropython REPL

Open the serial monitor to see the output. I used mobaXterm to connect to the serial monitor.

  • Choose Serial from the dropdown menu

  • Set the Baud Rate to 115200

  • Click OK button mb

  • Once connected, you will see the output below. mb

4.4. Write a program

Write a program send hello, fab academy! to the serial monitor.

import machine
import time
while True:
print("hello, fab academy!")
time.sleep(1)

mb

Note: you can use Ctrl + C to stop the program.

4.5 References