Risultati per
Hi, this is my first question here... hope not to bother you all. Is it possible to stop a sensor from collecting data by using ThingSpeak/MQTT broker/MQTT protocol? How? I'm working with a MAX30102 for oxigen and bpm detection and I need to stop the sensor from ThingSpeak or at least this is what I was asked to do. At the moment I can't figure out how to do this except by using the APIkey and the HTTP protocol but my task was to only use MQTT protocol. Hope someone can help me finding a new point of view about this topic/problem.
EDIT: I solved the problem. I used another client, MQTTx to be precise, in order to send messages in a field of control. So, at the beginning I had just two fields (BPM and SpO2), then I added a third field of control. The board WeMos, connected to the sensor MH-ET LIVE MAX30102 was used to process the sensor's data and send them to Thingspeak every 15 seconds wherease the client desktop MQTTx was also connected to ThingSpeak's broker and enbled for both publish and subscribe and I used it to send messages of ON and OFF, literally, as payload for the control field. This messages were passed to the callBack function and the payload was checked in order to change the state of my code, nested in a switch system. Thamk's for the help to you all :) If you're interested to the code and the settings just let me know.