pdf-icon

UiFlow Tutorial

UiFlow1 Development Guide

Project Management

Use LTE network

UiFlow1 Blockly

Event

Unit

UiFlow2 Development Guide

UI Editor

Device Security & Sharing

Cardputer: Flash Firmware & Run Code

1.Preparation

  • Refer to the UIFlow2 Web IDE tutorial, to understand the basic process of using UiFlow2 and complete the installation of the M5Burner firmware burning tool.

  • Register and log in to M5Burner. After the device is successfully burned, the device information will be simultaneously bound to the account.

  • Download the firmware suitable for Cardputer in M5Burner, as shown in the figure below.

2.Port Selection

Connect the device to the computer via a USB cable, click the Burn button for the corresponding firmware in M5Burner, fill in the Wi-Fi information, and select the corresponding device port.

After the Device is turned on, press and hold down the G0 key, insert the USB port, enter the download mode, after connecting, the software will pop up Found New Device. In this case, the connection is successful, and the screen does not display the content, enter the programming mode.


schematics

3.Firmware Burning

Connect the device to the computer via a USB cable, select the Burn button for the corresponding firmware in M5Burner, and fill in the Wi-Fi configuration that the device is pre-connected to, including Wi-Fi SSD and Wi-Fi Password, as well as other device configurations that need to be added or modified.

Note: If your device is connected for the first time, you need to bind the device under this account.

Configuration information:

  • COM: Serial port
  • audRate: Baud rate of serial port communication
  • Server: Indicates the IP address of the server connected to the device
  • WIFI SSID / WIFI Password
  • SNTP Server
    • SNTP0: Alibaba Cloud NTP Server (China)
    • SNTP1: Indicates the NTP server pool in Japan
    • SNTP2: Indicates the global public NTP server pool
  • Timezone: Specifies the time zone
  • Boot Option
    • run main.py directly
    • show startup nemu and network setup
    • only net work setup

4.Modify Device Configuration

After the firmware is burned, the device will restart and remain connected to the USB. Use M5Burner to click the Configure option, fill in the device configuration that needs to be modified, and click next. Note: After successful burning, the device needs to be restarted. If you need to change the device configuration again, you need to modify the burning configuration information again.

5.Login to UiFlow2

Click the user icon in the upper right corner of the page to log in to the UiFlow2 system account. Note: This account needs to be the same as the one logged in to M5Burner. After successful account login, devices with successful and valid Wi-Fi connections under this account can be viewed by clicking Select Device. If you need to change the device owner, you need to unbind the relationship between the device and the account.

Wi-Fi Mode

Ensure that the Wi-Fi has been configured: When burning the program, you need to configure the Wi-Fi and other information in the M5Burner burning program Configure.

Select an online device.

USB Mode

Select the device module to which the USB is to be connected

Connect Cardputer to the computer's USB port and click the WebTerminal button.

Select the USB-connected device in the pop-up window, click Select, and when the WebTerminal screen displays "Connected to Serial Port!", it means that the USB connection is successful.

6.RUN

After completing the above steps, you can start programming using UiFlow2.

7. UiFlow2 Firmware Main Interface Function Module Description

UiFlow2 program includes five functional modules
DEVELOP:Displays basic information of the current device, including the MAC address and the bound user account.
APP.RUN:Configures the running mode for UiFlow2 downloaded programs.
APP.LIST:Manages the list of saved user programs.
EZDATA:Provides cloud data interaction capabilities, supporting data upload and synchronization.
SETTING:Centralized management of common device system settings, such as screen brightness adjustment and Wi-Fi network configuration.

After the device (Cardputer-Adv) boots up, the keyboard defaults to a low-power sleep state. To enable keyboard input functionality, the user must perform the following actions simultaneously: Hold down the fn key on the keyboard with the left hand to wake up the keyboard; use the right hand to press the desired key on the keyboard. This operation ensures the keyboard is successfully activated and responsive to subsequent inputs.

  • DEVELOP
    • MAC address
    • The account bound during the M5Burner burning process, used for offline development
  • APP.RUN
    • When you use UiFlow2 to download the edited program to the device, the system will automatically write the program into the main.py file under the APP.RUN directory (overwriting the existing content) and immediately run it
    • If you add a program named main.py to the APP.RUN directory through other methods (such as manual import), you can also run it on the device by selecting RUN(ONCE) for a one-time run or RUN(ALWAYS) for continuous running options

Note: The main.py file must not be deleted. If it is deleted, when entering the APP.RUN program, the device will freeze. After executing the UiFlow2 program for burning or running the main.py program, it is impossible to return to the main interface of UiFlow2. You need to use M5Burner again to perform Config configuration and update the firmware.

  • APP.LIST
    • After you become familiar with UiFlow2 development, you can manually write Python programs (using any code editor). Click the WebTerminal at the lower left corner of the UiFlow2 interface, connect the device via USB, click the "file" folder, and import the program files into the /flash/apps directory on the device. Place the files in the directory. Once the device is powered on, you can test and run the program at any time
  • SETTING
    • Configure Wi-Fi
    • Adjust the screen brightness

Built-in peripheral development

8.Related Videos

On This Page