const int SW1 = 15; 
const int SW2 = 18; 
const int SW3 = 4; 
const int SW4 = 5;   
  
const int RED =  13;  
const int GREEN =  12; 
const int YELLOW =  14; 
const int BLUE =  27; 

int SW1State = 0;  
int SW2State = 0;
int SW3State = 0;
int SW4State = 0;       

void setup() 
{
  pinMode(RED, OUTPUT);
  pinMode(GREEN, OUTPUT);
  pinMode(YELLOW, OUTPUT);
  pinMode(BLUE, OUTPUT);
  
  pinMode(SW1, INPUT_PULLUP);
  pinMode(SW2, INPUT_PULLUP);
  pinMode(SW3, INPUT_PULLUP);
  pinMode(SW4, INPUT_PULLUP);
}

void loop() 
{
  
  SW1State = digitalRead(SW1);
  SW2State = digitalRead(SW2);
  SW3State = digitalRead(SW3);
  SW4State = digitalRead(SW4);

  if (SW1State == LOW) 
  {
    digitalWrite(RED, HIGH);
  } 
  else 
  {
    digitalWrite(RED, LOW);
  }

  if (SW2State == LOW) 
  {
    digitalWrite(GREEN, HIGH);
  } 
  else 
  {
    digitalWrite(GREEN, LOW);
  }

  if (SW3State == LOW) 
  {
    digitalWrite(YELLOW, HIGH);
  } 
  else 
  {
    digitalWrite(YELLOW, LOW);
  }

  if (SW4State == LOW) 
  {
    digitalWrite(BLUE, HIGH);
  } 
  else 
  {
    digitalWrite(BLUE, LOW);
  }
  
}
