int LED=9;
int BOTAO=8;
void setup()
{
pinMode(LED,OUTPUT);
pinMode(BOTAO,INPUT_PULLUP);
}
void loop()
{
if (digitalRead(BOTAO) == LOW)
{
digitalWrite(LED, HIGH);
}
else
{
digitalWrite(LED, LOW);
}
}