Go Down

Topic: BAUD RATE Xbee (Read 591 times) previous topic - next topic

MBose

Respected sir,

I am trying to control a servo wirelessly with a potentiometer
For that I am using Arduino and xbees,sir my question is what changes have to be made in the code and Arduino if I have to increase the baud rate of xbees.

Secondly, during configuring the xbee on x-ctu software (old version), as soon as I give write command I loose communication with xbee and software interface

Sir, please guide
Thanking you
MBose


//Sending
   
Code: [Select]
int val = 0;
    int mapVal = 0;
    int potPin = 0;

    void setup()
    {
      Serial.begin(9600);
      pinMode(potPin, INPUT);
    }
    void loop()
    {
      val = analogRead(potPin);
      mapVal = map(val,0,1023,0,179);
      Serial.write(mapVal);
      delay(2);
    }

PaulS

Quote
For that I am using Arduino and xbees,sir my question is what changes have to be made in the code and Arduino if I have to increase the baud rate of xbees.
There is a baud rate that the Arduino uses to talk to the XBee. There is a baud rate that the XBee uses to talk to the other XBee. The first baud rate is set in the code. The second is set when configuring the XBees.

It makes little sense to make the XBees chatter faster when you talk to them ssslllooowwwlllyyy.

It makes little sense to change the baud rate if the sending XBee is using broadcast mode.
The art of getting good answers lies in asking good questions.

Go Up