Skip to content

YFROBOT-TM/pxt-yfrobot-motorbit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pxt-yfrobot-motorbit -- MotorBit

YFROBOT MotorBit extension for makecode

MotorBit is an easy-to-use motor drive expansion board for MicroBit

MotorBit To Buy

The YFROBOT Motor:Bit is an integrated motor driver and breakout board for the BBC micro:bit. With two integrated motor driver chip DRV8838, your micro:bit can drive two DC motors with 250mA max single channel current.

The Motor:Bit also features the “GVS” connectors, allowing for easy direct connection to compatible “GVS” sensors and outputs. Among these connectors, P0, P1 support sensors with 3.3V power voltage only; P2, P8, support 3.3V or 5V sensors, You can change the output voltage by jumper caps on the board.

Basic usage

  • Set the direction and speed of MotorBit motor
 motorbit.motorRun(motorbit.Motors.ML, motorbit.Dir.CW, 120)
 motorbit.motorRun(motorbit.Motors.MR, motorbit.Dir.CCW, 120)
  • Stop the MotorBit motor
motorbit.motorStop(motorbit.Motors.ML)
  • Move forward
motorbit.forward(128)
  • Move back
motorbit.back(128)
  • Turn left
motorbit.turnLeft(128)
  • Turn right
motorbit.turnRight(128)
  • Read IR sensor value
basic.showNumber(motorbit.irButtonCode())

License

MIT

Copyright (c) 2020, YFROBOT

Supported targets

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

About

YFRobot Motor:Bit for Micro:Bit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published