SET FREQUENCY ARDUINO MEGA

Hi everyone!

I am learning arduino mega. I don't know how to set frequency of PWM as 10kHz, 20kHz,... Could you please help me???

Thanks!

It would be amazing, wouldn't it, if you were the first person to ask such a question?

It's not amazing.

Take a look here;
https://www.arduino.cc/en/Tutorial/SecretsOfArduinoPWM

Here you will learn how to set frequency of PWM

Timers and counters http://www.gammon.com.au/timers