0.1. Setting up MicroPython
A board does not run MicroPython out of the box. Unlike Arduino, where you compile your code on the computer and send the finished program to the board, MicroPython is an interpreter that lives on the board itself. So before writing any code, you put MicroPython onto the board once, and from then on you send it .py files to run.
This page takes you from a board fresh out of the box to a board running your code. You only have to do it once.
By the end of this page you will have:
- The driver your computer needs to see the board
- Thonny installed, ready to write and run code
- MicroPython firmware on the board
- The Soldered drivers copied onto the board, ready for the Qwiic modules
1. Install the USB driver
The NULA Mini talks to your computer through an onboard CH340 chip, and neither Windows nor macOS ships a driver for it. Without the driver the board gets power but never appears as a port, so nothing later on this page will work.
CH340 drivers
Installing the driver on Windows, macOS and Linux, and what to do when the board still is not detected.
Once installed, plug the board in and confirm it appears:
| System | What to look for |
|---|---|
| Windows | A COM port in Device Manager under Ports (COM & LPT) |
| macOS | A device named /dev/cu.wchusbserial... |
| Linux | A device named /dev/ttyUSB0 |
2. Install Thonny
Thonny is a small Python editor built for exactly this job. It can flash MicroPython onto the board, edit files directly on it, and give you a live prompt to talk to it, all without a command line.
Download Thonny
Free Python editor for beginners, available for Windows, macOS and Linux.
esptool and mpremote instead. Those commands are given alongside each step.3. Put MicroPython on the board
The NULA Mini is an ESP32-C6 board, so it runs the ESP32_GENERIC_C6 build of MicroPython.
Using Thonny
- Connect the board over USB-C.
- Open Tools → Options → Interpreter.
- Set the interpreter to MicroPython (ESP32).
- Choose your board's port from the port dropdown.
- Click Install or update MicroPython at the bottom of the dialog.
- In the window that opens, pick the ESP32-C6 target and the latest version offered, then click Install.
Thonny downloads the firmware and flashes it for you. When it finishes, close the dialog.
Using the command line
Download the latest stable .bin first:
MicroPython firmware for ESP32-C6
Official download page. Take the latest stable build, not a nightly.
pip install esptool
python -m esptool --chip esp32c6 --port COM5 erase_flash
python -m esptool --chip esp32c6 --port COM5 --baud 460800 write_flash 0 ESP32_GENERIC_C6-<version>.bin
Replace COM5 with your port, and <version> with the filename you downloaded.
115200.4. Say hello
With MicroPython installed, the board gives you a live prompt called the REPL: you type a line, the board runs it immediately and prints the answer. It is the quickest way to confirm everything is working.
In Thonny, look at the Shell panel at the bottom. You should see something like MicroPython v1.x.x on ... followed by >>>. Type:
print("Hello from the NULA Mini!")
Press Enter. The board prints it straight back.
The REPL runs at 115200 baud, which is the default in Thonny and in mpremote, so there is nothing to configure.
5. Copy the Soldered drivers onto the board
Eight of the examples in this kit use the three Qwiic modules: the 16x2 LCD, the ultrasonic distance sensor and the SHTC3 temperature and humidity sensor. Each one needs a driver, and in MicroPython a driver is simply a .py file that has to live on the board.
The drivers are in the lib folder of the examples repository:
| Driver | Used by | Provides |
|---|---|---|
lib/LCD.py | 4.1, 4.2, 7.1, 7.7 | LCD_I2C, the 16x2 Qwiic display |
lib/SHTC3.py | 5.1, 7.1 | SHTC3, the temperature and humidity sensor |
lib/UltrasonicSensor.py | 3.1, 3.2, 7.3 | UltrasonicSensor, the distance sensor |
lib/Qwiic.py | the three drivers above | shared Qwiic helper they all build on |
MicroPython looks for imported modules in a folder called lib on the board, so the whole folder goes across as-is.
Using Thonny
- Open View → Files if the Files panel is not already showing. It has two halves: your computer on top, the board underneath.
- In the top half, navigate to the
libfolder of the examples repository. - Right-click the
libfolder and choose Upload to /.
Using the command line
pip install mpremote
mpremote connect auto fs cp -r lib :
urequests and ntptime modules that the Wi-Fi examples use are already built into the firmware.Sections 1, 2 and 6 use nothing but built-in modules, so if you want to start immediately you can come back to this step when you reach section 3.
6. Run an example
Open any example .py file in Thonny and press Run (the green play button). The code runs on the board and its output appears in the Shell.
From the command line:
mpremote connect auto run 1_Basic_Skills/1.1_Hello_World/1.1_Hello_World.py
To make a program start by itself whenever the board powers up, which is useful once a project is finished and you want it running without a computer attached, copy it onto the board named main.py:
mpremote connect auto fs cp 1_Basic_Skills/1.2_LED_blinking/1.2_LED_blinking.py :main.py
main.py starts every time the board is powered. To stop it and get the prompt back, press Ctrl+C in the Shell.If something is not working
| Symptom | Cause |
|---|---|
| No port to choose anywhere | The CH340 driver is missing. Go back to step 1. |
ImportError: no module named 'LCD' | The lib folder has not been copied to the board, or it landed somewhere other than /lib. See step 5. |
| The Shell shows nothing, or nothing but noise | The wrong port is selected, or another program is holding it open. Close any other serial monitor. |
| Code runs but the board seems to ignore edits | You edited the copy on your computer and ran the copy on the board, or the other way round. Check the title bar in Thonny to see which file is open. |
Next
You are set up. On to the first example.
1.1. Hello World
Print your first message from the board to your computer.