int i,k;
void setup() {
for(i=2;i<=8;i++)
{
pinMode(i, OUTPUT);
}
}
void loop() {
k=0x3f;//0
for(i=2;i<=8;i++)
{
digitalWrite(i,bitRead(k,i-2));
}
delay(1000);
k=0x06;//1
for(int i=2;i<=8;i++)
{
digitalWrite(i,bitRead(k,i-2));
}
delay(1000);
k=0x5B;//2
for(int i=2;i<=8;i++)
{
digitalWrite(i,bitRead(k,i-2));
}
delay(1000);
k=0x4F;//3
for(int i=2;i<=8;i++)
{
digitalWrite(i,bitRead(k,i-2));
}
delay(1000);
k=0x66;//4
for(int i=2;i<=8;i++)
{
digitalWrite(i,bitRead(k,i-2));
}
delay(1000);
k=0x6D;//5
for(int i=2;i<=8;i++)
{
digitalWrite(i,bitRead(k,i-2));
}
delay(1000);
k=0x7D;//6
for(int i=2;i<=8;i++)
{
digitalWrite(i,bitRead(k,i-2));
}
delay(1000);
k=0x07;//7
for(int i=2;i<=8;i++)
{
digitalWrite(i,bitRead(k,i-2));
}
delay(1000);
k=0x7F;//8
for(int i=2;i<=8;i++)
{
digitalWrite(i,bitRead(k,i-2));
}
delay(1000);
k=0x6F;//9
for(int i=2;i<=8;i++)
{
digitalWrite(i,bitRead(k,i-2));
}
delay(1000);
k=0x77;//A
for(int i=2;i<=8;i++)
{
digitalWrite(i,bitRead(k,i-2));
}
delay(1000);
k=0x7C;//b
for(int i=2;i<=8;i++)
{
digitalWrite(i,bitRead(k,i-2));
}
delay(1000);
k=0x39;//C
for(int i=2;i<=8;i++)
{
digitalWrite(i,bitRead(k,i-2));
}
delay(1000);
k=0x5E;//d
for(int i=2;i<=8;i++)
{
digitalWrite(i,bitRead(k,i-2));
}
delay(1000);
k=0x79;//E
for(int i=2;i<=8;i++)
{
digitalWrite(i,bitRead(k,i-2));
}
delay(1000);
k=0x71;//F
for(int i=2;i<=8;i++)
{
digitalWrite(i,bitRead(k,i-2));
}
delay(1000);
}