Microbit
Advanced
30 mins
145 points
What you need:
  • Chromebook/Laptop/PC
  • Microbit
  • Move Mini Robot Car

Move Mini Knight Rider

Knight Rider was a famous TV series with a car called KITT. In this project we'll recreate KITT's red scanning lights.

1 - Introduction

Knight Rider was a famous TV series in the 1980s that had a car called KITT (Knight Industries Two Thousand). KITT had distinctive red lights at the font of the car that would go back and forth.

In this project we'll recreate those scanning red lights on our Move Mini.



2 - Create a new Microbit project

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

3 - Add the neopixel extension

Your Move Mini has 5 LED lights at the front of it. To program these we will need the neopixel extension which has special blocks for programming LEDs. 

Add the neopixel extension to your project.


4 - Create a variable for the LED strip

The 5 LEDs on your Move Mini are a 'LED strip' which just means a group of LEDs in a row. To work with them we need to create them into a variable which we can then use to program.

Add the following code to your project.

5 - Create a 'showRed' function

We will program one LED at a time to light up red, turn off and then wait a short amount of time before we light up the next LED.

As the code will be the same for each LED we will make a function so we don't have to repeat the same code five times.

Create a function called 'showRed' and give it a number parameter called led. This 'led' parameter will be the number of the LED you want to light up.


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 . 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