SRF05 Class Reference
Library for the SRF05 Ultrasonic range finder. More...
#include <SRF05.h>
Public Member Functions | |
SRF05 (PinName trigger, PinName echo) | |
Create a SRF05 object, connected to the specified pins. | |
float | read () |
A non-blocking function that will return the last measurement. | |
operator float () | |
A short hand way of using the read function. |
Detailed Description
Library for the SRF05 Ultrasonic range finder.
Example:
// Print measured distance #include "mbed.h" #include "SRF05.h" SRF05 srf(p9,p10); int main() { while(1) { printf("Measured : %.1f\n", srf.read()); wait(0.2); } }
Definition at line 49 of file SRF05.h.
Constructor & Destructor Documentation
SRF05 | ( | PinName | trigger, |
PinName | echo | ||
) |
Member Function Documentation
operator float | ( | ) |
Generated on Wed Jul 13 2022 18:14:02 by 1.7.2