Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed XBee mbed-rtos
examples/xbee_io01.cpp@11:25a790b8feb0, 2013-01-29 (annotated)
- Committer:
- yamaguch
- Date:
- Tue Jan 29 14:00:39 2013 +0000
- Revision:
- 11:25a790b8feb0
recommit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
yamaguch | 11:25a790b8feb0 | 1 | #include "XBee.h" |
yamaguch | 11:25a790b8feb0 | 2 | |
yamaguch | 11:25a790b8feb0 | 3 | void xbee_io01() { |
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 | for (int i = 0; i < 60; i++) { |
yamaguch | 11:25a790b8feb0 | 9 | xbee.sendCommand("P2", (i & 1) ? 4 : 5); |
yamaguch | 11:25a790b8feb0 | 10 | xbee.receive(); |
yamaguch | 11:25a790b8feb0 | 11 | xbee.dump(); |
yamaguch | 11:25a790b8feb0 | 12 | wait(1); |
yamaguch | 11:25a790b8feb0 | 13 | } |
yamaguch | 11:25a790b8feb0 | 14 | |
yamaguch | 11:25a790b8feb0 | 15 | printf("done.\n"); |
yamaguch | 11:25a790b8feb0 | 16 | } |