I want to play a frequency of 432 hz (Hertz) immediately after I power up the arduino.
My circuit diagram:
My code:
void setup() {
// put your setup code here, to run once:
pinMode(9, OUTPUT);
tone(9, 432);
}
void loop() {
// put your main code here, to run repeatedly:
}
The problem is that the speaker does not start when I power the arduino;
It starts when I press the reset button; I also tried pressing the tone(9,432); function in the void loop() but the output is same;
I want to know how to start the speaker when powered the arduino;
(like using capacitors, etc)
