Skip to content


Scratch theremin

Beginner | Scratch | Accelerometer | Iteration, Sound

Step 1: Make it

What is it?

Make a spooky musical instrument you control by waving your hand.

Scratch project screenshot - bat in woods

How it works

  • A theremin is a musical instrument that makes spooky noises when you move your hands near it.
  • The program runs in an infinite (forever) loop to constantly take readings from the micro:bit’s accelerometer.
  • It measures the angle at which you tilt it forwards and backwards: the greater the angle of tilt, the higher pitched the sound will be.
  • Find out more about theremins here:

What you need

  • micro:bit and optional battery pack
  • a suitable computer with Scratch link installed. See for details on how to get Scratch working with micro:bit

Step 2: Code it

Step 3: Improve it

  • Experiment with different instrument sounds.
  • Record your own sounds and use them instead.
  • Use the angle of tilt left and right to control the volume, like in a real theremin.