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 - Select the
Firmware
we just downloaded - Click
Flash
button - Wait for the process to finish
- Done!
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
to115200
-
Click
OK
button -
Once connected, you will see the output below.
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)
Note: you can use Ctrl + C
to stop the program.