/*
B00111111, B00000110, B01011011,
B01001111, B01100110, B01101101,
B01111101, B00000111, B01111111, B01101111
*/
int binary_number_desplay[] = {
B00111111, B00000110, B01011011,
B01001111, B01100110, B01101101,
B01111101, B00000111, B01111111, B01101111};
void setup()
{
DDRD |= 0xFF;
DDRB |= 0xFF;
}
void loop()
{
for (int i = 0; i <= 9; i++)
{
PORTB = 0b00101111;
PORTD = binary_number_desplay[i];
delay(200);
}
for (int j = 1; j <= 9; j++)
{
for (int i = 0; i <= 9; i++)
{
PORTB = 0b00011111;
PORTD = binary_number_desplay[j];
delay(300);
PORTB = 0b00101111;
PORTD = binary_number_desplay[i];
delay(300);
}}}