Demo usage of LLAP library

Dependencies:   LLAPSerial mbed

Revision:
0:95297d07b5c6
Child:
1:808e9257d1ea
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Apr 15 22:14:11 2014 +0000
@@ -0,0 +1,34 @@
+// Demo Ciseco LLAPSerial usage
+#include "mbed.h"
+#include "LLAPSerial.h"
+
+//LLAPSerial srf(PA_11, PA_12);
+// or
+LLAPSerial srf(PA_11, PA_12, "MB");
+
+Serial pc(USBTX, USBRX);
+
+DigitalOut srfEnable(PA_9);
+
+int main()
+{
+    pc.baud(115200);
+    pc.printf("LLAP Test\n");
+
+    srfEnable = 1;
+    srf.sendMessage("STARTED");
+    wait_ms(100);
+    srf.sendMessage("TMPA", "123");
+    wait_ms(100);
+    srf.sendInt("TMPA", 123);
+    wait_ms(100);
+    srf.sendIntWithDP("TMPA", 1230,2);
+    while( 1 ) {
+        if( srf.bMsgReceived ) {
+            myled = !myled;
+            pc.printf("Received: %s\n\r",srf.sMessage );
+            srf.bMsgReceived = false;   // Clear flag to indicate msg handled
+        }
+    }
+
+}