int mass[]={
0b11111100,
0b01100000,
0b11011010,
0b11110010,
0b01100110,
0b10110110,
0b10111110,
0b11100000,
0b11111110,
0b11110110
};
bool GO=true;//пауза для основго счета
unsigned long TimeForChislo;
int a=0;
bool current_condit_button;//переменная которая будет хранить СЧИТЫВАЕМОЕ состояние кнопки
bool last_condit_button=true;//переменная с предыдущим состоянием кнопки
unsigned long lastTime;//время для задержки в кнопке
unsigned long interval=1000;//интервал задержки
void setup() {
DDRD=254;
DDRB = 0 << 2;
//PORTD |= (1 << 0);//ставит HIGH в 0-бит регистра(D)
}
void loop() {
current_condit_button=(PINB>>2);
if(current_condit_button==0 && last_condit_button==1){
if(millis()-lastTime>interval){
PORTD |= (1 << 0);//PORTD=mass[a]+1;
GO=!GO;
lastTime=millis();
}
}
last_condit_button=current_condit_button;
if(GO==true){
if(millis()-TimeForChislo>1000){
if(a<10){
PORTD=mass[a];
a++;
}else if(a==10){
a=0;
}
TimeForChislo=millis();
}
}
}