I’m a big fan of Pete the Cat – created by Eric Litwin – particularly his story about Pete the Cat’s favourite shirt. It’s an excellent reminder for young children that they don’t need to be attached to material things at a time when they are just discovering the second law of thermodynamics for the first time themselves. It deals with the topic in a far more positive way than yelling at them that they need to grow up and stop crying over trash.
What’s this got to do with computer science on the classroom door? I hear you ask.
Two words: user interfaces!
How big should a button be? How big can a button be?
Why shouldn’t you make a button as big as a desk? If that’s what is needed – then go ahead! Obviously, often it isn’t. It would be a little impractical for typing a letter on a keyboard that takes up most of a classroom’s available floor space – but great for staging a massive dance performance. That’s why context is so important.
So, I take some sheets of A3 coloured card and make a couple of big, round groovy buttons. The coloured buttons can be printed out or written upon. They stick onto three sheets of card. The top and bottom sheets need some conductive material added to them. You can use aluminium kitchen foil, copper conductive tape or even just draw your circuit with a 2B (0) pencil.
The conductive sides of your card should face eachother, with the third sheet of card in the middle – with holes cut into it, so that when the conductive faces are pressed together, they meet.
Last time I did this, I made two buttons. One green and one red. There’s a reason for that. Can you guess why?
The buttons were then fixed to my classroom door.
I used a Makey Makey to connect my buttons to a computer, and because my interactive whiteboard was close enough to the door, we used that to output the results this time. However, there’s nothing to stop you from connecting a Raspberry Pi and a small screen or just having audio output.
So…
What do you want your buttons to do?
I used Scratch to make my screen change colour to match the button pressed.
In one version of this, I then had one button play the refrain from Pete the Cat and his Four Groovy Buttons. If you’re not familiar with it, go along to Harper Collin’s Pete the Cat subsite and enjoy it…
You could also use Scratch to record your class singing the Pete the Cat song and replay it when you press the button.
But why two buttons?
Because you know someone is then going to ask that all important question…
If pressing the red button makes the screen go red; and pressing the green button makes it go green…
What happens when you press them both together?
The code for doing this is a little more complicated – which is what I wanted to discuss with my classes – as I used variables to keep track of which buttons were pressed.
But it also gave us the opportunity to talk about what happens when you mix red light and green light together…
Hint: I have now found it useful to keep a small supply of RGB LEDs and some coin cells handy so that the children can see the results of mixing lights for themselves in small groups.