Scratch sound and motion detection
Continuing our series of Scratch projects, we’ve finally escaped from the planet of the snack-stealing space bats and are recovering in our starship’s extensive leisure facilities. To be specific, we’re keeping fit in the astro-gym with Ball Blaster, a game where you punch balls to score points, but you only have 30 seconds! To control the game we use a webcam that will look for our hands and react when we hit a ball. To start the game we need to shout “GO” and then the countdown starts!
Plug in your USB webcam and it should just work. Scratch 3 should come pre-installed on your Raspberry Pi OS image, but just in case it’s missing it can be installed from the main menu, under Preferences> Recommended Software. Scratch 3 is found in the
You’re reading a preview, subscribe to read more.
Start your free 30 days