Simple Hello World for the SRF05 library

Dependencies:   mbed SRF05

main.cpp

Committer:
simon
Date:
2010-11-19
Revision:
0:d87132986e8f

File content as of revision 0:d87132986e8f:

// 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); 
     } 
 }