A buzzer has two pins, namely positive and negative. The positive terminal is represented by the ‘+’ symbol and negative terminal is represented by the ‘-’ symbol just like an led and a capacitor.
Connect the Arduino USB to PC and click the upload button to upload the code to the Board. That's it! You have successfully run the code to play Sa re ga ma melody with Passive Buzzer using Arduino ...
The Arduino Mega can control both active and passive buzzers through its digital output pins, enabling audible alerts and sound generation for interactive projects and notifications.