hc-sr04-ultrasonic-range

xod/common-hardware/hc-sr04-ultrasonic-range

Measures distance with HC-SR04 ultrasonic range meter. Outputs infinity on no echo. Possible errors: — Invalid port — Initialization error
hc-sr04-ultrasonic-range
@/hc-sr04-ultrasonic-range
Deprecated: Use `xod-dev/hc-sr04/hc-sr04-range-meter` instead
Measures distance with HC-SR04 ultrasonic range meter. Outputs infinity on no echo. Possible errors: — Invalid port — Initialization error
TRIGport
Board port to which sensor’s `trig` pin is connected.
ECHOport
Board port to which sensor’s `echo` pin is connected.
PINGpulse
Triggers new ultrasonic ping which would result in the output update once sound echo will be captured. Pulses coming within 60 ms window after last one are ignored to fight sensor’s PCB resonance.
hc-sr04-ultrasonic-range
Dm
DONE
TRIG
ECHO
PING
DONEpulse
Fires when ping is done
Dmnumber
Last measured distance in meters.