I'm playing with an UNO since a while.... well, not for fun, it'll be the 'main controller' :) of a new machine in the company.
I encountered a problem with tone().
I need a 'tone' with 1 Hz frequency and 5 Sek. duration, to generate an intermittent BEEP on a connected buzzer (which does the audio tone itself). Results not as expected, not 1 Hz but much more, and not 5 sec duration but much less. I changed 'duration' in my tone() statement to 50000, and the duration is just 1 sec.
Arduinos reference sais: "Use of the tone() function will interfere with PWM output on pins 3 and 11"
I DO have a PWM output running, but on pin 9.
So, tone() should not be affected? I also switched of the PWM but no change. Maybe 1 Hz is not allowed?
Thanks for help!