I'm trying to get a pair of arduino Uno using Xbee Chip with Xbee arduino shields communicating.
I am new to Arudinos and their development environment..
but basically what I'm trying to accomplish is:
One Side:
Arduino-->Xbee/Arduino Sheild--->Xbee
transmit something
Other Side:
Arduino-->Xbee/Arduino Sheild--->Xbee
receive something
its sounds pretty straight forward, but i'm struggling with this a little.
I want to make sure the hardware is setup correct then I can deal with the software and how to get a basic tx/rx program downloaded on the boards.
I was using X-CTU to change the PAN ID and the Destination Address Low which are changable.
But for some reason the "MY - 16-bit Network Address" is read only. It won't let me change it..
Any ideas?
I was using X-CTU to change the PAN ID and the Destination Address Low which are changable.
But for some reason the "MY - 16-bit Network Address" is read only. It won't let me change it..
Any ideas?
If you want the XBees to talk to each other just exchanging serial data, you have the wrong Function Set selected. The Function Set defines what settings are used/alterable.
This is the transciever that I'm using. I think its series 2.
I'm not sure which one i'm supposed to be using. But I left it on XB24 ZB then tried chaing all the function sets, but none of them let me change the MY network address field
the XB24-B doesn't do anything either.
If I put it on the XB24, I can change the MY Network Address field. But then when I hit "Write" it gives me a checksum failed.
You've perhaps noticed that the XBees in that video do not look like yours. His are Series 1 models. Yours are not. Using Series 2 models to do point to point communication, which is not what they are designed for, requires quite different configuration.
surfer007:
the XB24-B doesn't do anything either.
If I put it on the XB24, I can change the MY Network Address field. But then when I hit "Write" it gives me a checksum failed.
what settings should these be on?
I overlooked this detail but are you reading in first? If not, you should probably do that. I'm not sure if the series 2 come preloaded with firmware but my guess is it should. Since that is probably the case you should be able to read in and get the exact firmware/function set that it is using and be able to go from there to some extent. At the very least this would confirm what firmware it should be using.
Yes the ATMY command would send the AT command to the xbee modem requesting the value stored in MY. Does +++ return OK when typed in the terminal? Make sure that works first. Look up specifics on how to configure series 2 for point to point. Ideally you probably should have gotten series 1 for simplicity but series 2 will just be slightly more complicated to do the same job.
From my understanding, series 2 create a more network-like infrastructure for data communication whereas series 1 merely repeats the data everywhere like a hub.
okok, thanks guys! This is the kinda information I was looking for. SO yes, I have series 2 and i'm trying to do point to point. And yes looks like those tutorials are using series1.
I think the transmitting is working, I see the DOUT led on the shield blinking, but i don't think the receiving end is working correctly. This is the code for that...
//Define Pins
int ledPin = 7;
int val = 0;
int data = 0;
void setup()
{
Serial.begin(9600);
// sets the pin as output
pinMode(ledPin, OUTPUT);
}
void loop()
{
if (Serial.available()) {
//read serial as ascii integer
int ser = Serial.read();
if(ser >= 48 && ser <= 57){
//The ascii equivilent of numbers 0 - 9 are 48 - 57
// so subtracting 46 from the ascii gives us 2 - 12 (the pins we want to use)
data = ser - 46;
if(data == 0){
analogWrite(ledPin, 0);
delay(2000);
}
else{
analogWrite(ledPin, 255);
delay(2000);
analogWrite(ledPin, 0);
delay(2000);
}