// Name the pin as led. 
#define speaker 11

int dooo = 1;
int siii = 2;
int laaa = 3;
int sool = 4;
int faaa = 5;
int miii = 6;
int reee = 7;
int doo = 8;
// Set the Snt end Pin & Receive Pin.

void setup()                    
{

pinMode(dooo, INPUT);
pinMode(siii, INPUT);
pinMode(laaa, INPUT);  
pinMode(sool, INPUT); 
pinMode(faaa, INPUT);
pinMode(miii, INPUT);
pinMode(reee, INPUT);
pinMode(doo, INPUT);
}

void loop()                    
{
  // Set a timer.
  long start = millis();

  // When hand is touched the sensor, the speaker will produce a tone.
  // I set a threshold for it, so that the sensor won't be too sensitive.
  if ((digitalRead(dooo))== LOW) tone(speaker,523);
  if ((digitalRead(siii))== LOW) tone(speaker,494);
  if ((digitalRead(laaa))== LOW) tone(speaker,440);
  if ((digitalRead(sool))== LOW) tone(speaker,392);
  if ((digitalRead(faaa))== LOW) tone(speaker,349);
  if ((digitalRead(miii))== LOW) tone(speaker,329);
  if ((digitalRead(reee))== LOW) tone(speaker,294);
  if ((digitalRead(doo))== LOW) tone(speaker,261);
  delay(100);    

   noTone(speaker);  // arbitrary delay to limit data to serial port 
}
