int button=0;
void setup() {
Serial.begin(9600);
pinMode(button, INPUT);
// pinMode(button, INPUT_PULLUP);
}
int a=0;
int b=0;
void loop() {
int raqam = digitalRead(button);
if (raqam==1){
if (b==1){
a=a+1;
}
b=0;
}else{
b=1;
};
Serial.println(a);
}