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.
Revision 0:c61faf93bc2a, committed 2012-08-29
- Comitter:
- tristanjph
- Date:
- Wed Aug 29 14:32:10 2012 +0000
- Child:
- 1:b2b2ed674cbf
- Commit message:
- first commit
Changed in this revision
--- /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