tone() uses pulse width modulation (PWM) on the pin to generate the frequency you (should) hear. `DigitalWrite(buzzer,HIGH)' simply sets the pin to +5V - no sound.
tone() uses pulse width modulation (PWM) on the pin to generate the frequency you (should) hear. `DigitalWrite(buzzer,HIGH)' simply sets the pin to +5V - no sound.