BLEの通信とサーボコントロールにM5Stack M5AtomS3を使っています。
送信側のJoyStickコントローラはSeeedStudio XIAO ESP32C3を使っています。
(小さくてもラジコンのプロポと同性能)
いずれも150mAhのバッテリーを搭載しています。
M5Atom用のバッテリーモジュールはこちらを参照してください。
https://protopedia.net/prototype/4219
こちらのサーボコネクタを増設したバージョンを使っています。
下のXへのリンクで写真があります。
起動時にM5AtomS3のスイッチを押すことで、自動演奏モードとラジコンモードを切り替えます。
プログラムは全てMicroPythonで行っています。
(MicroPythonでMP3再生ができるように、MicroPythonのコードそのものを改変しています)
オリジナルビルドMicroPythonの詳しい解説はこちらを参照してください。
https://itoi.jp/MicroPython.html
MP3を再生しながら動いている動画は下の動画になります。
黒いスピーカーボックスから音がでます。(小さいけど十分な音量)
MP3をPDM出力しているので使っているI/Oは1本になります。
I use M5Stack M5AtomS3 for BLE communication and servo control.
The JoyStick controller on the sending side is SeeedStudio XIAO ESP32C3.
(Even though it's small, it has the same performance as a radio-controlled radio control)
Both are equipped with 150mAh batteries.
See here for the battery module for M5Atom.
https://protopedia.net/prototype/4219
I use a version of this with an additional servo connector.
See the link to X below for a photo.
Press the switch on the M5AtomS3 at startup to switch between autoplay mode and radio-controlled mode.
All programming is done with MicroPython.
(The MicroPython code itself has been modified so that MP3 playback is possible with MicroPython)
For a detailed explanation of the original build of MicroPython, see here.
https://itoi.jp/MicroPython.html
The video below shows the video in motion while playing MP3.
The sound comes from the black speaker box. (Small but loud enough) Since it outputs MP3 via PDM, it only uses one I/O.
「木綿のハンカチーフ」を歌ってみました! - I tried singing "Cotton Handkerchief"!
CC BY-NC-SA