// 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
void setup() {
// put your setup code here, to run once:
for(int i=2; i<10; i++)
{
pinMode(i, OUTPUT);
//digitalWrite(i, HIGH);
//delay(2000);
}
}
void loop() {
// put your main code here, to run repeatedly:
//Diplay 1
one();
delay(1000);
two();
delay(1000);
three();
delay(1000);
}
void allOff()
{
for(int i=2; i<10; i++)
{
digitalWrite(i, LOW);
}
}
void allOn()
{
for(int i=2; i<10; i++)
{
digitalWrite(i, HIGH);
}
}
void one()
{
allOff();
digitalWrite(PinB, HIGH);
digitalWrite(PinC, HIGH);
}
void two()
{
allOn();
digitalWrite(PinF, LOW);
digitalWrite(PinC, LOW);
}
void three()
{
allOn();
digitalWrite(PinF, LOW);
digitalWrite(PinE, LOW);
}