Main content

The How of Robotics: Making micro:bit Movie Stars

micro:bit Movie Makers

Art meets electronics at the Artronix workshop in Glasgow; making films using micro:bits.

Become a robotics engineer and a film director!

Making robots isn't just for engineers and programmers - you can also make works of art. You don't need a gigantic Hollywood budget either, just some old toys, some good friends and some workshop tools. Oh, and your micro:bit, of course.

Artronix, a maker workshop organisation based in Glasgow, know all about hosting art jams. What’s a jam? Aside from delicious, it’s an event where you work with friends to make cool, creative things.

Check out the videos and tutorials below on how to make your own actor robots, and when you're ready, check out Artronix's top 10 tips on organising your own jam.

Click here to view and download the Artronix Jam Guide PDF.

Once you've made your videos, share them with us! If you tag your videos with #Artronixjam and #microbit, we'll be sure to see them.

Film Idea 1: Jeepers Bleepers

Horror films aren't just for Halloween, you know. In this jam project, you'll be using LEDs in your toy actors to seriously spooky effect. This Jam is a great one to start with if you've not tried a craft project like this before.

What you'll need:

  • A micro:bit, battery pack and micro USB cable, plus a suitable computer for programming.
  • Some LEDs. Get a selection of colours if you can.
  • Some 100 ohm resistors
  • At least 3 crocodile clip leads.

Step One: The Basic Code

You're going to use the Python editor on the micro:bit website for this jam. Click here to open the editor.

Click here to view the basic Python script for this Jam.

When you're done, download the .hex file and flash it to your micro:bit. Remember to give the script a memorable name!

Step Two: The Components

Lets take a look at the LED. Like any electronic component, it has to be connected the right way round.

Note that there's a long leg and a wee short leg. The long leg (anode) connects to the positive side. The short leg (cathode) connects to the negative, or Ground side.

Oh, and you'll notice that there's a small flat edge at the base of the LED. This also helps indicate the cathode. Connecting the LED to the power backwards is very likely to cause a puff of smoke to escape and your LED to mysteriously stop working...

Step Three: Wiring Up the Project

First things first make sure your micro:bit is powered down.

Use the crocodile clips to connect the short (negative) leg of the LED to one end of a 100 ohm resistor (it doesn't matter what end). Connect the other end of the resistor to GND on the micro:bit.

Lastly, connect the long leg of the LED to Pin 0 on the micro:bit. With the circuit complete, current will flow from Pin 0 to GND through the LED you've connected.

Now you've connected all of your components, it's time to test if it's all wired up and coded correctly! Power on your micro:bit and, all being well, your LED should be blinking on and off.

Our creepy robot doll in this project has two eyes - can you connect an additional LED to Pin 1 or 2?

Now's a great time to tinker with the code to make it more interesting. See if you can make the LEDs blink faster, or opposite to each other.

On, off. On, off... all a bit digital, isn't it? How about a nice pulsing and fading LED? We can generate a more analogue effect using “pulse width modulation” It's still just turning the LED on and off but it's so fast it looks like the brightness is changing.

Step Four: A More Advanced Code

If you want to create a pulsing LED effect, disconnect the LEDs and connect your micro:bit to your computer again.

Click here to view the advanced Python script for this Jam.

Open the Python editor and replace the script you've previously written with this one, then download the .hex file and update your micro:bit.

Step Five: It's Just Step Three Again

Reconnect the LED to Pin 0 as before and power on your micro:bit Hopefully you now have a gently pulsing LED. When you're confident how this new script works, tinker with the code some more to really make it your own.

Film Idea 2: War of the Worlds - Rise of the micro:bits

Those glowing LED eyes were wonderfully creepy, but how about a little bit of classic Sci-Fi? Everyone likes an alien invasion, right?

We'll be bringing our menace from outer space with a servo motor. It'll allow your actors to move and is a super simple (but still super flashy) way of exploring the world of robotics.

What you'll need:

  • A micro:bit, battery pack and micro USB cable, plus a suitable computer for programming.
  • 1 small servo motor (eg a SG90 3,3v servo)
  • 3 crocodile clip leads.
  • 3 breadboard jumper wires.

Step One: The Basic Code

You're going to use the Python editor on the micro:bit website for this jam. Click here to open the editor.

Click here to view the basic Python script for this Jam.

When you're done, download the .hex file and flash it to your micro:bit. Remember to give the script a memorable name!

Step Two: Understanding Servos

Lets take a look at the servo motor wires. The colour coding is a hint on how to wire it up correctly. The servo won't work if wired up wrong, so take note:

  • The Brown (or black) wire will connect to GND pin on your micro:bit.
  • The Red wire connects to 3V pin.
  • The Orange (or white) wire connects to Pin 0. This wire carries a pulse width modulated signal from the micro:bit to the servo motor, telling the motor where to turn to.

Step Three: Wiring Up the Project

Okay, lets wire this up. First, make sure your micro:bit is powered down.

We can use the jumper wires to connect to the servo motor plug then use the crocodile clips to the other side of these wires to the appropriate pin on the micro:bit, as follows.

  • Connect the Brown wire to the GND pin.
  • Connect the Red wire to 3V.
  • Connect the Orange wire to Pin 0.

Connect power and with luck the motor will spring to life. Tilt the micro:bit from side to side and the motor should respond.

If you experience any problems (especially if you notice your micro:bit getting warm) disconnect power immediately and check the mini troubleshooter below.

Mini Troubleshoot Guide

If the motor doesn't work, is unresponsive or moves erratically, here are a couple of things to check.

Be sure that you're using the Python Editor on the micro:bit website to write your code. There are other, older Python editors out there, but this one is the most up-to-date. Click here to open the editor.

Are the batteries really fresh? The micro:bit is a low-power device but the servo motor is a battery vampire.

If the micro:bit is getting warm, check your wiring. Maybe your servo motor is too large and drawing too much current. You could try attaching an independent battery power supply to it. This could even be worthwhile with the small servo as it will give it more endurance.

Finishing Up

Since our micro:bit is packed with sensors and now has the ability to interact with the physical world, we should now be able to think up all kinds of projects. See if you can modify the code to react to the buttons.

Film idea 3: Micro:Wars - A New Code

Now this is is a micro:bit project (and a film reference) that can really speak for itself. Get it? Speak? We're hilarious.

Doing the voices for our robot actors is a lot of fun but how about getting the micro:bit to talk? We can create retro-sounding computer speech easily.

What you'll need:

  • A micro:bit, battery pack and micro USB cable, plus a suitable computer for programming.
  • 2 crocodile clip leads.
  • A piezo speaker or an audio amp or even an old pair of earphones (don't use a good pair in case you wreck them).

Step One: The Basic Code

You're going to use the Python editor on the micro:bit website for this jam. Click here to open the editor.

Click here to view the basic Python script for this Jam.

When you're done, download the .hex file and flash it to your micro:bit. Remember to give the script a memorable name!

Step Two: Connecting Speakers

The piezo speaker is a nice, robust, low cost device but in this application it's going to be a little quiet.

If you have a small speaker or a pair of old headphones, they have a much louder sound output. You can read up on how to connect your headphones to your micro:bit here.

A word of warning, though! The volume from the headphones is going to be quite loud - please do not put the headphones over your ears!

Another alternative is to use an audio amp. Since the output from the micro:bit is quite high, turn the volume all the way down then gradually turn the volume up as the micro:bit talks.

Step Three: Wiring Up the Project

Okay, let's wire this up. First make sure your micro:bit is powered down. Use the crocodile clips to connect one of the piezo wires to Pin 0 and the other wire to Pin 1.

If you're using a headphone or amp, clip the tip of the jack plug to Pin 0 and clip the base of the jack plug to Pin 1 using the crocodile clips.

Connect power and after displaying a short countdown the micro:bit should start reciting some familiar dialogue.

Have a look at the code and make the micro:bit say whatever you want..

Finishing Up

Quite robotic and monotonous, right? Take a look at the Python documentation for speech and see what happens when you alter some of the speech parameters.

You can even get the thing to sing! Maybe your project could be a micro:bit musical...?

Film Idea 4: Bride of Frankenbit

Ah, we just love classic movie monsters. The novel Frankenstein is considered the first Science Fiction story, so it's a perfect target for a micro:bit twist.

What you'll need:

  • A micro:bit, battery pack and micro USB cable, plus a suitable computer for programming.
  • 1 small servo motor (eg a SG90 3,3v servo)
  • 3 crocodile clip leads.
  • 3 breadboard jumper wires.

Our mini movie uses two servo motors to move the arms of our robot actor. You can find out how to connect servos to your micro:bit in Film Idea 2: War of the Worlds - Rise of the micro:bits.

The cool thing here is that each arm is connected up to a separate micro:bit, so the 'puppeteer' for the scene attached micro:bits to his own arms. When he moved, so did the actor!

Film Idea 5: A Fistful of micro:bits

Howdy. This twist on an Old West epic is incredibly high tech. The Western genre is famous for it's super-tense standoffs - perfect if you robot actors are a little stiff.

What you'll need:

  • A micro:bit, battery pack and micro USB cable, plus a suitable computer for programming.
  • 1 small servo motor (eg a SG90 3,3v servo)
  • 3 crocodile clip leads.
  • 3 breadboard jumper wires.
  • Some LEDs. Get a selection of colours if you can.
  • Some 100 ohm resistors

This mini movie uses servos to move the arms and head of the actors in this scene (find out more in Film Idea 2: War of the Worlds - Rise of the micro:bits) but if you want to add a little bit of realism to the scene, the LED system we showed earlier (Film Idea 1: Jeepers Bleepers) is great for showing things like bullet impacts.

In modern films special effects are done by computer, but there are still some film directors that like to use practical effects like this when they can. What sort of art jam director will you be?