Read the Datasheet and modify the parameters in the code as per your requirements.
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()
{
Serial.print('1');
delay (2000); // delay 2 seconds
}