Hi
I'm trying to comunicate two Xbee S2 one as a Coordinator and the other one as End Device.
I used Moltosenso Iron to configurate them in the same network with this AT commands:
COORDINATOR
ATID 1111
ATBD 3
ATNI COORDINATOR
ATCH 14
ATMY 0
ATDH 000d6f00
ATDL 00068924
ATWR OK
ATCN OK
END DEVICE
ATID 1111
ATBD 3
ATNI NODE1
ATCH 10
ATMY 5F10
ATDH 000d6f00
ATDL 00068924
ATWR OK
ATCN OK
Then i tryed this code in the EndDivece to see if works:
/* Serial Test code
Sends "testing..." over the serial connection once per second
while blinking the LED on pin 13. Used for testing serial devices
such as the XBee.
Adapted from the SoftSerial Demonstration code
*/
#define ledPin 13
byte pinState = 0;
void setup() {
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
}
void loop() {
Serial.println("testing...");
// toggle an LED just so you see the thing's alive.
toggle(13);
delay(1000);
}
void toggle(int pinNum) {
// set the LED pin using the pinState variable:
digitalWrite(pinNum, pinState);
// if pinState = 0, set it to 1, and vice versa:
pinState = !pinState;
}
But it does'nt.
I don''t know where is the problem.
I'll appreciate if someone how know xbee could help me.
Thanx.