 }
  
 //writes the temperature on display
+// This function must be called cont. from loop() in order to keep display, well displaying... :-)
 void updateDisp(){
-  for(byte j=0; j<4; j++)  
+  // Run a Loop to Update each Display Character
+  for(byte j=0; j<4; j++){
+    // Turn Digit Off
     digitalWrite(digitPins[j], LOW);
- 
+  // Bring Latch Pin (to Shift Reg) Low to Signal Incoming Data.
   digitalWrite(latchPin, LOW);  
+  // Shift Out an All True Byte Pattern to Clear the Buffer.
   shiftOut(dataPin, clockPin, MSBFIRST, B11111111);
+  // Bring Latch Pin(to Shift Reg) High to Signal Data Transmission Complete.
   digitalWrite(latchPin, HIGH);
- 
+  // Delay for 100 Microseconds
   delayMicroseconds(100);
+  // Turn Digit On
   digitalWrite(digitPins[digitScan], HIGH); 
- 
-  digitalWrite(latchPin, LOW);  
-  if(digitScan==2)
+  // Bring Latch Pin (to Shift Reg) Low to Signal Incoming Data
+  digitalWrite(latchPin, LOW);
+  // Digit Scan ranges 0-3. Use this condition to place the Decimal Point
+  if(digitScan==2){
     shiftOut(dataPin, clockPin, MSBFIRST, ~(digit[digitBuffer[digitScan]] | B10000000)); //print the decimal point on the 3rd digit
-  else
+  }else{
     shiftOut(dataPin, clockPin, MSBFIRST, ~digit[digitBuffer[digitScan]]);
- 
+  }
+  // Bring Latch Pin (to Shift Reg) High to Signal Data Transmission Complete.
   digitalWrite(latchPin, HIGH);
+  // Increment DigitScan for next loop.
   digitScan++;
-  if(digitScan>3) digitScan=0; 
+  // Check if we need to reset the DigitScan var to 0
+  if(digitScan>3){ digitScan=0; }
+  }
 }
  
-void loop(){ 
-  digitBuffer[3] = 1;
-  digitBuffer[2] = 1;
-  digitBuffer[1] = 1;
-  digitBuffer[0] = 1;
-  updateDisp();
-  delay(2);
+void loop(){
+  for(int z=0;z<39;z++){
+    digitBuffer[3] = digit[z];
+    digitBuffer[2] = digit[z];
+    digitBuffer[1] = digit[z];
+    digitBuffer[0] = digit[z];
+    updateDisp();
+    delay(2);
+  }
 }

  B01111101, //6
  B00000111, //7
  B01111111, //8
  B01101111  //9
};
int digitBuffer[4] = {
  0};
int digitScan = 0;
 
void setup(){                

 * Created by Rui Santos, http://randomnerdtutorials.com
*/

const int digitPins[4] = {4,5,6,7};                 //4 common anode pins of the display
//const int clockPin = 11;    //74HC595 Pin 11
#define clockPin 11
//const int latchPin = 12;    //74HC595 Pin 12
#define latchPin 12
//const int dataPin = 13;     //74HC595 Pin 14
#define dataPin 13
const byte digit[38] =      //seven segment digits in bits
{
  B00111111, //0
  B00000110, //1
