05 | Push Button

Push buttons provide a simple way for users to interact with a physical system and are found in most electronic devices (for example the power button on your PC). In this tutorial we'll learn how to detect when a button is pressed and then modify the code to count the number of times we press the button.



Parts List
Circuit Schematic




  • Open the LINX - Digital Input 1 Channel example from the LabVIEW Example Finder.

  • Select DI channel 65 which is connected to BTN2.

  • Run the VI, and press BTN2.

  • Modify the VI to count the number of times the button is pressed and display it on a numeric indicator.
  • Update the code to display the numeric value on the 4 user LEDS on the chipKIT WF32.