int Led = 9 ;
int tombolApin = 8 ;
int tombolBpin = 7 ;
byte led = 0 ;
void setup ()
{
pinMode(led, OUTPUT);
pinMode(tombolApin, INPUT_PULLUP);
pinMode(tombolBpin, INPUT_PULLUP);
}
void loop ()
{
if (digitalRead(tombolApin) == LOW)
{
digitalWrite(Led, HIGH);
}
if (digitalRead(tombolBpin) == LOW)
{
digitalWrite(Led, LOW);
}
}