xbee test program 1

Dependencies:   XBee mbed

Files at this revision

API Documentation at this revision

Comitter:
takashiyamanoue
Date:
Sat Jul 21 04:06:22 2012 +0000
Commit message:
XBee test 1

Changed in this revision

XBee.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /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