A buzzer will produce a single audible tone when a voltage is applied and current passes through it. To play different tones or musical tunes consider using the piezo instead.
Activate a buzzer
The following program will activate a FET or Darlington transistor connected to output B.1, which in turn will sound the buzzer, for a second every five seconds.
An buzzer may be connected via a BCX38C darlington transistor.
Bill of Materials
|BCX38C Darlington driver transistor||TRT002||1||Buy Now|
|1k resistor (pack 100)||RES1K||1||Buy Now|
|1N4001 Diode||RES041||1||Buy Now|
Submit Your Own Code!
You must be logged in to submit code examples. Login now.