   thumb.write(thumbL);
 }
 
+//Grip (index and thumb)
 void indexthumb(){
   pinkie.write(pinkieL);
   ring.write(ringL);

  index.write(indexH);
  thumb.write(thumbH);
}
  
void allopened(){
  pinkie.write(pinkieL);
  ring.write(ringL);
  middle.write(middleL);

  if(Serial.available()>0){
    z = Serial.read();
  }
  if(z=='a'){           //Send  char 'a' trough serial monitor for open hand
    allopnd();
  }
  else if(z == 's'){    //Send  char 's' trough serial monitor for close hand
    allclosed();
  }
  else if(z == 'd'){    //Send  char 'd' trough serial monitor for grip (index and thumb)
    indexthumb();
  }
}

//Close hand
void allclosed(){
  pinkie.write(pinkieH);
  ring.write(ringH);
