Linux Format

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.

More from Linux Format

Linux Format3 min read
AMD Ryzen 5 8600G
Socket: AM5 Arch: Zen 4 (Phoenix) Process: TSMC 4nm FinFET Cores: 6 Threads: 12 Cache: 384KB L1, 6MB L2, 16MB L3 Speed: 4.3GHz (5.0GHz boost) Unlocked: Yes GPU: Radeon 760M GPU clock: 2.8GHz Compute: 8 units AI: Ryzen AI, 16 TOPS Display: Up to 4, DP
Linux Format5 min read
Tips For Managing Docker Containers
Everyone knows how containers revolutionised application building and deployment. Using a E disposable stack of containers that make up an app that aren’t using the docker-compose command to manage the stack are missing a trick. It allows the shippin
Linux Format2 min read
Patool
Version: 2.2.0 Web: https://wummel. github.io/patool/ TAR, TAR.GZ, ZIP and 7ZIP are just some of the endless list of archiving formats you’ll run into on a fairly regular basis on the Linux desktop. What makes working with them even more complicated

Related