06 | RGB LED

RGB LEDs contain 3 LEDs (Red, Green, and Blue) in one package and are commonly used for lighting and in large (stadium size) displays. In this tutorial we'll learn how PWM can be used with an RGB LED to create over a million different colors.

Prerequisites

Hardware


Parts List
  • Sparkfun RedBoard

  • 1x RGB LED
  • 3x 330 Ohm Resistors
Circuit Schematic

Software

Procedure




  • Open the LINX - PWM N Channel example from the LabVIEW Example Finder.

  • Select the PWM channels connected to the LED leads.

  • Run the VI, and use the numeric controls the change the PWM duty cycles.

  • Modify the VI use a color box control to select the three PWM values.
Challenges
  • Modify the code to automatically cycle through the color wheel.