int speakerPin = 16; void setup() { // initialize serial communications (for debugging only): Serial.begin(9600); randomSeed(analogRead(A0)); } void loop() { // make random not in the output pitch range (120 - 1500Hz) int thisPitch = random(120, 800); Serial.println(thisPitch); // play the pitch: tone(speakerPin, thisPitch, 500); delay(100); }