: distance = readDistance (dev)

Read the distance from a ultrasonic device

Inputs

dev - connected ultrasonic device opened using ultrasonic

Outputs

distance - distance value in meters from the ultrasonic device, or Inf if out of sensor range

See also: arduino, ultrasonic.

Package: arduino