How to use the
Learning Portal

Learning Portal

Our hands-on, comprehensive lesson plans span a range of levels. Browse our free STEM and coding learning resources.

Marty Image

Drummer Marty!


During lockdown we in the UK have been showing our support for the NHS, carers and key workers by clapping for them every Thursday at 8pm. We thought it would be fun if Marty could join us, but a lack of elbows makes it hard to clap! This activity programs Marty to play the "drums" and make some noise!

Marty joins in with 'clapping' for the NHS!

What you will need

  • A Scratch 3 compatible device
  • Marty the Robot
  • Empty glasses or glass jars or anything else that makes a noise when hit with a teaspoon!
  • A teaspoon or two

What will you learn about?

  • Moving individual joints

make marty a drum and drumsticks

You can make Marty's drum from anything you have lying around that makes a noise when hit with a teaspoon!

We used two jam jars (well, actually a Nutella jar and a jar of Biscoff spread but that's beside the point....). Alternatively you could use glasses, mugs, tin cans... experiment with a variety of objects and choose the one you think works best. It's quite fun to use objects that make different sounds!

We decorated our jars at Marty's request, but you needn't do that.

To make the drumsticks, we used two teaspoons. You want the teaspoons to remain free to move around a bit in Marty's hands so that when they strike the jars the sound isn't dampened. To allow for this, we put a piece of sellotape over the gap in Marty's hand and then popped the teaspoons into each hand as shown.

programming marty to bang out some beats

Now we have the kit set up, we need to get Marty to hit the drums in time to the beat.

Before we program Marty to hit the drums, we first changed the range of movement Marty's arms have, using the instructions in Part 1 of the Marty the Waiter Activity.

Now, we want to move Marty's arms so that the teaspoons hit the jars and make a noise. Before you move the jars near enough for Marty to hit them, use the '' blocks to raise and lower Martys arms one after the other. The code below shows the values we used, but your motors may be calibrated slightly differentlyso experiment a bit until you find some that work for you.

Now position the jars near to Marty so that the teaspoons hit the jar everytime Marty's arms are raised.

You'll probably want Marty to hit the jars more than once, so put the code inside a 'repeat' block like we did. Don't forget to add the 'Get Ready' block at the start of your program!

What Next?

You've programmed Marty to hit each 'drum' one after the other. How would you write a program so Marty hits both drums at the same time?

Hint - experiment with the 'blocking mode' block

Why not try adding some emotion to the music by moving Marty's eyebrows in time to the beat!