Basic Xbee reciever with application board. Uses LCD to display up or down.

Dependencies:   C12832 mbed

Files at this revision

API Documentation at this revision

Comitter:
Perijah
Date:
Sat Feb 20 11:56:30 2016 +0000
Commit message:
Basic Xbee reciever with applicationboard

Changed in this revision

C12832.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
diff -r 000000000000 -r ee395ccc1347 C12832.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/C12832.lib	Sat Feb 20 11:56:30 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/askksa12543/code/C12832/#990d5eec2ef6
diff -r 000000000000 -r ee395ccc1347 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Feb 20 11:56:30 2016 +0000
@@ -0,0 +1,35 @@
+#include "mbed.h"
+#include "C12832.h"
+
+Serial xbee(p9,p10);                //Create serial object
+char a;
+C12832 lcd(p5, p7, p6, p8, p11);    //Used for the LCD
+DigitalOut nReset(p30);             //reset pin of the xbee
+
+
+int main()
+{
+    xbee.baud(57600);               //set the baud rate of the xbee. (9600 standard)
+    while(1) {
+        lcd.locate(0,3);
+        wait_ms(500);
+        
+        if(xbee.readable()) {       //Checks if the data is readable
+            a = xbee.getc();        //Get the first character that's in the buffer
+        }
+        if(a=='u') {                //detects if joystick is pressed up
+
+            lcd.cls();              //NOT SURE: wipes LCD screen.           
+            lcd.printf("up");
+
+        }
+        if(a=='d') {                //detects if yoystick is pressed down
+
+            lcd.cls();
+            lcd.printf("down");
+
+        }
+
+
+    }
+}
diff -r 000000000000 -r ee395ccc1347 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Feb 20 11:56:30 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/252557024ec3
\ No newline at end of file