Quantcast
Channel: Seeedstudio Forum
Viewing all articles
Browse latest Browse all 6612

RFbee communication help

$
0
0
Thanks for your help.

I tried your code but data is not send from rfbees, it just prints in monitor but not send to the other one.

I don't understand, in your code, there only Serial.print. That only show what is between parentheses, i don't understand how it can configurate rfbees with just Serial.print.

I did that code with Serial.read() you adviced me :

Code: int incomingbyte = 1;

void setup()
{               
Serial.begin(9600); // beginning the Serial Communication

// Read the AT Commands section in RFBee Datasheet to understand AT Commands below
//Start control mode in RFBEE using NUM's +++
Serial.print("+++\r");
delay(40);
//Read firmware version (should be 1.1)
Serial.print("ATFV\r");
delay(10);
//Read HW version (should be 1.0)
Serial.print("ATHV\r");
delay(10);
//Read current baud setting (should be 0=9600bps)
Serial.print("ATBD\r");
delay(10);
//set mode, initially it's transceiving
Serial.write("ATMD0\r");
delay(10);
//Set Output format
Serial.write("ATOF3\r"); // Check Datasheet
delay(10);
//Set My (source) Address
Serial.write("ATMA2\r");
delay(10);
//Set Destination Address
Serial.write("ATDA1\r");
delay(10);
Serial.write("ATAC2\r");
delay(10);
Serial.write("ATTH0\r");
delay(10);
Serial.write("ATPA7\r"); //Maximum Power, can adjust as per requirement
delay(10);
Serial.write("ATCF5\r"); //Least Data rate, can change as per requirement
delay(10);


//Go back to data mode
Serial.print("ATo0\r");
}

void loop()
{

     
     incomingbyte =  Serial.read();
     Serial.println(incomingbyte);
     delay (1000); // delay 2 seconds
}


when i write something like "a" for exemple, it's show me a number "97" only in the monitor where i write it but not in the other one.

What should i do?

Statistics : Posted by dechaumet.valerian • on Wed May 27, 2015 7:00 pm • Replies 2 • Views 41

Viewing all articles
Browse latest Browse all 6612

Trending Articles