   pinMode(latchPin, OUTPUT);
   pinMode(dataPin, OUTPUT);
   pinMode(clockPin, OUTPUT);
+  pinMode(lightPin, INPUT);
+  Serial.begin(9600);
 }
 
 void updateShiftRegister()

int latchPin = 5;
int clockPin = 6;
int dataPin = 4;

byte leds = 0;


{
  leds = 0;
  updateShiftRegister();
  /* delay(500); */
  for (int i = 0; i < map(analogRead(lightPin), 40, 115, 0, 7); i++)
  {
    bitSet(leds, i);
    updateShiftRegister();
  }
}

