SSC-32 Servo Controller V2 icon SSC-32 Servo Controller V2 Bridge ARC to Lynxmotion SSC-32: maps V0-V31 to SSC-32 channels for reliable, high-performance serial control via USB, EZB/Arduino UART. Try it →
 

Waitforhigher

Ping.waitForHigher(triggerPort, echoPort, distance, [ezbIndex])

Parameters

triggerPort Trigger port used by the ultrasonic distance sensor.
echoPort Echo port used by the ultrasonic distance sensor.
distance Exclusive lower bound on value to wait for
ezbIndex (optional) Board index of the EZB to use.

Returns

The value measured from the ultrasonic distance sensor that is higher than distance as a number between 0 and 255.

Description

Suspends execution of the script until the value read from the ultrasonic distance sensor is higher than distance. The value read from the ultrasonic distance sensor is returned when the script resumes execution.