hc-sr04

Description

HC-SR04 ultrasound sensor.

Properties

Properties not inherited from the base binding file.

Name

Type

Details

trigger-gpios

phandle-array

Output pin used to trigger the distance measurement.

This property is required.

echo-gpios

phandle-array

Input pin. The pulse received on this pin corresponds to
the duration between the ultrasonic pulse emission and
the reception of its "echo".

This property is required.

echo-timeout-ms

int

Maximum time the driver waits for the echo to return.
Default value of 10ms is equivalent to approx. 1.5m maximum range.
Measurements with no target will abort when timeout is reached.

Default value: 10

friendly-name

string

Human readable string describing the sensor. It can be used to
distinguish multiple instances of the same model (e.g., lid accelerometer
vs. base accelerometer in a laptop) to a host operating system.

This property is defined in the Generic Sensor Property Usages of the HID
Usage Tables specification
(https://usb.org/sites/default/files/hut1_3_0.pdf, section 22.5).