motor
Connection to motor
Add-On Required: This feature requires the MATLAB Support Package for LEGO MINDSTORMS EV3 Hardware add-on.
Description
This object represents a connection to an EV3 Large or Medium Motor (item numbers
45502 or 45503). To control the speed and direction of the motor, assign a value to the
Speed
property of the motor
object. To start, stop, and
measure the rotation of a motor, use this object with the functions listed in Object Functions.
Creation
Description
creates a connection to a motor that is attached to an EV3 output port by the OutputPort
(see Properties), and returns an object handle for that connection. You can use this
connection with the functions listed in Object Functions to start, stop, and measure the rotation of a motor. mymotor
= motor(myev3
,outputport)
Input Arguments
Output Arguments
Properties
Object Functions
start | Start motor |
stop | Stop motor |
readRotation | Read rotation from motor |
resetRotation | Reset rotation count to zero |
Examples
See Also
legoev3
| readRotation
| resetRotation
| start
| stop