An open-source DIY remote control, based on the M5StickC Plus2, for DJI Osmo Action 5 Pro cameras. This is part of a much larger project, but I wanted to share it because there don’t seem to be any other DIY remotes out there.
It can sleep/wake the camera, switch modes, start/stop recording, capture photos, and will automatically reconnect. It also has external GPIO control:
Pull G0 to GND to trigger the shutter/recording. Pull G26 to HIGH to put the camera into SLEEP mode. Pull G36 to HIGH to wake the camera.
All you need is an M5Stack M5StickC Plus2 (Amazon affiliate link)
And the code here on GitHub
Needs to be flashed to the M5StickC Plus2 with the ESP-IDF (build and flash).
It would probably be possible to refactor the code to work with other versions of the M5StickC, but it isn’t a simple turnkey thing.
I tried really hard to make this work with the Arduino IDE, but the it just wasn’t possible. The available BLE libraries had quirks that made them incompatible with the DJI protocol, so I had to use ESP-IDF.
I’ve tested this with the DJI Osmo Action 5 Pro. It may work with other DJI camera models, but I’m not sure.
This is based on DJI’s own official demo, but very heavily modified.
Instructions
I’m not going to provide detailed instructions, because this isn’t very beginner-friendly and I wouldn’t suggest it unless you have experience programming microcontrollers—or you’re willing to spend a couple of hours learning the basics.
The supplied code is meant to be built and flashed using ESP-IDF. I did so in Visual Studio Code.
If you’re using the M5StickC Plus 2, Visual Studio Code, and the ESP-IDF, then it should be pretty straightforward. Just open the project folder and the ESP-IDF extension tools to build and then flash.
After that, using the remote is self-explanatory. The first time you connect, the camera will show the verification pin code and ask you to confirm. After that, it should reconnect automatically when both the remote and camera are on.
Leave a Reply