![](/media/cache/profiles/764f9642ebf04622c53ebc366a68c0a7.50x50_q85.jpg)
xbee test program 1
Revision 0:fb7cf60c8229, committed 2012-07-21
- Comitter:
- takashiyamanoue
- Date:
- Sat Jul 21 04:06:22 2012 +0000
- Commit message:
- XBee test 1
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/XBee.lib Sat Jul 21 04:06:22 2012 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/okini3939/code/XBee/#6efb3541af61
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat Jul 21 04:06:22 2012 +0000 @@ -0,0 +1,22 @@ +#include "mbed.h" +#include "XBee.h" + +XBee xbee(p13, p14); + +int main() { + uint8_t Cmd[] = {'D', '4'}; + uint8_t Low[] = {0x05}; + uint8_t Val[] = {0x04}; + XBeeAddress64 remoteAddress(0x0013A200, 0x403A8C82); + RemoteAtCommandRequest remoteAtRequest; + + wait(1); + xbee.begin(115200); + + remoteAtRequest = RemoteAtCommandRequest(remoteAddress, Cmd, Low, sizeof(Low)); + remoteAtRequest.setApplyChanges(true); + + remoteAtRequest.setCommandValue(Val); + remoteAtRequest.setCommandValueLength(sizeof(Val)); + xbee.send(remoteAtRequest); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Jul 21 04:06:22 2012 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/078e4b97a13e \ No newline at end of file