Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* First Pin is Bottom Right
- * Second Pin is Top Right
- * Thrid Pin is Top Mid
- * Fourth Pin is Mid
- * Fifth Pin is Top Left
- * Sixth Pin is Dot
- * Seventh Pin is Bottom Left
- * Eighth Pin is Bottom Mid
- */
- /*
- * LED NUMBER CODE
- * By: Grant Morgan
- */
- const int SER=8;
- const int LATCH=9;
- const int CLK=10;
- int seq[]={215,3,206,143,27,159,221,7,223,159};
- void setup()
- {
- pinMode(LATCH, OUTPUT);
- pinMode(SER, OUTPUT);
- pinMode(CLK,OUTPUT);
- digitalWrite(LATCH, LOW);
- shiftOut(SER,CLK, MSBFIRST, B11111111);
- digitalWrite(LATCH, HIGH);
- delay(50);
- digitalWrite(LATCH, LOW);
- shiftOut(SER,CLK, MSBFIRST, B00000000);
- digitalWrite(LATCH, HIGH);
- }
- void loop()
- {
- for (int i=0;i<11;i++)
- {
- digitalWrite(LATCH, LOW);
- shiftOut(SER,CLK, MSBFIRST,seq[i]);
- digitalWrite(LATCH, HIGH);
- delay(500);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement