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.
Dependencies: Servo mbed xbee_lib
Revision 0:d67473a71dc6, committed 2014-02-17
- Comitter:
- ricefireflighter
- Date:
- Mon Feb 17 16:57:59 2014 +0000
- Commit message:
- share
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Servo.lib Mon Feb 17 16:57:59 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/simon/code/Servo/#36b69a7ced07
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Feb 17 16:57:59 2014 +0000
@@ -0,0 +1,36 @@
+#include "mbed.h"
+#include "xbee.h"
+#include "Servo.h"
+#include "PwmOut.h"
+
+class xbee xbee1(PTD3,PTD2); //Initalise xbee_lib (Need to check these pins)
+Serial pc(USBTX, USBRX); //Initalise PC serial comms
+DigitalOut myled(LED_GREEN);
+
+int main()
+{
+ //Configure xbee with PanID of 6969 and exit config mode. Vary LED status.
+ myled = !myled;
+ xbee1.ConfigMode();
+ wait(1);
+ xbee1.SetPanId(6969);
+ myled = !myled;
+ xbee1.ExitConfigMode();
+
+ char send_data[202]; //Xbee buffer size is 202 bytes
+ char read_data[202]; //Xbee buffer size is 202 bytes
+
+ while(1){
+
+ xbee1.RecieveData(read_data,0);
+ // Line above receives data from xbee to FRDM as a char using getc.
+ // See function definition for more info.
+
+ // Transfer information in read.data character string to useful motor/servo info here.
+
+ wait(0.1);
+ // Wait for some amount of time to allow for complete data to be sent/received
+ }
+}
+
+
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Feb 17 16:57:59 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/a9913a65894f \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xbee_lib.lib Mon Feb 17 16:57:59 2014 +0000 @@ -0,0 +1,1 @@ +https://mbed.org/users/tristanjph/code/xbee_lib/#6455a079bdb3