Should I use the tone or digitalWrite for the passive buzzer?

So I was watchin paul mcWhorter and he used digitalWrite in the passibe buzzer ep, but should I just use tone? What do you guys think. thanks
2 Replies
TheStudier
TheStudierOP2mo ago
thanks
AnonEngineering
AnonEngineering2mo ago
an active buzzer contains an oscillator, give it power (with digitalWrite(BUZZ_PIN, HIGH)) and it generates a fixed tone. a passive buzzer is more like a speaker, you need to feed it an oscillating signal with tone(BUZZ_PIN, frequency)

Did you find this page helpful?