Pages: [1]   Go Down
Author Topic: Use DFRobot IO Expansion Shield with XBee PRO 900  (Read 1208 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have searched the solution for a long time to use DFRobot IO Expansion Shield (http://www.dfrobot.com/index.php?route=product/product&path=123_129&product_id=264) with XBee PRO 900. But there is no help. After reading the manual (http://www.dfrobot.com/wiki/index.php?title=IO_Expansion_Shield_For_Arduino(V5)_(SKU:_DFR0088)) and Schematics (http://www.dfrobot.com/image/data/DFR0088/Arduino%20Expansion%20V5%20SCH.pdf) carefully, I have successfully made UNO + IO Expansion Shield + XBee PRO 900 communicating with PC + X-CTU + XBee PRO 900. Here is the solution, hope it helps as an instruction.

1. Make the 3 jumpers all connect to APC side (opposite to 485). This will use XBee PRO. It does not need additional wiring. The IO Expansion Shield has connect APC-TXD to pin 0(RX), APC-RXD to pin 1(TX), DTR(EN) to pin 2.
2. Upload the sketch to UNO. Make sure the XBee PRO is not connected otherwise uploading will fail for serial port occupied by XBee PRO.
3. Plug IO Expansion Shield with XBee PRO into UNO.
4. To receive data, write LOW to EN.
5. To transmit data, write HIGH to EN.

Here is my codes (UNO).

Code:
int buzzerPin = 8;
int EN = 2;
int val;
 
void setup()
{
  pinMode(buzzerPin, OUTPUT);
  pinMode(EN, OUTPUT);
  Serial.begin(9600);
}
 
void loop()
{
  digitalWrite(EN, LOW); //Enable Receiving Data
  val = Serial.read();
  if (-1 != val) {
    if ('A' == val) {
      tone(buzzerPin, 2500, 200);
      digitalWrite(EN, HIGH); //Enable Transmitting Data
      Serial.println("XBee PRO 900 received");
    }
 }
}
« Last Edit: June 22, 2012, 10:09:28 pm by achenal » Logged

Shanhghai
Offline Offline
Newbie
*
Karma: 0
Posts: 27
DFRobot Tech Support
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

To use DFRobot IO Expansion shield with Xbee, all you need to do is the set the jumpers to Serial. And nothing else you need to do.

The rest bit is just to send and receive data as standard serial port.
Logged

DFRobot-Drive The Future
Official Technical Support for DFRobot Product
www.DFRobot.com

Pages: [1]   Go Up
Jump to: