ARC Pro

Upgrade to ARC Pro

Harnessing the power of ARC Pro, your robot can be more than just a simple automated machine.

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.