07-02-2009 09:19 AM
Hi!
I really need some BIG help here! I'm trying to use my mouse as a motion detector...I've been told that's stupid but...I WANNA DO IT! I wanna take his "motion sensor" and set it by the door and...when the door opens the sensor will become "active"...I suppose u know what I mean!
Now, I have an USB mouse but unfortunately it's some unknown mouse form China or something...can't find any info about him.
I need the simplest exemple on how to communicate with the USB mouse...something like "0" when the mouse is inactive and "1" when there was some motion in the near vicinity of the "LED". LabView has some examples but far to complicated for me.
I would be gratefull if you could help me out!...at least a site with a tutorial for this kind of application!
Thank you!
Solved! Go to Solution.
07-02-2009 09:29 AM
07-02-2009 09:39 AM
I'm a bit new to LabView (more into OrCAD or Proteus) and I may sound a bit stupid but... what kind of loop... timed or while?... and how do I "look for a change in the axis info"! :-s
Sorry, but I NEVER EVER worked with LabView and I'm trying to get a hold of it...
07-02-2009 09:49 AM
A while loop is sufficient. After taking the tutorials, you should know what a shift register is and how to use the comparison functions (i.e. Not Equal).
07-02-2009 10:02 AM
07-02-2009 11:21 AM
It's done...but I still have one problem...how do I make this schematic to show me (as it's running) when the mouse moved! Something like a table or...a record of the new mouse position or something like that! The modified position on the axes! :-?
Sorry I R STUPID!
Thanks for puttin' up with me!
07-02-2009 12:52 PM
It would be nice if you marked my answer as the solution instead of your thank you. You can change the markd solution by clicking on 'Options'.
First, you do not have a schematic. You have either a front panel or block diagram. A schematic is for electronic symbols.
If you want to know when it changed, then a simple way is to wire a case structure to the Boolean and place a Get Date/Time function in there. If you want to know the current position, that is being displayed in the axis info indicator. If you want to display the delta, then subtract the previous position from the present position. Just wire both clusters up to the subtract function. You could also put a write to a table of the delta information/time inside the case structure. A table is just a 2D string array so you would have to convert the cluster elements to an array with Cluster to Array and then convert to strings, Another shift register with a Build Array would handle the writing to the table.
Try writing something and see how far you get.
07-02-2009 02:35 PM
Sorry about the solution thing...I was in a hurry to get in a meeting...
The case thing works but...it just saves the time when I pressed the START button...if I continue moving it it stands still...after I stop the process and start again it will show the new start date and timp...I just want to make it real time...to continuously modify to the moving of the mouse! If I am moving the cursor, the date and time has to continuously change!
:-?
Is that possible? :-?
07-02-2009 03:21 PM
07-02-2009 03:42 PM
This is how mine looks like... And it just displays the moment when I press START! After that it just stands still (both the time and the axis panels)!!! I have LabView 8.0...I know it shouldn't matter but...
What did I do wrong?