takashi yamanoue
/
XBee_API_ex1
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
diff -r 000000000000 -r fb7cf60c8229 XBee.lib --- /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
diff -r 000000000000 -r fb7cf60c8229 main.cpp --- /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); +}
diff -r 000000000000 -r fb7cf60c8229 mbed.bld --- /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