04-30-2017 09:16 AM
hi im doing a project in LabView with a leap motion controller to control a robotic arm and the direction that the user puts there hand it copies it. my question is how to put the leap as the controller and the parameters need to do it the code i have already done goes through a h-Bridge and arduino and can drive the motor by switching with a toggle switch. any help is much appreciated. the code is uploaded along with this.
Solved! Go to Solution.
04-30-2017 09:54 PM
I can't view your code since I don't have '16 installed on this PC, would it be possible for you to save back to an earlier version of the software? But from the sounds of it you have the motor under control, then all that is left is to interface with the Leap Motion.
Did you have any specific plans for this interaction? If you are unsure where to start then might I recommend this link which I found through a simple search of the NI website, seems like if you can figure that out then you should be able to do exactly what you want.
04-30-2017 10:28 PM
hi thanks for the reply. ive already got the leap tool kit but unsure on how to make the leap the controller for the direction of the motor so if i go left the motor spins 1 way and then go right it spins the other way. i saved the code as 13.0
05-01-2017 03:37 PM
Well you stated above that you have the ability to control the direction of motor already right? How do you do that?
You have the leap toolkit but are you able to read the position of your hand from it yet?
Then it is just a matter of linking the two, presumably using a scaling factor around some positional value.
05-01-2017 03:43 PM
controlling the direction with a toggle switch connected to a case structure with the output numbers in the true or false cases. the number of the PWM output is in the case and that answer depending on the position of the toggle switch is fed into the pin selection
05-01-2017 04:01 PM
So all you need to do is convert from the hand position values that you get from the leap. Given that you get an XYZ value, take the X value, set a threshold position.
If the X value is greater than the threshold the boolean is true, depending on how much greater it is then set the PWM.
Likewise if the Y value is below the threshold the boolean is false, depending on how much less is is then set the PWM.
05-01-2017 04:03 PM
thanks a million for all your help