#define led 7
#define button 4
int val=0;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(led, OUTPUT);
pinMode(button, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
val=digitalRead(button);
digitalWrite(led,val);
Serial.println(val);
delay(100);
}