I've recently discovered a nice integrated MP3 player JQ6500 MP3 Player and thought it would be a nice to add audio output to my project .
I'm also working to integrate the various pieces of functionality that I've been trying out. I'm not as far along as I had hoped to be. I'm still struggling to figure out the best way to incorporate some AI elements.
So far, I've integrated some basic control elements. I have the microwave detector and the PSoC 62S2 communicating via MQTT through my RPi4 broker over WiFi. I've incorporated the EInk display and the JQ6500 MP3 player. I'm using FreeRTOS to integrate the various tasks and using queues to communicate between tasks. I'll have to admit that I'm learning a lot. Modus Toolbox is quite a capable tool, but I've found that it can be quite confusing because of the lack of interoperability of some of its features. I'm just not far enough along the learning curve...
As an example, I thought adding the JQ6500 was going to be easy because I intended to control it by toggling GPIO pin states rather than using a UART. There were lots of examples for configuring and using GPIO pins using the Device Configurator and the Peripheral Driver Library (PDL), so started down that path but I was getting lots of compilation errors. It turns out that some of the tasks that I was modifying were using the Hardware Abstraction Layer (HAL) for GPIO and HAL and PDL(and Device Configurator) cannot be used together. Once I figured that out, I switched to using only HAL functions.
Here is my project structure:
Here's a quick demo of my current functionality with sound and display: