12-08-2008 09:05 PM
I'm using the wiimote vi available here: http://decibel.ni.com/content/docs/DOC-1353
I seem to get about 10 acceleration samples/values per second. Anyone know if that's standard and what might be affecting my sampling frequency? I'd prefer it to be closer to 100 samples/second in order to record accelerations I am interested in.
Thanks,
-Adam
12-09-2008 02:01 PM
Adam,
I looked at that code several months back and decided that it was a bit outdated for my liking. I went ahead and created my own little API/library that uses version 1.5.2.0 of the WiimoteLib.dll. I created a quick example VI that will connect to the Wiimote, perform your accelerometer readings in a while loop, then exit and close references. I'm working on my own version of the LabVIEW WiiMote API using the WiimoteLib and .NET. I wasn't as big of a fan as the event based measurements as it was a little more confusing. Using straight invoke/property nodes one can achieve similar results but it is much easier to create a SubVI for each type of function you'd like.
Let me know if running this VI with the 1.5.2.0 DLL increases performance.
12-09-2008 06:03 PM
That sounds like just what I need. I have Labview 8.5 though... Could you post or send me a version for 8.5?
Thanks!
-Adam
12-10-2008 11:09 AM
Adam,
Please see the attached file.
12-10-2008 04:46 PM
Thanks.
It is about 20 X faster and more stable in terms of sampling frequency etc.
-Adam
12-11-2008 11:35 AM
Adam,
That is great news! I might invest some time in finishing this WiiMote Library that I started a while back and make it available online - sounds like there might be some interest in it.
12-12-2008 11:36 AM
The example that I had posted here: http://decibel.ni.com/content/docs/DOC-1353 actually includes several different examples, one that uses an event-driven approach and one that uses a more simple acquire-in-a loop approach. The latter framework opens a reference outside of the loop and calls a subVI in the loop for each measurement.
In playing with my code, I found that the speed of the acquisition appeared to be limited to the rate as supplied by the underlying WiimoteLib DLL.
--Sam
12-15-2008 09:18 AM
12-20-2008 07:21 PM
Anyone know if the vis work or if anyone has gotten them to work with the nunchuck?
Thanks,
-Adam
12-22-2008 10:11 AM
Adam,
I don't remember if the ones on the dev zone worked or not with the nunchuck. Sometimes you need to once the Wiimote is connected to your program, disconnect (physically) the nunchuck from the Wiimote and then plug it back in. I've written code that works with the nunchuck (xy coordinates, buttons, and accelerometers) with the 1.5.2 version of the library. If you'd like that I could probably whip up something, what are you wanting to gather?