Category Archives: Raspberry Pi

Build a secret message encoder with Morse code.

In this issue, I’ll show you how to use the Scratch list feature to build a message encoder (or translator) that can be played back using a simple circuit on the GPIO. From a programming skills perspective, it will demonstrate how to manipulate the individual characters of much larger strings and transform them into something new.

I remember creating codes with my friends so that we could write “secret” notes to each other in school. Sometimes, the code used simple substitution (e.g., Z for A, Y for B, etc.), and other times the code was gibberish. In this project, I’m going to show you how to build your own message encoder using Scratch to substitute letters and numbers for Morse code.

 

Creating an Animation and Slideshow Viewer

Creating a animation view in Scratch.
Creating a animation viewer in Scratch.

We show how to use the Scratch slideshow feature to create animations.

One of my favorite introductory Scratch projects is the basic slideshow, because it allows the programmer to incorporate personal images immediately and provides some exposure to fundamental concepts, such as design and synchronization.

The project covered in this article will build a variation of the slideshow by creating a viewer to watch animations. In the process, I’ll demonstrate some shortcuts and tips that help you create sprites, import animated GIFs, and navigate a scene-based slideshow.

Creating a Multiplayer Quick Reaction Game

scratch gpio circuit - quick reation
Circuit showing the two player quick reaction game controllable by ScratchGPIO.

The quick-reaction game provides an introduction to building simple circuits with the Raspberry Pi and controlling those circuits with ScratchGPIO, an advanced version of Scratch.

In this physical computing example, I’ll walk through the steps for creating a two-player game to see who has the fastest reaction time to a randomly displayed light. The object of the game will be to see which player can react faster by being the first person to click on the buzzer. I’ll create some controls to minimize cheating, and the game will keep score, so there will be a winner and bragging rights.