MPU6050 Accelerometer Gyro Temperature icon MPU6050 Accelerometer Gyro Temperature — Reads MPU6050 gyro, accelerometer and temperature via I2C, initializes and returns data on-demand to EZ-Script variables using ControlCommand RunOnce Try it →
 

Setrandom

PWM.setRandom(port, lowCycle, highCycle, [ezbIndex])

Parameters

port Port to use.
lowCycle Inclusive lower bound on duty cycle percentage to set PWM duty cycle to.
highCycle Exclusive upper bound on duty cycle percentage to set PWM duty cycle to.
ezbIndex (optional) Board index of the EZB to get PWM duty cycle from.

Returns

The random value that the PWM was set to.

Description

Sets the PWM duty cycle percentage of the specified port to a value randomly chosen between lowCycle (inclusive) and highCycle (exclusive). lowCycle and highCycle are values between 0 and 100.