Arduino piezo buzzer and code

Here’s how to wire a piezo buzzer using an Arduino and breadboard

Here’s the code to make the buzzer…buzz (click to zoom in):