works

Dependencies:   SRF05 mbed

Fork of SRF05_HelloWorld by Simon Ford

Committer:
simon
Date:
Fri Nov 19 22:36:20 2010 +0000
Revision:
0:d87132986e8f
Child:
1:612f5d9de345

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
simon 0:d87132986e8f 1 // Simple program to read the distance from an SRF05 using the SRF05 library
simon 0:d87132986e8f 2
simon 0:d87132986e8f 3 #include "mbed.h"
simon 0:d87132986e8f 4 #include "SRF05.h"
simon 0:d87132986e8f 5
simon 0:d87132986e8f 6 SRF05 srf(p13, p14);
simon 0:d87132986e8f 7
simon 0:d87132986e8f 8 int main() {
simon 0:d87132986e8f 9 while(1) {
simon 0:d87132986e8f 10 printf("Distance = %.1f\n", srf.read());
simon 0:d87132986e8f 11 wait(0.2);
simon 0:d87132986e8f 12 }
simon 0:d87132986e8f 13 }