int Button =2;
int Button_state=0;
void setup() {
Serial.begin(9600);
pinMode(Button, INPUT_PULLUP);
}
void loop() {
Button_state=digitalRead(Button);
Serial.println(Button_state);
delay(2000);
}
int Button =2;
int Button_state=0;
void setup() {
Serial.begin(9600);
pinMode(Button, INPUT_PULLUP);
}
void loop() {
Button_state=digitalRead(Button);
Serial.println(Button_state);
delay(2000);
}