int red = 13;
int green = 12;
int buttom = 11;
int buttonState = 0;
void setup() {
pinMode(red, OUTPUT);
pinMode(green, OUTPUT);
pinMode(buttom, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
buttonState = digitalRead(buttom);
if (buttonState == 1)
{
digitalWrite(red, HIGH);
digitalWrite(green, HIGH);
}
else if (buttonState == 0)
{
digitalWrite(red, LOW);
digitalWrite(green, LOW);
}
}