Motors
To connect from the MATLAB® software to the EV3 Large or Medium Motor (item number 45502 or 45503), use the
motor function to create a motor object.
To control the speed and direction of the motor, assign a value to the
Speedproperty of themotorobject. Input values range from-100to100(full reverse to full forward). The default value of theSpeedproperty is0. You can change this value while the motor is running or stopped.To start and stop the motor, use the
startandstopfunctions with themotorobject.To measure the total rotation of the motor in degrees, use the
readRotationfunction with themotorobject. Driving the motor forward increases the value. Driving the motor in reverse decreases the value.To reset the number of degrees to zero, use the
resetRotationfunction with themotorobject.