delay(1000);
}
5. Test Result
After uploading code and powering on, the buzzer emits sound for 1s and stays quiet for 1s.
8.5.9 Project 8Music Performer
1. Description
In this project, we will use a power amplifier speaker to play music. This speaker can not only play simple songs, but
also perform what you desire. Thus, you can program other interesting codes in the project to accomplish splendid
learning outcomes.
2. Working Principle
The electrical signal is input from pin 1 of RP1 (adjusts signal intensity, which is also the sound volume). After coupling
in C4 and passing R5, the signal reaches IN- pin of 8002B, in which it is operationally amplified and output to BEE1
speaker.
Frequency Comparison Table in C
Note
Frequency(Hz)
Flat 1 Do
262
Flat 2 Re
294
Flat 3 Mi
330
Flat 4 Fa
349
Flat 5 So
392
Flat 6 La
440
Flat 7 Si
494
8.5. Arduino Project
Note
Frequency(Hz)
Natural 1 Do
523
Natural 2 Re
587
Natural 3 Mi
659
Natural 4 Fa
698
Natural 5 So
784
Natural 6 La
880
Natural 7 Si
988
ESP32 Starter Kit
(continued from previous page)
Note
Frequency(Hz)
Sharp 1 Do
1047
Sharp 2 Re
1175
Sharp 3 Mi
1319
Sharp 4 Fa
1397
Sharp 5 So
1568
Sharp 6 La
1760
Sharp 7 Si
1967
65
Need help?
Do you have a question about the ESP32 and is the answer not in the manual?
Questions and answers