Slot a marker into the hole in the Move Mini and code it to draw some shapes.
The Move Mini comes with a pen slot that will fit a marker such as a sharpie. In this project we're going to put a marker in the slot and code the Move Mini to draw some shapes.
You'll need the following for this project:
Go to the makecode.microbit.org website and create a new project.
Go to the Makecode.com Microbit website using the link below and click on the 'New Project' button underneath the 'My Projects' heading.
Install the micro:bit app on your iPad or tablet.
Open the app, tap 'Create code' and then create a new project.
The Move Mini has 2 servos that each control the a wheel. We can program the speed and direction of these to move the wheels independently.
To draw a circle we will make one wheel to move faster than the other and that will make the Move Mini move in a circle.
Add the following code to your project.
input.onButtonPressed(Button.A, function () { pins.servoWritePin(AnalogPin.P0, 0) pins.servoWritePin(AnalogPin.P2, 120) })
Now let's test to see if it works.
Now let's try and draw a square, for this shape we're going to use the custom blocks for Kitronik servos.
Add the kitronik-servo-lite extension to your project. This extension has pre-programmed blocks that are easy to use for programming the Move Mini to move, turn and do different things.
To add an extension follow these steps: