Bits4Bots - Message on an Alphanumeric Display Using Arduino

by Bits4Bots in Circuits > Arduino

4219 Views, 6 Favorites, 0 Comments

Bits4Bots - Message on an Alphanumeric Display Using Arduino

Arduino| Message on a single 16 segment display

This project displays 'Hello' on a single 16 segment display with the use of an Arduino board.

Parts

fritz.JPG

For this project you will need:

  • Arduino programmer
  • Jumper wires
  • Alphanumeric display *LTP587HR (common anode)

How It Works

16 seg.JPG
WP_20151229_021.jpg
WP_20151229_022.jpg
WP_20151229_019.jpg

To program the Atmega use Arduino software. The code can be downloaded below. To build this project start by programming the microcontroller. Next wire the circuit. Then share you work with friends!

HOW IT WORKS

The Arduino pins (2-11) are set to output. They are feed into pins (H, G, U, P, C, D, T, M, S, and F) of the display segments. Through 1's and 0's the segments are either on or off. Since these are the only segments needed for 'Hello' the unused pins will be disregarded. This will allow the code to be short & simple. The first block of code to the right sets each defined Arduino pin.The second block tells the program to only light segments (H, G, U, P, C & D) which is the letter 'H' followed by a 1000 milliseconds delay.

By reading the code you can see that each character follows a pattern.*The void keyword is used only in function declarations. It indicates that the function is expected to return no information to the function from which it was called.PinMode configures the specified pin to behave either as an input or an output. The syntax digitalWrite writes a HIGH or a LOW value to a digital pin.Now that you understand the breakdown of the code and you have read up to this point, you can create your own message.

Modify the Code

WP_20151229_018.jpg
WP_20151229_023.jpg
WP_20151229_020.jpg

MODIFYING THE CODE

After reading about how to display a message on an alphanumeric display you too can create a project or add this circuit to an existing one. Here are some ideas:To use more/less digital pins for outputs to allow more segments to light up.Display a scrolling message with multiple displays.Create emoji's.and more!

Click for full code

THE CODE
//Arduino Alphabet with Alphanumeric Display, Common Cathode

//By L. Johnson www.bits4bots.com

//12/29/15

void setup() {

pinMode(2, OUTPUT);

pinMode(3, OUTPUT);

pinMode(4, OUTPUT);

pinMode(5, OUTPUT);

pinMode(6, OUTPUT);

pinMode(7, OUTPUT);

pinMode(8, OUTPUT);

pinMode(9, OUTPUT);

pinMode(10, OUTPUT);

pinMode(11, OUTPUT);

}void loop()

{ // write 'H'

digitalWrite(2, 0);

digitalWrite(3, 0);

digitalWrite(4, 0);

digitalWrite(5, 0);

digitalWrite(6, 0);

digitalWrite(7, 0);

digitalWrite(8, 1);

digitalWrite(9, 1);

digitalWrite(10, 1);

digitalWrite(11, 1);

delay(1000);

//write 'e' digitalWrite(2, 1);