Arduino + XbeeShield + Wifly Rn-XV

Hi everyone!!

I'm working in a project which the main porpouse is to control a mini car robot wireless with wifi from my computer. I'm working with Duinobot board wich is a modification of Arduino UNO board (is kinda the same) and i'm using Arduino 0022 soft; i have also an XbeeShield V1.0 (http://www.icbank.com/data/ICBShop/board/XbeeShieldV1.0_DS.pdf) and the Wifly Rn-XV.

I want to send from my computer commands to the wifly and then the wifly should comunicate with the board. I know that there are some troubles with the serial ports, i think that is the same that use the board to comunicate with the usb, and the shield to comunicate with the board.

So, I think that my problem is with the jumpers, i don't know how to change the digital pins, and make it on code.

Can somebody help me??

Thanks!!

Hi

r0b0t1t0:
So, I think that my problem is with the jumpers, i don't know how to change the digital pins, and make it on code.

The communications pins for the serial comms are specified in the jumper blocks that are explained on page 3 of the PDF you've linked to for the XbeeShield.

Is there a reason you need to run IDE 0.22? If you use one of the more modern IDEs (1.0 or younger) you'll be able to use the software serial library that comes as a standard part of the IDE now, and use your WiFly on pins other than D0 & D1. If you use D0 and D1 you will be using the same pins as the Arduino uses for USB, which will make it harder to debug since you won't be able to echo messages to the IDE's serial monitor screen. However, there's nothing wrong with using those pins if you must, only when you program your Arduino you'll need to pull the shield off so there's no conflict with the WiFly.

You've not really specified any problem in detail - so if you are having a problem please call out what errors you're seeing...and what your settings are.

Cheers ! Geoff

Geoff,

thx! for answer me!! =)

strykeroz:
The communications pins for the serial comms are specified in the jumper blocks that are explained on page 3 of the PDF you've linked to for the XbeeShield.

Yes, I know that.. the thing is that i don't know how to make it on code, because when i want to use the SoftwareSerial library, it doesn't work, for example, I tried to implement the Arduino example... and this is what happened:

#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
void setup()  
{
  // Open serial communications and wait for port to open:
  Serial.begin(57600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }
  Serial.println("Goodnight moon!");

  // set the data rate for the SoftwareSerial port
  mySerial.begin(4800);
  mySerial.println("Hello, world?");
}
void loop() // run over and over
{
  if (mySerial.available())
    Serial.write(mySerial.read());
  if (Serial.available())
    mySerial.write(Serial.read());
}

C:...\arduino-1.0.3-windows\arduino-1.0.3\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function 'void SoftwareSerial::begin(long int)':
C:...\arduino-1.0.3-windows\arduino-1.0.3\libraries\SoftwareSerial\SoftwareSerial.cpp:399: error: 'digitalPinToPCICR' was not declared in this scope
C:...\arduino-1.0.3-windows\arduino-1.0.3\libraries\SoftwareSerial\SoftwareSerial.cpp:401: error: 'digitalPinToPCICRbit' was not declared in this scope
C:...\arduino-1.0.3-windows\arduino-1.0.3\libraries\SoftwareSerial\SoftwareSerial.cpp:402: error: 'digitalPinToPCMSK' was not declared in this scope
C:...\arduino-1.0.3-windows\arduino-1.0.3\libraries\SoftwareSerial\SoftwareSerial.cpp:402: error: 'digitalPinToPCMSKbit' was not declared in this scope
C:...\arduino-1.0.3-windows\arduino-1.0.3\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function 'void SoftwareSerial::end()':
C:...\arduino-1.0.3-windows\arduino-1.0.3\libraries\SoftwareSerial\SoftwareSerial.cpp:417: error: 'digitalPinToPCMSK' was not declared in this scope
C:...\arduino-1.0.3-windows\arduino-1.0.3\libraries\SoftwareSerial\SoftwareSerial.cpp:418: error: 'digitalPinToPCMSKbit' was not declared in this scope

strykeroz:
Is there a reason you need to run IDE 0.22?

No, i can use whatever IDE i want... in fact in the example I use the lastest version.

My problem is that i have some troubles with the soft, and the code... i have no idea how to do to see in the serial monitor what happens with the WiFly Shield... that kind of errors aren't the only errors that the IDE showed... it showed me errors inside the libraries, wich i have no idea why...

In this website is my robot with its characteristics: robotgroup.com.ar - This website is for sale! - robotgroup Resources and Information.

I hope that u can help me with my problem...

If u don't understand me jet, ask me again and i'll explain u from the beggining..

Thx!!!!!!! =)

Cheers!! Fabri.

Hi,

I've not seen that specific error before. You might have an older version of SoftwareSerial messing things up for you, that needs to be removed. That code as you posted here compiles fine for me on IDE 1.0.1.

Geoff

If the XbeeShield is anything like the Xbee Explorer, you need to put a pullup resistor between din and 3.3v on the rn-xv module itself to get serial communication to work. The xbee has a built in pullup, the RN-XV does not.