From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using a wiimote with LabVIEW

I've run the Event Callback (IR).vi multiple times recently with LabVIEW 8.6.1 and wiimotelib 1.7 and haven't seen that error.

 

This is just a guess, but last year I ran into similar errors that seemed to be related to the Bluetooth adaptor and driver that I was using. Switching to a name brand bluetooth adaptor (the one supplied by Dell in my laptop) seems to have fixed the problem. Can you try another brand bluetooth adaptor with a different driver? If this is possible, you'll want to make sure to uninstall the bluetooth driver for the old adaptor prior to installing the newer one.

 

--Sam

Sam Shearman
0 Kudos
Message 81 of 220
(5,593 Views)

Could you try my vi using your setup (with 2 wiimotes) ? My main problem is the delay (several 100's msec's)  that is introduced when I register the 2nd wiimote's event-handler. I put a boolean on the frontpanel to play with this. If you set the ReportType in subOpenWiimoteCollection.vi to "IRAccel" (it was "ReadData") it also draws the dots.

 

btw : I did play with the order of invoke node's ("connect") and Register Event Callback, but that makes no difference

 

Unfortunately, I don't (yet) have lv 8.6.1.

As for the other bluetooth setup : my current setup works fine with Brian Peek's c# example (no errors nor delays), so that shoudn't be my first concern ?

 

Thanks in advance,

Peter

 

0 Kudos
Message 82 of 220
(5,569 Views)

Hi Peter,


Unfortunately, I don't have a second wiimote to be able to try out your code immediately. Thinking about it and looking at your code, I have an idea what may be occuring. I've attached a revised version of your code to test my idea. Do you see the same latency with it?

 

--Sam

Sam Shearman
0 Kudos
Message 83 of 220
(5,552 Views)

Thanks for the trouble, but it doesn't change the latency. Also the internal error seems to have occurred, cause if I stop and start labview I get again :

" The last time you ran LabVIEW, an internal error or crash occurred at vientrypoint.cpp, line 157. "

 

Anyway, I wonder where the events go in the mean time. Is it a labview event qeue or is it .net ? And if the latter, why is this not the case with the c# example ?

 

Kind regards,

Peter

 

0 Kudos
Message 84 of 220
(5,497 Views)

Hi Jonathan, Is there a one place where I can find the most recent version of the code ? Ideally for LV 8.2.

 

0 Kudos
Message 85 of 220
(5,391 Views)
Which code are you referring to?
Misha
0 Kudos
Message 86 of 220
(5,363 Views)

I am referring to the code which is attached to the post that started this topic by Johann. Although it would be great to have the code written by Sam Shearman in LV8.2 as well.

 

Cheers,

Jakub

Message Edited by jcz on 04-21-2009 01:01 PM
0 Kudos
Message 87 of 220
(5,358 Views)

The latest version of the wiimote VI I can find are here. This is version 8.0, but keep in mind that the functionality has not been tested in this version - they have merely been converted from 8.2.1.

Misha
0 Kudos
Message 88 of 220
(5,322 Views)

To Sam : thanks for your work, great fun so far. But I have one problem, the event based VI's don't work in my case. The pairing was done OK. The polling based VI's work fine. The event based ones however never seem  to receive callback events, although the 'init Wiimote' VI returns no error. I checked in there, the registration for the callback events seems OK, the connect function too, because if I change the output LED states to high at startup high it does this fine. But the event structure that waits for callback events does not seem to receive any. Did I forget to register anything from .NET? I don't get error messages, not even the next time I restart  LabView.
BTW, I use LV8.6, a Sitecom bleutooth USB dongle and the 1.7 version of the WiimoteLib.

 

Many thanks!

 

Manu

Message Edited by mkdieric on 04-28-2009 02:39 PM
Message Edited by mkdieric on 04-28-2009 02:40 PM
Certified LabVIEW Developer (CLD)
0 Kudos
Message 89 of 220
(5,236 Views)

Hi,

I've been capturing IR data from multiple wiimotes using Wiimotelib 1.7 (as a .NET assembly) and have been getting progressively slower reads from the Wiimote.  This happens using both a polling- and event-based approach.  The rates can be sustained at ~100Hz for a few minutes but will drop as far as 10-20Hz. This is on LabView 8.5.  I've tried 2 different bluetooth adapters and 2 different bluetooth stacks, so I doubt that is the issue. Has anyone seen this behavior or offer suggestions?  I've attached a polling example.  Thanks.

 

-Joe

0 Kudos
Message 90 of 220
(5,127 Views)