- Sun Jan 16, 2011 12:00 pm
#117647
Hello to all,
i'm trying to set up the communication between two arduinos, using the XBee.
I have:
_ 2x Arduinos Duemilanove (http://www.sparkfun.com/products/666)
_ 2x XBee serie 1 (http://www.sparkfun.com/products/8664)
_ 2x XBee Explorer Regulated (http://www.sparkfun.com/products/9132)
_ 1x XBee Explorer USB (http://www.sparkfun.com/products/8687)
i have already updated the XBee to the version 10E8. Both are XB24, with the functionset XBEE 802.15.4, values read from X-CTU.
booth at X_CTU have the same configurations:
CH: E
PAN ID: 4242
DL: 0
MY: 0
serial interface data rate: 9600
i would like to put one arduino sending messages (serial) to the other..
my code in arduino A (sender)
//sender
int data = 7;
int led = 13;
void setup()
{
Serial.begin(9600);
pinMode(data, INPUT);
pinMode(led, OUTPUT);
}
void loop()
{
if (Serial.available() > 0) {
data= Serial.read();
if (data== 'H'){
Serial.print(data, BYTE);
digitalWrite(led, HIGH);
}
}
else{
digitalWrite(led, LOW);
}
}
my code in arduino B (receiver)
int led = 13;
void setup() {
Serial.begin(9600);
pinMode(led, OUTPUT);
}
void loop() {
Serial.print("H");
delay(5000);
}
can anyone help me with the connections with the XBee Explorer and Arduino.. please, i've already read a lot of web sites and with no luck..
thank you.
i'm trying to set up the communication between two arduinos, using the XBee.
I have:
_ 2x Arduinos Duemilanove (http://www.sparkfun.com/products/666)
_ 2x XBee serie 1 (http://www.sparkfun.com/products/8664)
_ 2x XBee Explorer Regulated (http://www.sparkfun.com/products/9132)
_ 1x XBee Explorer USB (http://www.sparkfun.com/products/8687)
i have already updated the XBee to the version 10E8. Both are XB24, with the functionset XBEE 802.15.4, values read from X-CTU.
booth at X_CTU have the same configurations:
CH: E
PAN ID: 4242
DL: 0
MY: 0
serial interface data rate: 9600
i would like to put one arduino sending messages (serial) to the other..
my code in arduino A (sender)
//sender
int data = 7;
int led = 13;
void setup()
{
Serial.begin(9600);
pinMode(data, INPUT);
pinMode(led, OUTPUT);
}
void loop()
{
if (Serial.available() > 0) {
data= Serial.read();
if (data== 'H'){
Serial.print(data, BYTE);
digitalWrite(led, HIGH);
}
}
else{
digitalWrite(led, LOW);
}
}
my code in arduino B (receiver)
int led = 13;
void setup() {
Serial.begin(9600);
pinMode(led, OUTPUT);
}
void loop() {
Serial.print("H");
delay(5000);
}
can anyone help me with the connections with the XBee Explorer and Arduino.. please, i've already read a lot of web sites and with no luck..
thank you.
You do not have the required permissions to view the files attached to this post.
Last edited by nsa4ever on Sun Jan 16, 2011 3:15 pm, edited 1 time in total.