diff --git a/examples/Node1/Node1.ino b/examples/Node1/Node1.ino index 6393fc9c..ce8957ec 100644 --- a/examples/Node1/Node1.ino +++ b/examples/Node1/Node1.ino @@ -18,6 +18,16 @@ void setup() { while(true); } + Serial.print("[XBee] Setting PAN ID ... "); + state = bee.setPanId("0123456789ABCDEF"); + if(state == ERR_NONE) { + Serial.println("success!"); + } else { + Serial.print("failed, code 0x"); + Serial.println(state, HEX); + while(true); + } + Serial.print("[XBee] Setting destination address ... "); state = bee.setDestinationAddress("0013A200", "40A58A5D"); if(state == ERR_NONE) { @@ -42,6 +52,7 @@ void setup() { void loop() { Serial.print("[RF69] Waiting for incoming transmission ... "); byte state = rf.receive(pack); + bee.println("Hello World!"); if(state == ERR_NONE) { Serial.println("success!"); diff --git a/examples/Node2/Node2.ino b/examples/Node2/Node2.ino index e7c4c9c6..81f43058 100644 --- a/examples/Node2/Node2.ino +++ b/examples/Node2/Node2.ino @@ -16,6 +16,16 @@ void setup() { while(true); } + Serial.print("[XBee] Setting PAN ID ... "); + state = bee.setPanId("0123456789ABCDEF"); + if(state == ERR_NONE) { + Serial.println("success!"); + } else { + Serial.print("failed, code 0x"); + Serial.println(state, HEX); + while(true); + } + Serial.print("[XBee] Setting destination address ... "); state = bee.setDestinationAddress("0013A200", "40A58A5D"); if(state == ERR_NONE) {