The Pulse Width Modulation (PWM) reference application demonstrates using the PWM peripheral to control a Red Green Blue (RGB) Light Emitting Diode (LED) supporting multiple PWM channels.
GPIO Name | Direction | Connected To | Comments |
---|---|---|---|
GPIO0 | Output | LD4 | Red LED |
GPIO14 | Output | D1 | RGB red channel |
GPIO15 | Output | D1 | RGB green channel |
GPIO16 | Output | D1 | RGB blue channel |
After loading the program to the board and running:
-
A defined list of colors is cycled at several intensities using the 3 PWM channels on the RGB LED (D1).
-
The red LED (LD4) blink for every finished cycle.