Skip to content

Commit 06b53c1

Browse files
author
Zekeriya AY
authored
Update and rename buton.ino to button.ino
1 parent 25228e9 commit 06b53c1

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

buton.ino

-15
This file was deleted.

button.ino

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const int button = 3; // BUTTON PIN
2+
int counter = 0;
3+
int state = LOW;
4+
5+
void setup() {
6+
pinMode(button, INPUT);
7+
Serial.begin(9600);
8+
}
9+
void loop() {
10+
state = digitalRead(button);
11+
if (state == HIGH) {
12+
counter++;
13+
Serial.println(counter);
14+
}
15+
}

0 commit comments

Comments
 (0)