How to use V_TEXT in 2.0.0
-
Looks like I'm missing something here on using V_TEXT?
MyMessage TEXTMsg (CHILD_ID,V_TEXT); // 47 send(TEXTMsg.set("Alarm is Active", 0)); // Send to gateway
I get this error...
Using library MySensors at version 2.0.0-beta in folder: /Users/lafleur/Desktop/MySensor-Arduino-development/Arduino-development_1.6b/libraries/MySensors exit status 1 invalid conversion from 'const void*' to 'void*' [-fpermissive]
Thanks...
-
Hi!
I think you need to send a character array:
https://www.arduino.cc/en/Reference/StringYou can use the function toCharArray to convert a String to a character array.
-
What happens if you just skip the ",0", like this:
TEXTMsg.set("Alarm is Active")
-
That works?? what the ,0 for ??
-
Sorry, I don't know why you added ,0.
For some of the msg setters, the second argument is used to specify length (buffer) or number of decimals (float).
Please read through the API:
http://www.mysensors.org/download/sensor_api_15#the-full-api