So I've started to play with MQTT to allow my arduinos and other things to communicate with each other, it's got great potential to allow me to have my projects communicate with each other.
So let me break it down.
I set up an MQTT broker and tested it with an android app on my phone and an application on my laptop. I can send and receive messages no problem. So I loaded the example sketch and set the appropriate server ip, local ip, and mac address's; Then power up, I get the HELLO WORLD from outTopic on my other devices.
But what I can't figure out, is how can I trigger an event from a received MQTT message?
I have read through the mqtt basic and publish in callback examples over and over, but can't figure this out.
lets say I send a message to inTopic with a value, what do I need to write to tell it "hey look for this message under this topic, when received, do whatever action"?
it's not very clear from the example.
Thank you to anyone who wishes to help or give me a link to a useful tutorial, all I've been able to find only seem to cover sending messages rather than receiving them.