#include <Servo.h>

#define pinServo 34, 35, 32, 33, 25, 26

char letra;

Servo servo2;
Servo servo3;
Servo servo4;
Servo servo5;
Servo servo6;
Servo servo7;

void setup() {
  
  servo2.attach(34);
  servo3.attach(35);
  servo4.attach(32);
  servo5.attach(33);
  servo6.attach(25);
  servo7.attach(26);
  Serial.begin(9600);
  Serial.println ("Digite a letra escolhida");
}

void loop() {
  
  letra = Serial.read();
  
  switch (letra) {
  
    case 'A':
    
    zerar();
    servo2.write (180);
    break;
    
    case 'B':
    
    zerar();
    servo2.write (180);
    servo4.write (180);
    break;
   
    case 'C':
    zerar();
    servo2.write(180);
    servo3.write(180);
    break;
    
    case 'D':
      
    zerar();
    servo2.write(180);
    servo3.write(180);
    servo5.write(180);
    break;
    
    case 'E':
    
    zerar();
    servo2.write(180);
    servo5.write(180);
    break;
    
    case 'F':
    
    zerar();
    servo2.write(180);
    servo3.write(180);
    servo4.write(180);
    break;
    
    case 'G':
    
    zerar();
    delay(500);
    servo2.write (180);
    servo3.write (180);
    servo4.write (180);
    servo5.write(180);
    break;
    
    case 'H':
    
    zerar();
    servo2.write (180);
    servo4.write (180);
    servo5.write (180);
    break;
    
    case 'I':
    
    zerar();
    servo3.write (180);
    servo4.write (180);
    break;
    
    case 'J':
    
    zerar();
    servo3.write(180);
    servo4.write(180);
    servo5.write(180);
    break;
    
    case 'K':
    
    zerar();
    servo2.write(180);
    servo6.write(180);
    break;
    
    case 'L':
    
    zerar();
    servo2.write(180);
    servo4.write(180);
    servo6.write(180);
    break;
    
    case 'M':
    
    zerar();
    servo2.write(180);
    servo3.write(180);
    servo6.write(180);
    break;
    
    case 'N':
    
    zerar();
    servo2.write(180);
    servo3.write(180);
    servo5.write(180);
    servo6.write(180);
    break;
    
    case 'O':
    
    zerar();
    servo2.write(180);
    servo5.write(180);
    servo6.write(180);
    break;
    
    case 'P':
    
    zerar();
    servo2.write(180);
    servo3.write(180);
    servo4.write(180);
    servo6.write(180);
    break;
    
    case 'Q':
    
    zerar();
    servo2.write(180);
    servo3.write(180);
    servo4.write(180);
    servo5.write(180);
    servo6.write(180);
    break;
    
    case 'R':
    
    zerar();
    servo2.write(180);
    servo4.write(180);
    servo5.write(180);
    servo6.write(180);
    break;
    
    case'S':
    
    zerar();
    servo3.write(180);
    servo4.write(180);
    servo6.write(180);
    break;
    
    case 'T':
    
    zerar();
    servo3.write(180);
    servo4.write(180);
    servo5.write(180);
    servo6.write(180);
    break;
    
    case 'U':
    
    zerar();
    servo2.write(180);
    servo6.write(180);
    servo7.write(180);
    break;
    
    case'V':
    
    zerar();
    servo2.write(180);
    servo4.write(180);
    servo6.write(180);
    servo7.write(180);
    break;
    
    case'W':
    
    zerar();
    servo3.write(180);
    servo4.write(180);
    servo5.write(180);
    servo7.write(180);
    break;
    
    case 'X':
    
    zerar();
    servo2.write(180);
    servo3.write(180);
    servo6.write(180);
    servo7.write(180);
    break;
    
    case 'Y':
    
    zerar();
    servo2.write(180);
    servo3.write(180);
    servo5.write(180);
    servo6.write(180);
    servo7.write(180);
    break;
    
    case 'Z':
    
    zerar();
    servo2.write(180);
    servo5.write(180);
    servo6.write(180);
    servo7.write(180);
    break;
    
    case '0':
    
    zerar();
    break;
   
    
  }
}

void zerar() {

  servo2.write (90);
  servo3.write (90);
  servo4.write (90);
  servo5.write (90);
  servo6.write (90);
  servo7.write (90);
  delay(500);
}