ESP32 Starter Kit
(continued from previous page)
tone(beeppin, 330);//Flat Mi plays 500ms
delay(500);
tone(beeppin, 349);//Flat Fa plays 500ms
delay(500);
tone(beeppin, 392);//Flat So plays 500ms
delay(500);
tone(beeppin, 440);//Flat La plays 500ms
delay(500);
tone(beeppin, 494);//Flat Si plays 500ms
delay(500);
noTone(beeppin);//Stop for 1s
delay(1000);
}
5. Test Result
After uploading code and powering on, the amplifier circularly plays music tones with corresponding frequency: DO,
Re, Mi, Fa, So, La, Si.
Power amplifier sound adjustment
**There is a potentiometer next to the speaker. We can adjust the sound of the speaker by twisting it. ** (Note: Please
use appropriate strength to adjust it, so as not to break the potentiometer)
6. Knowledge Expansion
Let’s play a birthday song. The wirings remain unchanged.
Numbered musical notation:
8.5. Arduino Project 67