PaulS:
Therefore, this:[b] for (byte i = 0; i < *radio.DataLen; i++) //can also use radio.GetDataLen() if you don't like pointers[/b]
Serial.print((char)radio.Data[i]);
will not work, and you'll have to use the GetDataLen() and GetData() methods. By the way, don't try to bold stuff in a code window.
Paul, thanks. I tried removing the *radio.DataLen and replacing with GetDataLen() like this. It did compile past that line, but then error on the next Serial.print for a similar reason.
void loop()
{
if (radio.ReceiveComplete())
{
if (radio.CRCPass())
{
Serial.print('[');Serial.print(radio.GetSender());Serial.print("] ");
for (byte i = 0; i < radio.GetDataLen(); i++)
Serial.print((char)radio.Data[i]);
if (radio.ACKRequested())
{
radio.SendACK();
Serial.print(" - ACK sent");
}
}
else
Serial.print("BAD-CRC");
Serial.println();
}
}
RFM12B.h:205: error: 'volatile uint8_t* RFM12B::Data' is private
On Line: Serial.print((char)radio.Data*);*
[/quote]
I have the feeling you meant I also need to change that Serial.print() line to something like
> Serial.print((char)radio.GetData(??));
But none of my iterations of GetData worked in the Serial.print statement. I'm probably being dense. Can you type it out for me?