Build a Pi-powered helicopter diorama
This tutorial takes us behind the scenes of a Raspberry Pi-powered diorama to explore the concept of concurrency. A diorama is a three-dimensional full-size or miniature model. For this exercise the diorama is a miniature helicopter complete with lighting sequence, engine run-up sounds, and blade motion. We’ll be using the computer power of the Pi to generate light, sound and motion animation to bring the model to life.
The animation of light, sound and motion are added to the diorama through electronics attached to the Raspberry Pi general-purpose input and output (GPIO) pins. Four sets of LEDs provide cabin, strobe, navigation and landing lighting. The mp3 sounds of a turbine engine spooling up and whirring are generated to the Pi’s headphone jack. Finally, a stepper motor gradually speeds up to provide rotor action. The final product is a digital orchestra conducted by the Pi using Python code.
We’ll assume that you have a basic understanding of the Raspberry Pi, including loading the operating system and installing software. A familiarity with using the command line interface (CLI) is recommended to explore the workings of the Python program.
Concurrency
Key to this project’s design is concurrency, which means at the same time. While consecutive means one after the other in a series. It’s no surprise that criminals convicted of multiple crimes would prefer to serve concurrent terms as a sentence, instead of consecutive terms.
The Pi in the helicopter diorama mixes both the concurrent and the consecutive operation of the lights, sound) there are three colours corresponding to the three types of animation.
You’re reading a preview, subscribe to read more.
Start your free 30 days