Created
April 18, 2014 02:40
-
-
Save ryanmr/11022096 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
/* | |
Use ifupdown.com/putnam/generator.html | |
to generate a matrix and global values. | |
Then paste that generated code here. | |
*/ | |
void loop() { | |
int WIDTH = (LETTERS - 1) * RANGE; | |
int position = 0; | |
for (position = 0; position < WIDTH; position++) { | |
int refresh = 0; | |
for (refresh = 0; refresh < REFRESH_END; refresh++) { | |
for (int letter = 0; letter < LETTERS; letter++) { | |
int a = 0, b = 0; | |
for (a = 2; a < 11; a++) { | |
digitalWrite(a, LOW); | |
} | |
for (b = BASE_PIN; b < (BASE_PIN + RANGE); b++) { | |
digitalWrite(b, HIGH); | |
} | |
digitalWrite(2 + letter, HIGH); | |
for (int i = 0; i < RANGE; i++) { | |
int p = (letter * RANGE) + i; | |
if ( matrix[p] != 0 ) { | |
digitalWrite(BASE_PIN + write_out, LOW); | |
} | |
write_out++; | |
} | |
delay(1); | |
digitalWrite(2 + letter, LOW); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment