In the previous blog (blog1) i have explained about the over all idea and getting started guide with the sensor. In this blog i have implemented the music control over gesture.
My initial plan is to use DFmini player to play the mp3 file but due to some limitation with time & support for MAX25405EVKIT i have used PC and python scripting to playing audio.
My setup looks like below, I have used Bluetooth Speaker which is connected to the PC. UART TX, RT P3_1, P3_0 pins connected to serial to USB converter and connected to PC.
Building the Code:
Initially i thought building the firmware was easy job but due to some github versions , it took more time for me. The blogs from misaz really helpful for me find out the working version of
Installed pythons & Visual Studio tools helps to build the firmware without any issues.
git checkout 0fdfcf7350896a9c0b57c4a18237677abfe25f1a
// Option to implement serial API over UART instead of USB
#define USE_UART_INTERFACE 1
#define UART_BAUD_RATE 115200
After all changes the code works and prints in uart console.
I used python to read the serial data over com port. I have made logic to Play/Pause/Next/Previous controls using gesture values.
The final working demo of video is here. I will be improving the version in the future. Thank you all for the support.