4 digit 7-segment LED display programming issue

In the below code I am trying to make my temperature sensor (and soon a light sensor) to go through a 16 pin shift register (SN74HC595N) to a 4 digit 7 segment led display and the correct temperature value in degrees C (and F later). I know my circuitry and pin values are correct because I made some basic code to check my display. However, I am having issues when controlling individual digits of my display, I can get them all to display the same number or character but not different ones.

This code was based off of another person's arduino project, but currently the below code outputs FFFF on my display.

int latchPin = 8;
int clockPin = 12;  //Pin connected to SH_CP 
int dataPin = 11;  //Pin connected to DS 

int digit1Pin = 2;
int digit2Pin = 3;
int digit3Pin = 4;
int digit4Pin = 5;

byte data;
byte dataArray[13];

int tempPin = 0;     // the thermistor and 4,7k resistor
int sensorPin = 3;   // light sensor pin 0-1023 scale

int tempread = 0;
int temp;

const int MINUS_IDX = 10;
const int CELCIUS_IDX = 11;
const int FARENHEIT_IDX = 12;

void setup(){
  pinMode(digit1Pin, OUTPUT);
  pinMode(digit2Pin, OUTPUT);
  pinMode(digit3Pin, OUTPUT);
  pinMode(digit4Pin, OUTPUT);

  Serial.begin(9600);

  dataArray[0] = B01110111; //119; Corresponding binary to number value is represented
  dataArray[1] = B00100100; //36;
  dataArray[2] = B01011101; //93;
  dataArray[3] = B01101101; //109;
  dataArray[4] = B00101110; //46;
  dataArray[5] = B01101011; //107;
  dataArray[6] = B01111011; //123;
  dataArray[7] = B00100101; //37;
  dataArray[8] = B01111111; //127;
  dataArray[9] = B00101111; //47;
  
  //temperature specific characters
  dataArray[CELCIUS_IDX] = B00011011; //83;  // C
  dataArray[FARENHEIT_IDX] = B01010011; //27;  // F

}

void loop(){
  
  int  lightLevel = 0;
  
   //LED and photoresistor part
  lightLevel = analogRead(sensorPin); //number can range between 0 (0 Volts) and 1023 (5 Volts)
  tempread = analogRead(tempPin);
  tempread = (analogRead(tempPin));
  setTemp(temp, 'C');
  // add settemp for f here, mode button toggles which one (if/else statement)
 }

void setTemp(int temp, char scale){
  //temp must be between -99 and 999 in either scale to fit the display
  //put in a check here later

  if (scale == 'F'){
    setDigit(digit1Pin, FARENHEIT_IDX);
    temp = (tempread * 5) * (9/5) + 32.0; // converts degrees Celsius to Fahrenheit.
  } else if (scale == 'C'){
    setDigit(digit1Pin, CELCIUS_IDX);
    temp = tempread * 5;   // converts the voltage to degrees Celsius. 
  
}

  setDigit(digit2Pin, temp % 10);
  temp /= 10;
  if (temp >= 1){
    setDigit(digit3Pin, temp % 10);
    temp /= 10;
    if (temp >= 1){
	setDigit(digit4Pin, temp % 10);
    }
  }
}

void setDigit(int digitPin, int value){

    digitalWrite(latchPin, 0);
    shiftOut(dataPin, clockPin, dataArray[value]);
    digitalWrite(latchPin, 1);
  
    digitalWrite(digitPin, HIGH);
    delay(1);
    digitalWrite(digitPin, LOW);
}

void shiftOut(int myDataPin, int myClockPin, byte myDataOut) {
  // This shifts 8 bits out MSB first,
  //on the rising edge of the clock,
  //clock idles low

  //internal function setup
  int i=0;
  int pinState;
  pinMode(myClockPin, OUTPUT);
  pinMode(myDataPin, OUTPUT);

  //clear everything out just in case to
  //prepare shift register for bit shifting
  digitalWrite(myDataPin, 0);
  digitalWrite(myClockPin, 0);

  for (i=7; i>=0; i--)  {
    digitalWrite(myClockPin, 0);

    //if the value passed to myDataOut and a bitmask result
    // true then... so if we are at i=6 and our value is
    // %11010100 it would the code compares it to %01000000
    // and proceeds to set pinState to 1.
    if ( myDataOut & (1<<i) ) {
	pinState= 1;
    }
    else {
	pinState= 0;
    }

    //Sets the pin to HIGH or LOW depending on pinState
    digitalWrite(myDataPin, pinState);
    //register shifts bits on upstroke of clock pin 
    digitalWrite(myClockPin, 1);
    //zero the data pin after shift to prevent bleed through
    digitalWrite(myDataPin, 0);
  }

  //stop shifting
  digitalWrite(myClockPin, 0);
}

I reached the max character length, so in the below post I will continue with my own code that is giving me a different problem but perhaps an easier fix.

This is my own ghetto code (I have very little coding experience, electrical engineer here). This below code displays the correct output in a fashion...It quickly cycles all digits with the values I want to be displayed IE: 2222 -> 1111 -> CCCC. Any ideas on how to have it display what i want, which is 021C (updating every second or so)?

const int temperaturePin = 0; //using analog input 1 to measure the temperature sensor's signal pin. 
const int sensorPin = 3; //using analog input 0 to measure the temperature sensor's signal pin.
int lightLevel = 0; //holding variable for light level
int digit1Pin = 2; //pin for segment 1 of LED Display
int digit2Pin = 3; //pin for segment 2 of LED Display
int digit3Pin = 4; //pin for segment 3 of LED Display
int digit4Pin = 5; //pin for segment 4 of LED Display
int latchPin = 8;     //Pin connected to ST_CP of 74HC595
int clockPin = 12;    //Pin connected to SH_CP of 74HC595
int dataPin = 11;     //Pin connected to DS of 74HC595

byte SegDisplay;

// Setup the combination to display each number on the display
byte ZERO = 119; // Corresponding binary to number value is represented
byte ONE = 36;
byte TWO = 93;
byte THREE = 109;
byte FOUR = 46;
byte FIVE = 107;
byte SIX = 123;
byte SEVEN = 37;
byte EIGHT = 127;
byte NINE = 47;
byte FARENHEIT = 27;
byte CELSIUS = 83;

void setup()
{

  Serial.begin(9600); // temperature sensor's speed (bits/sec) "baud rate". 9600 is what I will use, it will transfer about 10 characters per second.
  pinMode(8, OUTPUT);
  pinMode(12, OUTPUT);
  pinMode(11, OUTPUT);
  pinMode(digit1Pin, OUTPUT);
  pinMode(digit2Pin, OUTPUT);
  pinMode(digit3Pin, OUTPUT);
  pinMode(digit4Pin, OUTPUT);
  
}

void loop()
{
  //LED and photoresistor part
  lightLevel = analogRead(sensorPin); //number can range between 0 (0 Volts) and 1023 (5 Volts)
 
  //temperature sensor
      float voltage, degreeC, degreeF;
      int hundredsplaceC, tensplaceC, onesplaceC,degreesC,hundredsplaceF, tensplaceF, onesplaceF,degreesF;
  
  voltage = getVoltage(temperaturePin);
  degreeC = (voltage - 0.5) * 100.0;   // converts the voltage to degrees Celsius. 
  degreesF = ((voltage - 0.5) * 100.0) * (9.0/5.0) + 32.0; // converts degrees Celsius to Fahrenheit.
  degreesC = (int) degreeC; //making degreesC into int form
  degreesF = (int) degreesF;//making degreesF into int form


/*
  setDigit(digit2Pin, temp % 10);
  temp /= 10;
  if (temp >= 1){
    setDigit(digit3Pin, temp % 10);
    temp /= 10;
    if (temp >= 1){
	setDigit(digit4Pin, temp % 10);
*/
  //Pulling individual values out of degreesC
  hundredsplaceC = degreesC / 100;
  tensplaceC = degreesC / 10;
  onesplaceC = degreesC % 10;
  
  //Pulling individual values out of degreesF
  hundredsplaceF = degreesF / 100;
  tensplaceF = degreesF / 10;
  onesplaceF = degreesF % 10;  
   
   
  digitalWrite(latchPin, LOW);  
  digitalWrite(latchPin, 0);
  if (tensplaceC==0) SegDisplay=ZERO; // Min value
  if (tensplaceC==1) SegDisplay=ONE;
  if (tensplaceC==2) SegDisplay=TWO;    
  if (tensplaceC==3) SegDisplay=THREE;    
  if (tensplaceC==4) SegDisplay=FOUR;    
  if (tensplaceC==5) SegDisplay=FIVE;    
  if (tensplaceC==6) SegDisplay=SIX;    
  if (tensplaceC==7) SegDisplay=SEVEN;    
  if (tensplaceC==8) SegDisplay=EIGHT;    
  if (tensplaceC==9) SegDisplay=NINE;    
     
  shiftOut(dataPin, clockPin, MSBFIRST, SegDisplay);    
  digitalWrite(latchPin, 1);
    digitalWrite(digit3Pin, HIGH);
    delay(100);
    digitalWrite(digit3Pin, LOW);

  digitalWrite(latchPin, LOW);  
  digitalWrite(latchPin, 0);
  if (onesplaceC==0) SegDisplay=ZERO; // Min value
  if (onesplaceC==1) SegDisplay=ONE;
  if (onesplaceC==2) SegDisplay=TWO;    
  if (onesplaceC==3) SegDisplay=THREE;    
  if (onesplaceC==4) SegDisplay=FOUR;    
  if (onesplaceC==5) SegDisplay=FIVE;    
  if (onesplaceC==6) SegDisplay=SIX;    
  if (onesplaceC==7) SegDisplay=SEVEN;    
  if (onesplaceC==8) SegDisplay=EIGHT;    
  if (onesplaceC==9) SegDisplay=NINE;    
     
  shiftOut(dataPin, clockPin, MSBFIRST, SegDisplay);    
  digitalWrite(latchPin, 1);
    digitalWrite(digit2Pin, HIGH);
    delay(100);
    digitalWrite(digit2Pin, LOW);  

  digitalWrite(latchPin, LOW);  
  digitalWrite(latchPin, 0);
  SegDisplay = CELSIUS;
  shiftOut(dataPin, clockPin, MSBFIRST, SegDisplay);    
  digitalWrite(latchPin, 1);
    digitalWrite(digit1Pin, HIGH);
    delay(1);
    digitalWrite(digit1Pin, LOW);  
/*
  Serial.print("  100: ");
  Serial.print(hundredsplaceC);
  Serial.print(  hundredsplaceF);  
  Serial.print("  10: ");
  Serial.print(tensplaceC);
  Serial.print(  tensplaceF);
  Serial.print("  1: ");
  Serial.print(onesplaceC); 
  Serial.print(  onesplaceF);
  Serial.print("  voltage: ");
  Serial.print(voltage);
  Serial.print("  deg C: ");
  Serial.print(degreesC);
  Serial.print("  deg F: ");
  Serial.println(degreesF);
  Serial.print("Lightlevel: ");
  Serial.println(lightLevel);
 */ 
  // These statements will print lines of data like this:
  // "voltage: 0.73 deg C: 22.75 deg F: 72.96 Lightlevel: 0-1023"
  delay(1000); // repeat once per second
}
float getVoltage(int pin)
{
    return (analogRead(pin) * 0.004882814);
}

Thanks for looking through my mess, hopefully someone can provide some insight onto why I am getting these issues!

In the below code I am trying to make my temperature sensor (and soon a light sensor) to go through a 16 pin shift register (SN74HC595N) to a 4 digit 7 segment led display and the correct temperature value in degrees C (and F later). I know my circuitry and pin values are correct because I made some basic code to check my display. However, I am having issues when controlling individual digits of my display, I can get them all to display the same number or character but not different ones.

I'm sorry but I don't understand what you are saying here.( "to go through")
Are you saying you want to display the temp on a 4digit- 7-segment display controlled by a shift register ?

Yes.

http://www.sweeting.org/mark/blog/2011/11/27/arduino-74hc595-shift-register-and-a-7-segment-led-display

http://www.sqlskills.com/blogs/paulselec/post/arduino-cascading-shift-registers-to-drive-7-segment-displays.aspx

http://forum.arduino.cc/index.php?topic=76883.0