// By Nissanka MD COTM
#define pinDp 2
#define pinC 3
#define pinD 4
#define pinE 5
#define pinG 6
#define pinF 7
#define pinA 8
#define pinB 9
bool A;
bool B;
bool C;
bool D;
bool E;
bool F;
bool G;
bool Dp;
void writeDisplay(){
digitalWrite(pinA,A);
digitalWrite(pinB,B);
digitalWrite(pinC,C);
digitalWrite(pinD,D);
digitalWrite(pinE,E);
digitalWrite(pinF,F);
digitalWrite(pinG,G);
digitalWrite(pinDp,Dp);
}
void allOff(){
A=LOW;
B=LOW;
C=LOW;
D=LOW;
E=LOW;
F=LOW;
G=LOW;
Dp=LOW;
//writeDisplay();
}
void allOn(){
A=HIGH;
B=HIGH;
C=HIGH;
D=HIGH;
E=HIGH;
F=HIGH;
G=HIGH;
Dp=HIGH;
//writeDisplay();
}
void allOnWrite(){
allOn();
writeDisplay();
}
void allOffWrite(){
allOff();
writeDisplay();
}
void one(){
allOff();
B=HIGH;
C=HIGH;
writeDisplay();
}
void three(){
allOn();
E=LOW;
F=LOW;
writeDisplay();
}
void setup() {
for (int i=2; i<10; i++){
pinMode(i,OUTPUT);
}
}
void loop() {
// put your main code here, to run repeatedly:
three();
delay(1500);
one();
delay(1500);
}