1 /* SuperCar like pattern with a shift register.
2 Note: first bit/LED is supposed to be 0 and not 7
3 as in many arduino example sketches.
5 Turning on the outputs of a 74HC595 using an array
8 * 74HC595 shift register
9 * LEDs attached to each of the outputs of the shift register
12 int clockPin = 12; //IC Pin 11, Yellow Jumper
13 int dataPin = 11; //IC Pin 14, Blue Jumper
14 int latchPin = 8; //IC Pin 12, Green Jumper
34 int count = sizeof(patterns) / 2;
37 pinMode(latchPin, OUTPUT);
38 pinMode(clockPin, OUTPUT);
39 pinMode(dataPin, OUTPUT);
43 digitalWrite(latchPin, LOW);
44 shiftOut(dataPin, clockPin, MSBFIRST, patterns[index * 2]);
45 digitalWrite(latchPin, HIGH);
46 delay(patterns[(index * 2) + 1]);