Untitled
unknown
plain_text
a year ago
332 B
7
Indexable
int br;
unsigned long ms;
volatile bool ispis;
void setup() {
br = 1;
Serial.begin(9600);
pinMode(2,INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(2),tipka,RISING);
}
void tipka() {
ispis = true;
}
void loop() {
br = br<6 ? br+1 : 1;
if(ispis) {
ispis = false;
Serial.println(br);
}
}Editor is loading...
Leave a Comment