Pulse Width Modulation (PWM) is a technique commonly used for controlling analog devices using a digital control signal. With this analog-like digital signal, we can control a range of devices, from motors, lighting, power control and conversion. In this lesson, we will go through the basics of PWM control and take a closer look at how we can configure the PWM API for different things by changing the active duty cycle of the signal and by adding different compatible nodes to the overlay file in nRF Connect SDK.
In the exercise section of this lesson, we will practice controlling an LED on the DK using the PWM API. Then we will modify the devicetree to control an external servo motor device, and how to add a second PWM instance to be able to control both the servo and an LED on the board.