Created
October 11, 2018 21:24
-
-
Save WyriHaximus/aa2c658ab69e2b97efae569cfa731dd5 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 segA = 9; // top | |
int segB = 8; // right-top | |
int segC = 7; // middle | |
int segD = 6; // left-top | |
int segE = 5; // left-bottom | |
int segF = 4; // bottom | |
int segG = 3; // right-bottom | |
const int MY_PINS[8] = { | |
segA, segB, segC, segD, segE, segF, segG, | |
}; | |
const byte SENTENCE[15][8] = { | |
{LOW, LOW, LOW, LOW, LOW, LOW, LOW}, | |
{LOW, LOW, LOW, HIGH, HIGH, LOW, LOW}, | |
{LOW, LOW, LOW, LOW, LOW, LOW, LOW}, | |
{LOW, LOW, LOW, HIGH, HIGH, HIGH, LOW}, | |
{HIGH, HIGH, LOW, HIGH, HIGH, HIGH, HIGH}, | |
{LOW, LOW, LOW, LOW, HIGH, HIGH, HIGH}, | |
{HIGH, LOW, HIGH, HIGH, HIGH, HIGH, LOW}, | |
{LOW, LOW, LOW, LOW, LOW, LOW, LOW}, | |
{LOW, HIGH, LOW, HIGH, HIGH, HIGH, HIGH}, | |
{LOW, LOW, LOW, LOW, LOW, LOW, LOW}, | |
{LOW, HIGH, LOW, HIGH, HIGH, HIGH, HIGH}, | |
{LOW, LOW, LOW, LOW, LOW, LOW, LOW}, | |
{LOW, HIGH, LOW, HIGH, HIGH, HIGH, HIGH}, | |
{LOW, LOW, LOW, LOW, LOW, LOW, LOW}, | |
{LOW, LOW, LOW, LOW, LOW, LOW, LOW}, | |
}; | |
void setup() { | |
for (int i = 3; i <= 9; i++) { | |
pinMode(i, OUTPUT); | |
} | |
} | |
void loop() { | |
for (int i = 0; i < 15; i++) { | |
delay(1000); | |
for (int j = 0; j < 8; j++) { | |
digitalWrite(MY_PINS[j], SENTENCE[i][j]); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment