HCSR04 Class
- ID: hcsr04
- Name: Ultrasonic Distance Measuring Sensor
- Category: sound
- Manufacturer: generic
- Connection: gpio
- Link: https://www.sparkfun.com/products/13959
This module defines the HC-SR04 interface for libhcsr04
Item Index
Methods
Methods
HCSR04
(
Number
-
triggerPin
-
echoPin
Instantiates an HCSR04 object
Parameters:
-
triggerPin
NumberPin to trigger the sensor for distance
-
echoPin
NumberPulse response to triggering
Returns:
Number:
getDistance
(
Number
-
unit
Gets the distance from the sensor
Parameters:
-
unit
HCSR04_USelects units for measurement
Returns:
Number: