Example program for the Ciseco SRF Shield, based on UART serial port connectivity (D0/D1 pins). This program sends SRF messages and prints out the received ones

Dependencies:   LLAPSerial mbed

Fork of Ciseco_LLAP_Test by Andrew Lindsay

Files at this revision

API Documentation at this revision

Comitter:
screamer
Date:
Fri Jul 25 12:33:34 2014 +0000
Parent:
5:52fe9a6d9ae9
Child:
7:d2d5ddbc3acb
Commit message:
Update mbed library to the latest revision

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
--- a/main.cpp	Fri May 30 13:54:10 2014 +0000
+++ b/main.cpp	Fri Jul 25 12:33:34 2014 +0000
@@ -28,7 +28,7 @@
 /** On many platforms USBTX/USBRX overlap with serial on D1/D0 pins and enabling the below will interrupt the communication.
  *  You can use an LCD display to print the values or store them on an SD card etc.
  */
-//Serial pc(USBTX, USBRX);
+Serial pc(USBTX, USBRX);
 
 /**
  * D1 - TX pin (RX on the shield side)
@@ -38,6 +38,7 @@
  * "MB" - ID for device, used in sending messages and if checkNodeID is true then only messages for this ID are accepted
  */
 LLAPSerial srf(D1, D0, D8, false, "MB");
+DigitalOut myled(LED1);
 
 int main()
 {
@@ -52,7 +53,7 @@
     srf.sendIntWithDP("TMPA", 1230, 2);
     while (1) {
         if (srf.bMsgReceived) {
-            //myled = !myled;
+            myled = !myled;
             printf("Received: %s\n\r", srf.sMessage);
             srf.bMsgReceived = false;   // Clear flag to indicate msg handled
         }
--- a/mbed.bld	Fri May 30 13:54:10 2014 +0000
+++ b/mbed.bld	Fri Jul 25 12:33:34 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/6473597d706e
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/04dd9b1680ae
\ No newline at end of file