LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using a wiimote with LabVIEW

 

Does the wiimote example (provided by Sam Shearman) "Acquisition + IR (Event).vi" enable you to find up to 4 LEDs and the "Acquisition+IR(Polled).vi" up to two?

I've been through the block diagrams and I don't think the polled one supports it (max 4), or did I miss something?

0 Kudos
Message 121 of 220
(3,000 Views)

Hi,

 

I have been using the wiimote VI's posted by Sam Shearman and was wondering whether anyone has attempted to establish a bluetooth connection to the wiimote directly from LabVIEW?

 

I'm not sure if this idea is completely feasible but I have noticed that there are Bluetooth VI's built into my version of LabVIEW (LV 2009) and that I should be able to setup a bluetooth server from labVIEW.  Does anyone have any thoughts on this?

 

Alistair

0 Kudos
Message 122 of 220
(2,857 Views)

Hi Alistair,

 

This DevZone talks about Bluetooth applications in LabVIEW and even shows some examples of how to use the Bluetooth VIs. Also, try checking out this community example. I hope these are helpful!

 

Thank you for choosing National Instruments.

 

Aaron P

National Instruments

Applications Engineer

http://www.ni.com/support

 

0 Kudos
Message 123 of 220
(2,836 Views)

Hi Aaron P,

 

Thanks for the quick reply, the bluetooth discovery VI's are useful.  I was more concerned with establishing and using a bluetooth connection to wiimote to receive the data that is used in Sam Shearman's Wiimote VI's.  I can get these VI's to work if I establish my bluetooth connection manually but I was wondering if there would be any way to automate the connection procedure to obtain the same set of data?

 

thanks again,

 

Alistair

0 Kudos
Message 124 of 220
(2,822 Views)

Hi,

 

In addition to my last post, I was wondering whether anyone has tried or is able to obtain the battery status of the wiimote in labVIEW?

 

Thanks,

 

Alistair

0 Kudos
Message 125 of 220
(2,809 Views)

I am using the Wiimote with the Labview files on ni.com. When I run the Pitch Roll file (or any of the other ones), I get this error message:

 

"Error calling method WiimoteLib.Wiimote.Connect of ObjectId handle: 0x7B61128 for obj 0x3DD3515[WiimoteLib.Wiimote] in domain [LabVIEW Domain for Run] and thread 3548, (System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 Inner Exception: System.Security.SecurityException: System.Security.Permissions.SecurityPermission
) in subInitWiimote.vi->Roll Pitch (Event).vi"

 

Does anyone know how to resolve this problem?

0 Kudos
Message 126 of 220
(2,720 Views)

In response to Alistair's earlier posting regarding automatically establishing a link to a wiimote--I had looked into this a bit a while ago and didn't get very far. 

 

Establishing and re-establishing a bluetooth association is handled by the bluetooth driver. The LabVIEW code essentially checks with the bluetooth driver to determine if a good association already exists. It doesn't try to create a new association.

 

My experience with the Microsoft bluetooth driver was that the association was sometimes automatically re-established, but it was inconsistant. I had the same issue with a Bluetooth mouse, so the problem was broader than just the Wiimote.

 

--Sam

Message Edited by sshearman on 01-26-2010 10:20 AM
Sam Shearman
0 Kudos
Message 127 of 220
(2,693 Views)

Hi Sam,

 

Thanks for the reply firstly, I have tried a few things with the bluetooth connection and have come up against similar problems.  I am using another application called smoothboard which is able to automatically detect the wiimote but unfortunately the software is copyright protected so I am unsure how this is done.  

 

On another note, is there anyway of establishing battery status from the wiimote?  I see that if I place a .net property node I am able to call wiimote state and set the property to battery but I have been unable to actually establish the battery information?

 

Alistair

0 Kudos
Message 128 of 220
(2,679 Views)

Is calculating yaw from the IR data as straightforward as obtaining pitch & roll (i.e. running it through some formulas) from the accelerometer data?

I want to take a shot at it, but I can't seem to find any useful data on the topic (been checking wiibrew, wiili.org (or what's left of it) and other sites, but no dice).

0 Kudos
Message 129 of 220
(2,550 Views)

Kovacs, 

 

     Check out the Roll Pitch (Event).vi or Roll Pitch 3dGraph.vi in the Wiimote library. It is as simple as you say (just apply some formulas) but it's even simplier than that because it's already down for you. Good luck! 

0 Kudos
Message 130 of 220
(2,514 Views)