As the rhythm of the music changes and flashes, the louder the sound, the brighter the LED, and vice versa. Working principle: Use a microphone to detect sound, process it with an operational amplifier, and send it to an ADC for sampling, obtaining a sampling value corresponding to the sound size. The program processes the sampled values and assigns them directly to the PWM register. In this way, different volumes correspond to different duty cycles, and the LED on the output pin will change with the sound. Next, we will drive higher power LEDs using 3W LED chips and components such as photodiodes.