Control multiple led with a single input.

I just brought my first Arduino just 3 days ago so if the question is stupid im sorry im still learning.

I wanna control 2 columns of 4 led each via Bluetooth. Eg if i send 'h' 4 LEDs should activate while the remaining 4 shut down and the opposite with 'i'. I tried googling it but didn't come up with anything i tried to modify some code i found online but it came with errors as soon as i gave more than 1 change state of digital pins.

Any help would be most appreciated.

Code that showed the error

char data = 0;         
void setup() 
{
 Serial.begin(9600);         
 pinMode(2, OUTPUT);
 pinMode(3, OUTPUT);
 pinMode(4, OUTPUT);
 pinMode(5, OUTPUT);
 pinMode(6, OUTPUT);
 pinMode(7, OUTPUT);
 pinMode(8, OUTPUT);
 pinMode(9, OUTPUT);
 pinMode(10, OUTPUT);
 pinMode(11, OUTPUT);
}

void loop()
{
 if(Serial.available() > 0)  
{
 data = Serial.read();      
 Serial.print(data);        
 Serial.print("\n");         
   switch (data) {
   case 'a':
   digitalWrite(11, HIGH);
   break;
   case 'b':
   digitalWrite(11, LOW);
   break;
   case 'c':
   digitalWrite(12, HIGH);    
   break;
   case 'd':
   digitalWrite(12, LOW);
   break;
   case 'e':
   digitalWrite(13, HIGH);
   break;
   case 'f':
   digitalWrite(13, LOW);
   break;
   case 'g':
   digitalWrite(2,LOW);       // Led area
   digitalWrite(3,LOW);
   digitalWrite(4,LOW);
   digitalWrite(5,LOW);
   digitalWrite(6,HIGH);
   digitalWrite(7,HIGH);
   digitalWrite(8,HIGH);
   digitalWrite(9,HIGH);
   break;
   case 'h':
   digitalWrite(6,LOW);
   digitalWrite(7,LOW);
   digitalWrite(8,LOW);
   digitalWrite(9,LOW);
   digitalWrite(2,HIGH);
   digitalWrite(3,HIGH);
   digitalWrite(4,HIGH);
   digitalWrite(5,HIGH);
   break;
 }                            
}

Welcome to the forums. Please read the sticky post at the top of the forum about how to properly post your code using code tags. It will help people help you.

  1. comments begin with '//' not '\'
  2. Inside the IDE, you can auto format your code with Ctrl-T (or Tools->Auto Format). This will show you that you are missing the closing '}'