Here is a small MicroPython lab that teaches Pulse Width Modulation (PWM). The video shows a knob being turned and the LED getting brighter. The display on the right shows what the pulse width modulation signal looks like and also displays the duty cycle.
All the code is available online on our "Learning MicroPython" site.