Skip to content

Arduino tone() Produces No Sound

DodaTech Updated 2026-06-26 1 min read

In this tutorial, you'll learn about Arduino tone() Produces No Sound. We cover key concepts, practical examples, and best practices to help you understand and apply this topic effectively.

The Problem

Calling tone() on a buzzer pin produces no audible output.

Quick Fix

Wrong

tone(9, 440);  // No duration specified — plays forever
Buzzer plays 440 Hz continuously with no stop.
int buzzerPin = 9;
void setup() {
  pinMode(buzzerPin, OUTPUT);
}
void loop() {
  tone(buzzerPin, 440, 500);  // 440 Hz for 500 ms
  delay(600);
  noTone(buzzerPin);
  delay(500);
}
Buzzer beeps at 440 Hz for 500 ms, pauses, repeats.

Prevention

tone() uses Timer2 on AVR, conflicting with analogWrite() on pins 3 and 11. Use a duration parameter to auto-stop the tone. Call noTone() to stop manually. Only one tone() can play at a time. tone() does not need pinMode — it sets the pin mode automatically.

DodaTech engineers apply these same patterns across Doda Browser, DodaZIP, and Durga Antivirus Pro for production IoT reliability.

FAQ

### Can I play multiple tones simultaneously?

No. tone() uses a single timer (Timer2 on AVR). Only one frequency can be generated at a time.

Does tone() work with any pin?

tone() works on most digital pins but uses the hardware timer. Some pins may have limited frequency range. Check the documentation for your board.

What frequencies are supported?

31 Hz to 65535 Hz on AVR. The actual range depends on the timer resolution. Very high frequencies may not be audible.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro