Question about sending variables in publish function #328
Unanswered
Papillon340
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm new to this library and am having some issues with sending variable sensor data with my Arduino MKR NB 1500.
Using the example sketch client.publish("/hello", "world"); I was able to replace the "world" with other information that I wish to publish and that works just fine.
But I'm a bit stuck when it comes to sending variables like temperature or gps data.
It looks to me as if the publish function requires string data type and my sensor data might not fullfil this criterion. I have tried all kinds of combinations of symbols and variables but I'm really just guessing at this point. Google isn't my friend this time around either.
I thought maybe you could point me in the right direction.
I would be great if I could put in a variable like in the Serial.print function or similar.
Thanks for your help.
Beta Was this translation helpful? Give feedback.
All reactions