Extend it with code

How can you improve it?

  • If you try out the code on a micro:bit and try to press both buttons at the same time, the buzzer will almost always say that button A was pressed first. Can you work out why this is? Can you fix it so that it’s fairer to player B?
  • Have a look at the documentation for the music module. See if you can make it so that a simple tune plays in the background whilst the buzzer waits for button A or button B to be pressed.
  • Have a look at the documentation for the image class. See if you can make the buzzer display your own picture rather than a happy face.  If you’re feeling adventurous you could make a little animation of a button being pressed by displaying two or three images one after another.

 

Competitive computing

Use this buzzer for quizzes in lessons

  • Write some code using create.withcode.uk that uses loops, conditional statements or lists. Add in some deliberate mistakes and then use them as a quiz to test your friends.