"Learn How to Drive a Flip-Disc Display with Your Arduino"
Learn How to Drive Flip-Disc Displays with Your Arduino!
Flip-disc displays, or flip-dot displays, are a type of display made up of a grid of tiny discs that rotate and flip to display different images. They’re often used in public information displays such as bus stop signs, or for advertisements. They’re also becoming popular for use in robotics and other DIY projects. Here we’ll show you how to use the Arduino to drive a flip-disc display, so you can create your own custom displays!
What You’ll Need
- An Arduino (or compatible board)
- Flip-Disc Display
- Jumper wires
- Optional: A breadboard
Connecting the Flip-Disc Display
The flip-disc display is controlled by 8 digital output pins on the Arduino (or compatible board). The connections between the Arduino and the display are straightforward – the 8 digital output pins on the Arduino connect to the 8 pins on the back of the display, labelled “Control”. Make sure to connect the ground pin on the Arduino to the ground pin on the display.
Writing the Code
The code for controlling the flip-disc display is fairly simple. We need to configure the 8 output pins as outputs, and then set them high or low depending on which pixels we want to light up. Once the pins have been configured, we can write a loop to flip each pixel on and off in turn.
First, we’ll configure the 8 output pins as outputs. To do this, we’ll use the pinMode() function, which takes two parameters – the pin number and either INPUT or OUTPUT. For example, to configure pin 12 as an output, we would write:
pinMode(12, OUTPUT);
Next, we’ll define a function called flipPixel(). This function will take one parameter – the pin number - and set it high or low depending on which pixels we want to light up. For example, if we want to light up the first pixel, we would write:
flipPixel(12, HIGH);
Finally, we’ll create a loop to flip each pixel on and off in turn. This loop will use the delay() function to pause the program for a brief period, allowing us to see the effects of our code. To create the loop, we’ll use a for loop and the flipPixel() function to set each pin high or low in turn. For example:
for (int pin = 0; pin < 8; pin++) { flipPixel(pin, HIGH); delay(100); flipPixel(pin, LOW); }
Once this code is uploaded to the Arduino, the flip-disc display should start animating! There are lots of possibilities for creating cool and interesting animations with the flip-disc display. Have fun, and happy coding!