//Developed By-Sumit Kumar
//[email protected]
#define A 2
#define B 4
#define C 5
#define D 21
#define E 19
#define F 22
#define G 23
int code[10][7] = {
{A, B, C, D, E, F},
{B, C},
{A, B, D, E, G},
{A, B, C, D, G},
{B, C, F, G},
{A, C, D, F, G},
{A, C, D, E, F, G},
{A, B, C},
{A, B, C, D, E, F, G},
{A, B, C, D, F, G}
};
void setup() {
Serial.begin(115200);
for (int i = A; i <= G; i++) {
pinMode(i, OUTPUT);
}
}
void loop() {
for (int d = 9; d >= 0; d--) {
for (int i = 0; i < 7; i++) {
digitalWrite(code[d][i], LOW);
}
delay(1000);
for (int k = A; k <= G; k++) {
digitalWrite(k, HIGH);
}
delay(500);
}
Serial.print("done");//this prints done to check when everything has
//been printed
}