Skip to content

huffeec/pxt-kitronik-motor-driver

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kitronik blocks for micro:bit

Blocks that support Kitronik kits and shields for the micro:bit This package is for the Motor Driver Board

Motors

  • turn around
input.onButtonPressed(Button.A, () => {
    Kitronik.motorOn(Kitronik.Motors.Motor1, Kitronik.MotorDirection.Forward, 100);
    Kitronik.motorOn(Kitronik.Motors.Motor2, Kitronik.MotorDirection.Reverse, 100);
})
  • go forward
input.onButtonPressed(Button.B, () => {
    kitronik.motorOn(kitronik.Motors.Motor1, kitronik.MotorDirection.Reverse, 100);
    kitronik.motorOn(kitronik.Motors.Motor2, kitronik.MotorDirection.Forward, 100);
})
  • stop both motors when pressing A+B
input.onButtonPressed(Button.AB, () => {
    kitronik.motorOff(kitronik.Motors.Motor1);
    kitronik.motorOff(kitronik.Motors.Motor2);
})

License

MIT

Supported targets

  • for PXT/microbit (The metadata above is needed for package search.)
pxt-kitronik-motor-driver=github:KitronikLtd/pxt-kitronik-motor-driver

About

Blocks for driving the Kitronik micro:bit motor driver board

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 98.4%
  • Makefile 1.6%