StackChan: Flash Firmware & Run Code
1. Preparation
- Refer to the UIFlow2 Web IDE Tutorial to understand the basic workflow of UiFlow2 and complete the installation of the M5Burner firmware flashing tool.
- Log in and register an account on M5Burner. Once the firmware is successfully flashed, the device information will be bound to that account.
2. Firmware Flashing
- Enter Download Mode: Connect the computer to StackChan using a USB-C cable (both the USB-C port on the main unit and the one on the base support data transfer; however, using the base port is recommended to avoid accidental motor movement). Press and hold the RST reset button (located next to the microSD card slot on the bottom side) for 3 seconds. When the indicator LED next to the button turns green, the device has entered download mode and the button can be released.
- Download the firmware for
StackChan in M5Burner, as shown below.
- Click the
Burn button corresponding to the StackChan firmware, select the corresponding device port, and click Start.
- Enter the Wi-Fi configuration required for the device, including the Wi-Fi SSID and Wi-Fi Password, along with any other device settings to be added or modified, then click
Next to begin flashing.
Note
If this is the first time connecting your device, you will need to bind the device to your account.
When the prompt Burn successfully, click here to return appears, the flashing has completed successfully. Restart the device to apply the flashed configuration.
Configuration Parameters
- COM: Serial port
- BaudRate: Baud rate for serial communication
- Server: Server address the device connects to
- WIFI SSID / WIFI Password: Wi-Fi name and password for the device
- SNTP Server
- SNTP0: Alibaba Cloud NTP server (China)
- SNTP1: Japan NTP server pool
- SNTP2: Global public NTP server pool
- Timezone: Timezone setting
- Boot Option:Sets the device boot mode after firmware programming
- run main.py directly:After programming is complete, the program in main.py runs 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 display the UiFlow2 startup screen
- only network setup:The device only connects to the network without displaying the UiFlow2 startup screen
3. Modifying Device Configuration
After firmware flashing is complete, if you need to modify the device configuration, keep the USB connection active, restart the device, and click the Configure option in M5Burner. Make the desired changes in the configuration panel that appears, then click Next to reapply the updated configuration.
4. Logging in to UiFlow2
Go to the UiFlow2 page and click the user icon in the upper-right corner to log in to your UiFlow2 account.
UiFlow2 Account
This account must be the same one used to log in to M5Burner. Once logged in, devices that have successfully connected to a valid Wi-Fi network under this account can be viewed by clicking Select Device. To transfer device ownership, the device must first be unbound from the current account.
5. Entering the Programming Interface
The device can be connected to UiFlow2 via Wi-Fi or USB to access the programming interface. The methods are as follows:
Wi-Fi
Note
Ensure Wi-Fi has been configured: When flashing the firmware, the Wi-Fi and other settings must be configured in the M5Burner Configure section.
- Open the device list.
- Select the online device and click
Confirm.
The UiFlow2 programming interface for the device will open successfully.
USB
- Connect StackChan to the computer via a USB cable. In the device list, select the StackChan device module and click
Confirm.
- Click the
WebTerminal button.
- In the dialog, select the serial port for
StackChan and click Connect.
When the WebTerminal screen displays Connected to Serial Port!, the USB connection is successful and the UiFlow2 programming interface for the device will open.
6. RUN
Once the above steps are complete, you can start programming with UiFlow2.