Pi Supply bit:buggy Project 02 – Make a Shape
In the last project we showed you how to move the bit:buggy forward and backwards, whilst familiarising yourself with Microsoft Make Code programming language. In this project we are going to show you how to make turns left and right by turning each servo motor either on or off.
Connect your hardware
If you haven’t done so already, you will need to connect the left servo wheel to P1 and the right servo wheel to P2.
Step 1 – Snap into place the “set left wheel at P1 right wheel at P2” block into the “On start” block. The port number is the actual servo connection port.
Step 2 – With the “Forever” block snap in the following code blocks:
- go straight at full speed
- turn right at full speed
Step 4 – Upload your code to the bit:buggy
Here is the program link – https://makecode.microbit.org/_hHL6ToXRy7rt
After you have uploaded the sketch you should see the micro:bit buggy slowly turn on a full circle in a clockwise direction creating the shape of a circle.
Taking it further
Can you make any other shapes with the bit:buggy?
- Project 01 – Full speed ahead
- Project 02 – Make a shape
- Project 03 – Turn at an angle
- Project 04 – Here comes the police
- Project 05 – Crazy dance
- Project 06 – Remote control
- Project 07 – Turns over detection
- Project 08 – Light follow
- Project 09 – Remote control by an accelerometer