By jimbar99
#9625
I cannot get the XBee module to be recognized on the Input Shield V2.

I have 2 XBee modules that are both configured properly and can be read by the Digi X-CTU software when plugged into your XBee pro shield stacked directly onto my Arduino Uno board

The XBee modules can also be read when plugged into your XBee pro shield that's stacked on top of the Input Shield V2 that is in turn plugged into the Arduino.

However, if I plug the Input Shield V2 alone into the Arduino, and install the XBee module on it, the XBee module is not recognized.

I am probably doing something wrong, but haven't been able to find any detailed information about the proper procedure for getting this to work. Any help would be appreciated.
By Leff
#9639
Hello jimbar99,

Sorry, do you mean this Input Shield for Arduino?

(28.66 KiB) Downloaded 6083 times


If so, sorry that you missed nothing, but it is normal that Xbee won't be configured on this kind of shield, since they are connected as: TX-RX; RX-TX to communicate with the board...

But I am not sure yet, if Xbee module could be found by connecting it with the shield as:

TX-TX
RX-RX

or if it would work once upload a special code for comunication with serial module:

For controller like Uno:

Code: Select all
void setup() {
  Serial.begin(9600); //initialize Serial(i.e. USB port)
}
void loop() {
  while (Serial.available()) {
    Serial.write(Serial.read());
  }
  delay(1);
}


For controller like Leonardo:
Code: Select all
void setup() {
  Serial.begin(9600); //initialize Serial(i.e. USB port)
  Serial1.begin(9600); //initialize Serial1
 
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }
}
void loop() {
  while (Serial1.available()) {
    Serial.write(Serial1.read());
  }
  while (Serial.available()) {
    Serial1.write(Serial.read());
  }
  delay(1);
}
By Leff
#9709
The wiki about how to set Veyron Driver through Serial port has not shown all the steps, poor wiki I'd like to point it out.

So I tested different ways to do the setting through a UNO(TX-RX/TX both worked), FTDI adapter(RX-TX, TX-RX), USB-TTL adapter (TX-TX, RX-RX).

  1. UNO, RX-RX, TX-TX
    1. Upload an empty sketch or a Blink to release the Serial port.
      Code: Select all
      void setup() {
        // put your setup code here, to run once:

      }

      void loop() {
        // put your main code here, to run repeatedly:

      }
    2. Connect the Serial device waiting for Serial debug.
      (452.36 KiB) Downloaded 379 times


    3. Open the serial port of UNO, and send Command (here I sent 1,SVS,1,1000 to run the motor)

      (7.06 KiB) Downloaded 379 times

  2. UNO, TX-RX & RX-TX

    1. Upload the code below to UNO, it will send what you have input. Important: Set the Baud rate as required.
      Code: Select all
      void setup() {
        Serial.begin(57600); //initialize Serial(i.e. USB port)
      }
      void loop() {
        while (Serial.available()) {
          Serial.write(Serial.read());
        }
        delay(1);
      }



    2. Wiring as above except: TX-RX & RX-TX (.Important: )

    3. Send the command as above.
      (7.06 KiB) Downloaded 379 times

  3. Xbee USB adapter (FTDI ready) DFR0050 RX-TX, TX-RX, GND-GND as below, and you can send command as you wish.

    (470.75 KiB) Downloaded 379 times


  4. USB Serial Light Adapter - Atmega8U2 (Arduino Compatible) DFR0164, RX-RX, TX-TX, GND-GND, other wiring are the same (for the reason why TX-TX, the label on PCB was not equal to hardware)

    (476.12 KiB) Downloaded 379 times