Go Down

Topic: swarm , wireless communication (Read 867 times) previous topic - next topic


Hi . I'm planning for a project that involves 3 to 4 individual , independent robots(they use micro controllers with arduino boards ) .

I would like to exchange data between the robots (A robot may send data at any point in time to any other robot ) . Which is the best module for me , I would want it to be low cost and simple to use as I don't know much of hardware .

Jeffrey Sun

I think xBee module can meet your requirement.


[size=12]How many pins do i need for XBee communication ?
What are the modules that I need to buy ?
Any example arduino code ?[/size]

Jeffrey Sun

Arduino board communicates with XBee by Serial port. I'm using Arduino Mega + Sensor Shield + XBee serial 1. The TX0, RX0 (pin 0, 1) are used for the communication.

The DFRobot (www.dfrobot.com) sells the XBee shields and modules. I'm not sure if this site is convenient for you. There are many sites around the world sell the arduino related modules. You can select a convenient one.

You can treat the XBee module as a wireless serial port. It will automatically transmit the data you send to serial port to the air. There is nothing special when wirte the code. I pasted a simple serial port test code below.

const int ledPin =  13;      // the number of the LED pin

void setup() {

     // initialization
     Serial.write("Hello world");
     digitalWrite(ledPin, HIGH);


void loop() {

     // Do the things.

      //Serial.write("Hello world");

           int c = Serial.read();
           case 'a':
                 Serial.write("Receive a\r\n");
                 digitalWrite(ledPin, HIGH);
           case 'b':
                 Serial.write("Receive b\r\n");
                 digitalWrite(ledPin, LOW);

To use the XBee modules, what you need to do is configure them, so that they can set up the wireless network.
You can get more details regarding how to configure the XBee module at http://arduino.cc/en/Main/ArduinoXbeeShield .

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131