works

Dependencies:   SRF05 mbed

Fork of SRF05_HelloWorld by Simon Ford

main.cpp

Committer:
darcy11025
Date:
2016-11-29
Revision:
1:612f5d9de345
Parent:
0:d87132986e8f
Child:
2:f9045153af1e

File content as of revision 1:612f5d9de345:

// Simple program to read the distance from an SRF05 using the SRF05 library

#include "mbed.h"
#include "SRF05.h"

SRF05 srf(p9, p10);
 
int main() { 
     while(1) { 
         printf("Distance = %.1f\n\r", srf.read());              
         wait(0.2); 
     } 
 }