Tristan Hughes / Mbed 2 deprecated Xbee_Hello_world

Dependencies:   mbed xbee_lib

Files at this revision

API Documentation at this revision

Comitter:
tristanjph
Date:
Wed Aug 29 14:32:10 2012 +0000
Child:
1:b2b2ed674cbf
Commit message:
first commit

Changed in this revision

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
xbee_lib.lib Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Aug 29 14:32:10 2012 +0000
@@ -0,0 +1,26 @@
+#include "mbed.h"
+#include "xbee.h"
+
+xbee xbee1(p9,p10,p11); //Initalise xbee_lib
+
+int main()
+{
+    int device_serial[8];
+    int security_key[8];
+    int Pan_ID;
+    char send_data[202];
+    char read_data[202];
+
+    xbee1.ConfigMode(); //Enter the xbee's config mode
+    xbee1.GetSerial(device_serial); //Read the xbee devices serial into device_serial
+    xbee1.SetKey(security_key); //Set the network key to security_key
+    xbee1.SetPanId(Pan_ID); // set the PAN network id to Pan_ID
+    xbee1.WriteSettings(); // Write the settings to non volatile memory
+    xbee1.ExitConfigMode(); //Exit config mode
+    xbee1.reset(); //Reset Xbee
+
+    xbee1.SendData(send_data); //Send the data in send_data
+    xbee1.RevieveData(read_data); //Put recieved data into read_data
+
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Aug 29 14:32:10 2012 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/cd19af002ccc
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/xbee_lib.lib	Wed Aug 29 14:32:10 2012 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/tristanjph/code/xbee_lib/#682615a0717e