Skip to content
Snippets Groups Projects
Commit fd0e81b0 authored by AnHardt's avatar AnHardt Committed by Richard Wackerbarth
Browse files

Distinguish between BUZZER and SPEAKER (PR#2513)

A speaker needs a AC or a pulsed DC to make a sound, a buzzer only needs a DC.
A buzzer has it's own resonator. It works in most cases to feed the buzzer with a pulsed DC, but the sound will not be as loud as with pure DC.

There seem to be boards where the BEEPER-pin is not able to handle a PWM. Obviously intended for a buzzer.
To make these board able to handle a speaker

* replace the PWM based tone()-function again with a on-delay-off-delay loop.

Hopefully the last time I touch the beeper code.
parent 53d9c9ff
No related branches found
No related tags found
No related merge requests found
Showing
with 32 additions and 2 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment