M5_CoreMP135_debian12_20260626)を書き込みます。この手順については、CoreMP135 イメージ書き込みチュートリアルを参照してください。容量を拡張します。この手順については、CoreMP135 パーティション拡張チュートリアルを参照してください。apt update
apt install -y python3-pip build-essential python3-dev python3-pyaudio 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 apt update コマンドを実行してパッケージ情報を更新し、依存パッケージのインストールコマンドを再度実行します。--break-system-packages フラグを追加してパッケージをインストールします(ネットワーク接続が必要です)。pip install uiflow2 --break-system-packages 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 CoreMP135 は Access Code(ネットワーク経由)を使用して UiFlow2 に接続し、プログラムの転送とデバッグを行います。以下の手順に従って操作してください。
Access Code が表示されます。# Start the UiFlow2 service
uiflow2
Select Your Controller(初回アクセス時に表示)または Controller ボタンをクリックし、Select Device ページを開きます。
Connect Device をクリックし、Access Code と任意のデバイス名を入力してから Confirm をクリックすると、CoreMP135 が UiFlow2 に接続されます。
Confirm をクリックすると、UiFlow2 のプログラミング画面が開きます。
デバイスを UiFlow2 に接続すると、Blockly ブロックをドラッグしてプログラムを編集できます。
プログラムの編集が完了したら、画面右下の Run Once ボタンをクリックして、テストプログラムを 1 回実行できます。
デバイスの電源投入後にプログラムを自動実行するには、Run Always ボタンをクリックしてプログラムをデバイスにダウンロードし、6. その他の一般的なコマンドを参照して UiFlow2 サービスの自動起動を設定します。
# Start the UiFlow2 service and run the default UiFlow2 startup program (Access Code page)
uiflow2 ui
# Stop the UiFlow2 service
uiflow2 stop # 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