USE a BUZZER MODULE (PIEZO SPEAKER) USING ARDUINO UNO The connections are pretty easy, see the image above with breadboard circuit schematic. Step 3: The Code. Here's the "Tone" code, embedded using codebender! How it works? It's simple, tone(buzzer, 1000) sends a 1KHz sound signal to pin 9, delay(1000) pause the program for one second and noTone(buzzer) stops the signal sound.
Related with circuit diagram of a piezo buzzer on arduino