PWM - Peltier working code

I still had bugs in the display, but finaly worked them out.
Heres the code and pic , take a look and comment.

/*
4 - 10k resistors

2 - TMP36 - temperature sensor - 5volt
For more details on this circuit: http://tinyurl.com/c89tvd
I used a 10k ohm resistor on Vout to-> ground to protect the arduino pin

1 - Serial 7 Segment Display Sparkfun Datasheet - 3.3volt
https://github.com/sparkfun/Serial7SegmentDisplay/wiki/Serial-7-Segment-Display-Datasheet

1 - MOSFET RFP30N06LE or RFP30N06L
http://bildr.org/2012/03/rfp30n06le-arduino/

1 - TEC1-12709 - Sealed Peltier - 12volt
maxVolts - 15.4
maxAmps  - 9
maxWatts - 138.6

1 - Pushbutton - 5volt 
http://arduino.cc/en/Tutorial/Button

#include <LiquidCrystal.h>
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);    // nuelectronics lcd-shield v1.1

int numCols = 16;
int numRows = 2;
/*

/* This is a simple program to test the 4 diget Sparkfun 7 segment serial LED display */
#include <SoftwareSerial.h>

#define rxPin 255 // 255 because we don't need a receive pin
// Connect the Arduino pin 3 to the rx pin on the 7 segment display
#define txPin 3

// set up a new serial port
SoftwareSerial LEDserial=SoftwareSerial(rxPin, txPin);

#define ARY_LEN(a) (sizeof(a)/sizeof(a[0]))

/* Pin 3 for display- delay only, 
   Pin 8 for CoolDown- delay only,
   Pin 5 PWM Peltier- full function */
const int PWM_pin[]                = { 3,   8,    5   };   // Pin numbers used
const unsigned long Fade_delayMs[] = {1000, 1000, 80  };
const int Fade_start[]             = { 175, 175,  250 }; // This can be 0 to 254
const int Fade_end[]               = { 255, 255,  255 }; // this can be PWMstart+1..255
const int Fade_step[]              = { 1,   1,    1   };
unsigned int Fade_direction[]      = { +1,  +1,   +1  };  // Fade direction for each pin
int Fade_value[]                   = {  0,   0,   0   }; 
unsigned long Fade_prevMillis[]    = {  0,   0,   0   };
unsigned long currentMillis;

/* TMP36 temperature sensor on Analog-in A0 & A1 Pin's */
int temperaturePin = 0; // Hot sensor
int temperaturePin2 = 1; // Cold sensor
/* Temp Logic veriables */
float temperature = 0;
int nexttempPin = 0;
int StartCooldown = 0;
int tempSet;

/* Push Button values */
const int buttonPin = 2;     // the number of the pushbutton pin
unsigned int currentTemp = 2; // controles, 1 = celcius, 2 = farenheit
int buttonState = 0;         // variable for reading the pushbutton status

void CheckTemp() {
 temperature = getVoltage(temperaturePin);
 temperature = (((temperature - .5) * 100)*1.8) + 32;
}
/* Over temperature protection */
void CoolDown() {
 CheckTemp();
 if (temperature <= 80) StartCooldown = 0;
}

void pwmOut(int fadeNum, int value) {
 CheckTemp();
 if (temperature >= 100) {
  analogWrite(5, 0);
  StartCooldown = 1;
 }
  else if (temperature >= 95) {
  analogWrite(5, 0);
 }
  else {
  analogWrite(PWM_pin[fadeNum], value); 
 } 
}

/* to run a simulation  
void lcdOut(int fadeNum, int value) {
    int col, row;
    if (fadeNum <= 3) {
        row = 0;
        col = fadeNum * 4;
    }
    else {
        row = 1;
        col = (fadeNum - 4) * 4;
    }
    lcd.setCursor(col, row);
    lcd.print("    ");
    lcd.setCursor(col, row);
    lcd.print(value, DEC);
}
*/

/* 4 diget, 7-segment serial display, SparkFun 
 Set as PWM_pin 3 to only use an ajustable 1000ms delay and not fading part of the method */
void LEDdisplay() {
 
 LEDserial.print('v'); // this is the reset display command
 
 if (nexttempPin == temperaturePin) nexttempPin = temperaturePin2;
 else nexttempPin = temperaturePin;  
 
 temperature = getVoltage(nexttempPin);  //getting the voltage reading from the temperature sensor
 
 if (currentTemp == 1) temperature = (temperature - .5) * 100; 
 else temperature = (((temperature - .5) * 100)*1.8) + 32; 
  
 LEDserial.print('w'); // send the command char for decimal control 
 temperature += 0.001f; // ensure hundredth place
 
 if (temperature < 100 && temperature >= 0
  || temperature > -10 && temperature <=  0){
  if (nexttempPin == temperaturePin2) LEDserial.write(0b00100010);
  else LEDserial.write(0b00000010);
  tempSet = int(temperature*100);
 } 
 else if (temperature >= 100 && temperature <= 1000 
       || temperature <= -10 && temperature >= -100) {
  if (nexttempPin == temperaturePin) LEDserial.write(0b00000100);
  else LEDserial.write(0b00100100); // turn on apostrophe for temp 2 
  tempSet = int(temperature*10);
 }
 else { // some error
  LEDserial.write(0b00111111);
  tempSet = 9999;  
 }
 // 4 place format to fix absent diget alignment.
 if(tempSet<10 && tempSet>=0) LEDserial.print("000");
 else if(tempSet<100&&tempSet>=10) LEDserial.print("00");
 else if(tempSet<1000&&tempSet>=100) LEDserial.print("0");
 else if(tempSet<0 &&tempSet>-10) LEDserial.print("--");
 else if(tempSet>-100&&tempSet<=-10) LEDserial.print("-");
  
 LEDserial.print(tempSet);
}

/* converting from a 0 to 1023 digital range 
 to 0 to 5 volts (each 1 reading equals ~ 5 millivolts */
float getVoltage(int pin) {
 return (analogRead(pin) * .004882814);                                       
}

void Fade_outFunc(int fadeNum, int value) {
  // run one or both output functions...
  //lcdOut(fadeNum, value);
  if (StartCooldown == 0 && PWM_pin[fadeNum] == 5) 
  pwmOut(fadeNum, value);
  
  if (StartCooldown == 1 && PWM_pin[fadeNum] == 8) 
  CoolDown();
  
  if (PWM_pin[fadeNum] == 3) 
  LEDdisplay();
}


void setup() {
  //lcd.begin(numCols, numRows);
  //lcd.clear();
  
  // 4 diget, 7-segment serial display, SparkFun
  pinMode(txPin, OUTPUT);
  LEDserial.begin(9600);
  
  // Fade & delay
  for (unsigned int i = 0; i < ARY_LEN(PWM_pin); i++){
    Fade_value[i] = Fade_start[i];
    Fade_outFunc(i, Fade_value[i]);
  }
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin, INPUT);
}


void Fade_run(int fadeNum) {
  currentMillis = millis();
  if(currentMillis - Fade_prevMillis[fadeNum] > Fade_delayMs[fadeNum]) {
    Fade_prevMillis[fadeNum] = currentMillis;

    Fade_value[fadeNum] += Fade_direction[fadeNum] * Fade_step[fadeNum];
    if (Fade_value[fadeNum] >= Fade_end[fadeNum]) {
      Fade_value[fadeNum] = Fade_end[fadeNum];
      Fade_direction[fadeNum] = -Fade_direction[fadeNum];
    }
    else if (Fade_value[fadeNum] <= Fade_start[fadeNum]) {
      Fade_value[fadeNum] = Fade_start[fadeNum];
      Fade_direction[fadeNum] = -Fade_direction[fadeNum];
    }
    Fade_outFunc(fadeNum, Fade_value[fadeNum]);
  }
}

void loop() {
 /* Push Button */
 buttonState = digitalRead(buttonPin);
 if (buttonState == HIGH && currentTemp == 2) currentTemp = 1;  
 else if (buttonState == HIGH && currentTemp == 1) currentTemp = 2;

 /* Fade & Delay Loop */
 for (unsigned int i = 0; i < ARY_LEN(PWM_pin); i++) 
 Fade_run(i);
}