|
upm
1.5.0
Sensor/Actuator repository for libmraa (v1.8.0)
|
API for the HC-SR04 Ultrasonic Sensor. More...
This module defines the HC-SR04 interface for libhcsr04
Public Member Functions | |
| HCSR04 (int triggerPin, int echoPin) | |
| ~HCSR04 () | |
| double | getDistance (HCSR04_U unit) |
| HCSR04 | ( | int | triggerPin, |
| int | echoPin | ||
| ) |
Instantiates an HCSR04 object
| triggerPin | Pin to trigger the sensor for distance |
| echoPin | Pulse response to triggering |
| double getDistance | ( | HCSR04_U | unit | ) |
Gets the distance from the sensor
| unit | Selects units for measurement |

1.8.11