YOU’VE COME A long way, and now you’ve reached your final adventure—the biggest yet! In this adventure, you are going to combine digital input, digital output, analogue input and analogue output to create a marble maze game like the one in Figure 9-1. Inspired by retro pinball machines, your game knows when you’ve scored points and tells you if you’ve achieved a new high score. It counts down to when the next game begins and keeps track of the time remaining in the game. It even has its own sound effects!
The game brings together a lot of the different skills you’ve learned from the earlier adventures, but there are a couple of other things for you to learn before you can build your game. The first is how to use a piezo as a sensor. You’ve already used a piezo as a speaker but it is a multitalented component and you can also use it to sense vibrations, which is a vital skill for your marble maze game!
You need the following items for your marble maze game. The electronic components that you need are shown in Figure 9-2: