Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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 47 of file SRF05.h.
Constructor & Destructor Documentation
| SRF05 | ( | PinName | trigger, |
| PinName | echo | ||
| ) |
Member Function Documentation
| operator float | ( | ) |
Generated on Tue Jul 12 2022 16:58:37 by
1.7.2