1

I configured two XBees using XCTU, connected them to the computer and sent Bytes back and forth. Works.

Works.

This is the current, non-working setup:

void setup() {
  Serial1.begin(9600);
  pinMode(13, OUTPUT);
  //After 3 seconds the XBee should send out a couple of "A"s coming from the serial port
  delay(3000);
  int i = 0;
  while (i < 10) {
    Serial1.print("A");
    delay(100);
    i++;
  }
}
void loop() {
  //If anything is sent to the XBee it should appear in the Arduino's serial buffer
  //making the LED on pin 13 turn on
  if (Serial1.available() > 0) {
    digitalWrite(13, HIGH);
  }
}

The DOUT LED on the Explorer Regulated flashes as supposed to but nothing is received on the computer where my Terminal application is listening.

Same when I send something from the Terminal, the LED on pin 13 of the Arduino does not indicate any bytes in the buffer, meaning that the XBee probably never received anything.

I already tried swapping TX & RX, resulting in the DIN LED blinking instead of DOUT. Transmission still not working.

migrated from electronics.stackexchange.com Nov 2 '15 at 19:58

This question came from our site for electronics and electrical engineering professionals, students, and enthusiasts.

  • 1
    Try swapping TX and RX. – Eugene Sh. Nov 2 '15 at 17:39
  • Is the terminal configured for 9600 baud? Are both xbees configured to it too? – Eugene Sh. Nov 2 '15 at 17:47
  • @EugeneSh. Yes, they're set to 9600 baud. Probably would have noticed already when transmitting data with the Terminal. – Dario Nov 2 '15 at 17:53
  • Anyway, DOUT is an output of XBee, so it should go to the input of Arduino, which is RX, rather than TX. First fix this. BTW, make sure you don't have any hard/soft flow control – Eugene Sh. Nov 2 '15 at 17:57
  • @Dario Swapping TX and RX was the solution? Please share it with is for when we get the same problem :) Output of one device is likely to be input of the other and vice versa. It's not that RX connects to RX and TX to TX, they should be cross-connected. – Paul Nov 2 '15 at 20:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.