int LED1 = 2;
int button = 3;
int statusButton = 0;
void setup() {
Serial.begin(9600);
pinMode(LED1,OUTPUT);
pinMode(button, INPUT);
// put your setup code here, to run once:
}
void loop() {
statusButton=digitalRead(button);
if(statusButton==HIGH){
digitalWrite(LED1, HIGH);
}else
digitalWrite(LED1, LOW);
// put your main code here, to run repeatedly:
}