Using MicroPython with NM-CYD-C5

Using MicroPython with NM-CYD-C5

1. Hardware Preparation

Before you start, you need to prepare a NM-CYD-C5 board.

2. Deploying MicroPython Firmware

Next, we will guide you through how to deploy the MicroPython firmware on the NM-CYD-C5.

2.1 Install esptool

You need to install esptool first. If you already installed python3, open a terminal and enter the following command.

pip install esptool

Second, before installing MicroPython on the NM-CYD-C5, use the following command to erase the Flash first.

esptool erase_flash

2.2 Install MicroPython firmware

Step1. Get micropython firmware on MicroPython ESP32_GENERIC_C5

We can choose the Release Version ESP32_GENERIC_C5-20260406-v1.28.0.bin

Step2. deploy the firmware to NM-CYD-C5, Notice, the starting address of ESP32-C5 is 0x2000.

esptool --baud 961200 write_flash 0x2000 .\ESP32_GENERIC_C5-20260406-v1.28.0.bin

After deploy ESP32-C5 firmware, you can connect the Board with Serial Port, default baudrate is 115200, you can see ESP-ROM info from putty.

3. Develop MicroPython

You can choose to install Thonny IDE or RT-Thread MicroPython on Visual Studio Code.

With RT-Thread MicroPython installed on Visual Studio Code, you can see the Tools below:

3.1 Run ST7789 Screen Demo

You can get the screen demo from github RockBase-iot

The ST7789 driver from MicroPython LCD Driver in Python, which support many boards.

To run with NM-CYD-C5, you can get tft_config.py from tft_configs/nm-cyd-c5.

Before run the rotations.py example,

  1. Create a MicroPython Project
  2. Device connect: connect nm-cyd-c5 with serial port;
  3. Then you should Sync the *.py files to nm-cyd-c5 board;
  4. Run the example.

Reference

  1. ESP32-C5 Installation instructions.
  2. MicroPython LCD Driver in Python
  3. RockBase-iot NM-CYD-C5
返回網誌