Cardputer-Adv: Flash Firmware & Run Code
1. UiFlow2 Firmware Flashing
Refer to the UiFlow2 Web IDE Tutorial to understand the basic UiFlow2 workflow and complete the installation of the M5Burner firmware flashing tool.
Download the firmware for Cardputer-Adv in M5Burner, as shown below.
- Set the power switch on the side of Cardputer-Adv to
OFF, then press and hold the G0 button before powering on. Release it after the device powers on, and the device will enter download mode.
- Connect the device to the computer with a USB cable. In M5Burner, click the
Burn button for the corresponding firmware, select the 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 flashing.
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 for device connection
- 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: Sets the device startup mode after firmware flashing is complete
- run main.py directly: After flashing is complete, directly runs 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 display the UiFlow2 startup screen
- only net work 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. Reset the device at this time.
- After firmware flashing is complete, if you need to modify the device configuration, keep the USB connection, restart the device, click the
Configure option, and modify the configuration according to the on-screen prompts.
2. Device Connection
The device supports connecting to UiFlow2 by Access Code (wireless network) or USB (wired computer connection), enabling program pushing and debugging. Refer to the following tutorials for details:
Access Code Wireless Connection
- Before connecting, make sure the device is connected to the network. If the network is not connected, check whether the Wi-Fi name and password entered during firmware flashing are correct, modify them through the
Configure option in M5Burner, and flash 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 on first entry) 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 Cardputer-Adv to UiFlow2.
Access Code Description
1. Changing browsers, using private/incognito mode, or clearing the UiFlow website cache will invalidate the original pairing state.
2. Simply closing the tab, restarting the browser, logging in, or logging out will not affect the existing pairing relationship.
3. Once the device is paired by another browser, the original browser pairing relationship becomes invalid immediately.
USB Wired Connection
Visit uiflow2.m5stack.com to open the UiFlow2 Web IDE, and connect Cardputer-Adv to the computer with a USB Type-C cable.
Click Select Your Controller (displayed on first entry) or the Controller button on the page to enter the Select Device page.
- Select the Cardputer-Adv device in the device list and click
Confirm.
- Click the
WebTerminal button, select the serial port of Cardputer-Adv in the dialog box, and click Connect.
When the WebTerminal screen displays Connected to Serial Port!, the USB connection is successful.
3. 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 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.
UiFlow2 Firmware Main Interface Function Module Description
The UiFlow2 program includes five functional modules
DEVELOP: Displays basic information about the current device, including the MAC address and bound user account.
APP.RUN: Configures the running mode of programs downloaded by UiFlow2.
APP.LIST: Manages the list of saved programs.
EZDATA: Provides cloud data interaction functions and supports data upload and synchronization.
SETTING: Centrally manages common device system settings, such as screen brightness adjustment and Wi-Fi network configuration.
After the device (Cardputer-Adv) starts, the keyboard is in low-power sleep mode by default. To enable keyboard input, perform the following actions at the same time: keep holding the fn key on the keyboard with your left hand to wake the keyboard; use your right hand to press the desired key on the keyboard. This ensures that the keyboard is activated successfully and responds to subsequent input. For details, refer to the official documentation.
- DEVELOP
- Device MAC address
- Account bound during M5Burner flashing, used for offline development
- APP.RUN
- When you use UiFlow2 to download an edited program to the device, the system automatically writes the program to the main.py file in the APP.RUN directory (overwriting the original content) and runs it immediately
- If you add a program named main.py to the APP.RUN directory by another method (such as manual import), you can also run it on the device through the RUN(ONCE) one-time run or RUN(ALWAYS) continuous run option
Note: Do not delete main.py. If it is deleted, the device will freeze when entering the APP.RUN program. After flashing a UiFlow2 program or running the main.py program, you cannot return to the UiFlow2 main interface. You need to use M5Burner again to perform Configure configuration and refresh the firmware.
- APP.LIST
- After you are familiar with UiFlow2 development, you can manually write Python programs (using any code editor). Click WebTerminal in the lower-left corner of the UiFlow2 interface, connect the device via USB, click the file folder, and import program files into the device's /flash/apps directory. Files placed in this directory can be tested and run at any time after the device starts
- SETTING
- Configure Wi-Fi
- Configure screen brightness