60 mins
160 points
What you need:
  • Computer/laptop
  • Move Mini Robot Car

Move Mini draw with a pen

Slot a marker into the hole in the Move Mini and code it to draw some shapes.

1 - Introduction

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:

  1. Your Move Mini assembled with your Microbit attached.
  2. A marker such as a sharpie. You may need to test a few different markers to find one that fits.
  3. Lots of sheets of paper. The larger the sheets the more room you have to draw!
You may also want to put some newspaper down under the sheets of paper you will draw on, just in case the car drives off the sheets of paper.

2 - Create a new Microbit project

Go to the makecode.microbit.org website and create a new project.

3 - Program a circle

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)

4 - Draw the circle

Now let's test to see if it works.

  1. Download and send the code to your Microbit in the Move Mini.
  2. Unplug the USB cable.
  3. Put in the marker.
  4. Place your Move Mini on your sheet of paper.
  5. Turn your Move Mini on.
  6. Press the A button and your Move Mini should drive in a circle while the pen draws.

5 - Add the kitronik-servo-lite extension

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.

Join our club 😃

To view the remaining 3 steps and access hundreds of other coding projects please login or create an account.

Copyright Notice
This lesson is copyright of Coding Ireland. Unauthorised use, copying or distribution is not allowed.
🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more