CHANGING ARDUINO PWM FREQUENCY   In some projects like boost and buck converters we may need to change the default frequency of Arduino PWM pins according to our need in order to control the charging time of inductor. in Arduino UNO pins D5 and D6 have PWM frequency of  62500  HZ , pins D3, D11, D9 and D10 has the default PWM frequency of  31250 HZ  .   To change the PWM frequency  following code can be written in setup function to set PWM frequency           Divide the base frequency of pins by the factor you want to decrease  the frequency for each pin  some examples are shown below     The divisors available on pins 5, 6, 9 and 10 are: 1, 8, 64, 256, and 1024.    The divisors available on pins 3 and 11 are: 1, 8, 32, 64, 128, 256, and 1024.   for D3 and D11       TCCR2B = TCCR2B & B11111000 | B00000001; // for PWM frequency of 31372.55 Hz      TCCR2B = TCCR2B & B11111000 | B00000010; // for PWM frequency of 3921.16 Hz      TCCR2B = TCCR2B & B11111000 | B000000...