Introduction: Color Changing Display

Custom made Multiple color display.

Have you ever wanted a display that is a little larger then one you can buy?
Have you ever wanted to make a display the way you wanted it?

Me too!

This is how I made a custom multiple color display that I use for temperature.

Step 1: Supplies and Tools

Supplies:
Safety Glasses, Gloves, Etc. ( Be safe )
Mold Putty
Clear casting epoxy
Epoxy
Pink Erasers
Graph paper
Mixing cups
Stirring sticks
Super glue
Wax paper
Black Enamel Model paint
.093 inch Acrylic sheeting
A bit of balsa wood
Tape
Stand offs

Electronics supplies:
1- Arduino or other microcontroller
9- 74HC374
72- 470 ohm resistors
46- Surface mount red/green leds
46- Surface mount blue leds
3- 0.1uf Capacitors
Proto board
Assorted size wires
5 volt power supply. I used a phone charger.

Tools:
Scissors
Solder Iron
Solder
Needle nose pliers
Wire cutter
Wire stripper
Pencil
Dremel/Cutter
Assorted Sand paper
Marker
Razor blade
Tweezers
Hot glue gun
Assorted other tools

Step 2: Style

Decide what style of digit you like best.

This is easiest to lay out on a piece of graph paper.

You can draw a few different styles. Though there really are only two styles I know of.

Straight up and down and slightly angled.

I like the slightly angled look.

Draw it out on your graph paper and using a razor blade cut out the individual pieces.

The pieces of graph paper are then placed on a large eraser so the eraser can be cut to shape.

For the decimal placed I ripped the eraser off the back of a pencil.
Perfect circle : )

Step 3: Make the Mold

Attach the cut pieces of eraser and the bit you pulled off the back of a pencil to a piece of card stock or poster board with some glue.

I used super glue and it held nicely but don’t get it on your fingers. That holds a little too nicely.

Then use some hot glue and a little balsa wood ( or whatever you have there ) to make an edging.

This all needs to be pretty sturdy because you will be pressing some silicone mold making material down into it with some force so make it strong.

Once you have it all glued down the way you want it mix up your silicone mold material and mash it to make a nice mold.

Step 4: Make the Digits

Place your mold on a piece of wax paper to make clean up of any spills much easier.

Using careful measurement and following the package instructions ( safety middle ) mix up some resin and pour it into the mold.

Wait for it to be set up and repeat until you have three digits.

Once you remove the pieces from the mold use a razor and some sand paper to clean them up.

Step 5: Digit Plate

Once you have all of the digits trimmed and sanded, lay them out on a piece of graph paper so you can get them straight and spaced the way you want them.

Once you have that worked out draw lines on the graph paper where you want the pieces.

Trace the line with a marker that will bleed through to the back side.

Flip the graph paper.

This is where you will be gluing your pieces.

Place a piece of wax paper under the graph paper and glue the pieces down with super glue.

Cut a few lengths of acrylic sheet to the width height and length to match your digits.

Glue the acrylic sheet in place with hot glue but only on the outside.

You don’t want hot glue in the finished display.

Once the sides are secure mix up another batch of resin and add about five drops of black enamel modeling paint.

Mix it well so you don’t have any light spots.

Step 6: Digit Plate Finish Up

After all the resin has had time to set up and harden you need to get all the paper and extra stuff removed.

Remove the wax paper.

Cut off the extra graph paper and remove the no longer needed hot glue.

Use water to remove the graph paper that the resin has stuck to.

Finish cleaning off the paper with a few different grades of sand paper.

Step 7: Making an Led Testing Tool

If you have an alternate way of testing your leds you can skip this step.

It is much easier to fix problems with your leds as they arise rather then finding out at the end when you are trying to power the display up.

For that purpose I made a special tool for testing my leds as I went.

Get a pair of tweezers place some electrical tape on the back to help insulate the battery.

Tape two short pieces of wire near the end of the tweezers.

Coil the negative wire on the tape at the top of the tweezers.

Place a 3 volt battery negative side down onto the negative wire.

Place the positive wire over the top of the battery and finish securing it with tape.

Trim and bend the ends of the wire so they come together nicely for testing your leds.

Test a led with your amazing new tool.

Step 8: Adding the LEDs

I used surface mount leds for this project because they are small and have a nice flat surface to glue them to the back of my digits.

Each segment of each digit has two leds of Red green and blue.

Glue each led in place using super glue and a pair of tweezers.

Once you have all the leds glued on test them with your testing tool to be sure they all work.

Solder a ground wire for each digit.

Solder a positive wire for each.

Remember the positive goes to both leds of the same color in each segment.

Once you have all the positive wires soldered check that both of your leds are working.

If all is good use some clear nail polish to insulate, secure and support your wires.

Grab a piece of paper and your tester to make note of where each color wire ends up on the edges of the digit plate.

Step 9: Schematic

Check out my schematic.

It is only shown for one color.

Step 10: 374 Board

Using some proto board layout the parts for the board with the 74HC374s and the resistors.

Decide where you want the mounting holes then trim and drill the board.

Check out the segment pattern I used.

Solder like a mad scientist. Lots of soldering.

Check out my pictures if you need some help.

Step 11: Arduino Board

The board for the Arduino will be mounted to the back of everything and connects to the 374 board with pin connectors.

Keep track of which clock and data pins are where off the 374 board so you can match them up properly on the Arduino board.

I used a dremel and cut a slice in the proto board to accommodate the odd pattern on the one side of the Arduino.

Step 12: Programs

If you don’t load any code and power the whole thing you may get something like what you see in the picture.

I wrote a few different programs to get this display working the way I wanted it.

I am including them however if you only need the finished program it is the last one.

The first two programs for testing are done in what I call long hand. They don’t use look up tables or anything like that.
First one runs through a number with each color then runs through a little flashing of individual segments before starting all over.
The second one is just segment flashing.

The last one is the code I am currently running in my finished display.
It uses an LM335 as the temperature sensor.

Step 13: Program 1

// serial output to 74hc374
// 2013
// Ray McQueen
// Used for testing custom color temp display
//
// Blanks display first
//
// Test color of each digit
//
// Some cool flashing and changing next
//
// Long hand. No tables used in this one.
//
// No temperature is displayed.
//
const int blue_data = 13; //74xx374 pin3
const int red_data = 12; //74xx374 pin3
const int green_data = 11; //74xx374 pin3
const int blue_clk3 = 10; // blue 3rd digit
const int blue_clk2 = 9; // blue 2nd digit
const int blue_clk1 = 8; // blue 1st digit
const int red_clk3 = 7; // red 3rd digit
const int red_clk2 = 6; // red 2nd digit
const int red_clk1 = 5; // red 1st digit
const int green_clk3 = 4; // green 3rd digit
const int green_clk2 = 3; // green 2nd digit
const int green_clk1 = 2; // green 1st digit
//
//
//
int Blank = 0; // Blanks 0
int All_on = 255; // All on 255
int Zero = 252; // Zero
int One = 12; // One
int Two = 182; // Two
int Three = 158; // Three
int Four = 78; // Four
int Five = 218; // Five
int Six = 122; // Six
int Seven = 140; // Seven
int Eight = 254; // Eight
int Nine = 206; // Nine
int DP = 1; // Decimal Place
int Top = 128; // Top center segment
int Ltop = 64; // Left side top segment
int Lbot = 32; // Left side bottom segment
int Bot = 16; // Bottom segment
int Rbot = 8; // Right side bottom segment
int Rtop = 4; // Right side top segment
int Mid = 2; // Middle segment

//
int val = 500; //used for the delay
int val2 = 200; //
//
void setup() {
  pinMode(blue_data, OUTPUT); //define pin12 as output
  pinMode(red_data, OUTPUT); //define pin12 as output
  pinMode(green_data, OUTPUT); //define pin12 as output
  pinMode(blue_clk3, OUTPUT); //define pin12 as output
  pinMode(blue_clk2, OUTPUT); //define pin12 as output
  pinMode(blue_clk1, OUTPUT); //define pin12 as output
  pinMode(red_clk3, OUTPUT); //define pin12 as output
  pinMode(red_clk2, OUTPUT); //define pin12 as output
  pinMode(red_clk1, OUTPUT); //define pin12 as output
  pinMode(green_clk3, OUTPUT); //define pin12 as output
  pinMode(green_clk2, OUTPUT); //define pin12 as output
  pinMode(green_clk1, OUTPUT); //define pin12 as output
  //
}

void loop() {
  //
  // BLANK ALL DIGITS
  //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Blank); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, Blank); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Blank); //
  //
  shiftOut(red_data, red_clk3, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk2, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk1, LSBFIRST, Blank); //
  //
  shiftOut(green_data, green_clk3, LSBFIRST, Blank); //
  shiftOut(green_data, green_clk2, LSBFIRST, Blank); //
  shiftOut(green_data, green_clk1, LSBFIRST, Blank); //
  //
  delay(val); //delay the amount of time stored in val
  //
  //
  // CHECK EACH COLOR IN EACH DIGIT
  // Start with Blue
  //
  //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Zero); //
  delay(val); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, Zero); //
  delay(val); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Zero); //
  delay(val); //
  //
  shiftOut(blue_data, blue_clk3, LSBFIRST, One); //
  delay(val); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, One); //
  delay(val); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, One); //
  delay(val); //
  //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Two); //
  delay(val); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, Two); //
  delay(val); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Two); //
  delay(val); //
  //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Three); //
  delay(val); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, Three); //
  delay(val); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Three); //
  delay(val); //
  //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Four); //
  delay(val); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, Four); //
  delay(val); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Four); //
  delay(val); //
  //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Five); //
  delay(val); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, Five); //
  delay(val); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Five); //
  delay(val); //
  //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Six); //
  delay(val); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, Six); //
  delay(val); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Six); //
  delay(val); //
  //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Seven); //
  delay(val); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, Seven); //
  delay(val); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Seven); //
  delay(val); //
  //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Eight); //
  delay(val); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, Eight); //
  delay(val); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Eight); //
  delay(val); //
  //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Nine); //
  delay(val); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, Nine); //
  delay(val); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Nine); //
  delay(val); //
  //
  shiftOut(blue_data, blue_clk3, LSBFIRST, DP); //
  delay(val); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, DP); //
  delay(val); //
  //
  //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Blank); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, Blank); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Blank); //
  delay(val); //
  //
  //
  // CHECK EACH COLOR IN EACH DIGIT
  // Red
  //
  //
  shiftOut(red_data, red_clk3, LSBFIRST, Zero); //
  delay(val); //
  shiftOut(red_data, red_clk2, LSBFIRST, Zero); //
  delay(val); //
  shiftOut(red_data, red_clk1, LSBFIRST, Zero); //
  delay(val); //
  //
  shiftOut(red_data, red_clk3, LSBFIRST, One); //
  delay(val); //
  shiftOut(red_data, red_clk2, LSBFIRST, One); //
  delay(val); //
  shiftOut(red_data, red_clk1, LSBFIRST, One); //
  delay(val); //
  //
  shiftOut(red_data, red_clk3, LSBFIRST, Two); //
  delay(val); //
  shiftOut(red_data, red_clk2, LSBFIRST, Two); //
  delay(val); //
  shiftOut(red_data, red_clk1, LSBFIRST, Two); //
  delay(val); //
  //
  shiftOut(red_data, red_clk3, LSBFIRST, Three); //
  delay(val); //
  shiftOut(red_data, red_clk2, LSBFIRST, Three); //
  delay(val); //
  shiftOut(red_data, red_clk1, LSBFIRST, Three); //
  delay(val); //
  //
  shiftOut(red_data, red_clk3, LSBFIRST, Four); //
  delay(val); //
  shiftOut(red_data, red_clk2, LSBFIRST, Four); //
  delay(val); //
  shiftOut(red_data, red_clk1, LSBFIRST, Four); //
  delay(val); //
  //
  shiftOut(red_data, red_clk3, LSBFIRST, Five); //
  delay(val); //
  shiftOut(red_data, red_clk2, LSBFIRST, Five); //
  delay(val); //
  shiftOut(red_data, red_clk1, LSBFIRST, Five); //
  delay(val); //
  //
  shiftOut(red_data, red_clk3, LSBFIRST, Six); //
  delay(val); //
  shiftOut(red_data, red_clk2, LSBFIRST, Six); //
  delay(val); //
  shiftOut(red_data, red_clk1, LSBFIRST, Six); //
  delay(val); //
  //
  shiftOut(red_data, red_clk3, LSBFIRST, Seven); //
  delay(val); //
  shiftOut(red_data, red_clk2, LSBFIRST, Seven); //
  delay(val); //
  shiftOut(red_data, red_clk1, LSBFIRST, Seven); //
  delay(val); //
  //
  shiftOut(red_data, red_clk3, LSBFIRST, Eight); //
  delay(val); //
  shiftOut(red_data, red_clk2, LSBFIRST, Eight); //
  delay(val); //
  shiftOut(red_data, red_clk1, LSBFIRST, Eight); //
  delay(val); //
  //
  shiftOut(red_data, red_clk3, LSBFIRST, Nine); //
  delay(val); //
  shiftOut(red_data, red_clk2, LSBFIRST, Nine); //
  delay(val); //
  shiftOut(red_data, red_clk1, LSBFIRST, Nine); //
  delay(val); //
  //
  shiftOut(red_data, red_clk3, LSBFIRST, DP); //
  delay(val); //
  shiftOut(red_data, red_clk2, LSBFIRST, DP); //
  delay(val); //
  //
  //
  shiftOut(red_data, red_clk3, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk2, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk1, LSBFIRST, Blank); //
  delay(val); //
  //
  //
  // CHECK EACH COLOR IN EACH DIGIT
  // Green
  //
  //
  shiftOut(green_data, green_clk3, LSBFIRST, Zero); //
  delay(val); //
  shiftOut(green_data, green_clk2, LSBFIRST, Zero); //
  delay(val); //
  shiftOut(green_data, green_clk1, LSBFIRST, Zero); //
  delay(val); //
  //
  shiftOut(green_data, green_clk3, LSBFIRST, One); //
  delay(val); //
  shiftOut(green_data, green_clk2, LSBFIRST, One); //
  delay(val); //
  shiftOut(green_data, green_clk1, LSBFIRST, One); //
  delay(val); //
  //
  shiftOut(green_data, green_clk3, LSBFIRST, Two); //
  delay(val); //
  shiftOut(green_data, green_clk2, LSBFIRST, Two); //
  delay(val); //
  shiftOut(green_data, green_clk1, LSBFIRST, Two); //
  delay(val); //
  //
  shiftOut(green_data, green_clk3, LSBFIRST, Three); //
  delay(val); //
  shiftOut(green_data, green_clk2, LSBFIRST, Three); //
  delay(val); //
  shiftOut(green_data, green_clk1, LSBFIRST, Three); //
  delay(val); //
  //
  shiftOut(green_data, green_clk3, LSBFIRST, Four); //
  delay(val); //
  shiftOut(green_data, green_clk2, LSBFIRST, Four); //
  delay(val); //
  shiftOut(green_data, green_clk1, LSBFIRST, Four); //
  delay(val); //
  //
  shiftOut(green_data, green_clk3, LSBFIRST, Five); //
  delay(val); //
  shiftOut(green_data, green_clk2, LSBFIRST, Five); //
  delay(val); //
  shiftOut(green_data, green_clk1, LSBFIRST, Five); //
  delay(val); //
  //
  shiftOut(green_data, green_clk3, LSBFIRST, Six); //
  delay(val); //
  shiftOut(green_data, green_clk2, LSBFIRST, Six); //
  delay(val); //
  shiftOut(green_data, green_clk1, LSBFIRST, Six); //
  delay(val); //
  //
  shiftOut(green_data, green_clk3, LSBFIRST, Seven); //
  delay(val); //
  shiftOut(green_data, green_clk2, LSBFIRST, Seven); //
  delay(val); //
  shiftOut(green_data, green_clk1, LSBFIRST, Seven); //
  delay(val); //
  //
  shiftOut(green_data, green_clk3, LSBFIRST, Eight); //
  delay(val); //
  shiftOut(green_data, green_clk2, LSBFIRST, Eight); //
  delay(val); //
  shiftOut(green_data, green_clk1, LSBFIRST, Eight); //
  delay(val); //
  //
  shiftOut(green_data, green_clk3, LSBFIRST, Nine); //
  delay(val); //
  shiftOut(green_data, green_clk2, LSBFIRST, Nine); //
  delay(val); //
  shiftOut(green_data, green_clk1, LSBFIRST, Nine); //
  delay(val); //
  //
  shiftOut(green_data, green_clk3, LSBFIRST, DP); //
  delay(val); //
  shiftOut(green_data, green_clk2, LSBFIRST, DP); //
  delay(val); //
  //
  //
  shiftOut(green_data, green_clk3, LSBFIRST, Blank); //
  shiftOut(green_data, green_clk2, LSBFIRST, Blank); //
  shiftOut(green_data, green_clk1, LSBFIRST, Blank); //
  delay(val); //
  //
  //
  // CHECK EACH COLOR IN EACH DIGIT
  // Yellow
  //
  //
  shiftOut(green_data, green_clk3, LSBFIRST, Zero); //
  shiftOut(red_data, red_clk3, LSBFIRST, Zero); //
  delay(val); //
  shiftOut(green_data, green_clk2, LSBFIRST, Zero); //
  shiftOut(red_data, red_clk2, LSBFIRST, Zero); //
  delay(val); //
  shiftOut(green_data, green_clk1, LSBFIRST, Zero); //
  shiftOut(red_data, red_clk1, LSBFIRST, Zero); //
  delay(val); //
  //
  shiftOut(green_data, green_clk3, LSBFIRST, One); //
  shiftOut(red_data, red_clk3, LSBFIRST, One); //
  delay(val); //
  shiftOut(green_data, green_clk2, LSBFIRST, One); //
  shiftOut(red_data, red_clk2, LSBFIRST, One); //
  delay(val); //
  shiftOut(green_data, green_clk1, LSBFIRST, One); //
  shiftOut(red_data, red_clk1, LSBFIRST, One); //
  delay(val); //
  //
  shiftOut(green_data, green_clk3, LSBFIRST, Two); //
  shiftOut(red_data, red_clk3, LSBFIRST, Two); //
  delay(val); //
  shiftOut(green_data, green_clk2, LSBFIRST, Two); //
  shiftOut(red_data, red_clk2, LSBFIRST, Two); //
  delay(val); //
  shiftOut(green_data, green_clk1, LSBFIRST, Two); //
  shiftOut(red_data, red_clk1, LSBFIRST, Two); //
  delay(val); //
  //
  shiftOut(green_data, green_clk3, LSBFIRST, Three); //
  shiftOut(red_data, red_clk3, LSBFIRST, Three); //
  delay(val); //
  shiftOut(green_data, green_clk2, LSBFIRST, Three); //
  shiftOut(red_data, red_clk2, LSBFIRST, Three); //
  delay(val); //
  shiftOut(green_data, green_clk1, LSBFIRST, Three); //
  shiftOut(red_data, red_clk1, LSBFIRST, Three); //
  delay(val); //
  //
  shiftOut(green_data, green_clk3, LSBFIRST, Four); //
  shiftOut(red_data, red_clk3, LSBFIRST, Four); //
  delay(val); //
  shiftOut(green_data, green_clk2, LSBFIRST, Four); //
  shiftOut(red_data, red_clk2, LSBFIRST, Four); //
  delay(val); //
  shiftOut(green_data, green_clk1, LSBFIRST, Four); //
  shiftOut(red_data, red_clk1, LSBFIRST, Four); //
  delay(val); //
  //
  shiftOut(green_data, green_clk3, LSBFIRST, Five); //
  shiftOut(red_data, red_clk3, LSBFIRST, Five); //
  delay(val); //
  shiftOut(green_data, green_clk2, LSBFIRST, Five); //
  shiftOut(red_data, red_clk2, LSBFIRST, Five); //
  delay(val); //
  shiftOut(green_data, green_clk1, LSBFIRST, Five); //
  shiftOut(red_data, red_clk1, LSBFIRST, Five); //
  delay(val); //
  //
  shiftOut(green_data, green_clk3, LSBFIRST, Six); //
  shiftOut(red_data, red_clk3, LSBFIRST, Six); //
  delay(val); //
  shiftOut(green_data, green_clk2, LSBFIRST, Six); //
  shiftOut(red_data, red_clk2, LSBFIRST, Six); //
  delay(val); //
  shiftOut(green_data, green_clk1, LSBFIRST, Six); //
  shiftOut(red_data, red_clk1, LSBFIRST, Six); //
  delay(val); //
  //
  shiftOut(green_data, green_clk3, LSBFIRST, Seven); //
  shiftOut(red_data, red_clk3, LSBFIRST, Seven); //
  delay(val); //
  shiftOut(green_data, green_clk2, LSBFIRST, Seven); //
  shiftOut(red_data, red_clk2, LSBFIRST, Seven); //
  delay(val); //
  shiftOut(green_data, green_clk1, LSBFIRST, Seven); //
  shiftOut(red_data, red_clk1, LSBFIRST, Seven); //
  delay(val); //
  //
  shiftOut(green_data, green_clk3, LSBFIRST, Eight); //
  shiftOut(red_data, red_clk3, LSBFIRST, Eight); //
  delay(val); //
  shiftOut(green_data, green_clk2, LSBFIRST, Eight); //
  shiftOut(red_data, red_clk2, LSBFIRST, Eight); //
  delay(val); //
  shiftOut(green_data, green_clk1, LSBFIRST, Eight); //
  shiftOut(red_data, red_clk1, LSBFIRST, Eight); //
  delay(val); //
  //
  shiftOut(green_data, green_clk3, LSBFIRST, Nine); //
  shiftOut(red_data, red_clk3, LSBFIRST, Nine); //
  delay(val); //
  shiftOut(green_data, green_clk2, LSBFIRST, Nine); //
  shiftOut(red_data, red_clk2, LSBFIRST, Nine); //
  delay(val); //
  shiftOut(green_data, green_clk1, LSBFIRST, Nine); //
  shiftOut(red_data, red_clk1, LSBFIRST, Nine); //
  delay(val); //
  //
  shiftOut(green_data, green_clk3, LSBFIRST, DP); //
  shiftOut(red_data, red_clk3, LSBFIRST, DP); //
  delay(val); //
  shiftOut(green_data, green_clk2, LSBFIRST, DP); //
  shiftOut(red_data, red_clk2, LSBFIRST, DP); //
  delay(val); //
  //
  //
  shiftOut(green_data, green_clk1, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk1, LSBFIRST, Blank); //
  shiftOut(green_data, green_clk2, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk2, LSBFIRST, Blank); //
  shiftOut(green_data, green_clk3, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk3, LSBFIRST, Blank); //
  delay(val); //
  //
  //
  // CHECK EACH COLOR IN EACH DIGIT
  // Funky Flashing for fun.
  // Blue in a circle
  //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Top); //
  delay(val2); //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Blank); //
  delay(val2); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, Top); //
  delay(val2); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, Blank); //
  delay(val2); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Top); //
  delay(val2); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Blank); //
  delay(val2); //
  //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Ltop); //
  delay(val2); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Blank); //
  delay(val2); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Lbot); //
  delay(val2); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Blank); //
  delay(val2); //
  //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Bot); //
  delay(val2); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Blank); //
  delay(val2); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, Bot); //
  delay(val2); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, Blank); //
  delay(val2); //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Bot); //
  delay(val2); //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Blank); //
  delay(val2); //
  //
  //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Rbot); //
  delay(val2); //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Blank); //
  delay(val2); //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Rtop); //
  delay(val2); //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Blank); //
  delay(val2); //
  //
  //
  // *********
  //
  // CHECK EACH COLOR IN EACH DIGIT
  // Funky Flashing for fun.
  // Blue in a circle
  // Red in a small circle
  // Green in a small circle
  //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Top); //
  shiftOut(red_data, red_clk2, LSBFIRST, Top); //
  shiftOut(green_data, green_clk1, LSBFIRST, Top); //
  delay(val2); //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk2, LSBFIRST, Ltop); //
  shiftOut(green_data, green_clk1, LSBFIRST, Ltop); //
  delay(val2); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, Top); //
  shiftOut(red_data, red_clk2, LSBFIRST, Lbot); //
  shiftOut(green_data, green_clk1, LSBFIRST, Lbot); //
  delay(val2); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk2, LSBFIRST, Bot); //
  shiftOut(green_data, green_clk1, LSBFIRST, Bot); //
  delay(val2); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Top); //
  shiftOut(red_data, red_clk2, LSBFIRST, Rbot); //
  shiftOut(green_data, green_clk1, LSBFIRST, Rbot); //
  delay(val2); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk2, LSBFIRST, Rtop); //
  shiftOut(green_data, green_clk1, LSBFIRST, Rtop); //
  delay(val2); //
  //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Ltop); //
  shiftOut(red_data, red_clk2, LSBFIRST, Top); //
  shiftOut(green_data, green_clk1, LSBFIRST, Top); //
  delay(val2); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk2, LSBFIRST, Ltop); //
  shiftOut(green_data, green_clk1, LSBFIRST, Ltop); //
  delay(val2); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Lbot); //
  shiftOut(red_data, red_clk2, LSBFIRST, Lbot); //
  shiftOut(green_data, green_clk1, LSBFIRST, Lbot); //
  delay(val2); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk2, LSBFIRST, Bot); //
  shiftOut(green_data, green_clk1, LSBFIRST, Bot); //
  delay(val2); //
  //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Bot); //
  shiftOut(red_data, red_clk2, LSBFIRST, Rbot); //
  shiftOut(green_data, green_clk1, LSBFIRST, Rbot); //
  delay(val2); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk2, LSBFIRST, Rtop); //
  shiftOut(green_data, green_clk1, LSBFIRST, Rtop); //
  delay(val2); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, Bot); //
  shiftOut(red_data, red_clk2, LSBFIRST, Top); //
  shiftOut(green_data, green_clk1, LSBFIRST, Top); //
  delay(val2); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk2, LSBFIRST, Ltop); //
  shiftOut(green_data, green_clk1, LSBFIRST, Ltop); //
  delay(val2); //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Bot); //
  shiftOut(red_data, red_clk2, LSBFIRST, Lbot); //
  shiftOut(green_data, green_clk1, LSBFIRST, Lbot); //
  delay(val2); //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk2, LSBFIRST, Bot); //
  shiftOut(green_data, green_clk1, LSBFIRST, Bot); //
  delay(val2); //
  //
  //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Rbot); //
  shiftOut(red_data, red_clk2, LSBFIRST, Rbot); //
  shiftOut(green_data, green_clk1, LSBFIRST, Rbot); //
  delay(val2); //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk2, LSBFIRST, Rtop); //
  shiftOut(green_data, green_clk1, LSBFIRST, Rtop); //
  delay(val2); //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Rtop); //
  delay(val2); //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Blank); //
  delay(val2); //
  //
  //
  //
}

Step 14: Program 2

// serial output to 74hc374
// 2013
// Ray McQueen
// Used for testing custom color temp display
//
// Blanks display first
//
// Some cool flashing and changing
//
// Long hand. No tables used in this one.
//
// No temperature is displayed.
//
const int blue_data = 13; //74xx374 pin3
const int red_data = 12; //74xx374 pin3
const int green_data = 11; //74xx374 pin3
const int blue_clk3 = 10; // blue 3rd digit
const int blue_clk2 = 9; // blue 2nd digit
const int blue_clk1 = 8; // blue 1st digit
const int red_clk3 = 7; // red 3rd digit
const int red_clk2 = 6; // red 2nd digit
const int red_clk1 = 5; // red 1st digit
const int green_clk3 = 4; // green 3rd digit
const int green_clk2 = 3; // green 2nd digit
const int green_clk1 = 2; // green 1st digit
//
//
//
int Blank = 0; // Blanks 0
int All_on = 255; // All on 255
int Zero = 252; // Zero
int One = 12; // One
int Two = 182; // Two
int Three = 158; // Three
int Four = 78; // Four
int Five = 218; // Five
int Six = 122; // Six
int Seven = 140; // Seven
int Eight = 254; // Eight
int Nine = 206; // Nine
int DP = 1; // Decimal Place
int Top = 128; // Top center segment
int Ltop = 64; // Left side top segment
int Lbot = 32; // Left side bottom segment
int Bot = 16; // Bottom segment
int Rbot = 8; // Right side bottom segment
int Rtop = 4; // Right side top segment
int Mid = 2; // Middle segment

//
int val = 500; //used for the delay
int val2 = 150; //
int circle = 0; // used for number of times to loop
//
void setup() {
  pinMode(blue_data, OUTPUT); //define pin12 as output
  pinMode(red_data, OUTPUT); //define pin12 as output
  pinMode(green_data, OUTPUT); //define pin12 as output
  pinMode(blue_clk3, OUTPUT); //define pin12 as output
  pinMode(blue_clk2, OUTPUT); //define pin12 as output
  pinMode(blue_clk1, OUTPUT); //define pin12 as output
  pinMode(red_clk3, OUTPUT); //define pin12 as output
  pinMode(red_clk2, OUTPUT); //define pin12 as output
  pinMode(red_clk1, OUTPUT); //define pin12 as output
  pinMode(green_clk3, OUTPUT); //define pin12 as output
  pinMode(green_clk2, OUTPUT); //define pin12 as output
  pinMode(green_clk1, OUTPUT); //define pin12 as output
  //
}

void loop() {
  //
  // BLANK ALL DIGITS
  //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Blank); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, Blank); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Blank); //
  //
  shiftOut(red_data, red_clk3, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk2, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk1, LSBFIRST, Blank); //
  //
  shiftOut(green_data, green_clk3, LSBFIRST, Blank); //
  shiftOut(green_data, green_clk2, LSBFIRST, Blank); //
  shiftOut(green_data, green_clk1, LSBFIRST, Blank); //
  //
  delay(val); //delay the amount of time stored in val
  //
  //
  // Flashing for fun.
  //
  //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Top); //
  shiftOut(red_data, red_clk3, LSBFIRST, Rtop); //
  shiftOut(green_data, green_clk3, LSBFIRST, Rbot); //
  delay(val2); //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk3, LSBFIRST, Blank); //
  shiftOut(green_data, green_clk3, LSBFIRST, Blank); //
  delay(val2); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, Top); //
  shiftOut(red_data, red_clk3, LSBFIRST, Top); //
  shiftOut(green_data, green_clk3, LSBFIRST, Rtop); //
  delay(val2); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk3, LSBFIRST, Blank); //
  shiftOut(green_data, green_clk3, LSBFIRST, Blank); //
  delay(val2); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Top); //
  shiftOut(red_data, red_clk2, LSBFIRST, Top); //
  shiftOut(green_data, green_clk3, LSBFIRST, Top); //
  delay(val2); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk2, LSBFIRST, Blank); //
  shiftOut(green_data, green_clk3, LSBFIRST, Blank); //
  delay(val2); //
  //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Ltop); //
  shiftOut(red_data, red_clk1, LSBFIRST, Top); //
  shiftOut(green_data, green_clk2, LSBFIRST, Top); //
  delay(val2); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk1, LSBFIRST, Blank); //
  shiftOut(green_data, green_clk2, LSBFIRST, Blank); //
  delay(val2); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Lbot); //
  shiftOut(red_data, red_clk1, LSBFIRST, Ltop); //
  shiftOut(green_data, green_clk1, LSBFIRST, Top); //
  delay(val2); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk1, LSBFIRST, Blank); //
  shiftOut(green_data, green_clk1, LSBFIRST, Blank); //
  delay(val2); //
  //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Bot); //
  shiftOut(red_data, red_clk1, LSBFIRST, Lbot); //
  shiftOut(green_data, green_clk1, LSBFIRST, Ltop); //
  delay(val2); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk1, LSBFIRST, Blank); //
  shiftOut(green_data, green_clk1, LSBFIRST, Blank); //
  delay(val2); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, Bot); //
  shiftOut(red_data, red_clk1, LSBFIRST, Bot); //
  shiftOut(green_data, green_clk1, LSBFIRST, Lbot); //
  delay(val2); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk1, LSBFIRST, Blank); //
  shiftOut(green_data, green_clk1, LSBFIRST, Blank); //
  delay(val2); //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Bot); //
  shiftOut(red_data, red_clk2, LSBFIRST, Bot); //
  shiftOut(green_data, green_clk1, LSBFIRST, Bot); //
  delay(val2); //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk2, LSBFIRST, Blank); //
  shiftOut(green_data, green_clk1, LSBFIRST, Blank); //
  delay(val2); //
  //
  //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Rbot); //
  shiftOut(red_data, red_clk3, LSBFIRST, Bot); //
  shiftOut(green_data, green_clk2, LSBFIRST, Bot); //
  delay(val2); //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk3, LSBFIRST, Blank); //
  shiftOut(green_data, green_clk2, LSBFIRST, Blank); //
  delay(val2); //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Rtop); //
  shiftOut(red_data, red_clk3, LSBFIRST, Rbot); //
  shiftOut(green_data, green_clk3, LSBFIRST, Bot); //
  delay(val2); //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk3, LSBFIRST, Blank); //
  shiftOut(green_data, green_clk3, LSBFIRST, Blank); //
  delay(val2); //
  //
  //
  // *********
  //
  // CHECK EACH COLOR IN EACH DIGIT
  // Funky Flashing for fun.
  // Blue in a circle
  // Red in a small circle
  // Green in a small circle
  //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Top); //
  shiftOut(red_data, red_clk2, LSBFIRST, Top); //
  shiftOut(green_data, green_clk1, LSBFIRST, Top); //
  delay(val2); //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk2, LSBFIRST, Ltop); //
  shiftOut(green_data, green_clk1, LSBFIRST, Ltop); //
  delay(val2); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, Top); //
  shiftOut(red_data, red_clk2, LSBFIRST, Lbot); //
  shiftOut(green_data, green_clk1, LSBFIRST, Lbot); //
  delay(val2); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk2, LSBFIRST, Bot); //
  shiftOut(green_data, green_clk1, LSBFIRST, Bot); //
  delay(val2); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Top); //
  shiftOut(red_data, red_clk2, LSBFIRST, Rbot); //
  shiftOut(green_data, green_clk1, LSBFIRST, Rbot); //
  delay(val2); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk2, LSBFIRST, Rtop); //
  shiftOut(green_data, green_clk1, LSBFIRST, Rtop); //
  delay(val2); //
  //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Ltop); //
  shiftOut(red_data, red_clk2, LSBFIRST, Top); //
  shiftOut(green_data, green_clk1, LSBFIRST, Top); //
  delay(val2); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk2, LSBFIRST, Ltop); //
  shiftOut(green_data, green_clk1, LSBFIRST, Ltop); //
  delay(val2); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Lbot); //
  shiftOut(red_data, red_clk2, LSBFIRST, Lbot); //
  shiftOut(green_data, green_clk1, LSBFIRST, Lbot); //
  delay(val2); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk2, LSBFIRST, Bot); //
  shiftOut(green_data, green_clk1, LSBFIRST, Bot); //
  delay(val2); //
  //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Bot); //
  shiftOut(red_data, red_clk2, LSBFIRST, Rbot); //
  shiftOut(green_data, green_clk1, LSBFIRST, Rbot); //
  delay(val2); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk2, LSBFIRST, Rtop); //
  shiftOut(green_data, green_clk1, LSBFIRST, Rtop); //
  delay(val2); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, Bot); //
  shiftOut(red_data, red_clk2, LSBFIRST, Top); //
  shiftOut(green_data, green_clk1, LSBFIRST, Top); //
  delay(val2); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk2, LSBFIRST, Ltop); //
  shiftOut(green_data, green_clk1, LSBFIRST, Ltop); //
  delay(val2); //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Bot); //
  shiftOut(red_data, red_clk2, LSBFIRST, Lbot); //
  shiftOut(green_data, green_clk1, LSBFIRST, Lbot); //
  delay(val2); //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk2, LSBFIRST, Bot); //
  shiftOut(green_data, green_clk1, LSBFIRST, Bot); //
  delay(val2); //
  //
  //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Rbot); //
  shiftOut(red_data, red_clk2, LSBFIRST, Rbot); //
  shiftOut(green_data, green_clk1, LSBFIRST, Rbot); //
  delay(val2); //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Blank); //
  shiftOut(red_data, red_clk2, LSBFIRST, Rtop); //
  shiftOut(green_data, green_clk1, LSBFIRST, Rtop); //
  delay(val2); //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Rtop); //
  delay(val2); //
  shiftOut(blue_data, blue_clk3, LSBFIRST, Blank); //
  delay(val2); //
  //
  //
  //
  // loop 20 times here
  // This is my favorite one :)
  for (circle = 0; circle < 20; circle++) {
    //
    shiftOut(blue_data, blue_clk3, LSBFIRST, Top); //
    shiftOut(red_data, red_clk2, LSBFIRST, Top); //
    shiftOut(green_data, green_clk1, LSBFIRST, Top); //
    delay(val2); //
    shiftOut(blue_data, blue_clk3, LSBFIRST, Ltop); //
    shiftOut(red_data, red_clk2, LSBFIRST, Ltop); //
    shiftOut(green_data, green_clk1, LSBFIRST, Ltop); //
    delay(val2); //
    shiftOut(blue_data, blue_clk3, LSBFIRST, Lbot); //
    shiftOut(red_data, red_clk2, LSBFIRST, Lbot); //
    shiftOut(green_data, green_clk1, LSBFIRST, Lbot); //
    delay(val2); //
    shiftOut(blue_data, blue_clk3, LSBFIRST, Bot); //
    shiftOut(red_data, red_clk2, LSBFIRST, Bot); //
    shiftOut(green_data, green_clk1, LSBFIRST, Bot); //
    delay(val2); //
    shiftOut(blue_data, blue_clk3, LSBFIRST, Rbot); //
    shiftOut(red_data, red_clk2, LSBFIRST, Rbot); //
    shiftOut(green_data, green_clk1, LSBFIRST, Rbot); //
    delay(val2); //
    shiftOut(blue_data, blue_clk3, LSBFIRST, Rtop); //
    shiftOut(red_data, red_clk2, LSBFIRST, Rtop); //
    shiftOut(green_data, green_clk1, LSBFIRST, Rtop); //
    delay(val2); //
    shiftOut(blue_data, blue_clk3, LSBFIRST, Top); //
    shiftOut(red_data, red_clk2, LSBFIRST, Top); //
    shiftOut(green_data, green_clk1, LSBFIRST, Top); //
    //
    //
    shiftOut(blue_data, blue_clk2, LSBFIRST, Top); //
    shiftOut(red_data, red_clk1, LSBFIRST, Top); //
    shiftOut(green_data, green_clk3, LSBFIRST, Top); //
    delay(val2); //
    shiftOut(blue_data, blue_clk2, LSBFIRST, Ltop); //
    shiftOut(red_data, red_clk1, LSBFIRST, Ltop); //
    shiftOut(green_data, green_clk3, LSBFIRST, Ltop); //
    delay(val2); //
    shiftOut(blue_data, blue_clk2, LSBFIRST, Lbot); //
    shiftOut(red_data, red_clk1, LSBFIRST, Lbot); //
    shiftOut(green_data, green_clk3, LSBFIRST, Lbot); //
    delay(val2); //
    shiftOut(blue_data, blue_clk2, LSBFIRST, Bot); //
    shiftOut(red_data, red_clk1, LSBFIRST, Bot); //
    shiftOut(green_data, green_clk3, LSBFIRST, Bot); //
    delay(val2); //
    shiftOut(blue_data, blue_clk2, LSBFIRST, Rbot); //
    shiftOut(red_data, red_clk1, LSBFIRST, Rbot); //
    shiftOut(green_data, green_clk3, LSBFIRST, Rbot); //
    delay(val2); //
    shiftOut(blue_data, blue_clk2, LSBFIRST, Rtop); //
    shiftOut(red_data, red_clk1, LSBFIRST, Rtop); //
    shiftOut(green_data, green_clk3, LSBFIRST, Rtop); //
    delay(val2); //
    shiftOut(blue_data, blue_clk2, LSBFIRST, Top); //
    shiftOut(red_data, red_clk1, LSBFIRST, Top); //
    shiftOut(green_data, green_clk3, LSBFIRST, Top); //
    //
    //
    shiftOut(blue_data, blue_clk1, LSBFIRST, Top); //
    shiftOut(red_data, red_clk3, LSBFIRST, Top); //
    shiftOut(green_data, green_clk2, LSBFIRST, Top); //
    delay(val2); //
    shiftOut(blue_data, blue_clk1, LSBFIRST, Ltop); //
    shiftOut(red_data, red_clk3, LSBFIRST, Ltop); //
    shiftOut(green_data, green_clk2, LSBFIRST, Ltop); //
    delay(val2); //
    shiftOut(blue_data, blue_clk1, LSBFIRST, Lbot); //
    shiftOut(red_data, red_clk3, LSBFIRST, Lbot); //
    shiftOut(green_data, green_clk2, LSBFIRST, Lbot); //
    delay(val2); //
    shiftOut(blue_data, blue_clk1, LSBFIRST, Bot); //
    shiftOut(red_data, red_clk3, LSBFIRST, Bot); //
    shiftOut(green_data, green_clk2, LSBFIRST, Bot); //
    delay(val2); //
    shiftOut(blue_data, blue_clk1, LSBFIRST, Rbot); //
    shiftOut(red_data, red_clk3, LSBFIRST, Rbot); //
    shiftOut(green_data, green_clk2, LSBFIRST, Rbot); //
    delay(val2); //
    shiftOut(blue_data, blue_clk1, LSBFIRST, Rtop); //
    shiftOut(red_data, red_clk3, LSBFIRST, Rtop); //
    shiftOut(green_data, green_clk2, LSBFIRST, Rtop); //
    delay(val2); //
    shiftOut(blue_data, blue_clk1, LSBFIRST, Top); //
    shiftOut(red_data, red_clk3, LSBFIRST, Top); //
    shiftOut(green_data, green_clk2, LSBFIRST, Top); //
    //
    //
    //
  }
  //
  //
  //
  //
}

Step 15: Main Program

/*

   Used for custom color temp display
   November 2013
   Ray McQueen

   Serial output to 74hc374

   Blanks display
   Blank leading 0's
   Minimum Temp is 0
   Display temp several times then do a fun flash
   Temp leveling to prevent large temp jumps



*/
//
const int blue_data = 13; //74xx374 pin3
const int red_data = 12; //74xx374 pin3
const int green_data = 11; //74xx374 pin3
const int blue_clk3 = 10; // blue 3rd digit
const int blue_clk2 = 9; // blue 2nd digit
const int blue_clk1 = 8; // blue 1st digit
const int red_clk3 = 7; // red 3rd digit
const int red_clk2 = 6; // red 2nd digit
const int red_clk1 = 5; // red 1st digit
const int green_clk3 = 4; // green 3rd digit
const int green_clk2 = 3; // green 2nd digit
const int green_clk1 = 2; // green 1st digit
//
int dig_it1 = 0; // First digit of display
int dig_it2 = 0; // Second digit of display
int dig_it3 = 0; // Third digit of display
//
int data_1 = 0;// First data  100 count
int data_2 = 0;// Second data  10 count
int data_3 = 0;// Third data    1 count
//
int test_test = 0;// Store number for testing
int tmprtr = 0;// For the temperature reading
int tmprtr_old = 0;// Last temp reading
int tmprtr_new = 0;// This temp reading
float tmprtr_read = 0;// Initial reading to do the math
//
//
int digits[] = {
  252, 12, 182, 158, 78, 218, 122, 140, 254, 206, 0
}; // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, Blank
//
//
int segments[] = {
  255, 1, 128, 64, 32, 16, 8, 4, 2, 0
}; // All on, Decimal Place, Top Center, Left Top,
//    Left Bottom, Bottom Center, Right Bottom, Right Top,
//    Middle Center, Blank
//
//
int del_short = 75;// Short delay for circling leds
int del_long = 1000;// Long delay
int circle = 0;// Times for circling
//
void setup() {
  pinMode(blue_data, OUTPUT); //define as output
  pinMode(red_data, OUTPUT); //define as output
  pinMode(green_data, OUTPUT); //define as output
  pinMode(blue_clk3, OUTPUT); //define as output
  pinMode(blue_clk2, OUTPUT); //define as output
  pinMode(blue_clk1, OUTPUT); //define as output
  pinMode(red_clk3, OUTPUT); //define as output
  pinMode(red_clk2, OUTPUT); //define as output
  pinMode(red_clk1, OUTPUT); //define as output
  pinMode(green_clk3, OUTPUT); //define as output
  pinMode(green_clk2, OUTPUT); //define as output
  pinMode(green_clk1, OUTPUT); //define as output
  //
  //
  // BLANK ALL DIGITS
  //
  data_1 = 10;// First data 10=Blank
  data_2 = 10;// Second data 10=Blank
  data_3 = 10;// Third data 10=Blank
  //
  blue_shift();// When clearing entire display you only need
  // to call one color shift because all color shifts clear
  // any other color before displaying themself. blue_shift
  // is used here but it can be any of the color shifts.
  //
  //
}
//
void loop() {
  //
  //
  for (circle = 0; circle < 60; circle++) {
    get_tmprtr();// Read the LM335 and convert to temperature
    temp_lvlr();// Prevents large temp jumps
    convert();// Break the temp out for proper display
    color_2_display();// Choose which color to display
    delay(del_long);// Delay
  }
  fun_ky_flash();// Do some fun flashing before doing temp again.
  //
  //
  // **  END OF MAIN LOOP **
  //
  //
}
//
//
//
void blue_shift() {
  //
  // Clears all other color digits first ... justin case.
  // This is to shift out for blue on the entire display
  //
  dig_it1 = 0;// 0 = 0000 0000 No leds on
  dig_it2 = 0;// 0 = 0000 0000 No leds on
  dig_it3 = 0;// 0 = 0000 0000 No leds on
  //
  shiftOut(red_data, red_clk1, LSBFIRST, dig_it1); //
  shiftOut(red_data, red_clk2, LSBFIRST, dig_it2); //
  shiftOut(red_data, red_clk3, LSBFIRST, dig_it3); //
  shiftOut(green_data, green_clk1, LSBFIRST, dig_it1); //
  shiftOut(green_data, green_clk2, LSBFIRST, dig_it2); //
  shiftOut(green_data, green_clk3, LSBFIRST, dig_it3); //
  //
  dig_it1 = (digits[data_1]);
  dig_it2 = (digits[data_2]);
  dig_it3 = (digits[data_3]);
  shiftOut(blue_data, blue_clk1, LSBFIRST, dig_it1); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, dig_it2); //
  shiftOut(blue_data, blue_clk3, LSBFIRST, dig_it3); //
  //
}
//
//
void red_shift() {
  //
  // Clears all other color digits first ... justin case.
  // This is to shift out red on the entire display
  //
  dig_it1 = 0;// 0 = 0000 0000 No leds on
  dig_it2 = 0;// 0 = 0000 0000 No leds on
  dig_it3 = 0;// 0 = 0000 0000 No leds on
  //
  shiftOut(blue_data, blue_clk1, LSBFIRST, dig_it1); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, dig_it2); //
  shiftOut(blue_data, blue_clk3, LSBFIRST, dig_it3); //
  shiftOut(green_data, green_clk1, LSBFIRST, dig_it1); //
  shiftOut(green_data, green_clk2, LSBFIRST, dig_it2); //
  shiftOut(green_data, green_clk3, LSBFIRST, dig_it3); //
  //
  dig_it1 = (digits[data_1]);
  dig_it2 = (digits[data_2]);
  dig_it3 = (digits[data_3]);
  shiftOut(red_data, red_clk1, LSBFIRST, dig_it1); //
  shiftOut(red_data, red_clk2, LSBFIRST, dig_it2); //
  shiftOut(red_data, red_clk3, LSBFIRST, dig_it3); //
  //
}
//
//
void green_shift() {
  //
  // Clears all other color digits first ... justin case.
  // This is to shift out green on the entire display
  //
  dig_it1 = 0;// 0 = 0000 0000 No leds on
  dig_it2 = 0;// 0 = 0000 0000 No leds on
  dig_it3 = 0;// 0 = 0000 0000 No leds on
  //
  shiftOut(red_data, red_clk1, LSBFIRST, dig_it1); //
  shiftOut(red_data, red_clk2, LSBFIRST, dig_it2); //
  shiftOut(red_data, red_clk3, LSBFIRST, dig_it3); //
  shiftOut(blue_data, blue_clk1, LSBFIRST, dig_it1); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, dig_it2); //
  shiftOut(blue_data, blue_clk3, LSBFIRST, dig_it3); //
  //
  dig_it1 = (digits[data_1]);
  dig_it2 = (digits[data_2]);
  dig_it3 = (digits[data_3]);
  shiftOut(green_data, green_clk1, LSBFIRST, dig_it1); //
  shiftOut(green_data, green_clk2, LSBFIRST, dig_it2); //
  shiftOut(green_data, green_clk3, LSBFIRST, dig_it3); //
  //
}
//
//
void yellow_shift() {
  //
  // Clears all other color digits first ... justin case.
  // This is to shift out yellow on the entire display
  //
  dig_it1 = 0;// 0 = 0000 0000 No leds on
  dig_it2 = 0;// 0 = 0000 0000 No leds on
  dig_it3 = 0;// 0 = 0000 0000 No leds on
  //
  shiftOut(blue_data, blue_clk1, LSBFIRST, dig_it1); //
  shiftOut(blue_data, blue_clk2, LSBFIRST, dig_it2); //
  shiftOut(blue_data, blue_clk3, LSBFIRST, dig_it3); //
  //
  dig_it1 = (digits[data_1]);
  dig_it2 = (digits[data_2]);
  dig_it3 = (digits[data_3]);
  shiftOut(green_data, green_clk1, LSBFIRST, dig_it1); //
  shiftOut(red_data, red_clk1, LSBFIRST, dig_it1); //
  shiftOut(green_data, green_clk2, LSBFIRST, dig_it2); //
  shiftOut(red_data, red_clk2, LSBFIRST, dig_it2); //
  shiftOut(green_data, green_clk3, LSBFIRST, dig_it3); //
  shiftOut(red_data, red_clk3, LSBFIRST, dig_it3); //
  //
}
//
//
//
//
void color_2_display() {
  //
  // Sets up for the color to be displayed
  //
  if ( tmprtr <= 49 ) {
    blue_shift();// Display it in blue
  }
  //
  if ( tmprtr >= 50 && tmprtr <= 59 ) {
    yellow_shift();// Display it in yellow
  }
  //
  if ( tmprtr >= 60 && tmprtr <= 79 ) {
    green_shift();// Display it in green
  }
  //
  if ( tmprtr >= 80 && tmprtr <= 89 ) {
    yellow_shift();// Display it in yellow
  }
  //
  if ( tmprtr >= 90 ) {
    red_shift();// Display it in red
  }
  //
}
//
//
void get_tmprtr() {
  //
  // Measure the temperature and make it useful
  //
  tmprtr_read = analogRead(A0);
  tmprtr_read = (((((tmprtr_read * (5.0 / 1024.0)) *100) - 273) * 1.8) + 32);
  tmprtr = (tmprtr_read);
  //
  // If the temp is too low leave it at 0
  if ( tmprtr_read <= 0 ) {
    tmprtr = 0;
  }
  //
}
//
//
//
//
void temp_lvlr() {
  //
  // Levels out the temp readings a bit
  // A new reading is compared to the last reading
  // If they are different it is determined that the
  // temp may only increase or decrease by 1 degree
  // per reading.
  // This will stop large temp jumps
  //
  tmprtr_new = tmprtr;// Get a copy of the newest reading
  // Check to see if temp is higher
  if (tmprtr_new > tmprtr_old) {
    tmprtr = ( tmprtr_old +1 );//
    tmprtr_old = tmprtr;//
  }
  // Check to see if temp is lower
  if (tmprtr_new < tmprtr_old) {
    tmprtr = ( tmprtr_old -1 );//
    tmprtr_old = tmprtr;//
  }
  // If temp is too low make it 0
  if ( tmprtr <= 0 ) {
    tmprtr = 0;
  }
  //
}
//
//
//
//
void convert() {
  //
  // Convert the reading to something this display can use
  //
  test_test = tmprtr;//copy contents to test_test for testing
  // Test 100s
  data_1 = 0;// Clear first digit 0XX
  while (test_test >= 100) {
    test_test = test_test - 100;
    data_1++;// First digit
  }
  data_2 = 0;// Clear second digit X0X
  while (test_test >= 10) {
    test_test = test_test - 10;
    data_2++;// Second digit
  }
  data_3 = test_test;// Everything left over XX0
  // Test to see if leading 0's and Blank.
  if (data_1 == 0) {
    data_1 = 10;// 10 = Blank in table
  }
  if (data_2 == 0) {
    data_2 = 10;// 10 = Blank in table
  }
  //
  // End testing
  // The number stored in test_test is now broken
  // out into three registers
  // data_1 // 100
  // data_2 //  10
  // data_3 //   1
  //
}
//
//
//
//
void fun_ky_flash() {
  // loop here
  // This is my favorite one :)
  for (circle = 0; circle < 10; circle++) {
    //
    shiftOut(blue_data, blue_clk3, LSBFIRST, segments[2]); // Top
    shiftOut(red_data, red_clk2, LSBFIRST, segments[2]); // Top
    shiftOut(green_data, green_clk1, LSBFIRST, segments[2]); // Top
    delay(del_short); //
    shiftOut(blue_data, blue_clk3, LSBFIRST, segments[3]); // Left Top
    shiftOut(red_data, red_clk2, LSBFIRST, segments[3]); // Left Top
    shiftOut(green_data, green_clk1, LSBFIRST, segments[3]); // Left Top
    delay(del_short); //
    shiftOut(blue_data, blue_clk3, LSBFIRST, segments[4]); // Left Bottom
    shiftOut(red_data, red_clk2, LSBFIRST, segments[4]); // Left Bottom
    shiftOut(green_data, green_clk1, LSBFIRST, segments[4]); // Left Bottom
    delay(del_short); //
    shiftOut(blue_data, blue_clk3, LSBFIRST, segments[5]); // Bottom
    shiftOut(red_data, red_clk2, LSBFIRST, segments[5]); // Bottom
    shiftOut(green_data, green_clk1, LSBFIRST, segments[5]); // Bottom
    delay(del_short); //
    shiftOut(blue_data, blue_clk3, LSBFIRST, segments[6]); // Right Bottom
    shiftOut(red_data, red_clk2, LSBFIRST, segments[6]); // Right Bottom
    shiftOut(green_data, green_clk1, LSBFIRST, segments[6]); // Right Bottom
    delay(del_short); //
    shiftOut(blue_data, blue_clk3, LSBFIRST, segments[7]); // Right Top
    shiftOut(red_data, red_clk2, LSBFIRST, segments[7]); // Right Top
    shiftOut(green_data, green_clk1, LSBFIRST, segments[7]); // Right Top
    delay(del_short); //
    shiftOut(blue_data, blue_clk3, LSBFIRST, segments[2]); // Top
    shiftOut(red_data, red_clk2, LSBFIRST, segments[2]); // Top
    shiftOut(green_data, green_clk1, LSBFIRST, segments[2]); // Top
    //
    //
    shiftOut(blue_data, blue_clk2, LSBFIRST, segments[2]); // Top
    shiftOut(red_data, red_clk1, LSBFIRST, segments[2]); // Top
    shiftOut(green_data, green_clk3, LSBFIRST, segments[2]); // Top
    delay(del_short); //
    shiftOut(blue_data, blue_clk2, LSBFIRST, segments[3]); // Left Top
    shiftOut(red_data, red_clk1, LSBFIRST, segments[3]); // Left Top
    shiftOut(green_data, green_clk3, LSBFIRST, segments[3]); // Left top
    delay(del_short); //
    shiftOut(blue_data, blue_clk2, LSBFIRST, segments[4]); //Left Bottom
    shiftOut(red_data, red_clk1, LSBFIRST, segments[4]); // Left Bottom
    shiftOut(green_data, green_clk3, LSBFIRST, segments[4]); // Left Bottom
    delay(del_short); //
    shiftOut(blue_data, blue_clk2, LSBFIRST, segments[5]); // Bottom
    shiftOut(red_data, red_clk1, LSBFIRST, segments[5]); // Bottom
    shiftOut(green_data, green_clk3, LSBFIRST, segments[5]); // Bottom
    delay(del_short); //
    shiftOut(blue_data, blue_clk2, LSBFIRST, segments[6]); //Right Bottom
    shiftOut(red_data, red_clk1, LSBFIRST, segments[6]); // Right Bottom
    shiftOut(green_data, green_clk3, LSBFIRST, segments[6]); // Right Bottom
    delay(del_short); //
    shiftOut(blue_data, blue_clk2, LSBFIRST, segments[7]); // Right Top
    shiftOut(red_data, red_clk1, LSBFIRST, segments[7]); // Right Top
    shiftOut(green_data, green_clk3, LSBFIRST, segments[7]); // Right Top
    delay(del_short); //
    shiftOut(blue_data, blue_clk2, LSBFIRST, segments[2]); // Top
    shiftOut(red_data, red_clk1, LSBFIRST, segments[2]); // Top
    shiftOut(green_data, green_clk3, LSBFIRST, segments[2]); // Top
    //
    //
    shiftOut(blue_data, blue_clk1, LSBFIRST, segments[2]); // Top
    shiftOut(red_data, red_clk3, LSBFIRST, segments[2]); // Top
    shiftOut(green_data, green_clk2, LSBFIRST, segments[2]); // Top
    delay(del_short); //
    shiftOut(blue_data, blue_clk1, LSBFIRST, segments[3]); // Left Top
    shiftOut(red_data, red_clk3, LSBFIRST, segments[3]); // Left Top
    shiftOut(green_data, green_clk2, LSBFIRST, segments[3]); // Left Top
    delay(del_short); //
    shiftOut(blue_data, blue_clk1, LSBFIRST, segments[4]); // Left Bottom
    shiftOut(red_data, red_clk3, LSBFIRST, segments[4]); // Left Bottom
    shiftOut(green_data, green_clk2, LSBFIRST, segments[4]); // Left Bottom
    delay(del_short); //
    shiftOut(blue_data, blue_clk1, LSBFIRST, segments[5]); // Bottom
    shiftOut(red_data, red_clk3, LSBFIRST, segments[5]); // Bottom
    shiftOut(green_data, green_clk2, LSBFIRST, segments[5]); // Bottom
    delay(del_short); //
    shiftOut(blue_data, blue_clk1, LSBFIRST, segments[6]); // Right Bottom
    shiftOut(red_data, red_clk3, LSBFIRST, segments[6]); // Right Bottom
    shiftOut(green_data, green_clk2, LSBFIRST, segments[6]); // Right Bottom
    delay(del_short); //
    shiftOut(blue_data, blue_clk1, LSBFIRST, segments[7]); // Right Top
    shiftOut(red_data, red_clk3, LSBFIRST, segments[7]); // Right Top
    shiftOut(green_data, green_clk2, LSBFIRST, segments[7]); // Right Top
    delay(del_short); //
    shiftOut(blue_data, blue_clk1, LSBFIRST, segments[2]); // Top
    shiftOut(red_data, red_clk3, LSBFIRST, segments[2]); // Top
    shiftOut(green_data, green_clk2, LSBFIRST, segments[2]); // Top
    //
    //
  }
  //
}
//

Make It Glow Contest

Participated in the
Make It Glow Contest