Simple Hello World for the SRF05 library

Dependencies:   mbed SRF05

Files at this revision

API Documentation at this revision

Comitter:
simon
Date:
Fri Nov 19 22:36:20 2010 +0000
Commit message:

Changed in this revision

SRF05.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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SRF05.lib	Fri Nov 19 22:36:20 2010 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/SRF05/#e758665e072c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Nov 19 22:36:20 2010 +0000
@@ -0,0 +1,13 @@
+// Simple program to read the distance from an SRF05 using the SRF05 library
+
+#include "mbed.h"
+#include "SRF05.h"
+
+SRF05 srf(p13, p14);
+ 
+int main() { 
+     while(1) { 
+         printf("Distance = %.1f\n", srf.read());              
+         wait(0.2); 
+     } 
+ } 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Nov 19 22:36:20 2010 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/e2ac27c8e93e