MakeCode package for the MakerBit motor driver.
The MakerBit connects to the BBC micro:bit to provide easy connections to a wide variety of sensors, actuators and other components. Among other things, it features a motor driver.
MakerBit | MakerBit+R with motor controller |
The MakerBit board provides a motor controller that can control two bi-directional DC motors, or four one-direction motors.
Sets the speed of a motor in the range of -100 to 100.
makerbit.runMotor(MakerBitMotor.A, 80)
Stops a motor.
makerbit.stopMotor(MakerBitMotor.A)
Sets the rotation direction of a motor. Use this function at start time to configure your motors without the need to rewire.
makerbit.setMotorRotation(MakerBitMotor.A, MakerBitMotorRotation.Backward)
Licensed under the MIT License (MIT). See LICENSE file for more details.
- for PXT/microbit