Hiroshi Yamaguchi / Mbed 2 deprecated XBeeExamples

Dependencies:   mbed XBee mbed-rtos

Committer:
yamaguch
Date:
Tue Jan 29 14:00:39 2013 +0000
Revision:
11:25a790b8feb0
Child:
14:50ee389d681f
recommit

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 xbee06() {
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 printf("*** Router/End Device ***\n");
yamaguch 11:25a790b8feb0 9
yamaguch 11:25a790b8feb0 10 for (int i = 0;; i++) {
yamaguch 11:25a790b8feb0 11 if (xbee.printf("Hello %d\n", i) > 0)
yamaguch 11:25a790b8feb0 12 printf("sent: Hello %d\n", i);
yamaguch 11:25a790b8feb0 13 else
yamaguch 11:25a790b8feb0 14 printf("failed to send: Hello %d\n", i);
yamaguch 11:25a790b8feb0 15 wait(1);
yamaguch 11:25a790b8feb0 16 }
yamaguch 11:25a790b8feb0 17 }