I'm developing a project that looks to play a sound read from an sd card when an mqtt message is received.
I'm using the Wio Terminal with the respeaker add on.
After a lot of debugging, I have come to realize that after I run the function .play from the audio library everything freezes and I have to power cycle to be able to load the code. If I remove client.loop() and I pressed a button instead of mqtt message the sound plays.
My question is there a way to handle such events? for a process that could collide with any background process that pubsubclient is using?
Thank you and any suggestion would be appreciated!
Hi,
I'm developing a project that looks to play a sound read from an sd card when an mqtt message is received. I'm using the Wio Terminal with the respeaker add on.
After a lot of debugging, I have come to realize that after I run the function .play from the audio library everything freezes and I have to power cycle to be able to load the code. If I remove client.loop() and I pressed a button instead of mqtt message the sound plays.
My question is there a way to handle such events? for a process that could collide with any background process that pubsubclient is using?
Thank you and any suggestion would be appreciated!