Skip to content
ElecFreaks MakeCode motor:bit package for micro:bit. Works with motor driver boards too.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
README.md
icon.png
motorbit.ts
pxt.json
tests.ts

README.md

Motor:bit Package

This ElecFreaks Motor:bit package was developed by ElecFreaks with minor assistance from Tinkercademy.

The ElecFreaks Motor:bit is an integrated motor driver and breakout board for the BBC micro:bit. With an integrated motor driver chip TB6612, your micro:bit can drive two DC motors with 1.2A max single channel current.

The Motor:bit also features the Octopus series "GVS" connectors, allowing for easy direct connection to compatible Octopus sensors and outputs. Among these connectors, P0, P3-P7, P9-P10 support sensors with 3.3V power voltage only; P13-P16, P19-P20 support 3.3V or 5V sensors. You can change the output voltage by sliding the switch on the board.

If you're using your own breakout board or motor driver, connect your driver such that P8 and P12 control direction, and P1 and P2 control speed.

Code Example

basic.forever(() => {
    motorbit.forward(70)
    basic.pause(2000)
    motorbit.back(50)
    basic.pause(2000)
    motorbit.turnleft(50)
    basic.pause(2000)
    motorbit.turnright(50)
    basic.pause(2000)
    motorbit.brake()
    basic.pause(2000)
    motorbit.freestyle(-40, 30)
    basic.pause(2000)
})

License

MIT

Supported targets

for PXT/microbit (The metadata above is needed for package search.)

You can’t perform that action at this time.