05 | Controlling LED Brightness

In this tutorial we'll learn how to use Pulse Width Modulation (PWM) to control the brightness of an LED and then modify the code to use a vertical slider to control the brightness.

Prerequisites

Hardware


Parts List
  • Sparkfun RedBoard

  • 1x LED (any color)
Circuit Schematic

Software

Procedure




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

  • Select the PWM channel connected to the LED.

  • Run the VI, and use the numeric control the change the PWM duty cycle.

  • Modify the VI use a vertical slider to control the LED brightness.
Challenges
  • Modify the code to automatically cycle through brightness values.