Blocks to support the MotionKit directly from MakeCode. Get more info on the MotionKit at: tinysuperlab.com.
- turn around
input.onButtonPressed(Button.A, () => {
motion_kit.turnRight(90);
})
- go forward
input.onButtonPressed(Button.B, () => {
motion_kit.driveForwards(10);
})
- stop both motors when pressing
A+B
input.onButtonPressed(Button.AB, () => {
motion_kit.stop();
})
MIT
- for PXT/calliopemini (The metadata above is needed for package search.)
pxt-motion-kit=github:tinysuperlab/motionkit