 #define STROBEPIN 12
 
 void setup(void) {
+  uint8_t i;
   pinMode(SERDATAIN, OUTPUT);
   pinMode(SHIFTCLOCK, OUTPUT);
   pinMode(STROBEPIN, OUTPUT);
   pinMode(13, OUTPUT);
+  
+  for(i=0;i<8;i++) {
+     leds[i] = i;
+  }
+  
   return;
 }
 
 
 void loop(void) {
+  uint8_t current_byte;  
+  // loop 256 times with wrap
+  for (uint8_t outer=1;outer!=0;outer++) {
+    current_byte=0;
+    for (uint8_t inner=0;inner < 8;inner++) {
+      if (leds[inner] >= outer) {
+        current_byte |= _BV(inner);
+      } else {
+        current_byte &= ~_BV(inner);
+      } /* if leds are to show */   
+    }   /* inner 8 values to compare */
+    clockout(current_byte);
+  }     /* outer loop for 256 values */
+  mil=millis();
+  update_values();
+}
+
+void update_led1() {
+  // leds[0]
+}
+void update_led2() {
+  // leds[1]
+}
+void update_led3() {
+  // leds[2]
+}
+void update_led4() {
+  leds[3]++;
+}
+void update_led5() {
+  // leds[4];
+}
+void update_led6() {
+}
+void update_led7() {
+   if ((mil % 20) == 0) leds[5]--;    
+}
+void update_led8() {
+   if ((mil % 20) == 0) leds[4]++;
+}
+
+void
+update_values() {
+  update_led1();
+  update_led2();
+  update_led3();
+  update_led4();
+  update_led5();
+  update_led6();
+  update_led7();
+  update_led8();
+}
+
+void unused(void) {
   uint8_t value = 0, overall = 0;
   unsigned long now;
 


  return;
}
/* SAMPLE
clockout(255);
digitalWrite(13,HIGH);
delay(1000);
*/

void clockout(uint8_t data) {
  uint8_t loop, pin = 1;

#define MYDELAY 500

void clockout(uint8_t);
void update_values();

uint8_t leds[8];
unsigned long mil;

/* pin11 goes to 595 pin 11 */
#define SHIFTCLOCK 11
