Skip to content

Instantly share code, notes, and snippets.

@skreuzer
Created September 13, 2010 03:32
Show Gist options
  • Save skreuzer/576763 to your computer and use it in GitHub Desktop.
Save skreuzer/576763 to your computer and use it in GitHub Desktop.
int latchPin = 8;
int clockPin = 12;
int dataPin = 11;
int number[] = {63, 6, 91, 79, 102, 109, 124, 7, 127, 103};
void setup() {
//set pins to output so you can control the shift register
pinMode(latchPin, OUTPUT);
pinMode(clockPin, OUTPUT);
pinMode(dataPin, OUTPUT);
}
void loop() {
for(int x = 0; x <= 9; x++)
{
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, number[x]);
digitalWrite(latchPin, HIGH);
delay(1000);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment