//progam menyalakan dan mematikan lampu dengan pushbotton 
//by Febby_Liyanna

int tombol1;
int tombol2;
int tombol3_off;
int lampu1 = 2;
int lampu2 = 4;

void setup() {
  pinMode(lampu1, OUTPUT);
  pinMode(lampu2, OUTPUT);
  pinMode(18, INPUT_PULLUP);
  pinMode(19, INPUT_PULLUP);
  pinMode(21, INPUT_PULLUP);
}

void loop() {
  tombol1 = digitalRead(18);
  if (tombol1 == 0){
    digitalWrite(lampu1, HIGH);
  }
  tombol2 = digitalRead(19);
  if (tombol2 == 0){
    digitalWrite(lampu2, HIGH);
  }
  tombol3_off = digitalRead(21);
  if (tombol3_off == 0){
    digitalWrite(lampu1, LOW);
    digitalWrite(lampu2, LOW);
  }
}