just Learned the second thing needed for this project, i learned how to make a buzzer and subsequently use buttons to turn it into an keyboard instrument of sorts. here is the code: int notes[] = {262, 294, 330, 349};void setup(){ Serial.begin(9600);}void loop(){ int keyVal = analogRead(A0); Serial.println(keyVal); if (keyVal == 1023){ tone(8, notes[0]); } else if(keyVal >= 990 && keyVal <=1010){ tone(8, notes[1]); } else if (keyVal >=505 && keyVal <= 1010){ tone(8, notes[2]); } else if (keyVal >= 5 && keyVal <= 10){ tone(8, notes[3]); } else { noTone(8); }} image is still wrongly cropped, to see the whole creation open the image in its own tab
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.