void setup() {
pinMode(A5, OUTPUT);
pinMode(A4, OUTPUT);
pinMode(A3, OUTPUT);
attachInterrupt(digitalPinToInterrupt(2), prerusenie,CHANGE);
pinMode(2, INPUT_PULLUP);
}
void loop() {
digitalWrite(A5, HIGH);
delay(500);
digitalWrite(A5, LOW);
delay(500);
digitalWrite(A4, HIGH);
delay(500);
digitalWrite(A4, LOW);
delay(500);
digitalWrite(A3, HIGH);
delay(500);
digitalWrite(A3, LOW);
delay(500);
}
void prerusenie(){
digitalWrite(A4, HIGH);
delay(200);
digitalWrite(A4, LOW);
delay(200);
digitalWrite(A4, HIGH);
delay(200);
digitalWrite(A4, LOW);
delay(200);
}