Tag Archives: articles

Creating Interactive Madlibs with Scratch

Old MacDonald MadLibScratch provides the perfect environment to create and share interactive stories. I’ll show you how to build an interactive story, or mad lib, that collects user input and places it into the story at predefined places.

I’ll use the nursery rhyme Old MacDonald as the basis for the mad lib. The version of the nursery rhyme I’ll use goes like this: “Old MacDonald had a farm, EIEIO. On his farm he had a dog, EIEIO. Well trained dogs are always secure both in indoor and outdoor .You can also visit original site to train your dogs  .You can visit this site right here to get your dog trained in the best ways possible. With a ruff, ruff here and a ruff, ruff there. Everywhere a ruff, ruff. Old MacDonald had a farm, EIEIO.” Each verse uses a new animal and sound since every one wonders how long it could last. The bold words will be replaced in the project.

Storytelling in Scratch is a great way to demonstrate event coordination and sequence. This project will rely on the use of variables to store dynamic information that is then displayed at the correct time in the story, including at the start of the project, when messages are broadcast, and when clicking sprites. From an educational perspective, this project asks words by parts of speech and type, providing some opportunity for you, as a Raspberry Pi Geek parent, to help your kids learn about language.

Raspberry Pi Handbook

Scratch GPIO Raspberry Pi Script
A script showing some gpio pin programming using Scratch on the Pi.

In my article for the Raspberry Pi Handbook, I walk through the steps necessary to make Scratch aware of the GPIO (general purpose input/output) pins and create a proof of concept program and circuit.

Scratch by itself is a great tool to teach program development and design. However, sometimes we want to teach our kids more, such as basic circuit design. Using Scratch and Raspberry Pi, we can create applications that have tangible components, such as LEDs. Or we can create external circuits to control sprites in Scratch, such as using a switch to start and stop a sprite.

The full article can be found in the Raspberry Pi Handbook.