 
 void setup()
 {
-  Serial.begin(9600);
-  Serial.println();
-  
+  //Serial.begin(9600);
+  //Serial.println();
+
+  pinMode(ledPin, OUTPUT);
+  pinMode(hackPin, OUTPUT);
   pinMode(outputDisabledPin, OUTPUT);
   pinMode(registerClockPin, OUTPUT);  
   pinMode(whichSegmentData, OUTPUT);
   pinMode(segmentShiftRegisterClockPin, OUTPUT);  
   pinMode(whichDigitData, OUTPUT);
-  pinMode(shiftRegisterClockPin, OUTPUT);
+  pinMode(digitShiftRegisterClockPin, OUTPUT);
 
   digitalWrite(outputDisabledPin, LOW);
+  digitalWrite(registerClockPin, LOW);
+  digitalWrite(whichSegmentData, LOW);
+  digitalWrite(segmentShiftRegisterClockPin, LOW);
+  digitalWrite(whichDigitData, LOW);
+  digitalWrite(digitShiftRegisterClockPin, LOW);
+  
+  //shiftOut(whichSegmentData, segmentShiftRegisterClockPin, MSBFIRST, 255);
+  //shiftOut(whichDigitData, digitShiftRegisterClockPin, MSBFIRST, 0);
+  //digitalWrite(registerClockPin, HIGH);
+  //digitalWrite(registerClockPin, LOW);
 
-  writeValue(0, 0);
-  valueToDisplay = 0;
+  valueToDisplay = 1234;
+  writeValue(0, valueToDisplay);
+}
+
+bool toggle = false;
+unsigned long lastToggle = 0;
+
+void loop2()
+{
+  unsigned long now = millis();
+
+  if (now - lastToggle > 3000)
+  {
+    toggle = !toggle;
+    lastToggle = now;
+  }
+
+  unsigned long pinValue = toggle ? HIGH : LOW;
+  digitalWrite(ledPin, pinValue);
+  digitalWrite(hackPin, pinValue);
+  //digitalWrite(registerClockPin, pinValue);
+  //digitalWrite(whichSegmentData, pinValue);
+  //digitalWrite(segmentShiftRegisterClockPin, pinValue);
+  //digitalWrite(whichDigitData, pinValue);
+  //digitalWrite(digitShiftRegisterClockPin, pinValue);
 }
 
 void loop()
 {
-  // Arduino pow function is approximage and sometimes will end up rounding down when casting to int
+  // Arduino pow function is approximate and sometimes will end up rounding down when casting to int
   int place = pow(10, 3 - segmentIndex) + 0.5f;
   int segmentValue = (valueToDisplay / place) % 10;
 

#include <arduino.h>

// shared pins
int outputDisabledPin = 9;
int registerClockPin = 10;

// segment pins
int whichSegmentData = 2; 
int segmentShiftRegisterClockPin = 4;

// digit pins
int whichDigitData = 11;
int shiftRegisterClockPin = 12;

const int segTop = (1 << 0);
const int segDot = (1 << 1);
const int segMiddle = (1 << 2);
const int segBottomRight = (1 << 3);
const int segBottomLeft = (1 << 4);
const int segBottom = (1 << 5);
const int segTopLeft = (1 << 6);
const int segTopRight = (1 << 7);

byte segmentIndex = 0;
int valueToDisplay = 0;

  unsigned long now = millis();
  if (now > lastIncrement + 20)
  {
    valueToDisplay = (valueToDisplay + 1) % 10000;
    lastIncrement = now;
  }

  digitalWrite(ledPin, (now % 200 == 0) ? HIGH : LOW);
}

void writeValue(byte digit, byte value)
