StamPLC: Flash Firmware & Run Code
1. UiFlow2 Firmware Burning
- Refer to the UiFlow2 Web IDE Tutorial to learn the basic workflow of using UiFlow2 and complete the installation of the M5Burner firmware burning tool.
- Enter download mode: Press and hold the Boot button until the red indicator lights up, then release the Boot button to enter download mode.
- Download the firmware compatible with
StamPLC in M5Burner, as shown below.
- In M5Burner, click the
Burn button for the corresponding firmware, select the corresponding device port, and click Start.
- 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 burning.
Configuration information description:
- 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 the device connects to
- 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 burning is complete
- run main.py directly: After burning is complete, directly run the program in
main.py 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, the burning is successful. Reset the device at this time.
- After firmware burning is complete, if you need to modify the device configuration, keep the USB connection, restart the device, click the
Configure option, and modify the settings according to the on-screen prompts.
2. Device Connection
The device supports connecting to UiFlow2 via Access Code (over a wireless network) or USB (wired connection to the computer) for program deployment and debugging. Refer to the following tutorial steps for details:
Access Code Wireless Connection
- Before connecting, make sure the device is connected to the network. If the device is not connected to the network, confirm whether the Wi-Fi name and password entered during firmware burning are correct. You can modify them through the
Configure option in M5Burner, and then burn again.


- View the currently generated valid Access Code on the device's UiFlow2 startup screen.
- Visit uiflow2.m5stack.com to open the UiFlow2 Web IDE.
- Click
Select Your Controller (displayed when entering for the first time) or the Controller button on the page to enter the Select Device page.
- Click
Connect Device, enter the access code and a custom device name, then click Confirm to connect StamPLC to UiFlow2.
USB Wired Connection
- Visit uiflow2.m5stack.com to open the UiFlow2 Web IDE, and connect StamPLC to the computer via a USB cable.
- Click
Select Your Controller (displayed when entering for the first time) or the Controller button on the page to enter the Select Device page.
- Select the StamPLC device from the device list, and click
Confirm.
- Click the
WebTerminal button, select the serial port of StamPLC in the dialog box, and click Connect.
When the WebTerminal screen displays Connected to Serial Port!, the USB connection is successful.
3. Run and Download Programs
After the device is connected to UiFlow2, you can drag Blockly blocks to edit programs.
After program editing is complete, click the Run Once button in the lower-right corner of the interface to run the test program once. Click the Run Always button to download the program to the device.
You can also run once or download the program from the WebTerminal window.