Skip to content


Scratch jumping cat

Beginner | Scratch | Accelerometer | Sequence

Step 1: Make it

What is it?

Get started with Scratch and micro:bit: make Scratch cat jump when you throw your own soft toy in the air.

Screenshot of Scratch project - cat jumping

How it works

  • Attach a battery pack to your micro:bit and connect it to Scratch, then attach it to a soft toy. Protect the micro:bit so that it doesn’t get damaged if you drop it!
  • Inspired by an awesome demo given by Kreg of the Scratch team, this program uses the micro:bit’s accelerometer to sense when it’s been thrown up in the air and makes the Scratch cat sprite jump at the same time.
  • At the same time the sprite also changes colour, makes a meow sound and changes makes the pitch of the sound higher each time you throw it.
  • It uses the glide block to make Scratch jump to the part of the screen each time, and then go back down again in a sequence.

What you need

  • micro:bit and battery pack
  • a suitable computer with Scratch link installed. See for details on how to get Scratch working with micro:bit.
  • soft toy or something soft and protective to put your micro:bit in

Step 2: Code it

Scratch blocks used for cat sprite

Scratch blocks for cat sprite

Step 3: Improve it

  • Record your own sounds to replace the ‘meow’.
  • Make something appear on the micro:bit’s display when you throw it up in the air.
  • Change the sprite’s costume when you press a button on the micro:bit.
  • Make Scratch cat jump higher each time you throw your micro:bit in the air.