There was a problem I didn’t know how to fix no matter what.
I was trying to use analog writing to control both the speaker's tone and the light's brightness.
The analog write is working fine by looking at the serial monitor. But neither the light nor the speaker progressively change


However, use the same method to control the motor is working fine
eb611a4394364ce583d883b38bf0ec17.MOV
