rahimgiki wrote:
Hi,
I need your helping in sending multiple strings via a single send comond. currently, i am using four commands for it. The four parameters are sensed and need to be send. But using this approach the some are missing and batteries are drain out in one or two days.
xbee802.send("0013A200407620F4",temp);
xbee802.send("0013A200407620F4",humidity);
xbee802.send("0013A200407620F4",soilhumidity);
xbee802.send("0013A200407620F4",lw);
I need to replace these commands with single one. Thanks in advance.
Regards
Rahim Khan
Hi, I might be missing the point - but here goes:
Are trying to send a string containing '
temp,humidity,soilhumidity,lw' ?
If I were I would try to build the string before sending it all at once - assuming you're trying to get all those values to the same destination, all at once.
You can use the sprintf helper function to write the values to a string - warning, you'll need to convert floats to strings before using them in the sprintf function.
The sprintf helper is here:
http://www.libelium.com/development/was ... torial0004 (see part 4).