Motor device for ev3.
$ npm install ev3-js-motor
var Motor = require('ev3-js-motor')
Motor('a').degrees(120, {
speed: 300,
braking: 'coast'
})
path
- port in which the motor is connected
Returns: a motor device instance
Run motor until stopped.
speed
- speed at which to run motor
Run motor for a number of degrees.
degrees
- number of degrees to turn the motoropts
- object of optional parameters
Run motor for a number of rotations.
rotations
- number of rotations to turn the motoropts
- object of optional parameters
Run motor for a specified amount of time.
time
- time in millisecondsopts
- object of optional parameters
Run motor until a specified motor position.
speed
- speed at which to run motorposition
- desired motor position
Stop motor.
Reset the position of the motor.
MIT