Responding to a Gateway Query
-
Greetings All,
Hek was kind enough to suggest the ways and means of querying a node for data. I have my nodes set up to send data automatically. I would like to test for the incoming query with an "IF" statement but, once again, I need a push. I cannot seem to incorporate my incomingMessage () without compiling errors, probably because I do not know what I am doing.
If I may be so bold as to request a bit of code, what might I place into an "IF" statement or my void loop to test for when the gateway has sent a request for information?
Right now, I have my gateway sending the following code: 1;3;2;0;39\n which translates into a no-ack (0) request for data (2) from node 1, child sensor 3, in the form of a current level reading (39). I just don't know how to respond to this request. All advice is greatly appreciated! Directions to an example would be great, as well, because I do not know what to search for.