Forum >Romeo V2.0 not working with APC220 module
ArduinoGeneral

Romeo V2.0 not working with APC220 module

userHead Account cancelled 2013-03-20 12:18:24 3059 Views1 Replies
I have just received a new DFRobot Romeo V2.0 controller and will need to use it will the APC220 wireless module to send information to and from my computer and the controller. I have done repeated tests trying to send and receive data, but all have failed.
Both APC220 modules (USB computer and the one on the Romeo) have been configured using RFMagic with the following settings:
RF frequency: 434 MHz
RF TRx Rate: 9600bps
RF Power: 9 (MAX)
Net ID: 12345
NODE ID: 123456789087
Series rate: 9600bps
Series Patity: Disable
PC Series: COM4

I'm currently using the following code to test the wireless communication. The code has been tested and completely works with the Romeo V1.0, but does not work on the Romeo V2.0.

int val = 0;
int ledPin = 13;
void setup()
{
Serial.begin(9600);
}

void loop()
{
val = Serial.read();
if (-1 != val) {
if ('A' == val || 'a' == val) {
Serial.println("Hello from Arduino!");
}else if ('B' == val || 'b' == val) {
digitalWrite(ledPin, HIGH);
delay(500);
digitalWrite(ledPin, LOW);
}
}
}

I did notice that the V2.0 controller has two serial ports, one for wireless communication and one for USB communication, while reading about the board. My guess is that I'm not selecting which port to receive communication from on the board, but I'm not sure if that's the problem or how to fix it. Please help
2013-03-20 18:20:03 Hi

The wireless module use the Serial1 not Serial. Please try to change the "Serial" to "Serial1" in your code.  ;)


Good luck
userHeadPic Phoebe