int led = 2;
int button = 33;
void setup() {
pinMode (led, OUTPUT);
pinMode (button, INPUT);
}
void loop() {
if (digitalRead (button)==HIGH)
{
digitalWrite (led, HIGH);
delay (100);
}
else
{
digitalWrite (led,LOW);
delay (100);
}
}
int led = 2;
int button = 33;
void setup() {
pinMode (led, OUTPUT);
pinMode (button, INPUT);
}
void loop() {
if (digitalRead (button)==HIGH)
{
digitalWrite (led, HIGH);
delay (100);
}
else
{
digitalWrite (led,LOW);
delay (100);
}
}