Example Code

LabVIEW Beat Pattern Detector (Door Knock)

Code and Documents

Attachment

Download All

Overview
This example VI is that it detects a pattern of mouse clicks which regardless of tempo to open the door.

 


Description
This VI built a nice little event based, producer or consumer architecture. Each time the mouse is clicked, it queues up the time, the consumer then calculates how long between it and the previous click. Once 3 clicks have been hit, the program knows the tempo the user is going at and uses this information to see if the next clicks happen at the right time. There is a timeout case which resets everything in case you get it wrong! 

 


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Download and unzip the attached folder to your computer
  2. Open the VI "Beat 2012 NIVerfied.vi"
  3. Run the program
  4. Click the control named "Press Here"

 

Additional Information or References
VI Block Diagram of "Beat 2012 NIVerfied.vi"

 Block Diagram.png

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

 

Nick

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.