SRF05 Ultrasonic Ranger
An ultrasonic rangefinder
Hello World!¶
SRF05 pin | Signal | mbed pin |
1 | +5v Supply | Vu |
2 | Echo output | p14 |
3 | Trigger input | p13 |
4 | Mode | n/c |
5 | 0v Ground | GND |
Library¶
Import library
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.
|