blob: aac559fbc0bc38601b36379122608808275d8d52 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
int sensorPin = 12; // Declare the push-button
int sensorValue = 0;
void setup() {
Serial.begin(9600);
pinMode(sensorPin, INPUT); // declare the sensorPin as an INPUT
for (int i = 0; i < 1000;i++){
sensorValue = digitalRead(sensorPin); // read push-button value
Serial.println(sensorValue); // print it at the Serial Monitor
}
}
void loop() {
}
|