You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a passive buzzers that has inverted logic. It is driven with a PNP transistor. I control the buzzer with a digital pin. The buzzer beeps when the pin is LOW.
The work around to keep using tone() with such buzzers is to call digitalWrite(buzzerPin, HIGH) instead of noTone().
The downside is that "click" after the tone has played : https://www.youtube.com/watch?v=zVIw2HHbOZw
Is there a way to inverse this whole logic in Tone.cpp ?
The text was updated successfully, but these errors were encountered:
(This is not an bug but an improvement request).
Tone works fine with passive buzzers that beep when the pin is HIGH : https://github.com/arduino/ArduinoCore-avr/blob/master/cores/arduino/Tone.cpp#L494
I have a passive buzzers that has inverted logic. It is driven with a PNP transistor. I control the buzzer with a digital pin. The buzzer beeps when the pin is LOW.
The work around to keep using tone() with such buzzers is to call
digitalWrite(buzzerPin, HIGH)
instead ofnoTone()
.The downside is that "click" after the tone has played : https://www.youtube.com/watch?v=zVIw2HHbOZw
Is there a way to inverse this whole logic in Tone.cpp ?
The text was updated successfully, but these errors were encountered: