English
English
简体中文
日本語
pdf-icon

UiFlow Tutorial

UiFlow1 Development Guide

Project Management

Use LTE network

UiFlow1 Blockly

Event

Unit

UiFlow2 Development Guide

UI Editor

Device Security & Sharing

Atom-Lite: Flash Firmware & Run Code

1. USB Driver Installation

Before flashing the Atom-Lite firmware, install the FTDI driver first so that the computer can recognize the device properly and create a virtual serial port, ensuring normal communication between the flashing tool and the device. Follow the steps below:

Connect the device to the PC, open Device Manager, and install the FTDI driver for the device. Using Windows 10 as an example, download the driver package that matches your operating system, unzip it, and install it through Device Manager. (Note: In some system environments, the driver may need to be installed twice before it takes effect. The unrecognized device name is usually M5Stack or USB Serial. On Windows, it is recommended to install the driver files directly from Device Manager with a custom update. The executable installer may not work properly.) Click here to download the FTDI driver

For MacOS users, before installation, enable System Preferences -> Security & Privacy -> General -> Allow apps downloaded from -> App Store and identified developers.
Baud Rate Limit
When downloading programs to the device, it is recommended to select one of the following serial baud rates. Using other speeds may cause the program download to fail.
1500000 bps / 750000 bps / 500000 bps / 250000 bps / 115200 bps

2. UiFlow2 Firmware Flashing

  1. Refer to the UiFlow2 Web IDE Tutorial to learn the basic workflow of UiFlow2 and complete the installation of the M5Burner firmware flashing tool.

  2. Download the firmware for Atom-Lite in M5Burner, as shown below.

  1. Connect the device to the computer with a USB cable. After the device powers on, plugging in the USB port will automatically enter download mode. When the connection is successful, M5Burner will display Found New Device. The device is now in programming mode and waiting for flashing.
  1. In M5Burner, click the Burn button for the corresponding firmware, select the device port, and click Start.
  1. Enter the Wi-Fi configuration required by the device, including Wi-Fi SSID and Wi-Fi Password, as well as any other device configuration that needs to be added or modified, then click Next to start flashing.

Configuration information:

  • COM: Select the serial port corresponding to the device
  • BaudRate: Baud rate for serial communication
  • Server: Server address the device connects to
  • WIFI SSID/WIFI Password: Wi-Fi name and password used by the device
  • SNTP Server:
    • SNTP0: Alibaba Cloud NTP server (China)
    • SNTP1: Japan NTP server pool
    • SNTP2: Global public NTP server pool
  • Timezone: Time zone setting
  • Boot Option: Set the device boot mode after firmware flashing is complete
    • Run main.py directly: After flashing is complete, run the program in main.py directly without connecting to the network or displaying the UiFlow2 startup screen
    • Show startup menu and network setup: The device connects to the network, and devices with a screen will display the UiFlow2 startup screen
    • Only network setup: The device only performs network setup and does not display the UiFlow2 startup screen

When Burn successfully, click here to return is displayed, flashing is successful.

  1. After firmware flashing is complete, if you need to modify the device configuration, keep the USB connection, restart the device, click Configure, and modify the settings according to the prompts.

3. Device Connection

The device supports connecting to UiFlow2 via Access Code (wireless network) or USB (wired connection to a computer) for program pushing and debugging. Refer to the following steps:

Access Code Wireless Connection

  1. Visit uiflow2.m5stack.com to open the UiFlow2 Web IDE.

  2. Make sure the device is connected to the network and obtain the Access Code: you can use WebTerminal to view the current valid Access Code generated by the device. Click the WebTerminal button, select the serial port for Atom-Lite in the dialog, then click Connect to open the serial monitor. You can view the current valid Access Code and Wi-Fi connection status. (Note: If the corresponding information is not displayed, click Soft Reset to perform a soft reboot.)

  1. Click Select Your Controller on the page (shown on first entry) or the Controller button to enter the Select Device page.
  1. Click Connect Device, enter the access code and a custom device name, then click Confirm to connect Atom-Lite to UiFlow2.
  1. Select the connected Atom-Lite device on the Select Device page, then click Confirm to enter the UiFlow2 programming interface.

USB Wired Connection

  1. Visit uiflow2.m5stack.com to open the UiFlow2 Web IDE, and connect Atom-Lite to the computer with a USB cable.

  2. Click Select Your Controller on the page (shown on first entry) or the Controller button to enter the Select Device page.

  1. Select Atom-Lite from the device list, then click Confirm.
  1. Click the WebTerminal button, select the serial port for Atom-Lite in the dialog, and click Connect.

When the WebTerminal screen displays Connected to Serial Port!, the USB connection is successful.

4. Program Run and Download

After the device is connected to UiFlow2, you can drag Blockly blocks to edit programs.

After editing the program, click the Run Once button in the lower-right corner to run the program once for testing. Click Run Always to download the program to the device.

You can also run once or download the program in the WebTerminal window.

Built-in Peripheral Development

Video

On This Page