English
English
简体中文
日本語

Product Guide

AI & Agent

Industrial Control

IoT Measuring Instruments

Air Quality

PowerHub

Module13.2 PPS

Input & Output Devices

Audio Playback Devices

Ethernet Camera

CoreMP135 UiFlow2 Quick Start

1. Preparation

2. Download System Dependencies

  • Connect to the device terminal via the serial port or SSH, then run the following commands to download the system dependencies (network access is required).
apt update
apt install -y python3-pip  build-essential python3-dev python3-pyaudio
Mirror Source
If the network connection is unstable or downloads are slow, try switching to the following mirror source. Use the commands below to back up the existing software source configuration, then add the mirror source configuration.
  • Back up the existing configuration and add the new mirror source links.
mv /etc/apt/sources.list /etc/apt/sources.list.backup
vim /etc/apt/sources.list
deb https://mirrors.ustc.edu.cn/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm main non-free non-free-firmware contrib
deb https://mirrors.ustc.edu.cn/debian-security/ bookworm-security main
deb-src https://mirrors.ustc.edu.cn/debian-security/ bookworm-security main
deb https://mirrors.ustc.edu.cn/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm-updates main non-free non-free-firmware contrib
deb https://mirrors.ustc.edu.cn/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm-backports main non-free non-free-firmware contrib
  • After saving the changes, run apt update to update the package information, then run the dependency installation command again.

3. Install the UiFlow2 Python Library

CoreMP135-UiFlow2 Package
The CoreMP135-UiFlow2 package is a third-party Python 3.11 library designed for CoreMP135 UiFlow2 and is used to run code generated by UiFlow2. The library includes an executable UiFlow2 command-line tool for starting and stopping the background service. The background service connects to the UiFlow2 server to receive commands.
  • Download the UiFlow2 package using the pip package manager. Because pip in Debian 12 has system protection enabled, add the --break-system-packages flag as shown below to install the package (network access is required).
pip install uiflow2 --break-system-packages
  • Verify that the installation succeeded by checking that uiflow2 appears in the pip package list.
pip list
Package            Version
------------------ ---------
certifi            2026.7.22
charset-normalizer 3.4.9
distro             1.8.0
evdev              1.9.3
idna               3.18
network            0.1
paho-mqtt          2.1.0
pip                23.0.1
PyAudio            0.2.13
pyserial           3.5
requests           2.34.2
setuptools         66.1.1
smbus2             0.6.1
typing_extensions  4.16.0
uiflow2            0.0.6
urllib3            2.7.0
wheel              0.38.4

4. Start the UiFlow2 Service

CoreMP135 connects to UiFlow2 using an Access Code (over the network), enabling program transfer and debugging. Follow the steps below:

  1. Run the service start command. After initialization is complete, the device Access Code will appear on the screen.
# Start the UiFlow2 service
uiflow2
  1. Visit uiflow2.m5stack.com to open the UiFlow2 Web IDE.
  2. Click Select Your Controller (displayed on first use) or the Controller button to open the Select Device page.
  1. Click Connect Device, enter the Access Code and a custom device name, then click Confirm to connect CoreMP135 to UiFlow2.
  1. On the Select Device page, select the connected CoreMP135 device and click Confirm to enter the UiFlow2 programming interface.

5. Run and Download Programs

After connecting the device to UiFlow2, drag Blockly blocks to edit the program.

After editing the program, click the Run Once button in the lower-right corner to run the test program once.

To run the program automatically after the device powers on, click Run Always to download the program to the device, then refer to 6. Other Common Commands to configure the UiFlow2 service to start automatically.

6. Other Common Commands

# Start the UiFlow2 service and run the default UiFlow2 startup program (Access Code page)
uiflow2 ui

# Stop the UiFlow2 service
uiflow2 stop
  • Linux system service commands
# Enable the UiFlow2 systemd service so UiFlow2 starts automatically when the system starts
uiflow2 enable

# Restart the UiFlow2 systemd service
systemctl restart uiflow2.service

# Check the UiFlow2 systemd service status
systemctl status uiflow2.service

# Stop the UiFlow2 systemd service
systemctl stop uiflow2.service

# Remove the UiFlow2 systemd service
uiflow2 disable
Page Tools
PDF
On This Page