const int led = 13;
const int btn = 7;
int nilai = LOW;

void setup() {
  pinMode(btn, INPUT);
  pinMode(led, OUTPUT);
  Serial.begin(9600);
}

void loop(){
  nilai = digitalRead(btn);
  digitalWrite(led, nilai);
  Serial.println(nilai);
}