PWM Servo Feedback (I2c) icon PWM Servo Feedback (I2c) Real-time servo position input via Arduino ADC over I2C; supports Nano (6 channels) or Mega (16), configurable I2C address and scalable chaining. 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.