Return to Tutorials

Leap Motion Controller And LabVIEW

The Leap is a harware an firmware piece that enables your hands as a control device for your PC or any hardware that you need to interact; developed by Leap Motion Inc, this hardware is a masterpiece of technology and science for Human Machine Interfacing or Machine to Machine interfacing.

what is


The Science Behind the Leap Motion Controller

Primarly when you use the leap controller you will notice two (or maybe three) LEDs, those LEDs generates a pattern of cloud dots of light (infrared) and two monochromatic infrared cameras that can do stereoscopic vision and handle the image of your hands as fast as 300 times per second.




As is told in the official webpage, this device could track motion of 10 fingers up to 1/100th of a milimeter.  There are serveral actions that these device could do:

  • Phalanx and articulations of multiple hands
  • Detect direction and velocity of your hand
  • Detect gestures as circle, swipes (direction and vector)


How to setup the Leap Motion Controller

  • Go to the setup page and choose download the windows drivers or developer suite
  • Connect the Leap Motion to your personal computer.
  • Unzip the folder and install the drivers using the file named Leap_Motion_Installer…
  • If you downloaded the SDK (LeapSDK), put it in a folder (i preffered C:/)
  • And you are done to test.


Doing some tests

If you want to play with some apps load the AirSpace app world that must be located in your desktop.  If not and you want to test it, use the VisualizerApp that comes by default with the software package, if you can’t look at it it is in:

C:\Program Files (x86)\Leap Motion\Core Services\ as VisualizerApp.exe

As you can see below i could detect more than 1 hand over the leap.

VisualizerAppTwoHands VisualizerAppOneHand

If you want to view the app world of Leap, launch the AirSpace application located on your desktop, there are few interesting uses of the leap and are very sophisticated interfaces.


Installing LabVIEW Drivers for the Leap Motion Controller

  • Follow up the instructions for the LabVIEW Hacker driver kit for Leap Motion Controller
  • Test the Leap Motion examples that will launch in LabVIEW and study them, you will view that the Leap Motion Controller is an easy to use hardware


LabVIEW Application

Now in the next example we will use the Leap Motion controller to use “THE FORCE” like and move a 3D Object located on our screen.

Actions required are:

  • Push the Play button
  • Run the VI with the Run Button

You can do several actions then if you put your hand over the Leap Motion Controller.

  • You can resize the shape by moving your hand over the leap controller
  • You can rotate the object moving your hand in circles from left to right
  • Swipe your hand in, out, lef, right, up or down to move the object as you wish from other position
  • Make a tap to reset the application

LabVIEW Front Panel


The front panel consists only of two buttons.  The Play button to start the application and the stop button to end the application.

When you start it you will view a cube, then put your hand over and make some of the actions that are on the left of the box to manipulate the cube.

LabVIEW Block Diagram

LEAPBlockDiagramThe block diagram only uses the leap motion driver by LabVIEW Hacker team to make some controls over the box.  Over the diagram are the leap structure that i use to control the box and below are the translation and rotation VIs used to manipulate the structure of the cube.

Finally here is a video of the LabVIEW application and the Github repository code if you want to test by your own.



Permanent link to this article:

1 ping

  1. […] Leap Motion Controller And LabVIEW […]

Leave a Reply

Your email address will not be published.