05-10-2016 12:55 PM
Hi all,
I have a motion sensor acquiring realtime values in labview.
I want to send this in realtime to control an object in a flash game
Pls advice me on this. Thanks.
05-11-2016 06:52 PM
What exactly do you want to do? Move the mouse? Click? Hit the keyboard?
05-11-2016 11:54 PM
I can imagine you can control the flash game using your keyboard, yes?
If so, it is easy to programmatically fire key strokes, like the up/down/left/right keys:
https://decibel.ni.com/content/docs/DOC-9001
You just need to create a DAQ loop which lets say gets the motion sensor values with 10 Hz. After this you need to translate the motion sensor values into direction info, like the up/down/left/right. From this loop you can then fire the appropriate library call to simulate the key stroke on your keyboard...
You could do something similar with mouse, try to google for it...
05-12-2016 12:29 AM - edited 05-12-2016 12:34 AM
Just to give you an idea, test it here for example: http://www.newgrounds.com/portal/view/578636
edit: there is a little bug in the VI, obviously you need to multiply by 3 NOT 4! 🙂 (array indexes are from 0 to 3!)
05-12-2016 01:53 AM
Hi Blokk,
there is a little bug in the VI, obviously you need to multiply by 3 NOT 4! (array indexes are from 0 to 3!)
Yes, there's a bug!
To get a uniform "noise" (aka random values) you should multiply by 4 (four), followed by "Round To -Inf" to ensure proper values of 0-3…
05-12-2016 04:04 AM
Yes, I know 🙂 I remembered one post where this was discussed:
However, the question how to generate uniform random numbers is totally unrelevant for this VI which was only made for demonstration purpose 😉
05-14-2016 12:28 AM
Hi... Thanks for replying.
I want to move a ball in four directions... (flash)
I have a sensor attached to my hand ... that reads whether i am moving the hand left / right/ top / bottom.. (labview)
How can i transfer the information from labview to flash....
05-14-2016 12:40 AM
05-14-2016 12:44 AM
we have not started developing the flash app...
we want to know the way to communicate between labview and flash app
05-14-2016 12:45 AM
can i know what library we have to use for this ?