// do , re , mi , fa , sol , la , si , do int freqs[] = { 1915, 1700, 1519, 1432, 1275, 1136, 1014, 956}; void setup(){ pinMode(11,OUTPUT); Serial.begin(9600); //open the serial to print } void loop(){ int val = Serial.read(); //read the serial to see if(val>’0’ && val <= ‘9’){ //which key was pressed val = val - ‘0’; //convert the character to an integer Serial.print(val,DEC); Serial.println(); for(int i=0; i<500; i++){ //duration of the tone (.5 seconds) digitalWrite(11,HIGH); delayMicroseconds(freqs[val]); //the tone’s frequency digitalWrite(11,LOW); delayMicroseconds(freqs[val]); } } }