LowPowerLab Forum

Hardware support => Moteino => Topic started by: chalupien on May 05, 2014, 05:26:14 PM

Title: Save radio.SENDERID to string??
Post by: chalupien on May 05, 2014, 05:26:14 PM
Hello, I can't get the byte holding the SENDERID to save into a String, or a char array...

Ive tried sprintf(senderID,"%d",radio.SENDERID) and String(radio.SENDERID,DEC)

Neither work and just retun 0...

Any ideas?
Title: Re: Save radio.SENDERID to string??
Post by: luisr320 on May 21, 2014, 07:43:08 PM
Try this:

int senderid = radio.SENDERID;
Serial.print(senderid);

Edit: Sorry, not a string  :-\
Title: Re: Save radio.SENDERID to string??
Post by: kiwisincebirth on May 27, 2014, 03:22:44 AM
Try this

String a = String( radio.SENDERID );

http://arduino.cc/en/Reference/StringConstructor