Hiroshi Yamaguchi / Mbed 2 deprecated XBeeExamples

Dependencies:   mbed XBee mbed-rtos

Committer:
yamaguch
Date:
Thu Mar 21 07:16:44 2013 +0000
Revision:
14:50ee389d681f
Parent:
11:25a790b8feb0
updated to use new XBee lib

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yamaguch 11:25a790b8feb0 1 #include "XBee.h"
yamaguch 11:25a790b8feb0 2
yamaguch 11:25a790b8feb0 3 void xbee_io02() {
yamaguch 11:25a790b8feb0 4 XBee xbee(p9, p10);
yamaguch 11:25a790b8feb0 5 xbee.baud(115200);
yamaguch 11:25a790b8feb0 6 xbee.init();
yamaguch 11:25a790b8feb0 7
yamaguch 11:25a790b8feb0 8 xbee.setDestination(XBeeAddress64(0x0013A200, 0x40310E99));
yamaguch 11:25a790b8feb0 9
yamaguch 11:25a790b8feb0 10 for (int i = 0; i < 60; i++) {
yamaguch 11:25a790b8feb0 11 xbee.sendRemoteCommand("P2", (i & 1) ? 4 : 5);
yamaguch 11:25a790b8feb0 12 xbee.receive();
yamaguch 11:25a790b8feb0 13 xbee.dump();
yamaguch 11:25a790b8feb0 14 wait(1);
yamaguch 11:25a790b8feb0 15 }
yamaguch 11:25a790b8feb0 16
yamaguch 11:25a790b8feb0 17 printf("done.\n");
yamaguch 11:25a790b8feb0 18 }