Created
September 13, 2010 03:32
-
-
Save skreuzer/576763 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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