• Nice, I did not know that analogWrite could do PWM with custom frequency.

  • Nice, I did not know that analogWrite could do PWM with custom frequency.

    Yes, analogWrite does the job. You can also change the duty cycle. In my code above, 0.5 after the pin parameter is for 50% of duty cycle.

About

Avatar for JeonLab @JeonLab started