Hiroshi Yamaguchi / Mbed 2 deprecated XBeeExamples

Dependencies:   mbed XBee mbed-rtos

Committer:
yamaguch
Date:
Thu Sep 20 11:17:17 2012 +0000
Revision:
6:d456c203adb6
Parent:
5:d01cf03058f6
updated for workshop

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yamaguch 0:34e0352d7396 1 #include "XBee.h"
yamaguch 0:34e0352d7396 2
yamaguch 0:34e0352d7396 3 void xbeeio4() {
yamaguch 5:d01cf03058f6 4 XBee xbee(p9, p10);
yamaguch 5:d01cf03058f6 5 xbee.baud(115200);
yamaguch 0:34e0352d7396 6 xbee.init();
yamaguch 5:d01cf03058f6 7
yamaguch 6:d456c203adb6 8 xbee.setDestination(XBeeAddress64(0x0013A200, 0x40310E99));
yamaguch 0:34e0352d7396 9
yamaguch 6:d456c203adb6 10 xbee.sendRemoteCommand("D1", 2);
yamaguch 5:d01cf03058f6 11 xbee.sendRemoteCommand("D4", 3);
yamaguch 0:34e0352d7396 12
yamaguch 0:34e0352d7396 13 while (xbee.receive())
yamaguch 0:34e0352d7396 14 xbee.dump();
yamaguch 5:d01cf03058f6 15
yamaguch 0:34e0352d7396 16 for (int i = 0; i < 60; i++) {
yamaguch 0:34e0352d7396 17 xbee.sendRemoteCommand("IS");
yamaguch 0:34e0352d7396 18 xbee.receive();
yamaguch 0:34e0352d7396 19 xbee.dump();
yamaguch 0:34e0352d7396 20 wait(1);
yamaguch 0:34e0352d7396 21 }
yamaguch 0:34e0352d7396 22
yamaguch 0:34e0352d7396 23 printf("done.\n");
yamaguch 0:34e0352d7396 24 }