int led = 19;
int button = 5;
void setup() {
pinMode(led, OUTPUT);
pinMode(button, INPUT);
}
void loop()
{
if (digitalRead(button)==HIGH)
{
digitalWrite(led,HIGH);
}
else
{
digitalWrite(led,LOW);
}
}
int led = 19;
int button = 5;
void setup() {
pinMode(led, OUTPUT);
pinMode(button, INPUT);
}
void loop()
{
if (digitalRead(button)==HIGH)
{
digitalWrite(led,HIGH);
}
else
{
digitalWrite(led,LOW);
}
}