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

Station-Bat: Flash Firmware & Run Code

1. USB Driver Installation

Click the link below to download the driver that matches your operating system. After extracting the archive, select the installer package that matches your operating system architecture. CH9102_VCP_SER_MacOS v1.7 may report an error during installation, but the installation has actually been completed and the error can be ignored. If the program cannot be downloaded properly during use (timeout or Failed to write to target RAM), try reinstalling the device driver.

Driver Name Applicable Driver Chip Download Link
CH9102_VCP_SER_Windows CH9102 Download
CH9102_VCP_SER_MacOS v1.7 CH9102 Download

2. UiFlow2 Firmware Flashing

  1. Refer to the UiFlow2 Web IDE tutorial to learn the basic workflow of using UiFlow2 and complete the installation of the M5Burner firmware flashing tool.
  2. Download the firmware for Station-Bat in M5Burner, as shown below.
  1. Connect the device to the computer via a USB cable. After the device is powered on, plug in the USB interface to enter download mode. When M5Burner displays Found New Device, the connection is successful. At this time, the device screen does not display content and the device enters programming mode.
  1. Click the Burn button for the corresponding firmware in M5Burner, select the corresponding device port, and click Start.
  1. Fill in the Wi-Fi configuration required by the device, including Wi-Fi SSID and Wi-Fi Password, as well as any other device configurations that need 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 connected by the device
  • WIFI SSID/WIFI Password: Wi-Fi name and password connected 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 startup mode after firmware flashing is completed
    • run main.py directly: After flashing is completed, directly run the program in main.py without networking or displaying the UiFlow2 startup screen
    • show startup menu and network setup: The device connects to the network, and devices with screens display the UiFlow2 startup screen
    • only network setup: The device only performs network setup and does not display the UiFlow2 startup screen
  1. When Burn successfully, click here to return is displayed, the flashing is successful.
  1. After firmware flashing is completed, if you need to modify the device configuration, keep the USB connection, restart the device, click the Configure option, and follow the on-screen prompts to modify it.

3. Device Connection

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

Access Code Wireless Connection

  1. Before connecting, use the Wi-Fi icon on the screen to make sure that the device is connected to the network. If the network connection is not successful, confirm whether the Wi-Fi name and password entered during firmware flashing are correct, then modify them through the Configure option in M5Burner and flash again.

  1. View the current valid Access Code generated on the device's UiFlow2 startup screen.
  1. Visit uiflow2.m5stack.com to open the UiFlow2 Web IDE.
  2. Click Select Your Controller (shown on first entry) or the Controller button on the page to enter the Select Device page.
  1. Click Connect Device, enter the access code and a custom device name, then click Confirm to connect Station-Bat to UiFlow2.

USB Wired Connection

  1. Visit uiflow2.m5stack.com to open the UiFlow2 Web IDE, and connect Station-Bat to the computer via a USB cable.
  2. Click Select Your Controller (shown on first entry) or the Controller button on the page to enter the Select Device page.
  1. Select the Station-Bat device from the device list and click Confirm.
  1. Click the WebTerminal button, select the serial port of Station-Bat 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 of the interface to run the program once for testing. Click the Run Always button to download the program to the device.

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

On This Page