The buzzer is used to sound an alarm or notify using sound or music.

Examples:

  1. Water Meter: flow sensor measures flow rate and buzzer sings a song when the tap is in use.
  2. Security breach alert: motion sensor detects pests, stray animals near a house at night and buzzer sends a loud alarm to scare them away.

Pin:

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/1a1722c6-56b5-49a9-a31e-b4a49f64ac40/Output_Buzzer-01.jpg

Code