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:
-
triggerPinNumberPin to trigger the sensor for distance
-
echoPinNumberPulse response to triggering
Returns:
Number:
getDistance
(
Number
-
unit
Gets the distance from the sensor
Parameters:
-
unitHCSR04_USelects units for measurement
Returns:
Number: