Lynxmotion Smart Servos icon Lynxmotion Smart Servos Compact Lynxmotion Smart Servos with position feedback, safety features and UART TX/RX for Arduino/EZ-B v4; scriptable temp, load, load-dir and ping. Try it →
 

Setpositionrandom

Servo.setPositionRandom(port, lowPosition, highPosition, [ezbIndex])

Parameters

port Servo port to set position of.
lowPosition Inclusive lower bound on random position value.
highPosition Exclusive upper bound on random position value.
ezbIndex (optional) Board index of the EZB to use.

Returns

The random position that the servo was commanded to move to.

Description

Commands the servo to move to a random position between lowPosition (inclusive) and highPosition (exclusive). lowPosition and highPositionis are values between 1 and 180.