LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PDA ms timer and bluetooth input

Hi, I'm working on a subvi that will deal with receiving input (button or key presses) to the pda and also recording the time between each press.  I am a summer intern with no previous LabView experience so this has been quite a challenge.  My program right now is a basic skeleton that outputs up/down/left/right when the on screen buttons or directional pad are pressed. 

So far I've gotten the touchscreen buttons and directional pad buttons to work, but I've run into trouble in using bluetooth input.  I am trying to connect the bluetooth numberpad (logitech diNovo media pad) for the same directional input but do not understand the process.  The examples use a server/client model, but I am unsure of how to even start with getting the numberpad recognized by LabView. 

My second problem is the timer function.  Using the elapsedtime express vi does what I want, except its lowest resolution seems to be seconds on the PDA when I need milliseconds.  I have read on the forums that the PDA cannot do less resolution and verified that it will display ms when on the PC.  I've been trying to use the tickcount function with subtraction, but it doesn't always work for the directional pad input.

So my two main questions are this:  How do I recognize a bluetooth input device that cannot have a "client vi" installed on it?  And what is the proper way to take ms times on a PDA?

I've attached the code I've been working on to make a simple model before tailoring it to the main program.  Also you should be warned at how inefficient and ugly the code will be.  I've left in the elapsedtime attempt and the ticktime attempt for the touchscreen.

0 Kudos
Message 1 of 4
(3,938 Views)
Well I wanted to update my question about the timer.  I've found that Wait for Front Panel Activity seems to work well with the touchscreen buttons, but I am unable to get any response with the directional buttons.  Is there a way to use this with Get PDA Button Input.vi or any of the other pda button input vi's?
0 Kudos
Message 2 of 4
(3,921 Views)
Hey parkithere,

I took a look at your VI and I believe you are on the right track to accomplish the tasks you would like, but I might approach it a little differently.  I think you could simplify your code a bit and eliminate some of the local variables.  I have attached a screenshot of a quick example that checks the PDA to see if the up button has been pressed and also checks the Up Boolean on the Front Panel.  This will have a resolution of ~10 ms since I have included the Wait function.



Regarding your Bluetooth question, do you know if the device works correctly or not with that PDA?  Can you enter directional inputs in other programs?  If not, this would be why LabVIEW isn't recognizing it.  If you can use the numpad in other programs then this would probably require some Bluetooth programming.  There are examples in the Example Finder for such programming, but I would think that once the PDA recognizes the numpad as a numpad then LabVIEW will also.

Hope this helps!
Andy F.

Message Edited by Andy F. on 07-26-2006 05:39 PM

-----------------------------------------------------------------
National Instruments
Message 3 of 4
(3,900 Views)
Hi Andy, 
  Thanks so much for the help.  I ended up using a variation off what you posted with the wait until activity function and so far it works well.  I'll keep plugging away at the bluetooth problem, but you were a huge help with the timer.  Thanks again!
0 Kudos
Message 4 of 4
(3,885 Views)