10 | Photocell

Photocells vary in resistance with changes in light intensity and are commonly used for detecting ambient light levels for things like automatic car headlights. In this tutorial we'll learn how to measure ambient light and then modify the code to display the light intensity on a graph.



Parts List
  • Sparkfun RedBoard

  • 1x Photocell
Circuit Schematic



  • Open the LINX - Analog Read 1 Channel example from the LabVIEW Example Finder.

  • Select the AI channel connected to the photocell.

  • Run the VI, and cover the photocell with your hand. Notice the change in analog voltage on the graph indicator.

  • Modify the VI to display the photocell value on a vertical slide indicator.
  • Build a theremin using the photocell to control the tone of a piezo buzzer.