NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
char ReadSensorUSExWait ( const byte  port,
byte &  values[],
const byte  wait 
)
inline

Read multiple ultrasonic sensor values with specified wait.

Return eight ultrasonic sensor distance values. The port must be configured as a Lowspeed port before using this function.

Parameters
portThe port to which the ultrasonic sensor is attached. See the Input port constants group. You may use a constant or a variable.
valuesAn array of bytes that will contain the 8 distance values read from the ultrasonic sensor.
waitThe number of milliseconds to wait before querying the sensor. You may use a constant or a variable.
Returns
A status code indicating whether the read completed successfully or not. See CommLSReadType for possible result values.