10-16-2009 01:45 PM
Hi Kovacs,
A great tutorial to look at is the Learn LabVIEW in 3 Hours, found here:
http://www.ni.com/academic/labview_training/
It looks like you could use the Simple Polled Acquisition (IR) Example as a starting point. It polls the accelerometer data every 100 ms and you could use this to graph and log the data.
10-17-2009 02:54 PM
Thank you, Kyle.
Learn it in 3 hours.. sounds promising, heh.
I'll start with the example you mentioned then, but I was curious if there's a huge difference between the "polled" and the "event" ones?
10-19-2009 10:21 AM
The polled examples rely on a loop that periodically checks for new information / changes from the Wiimote, while the event driven examples rely on the driver to notify the code that there is new info / changes from the wiimote.
10-22-2009 06:40 AM
I am using LabView 8.0. I can only read the bottons of the wii remote. Can anyone help me understanding wy I can't read the accelerometer and the IR?
Thanks,
Andrew
10-23-2009 09:51 AM
Things are going more and more strange...
I am using LabView 8.0, a Samsung minidesktop with embedded bluetooth-widcomm...
At first time I could read the wii-remote buttons but not the accelerometer and the IR.
I have updated the widcomm software to 5.0.... impossible to get pairing because the new version does not permit to skip the security code...
I have installed blusoleil and it works perfectly with wiinremote... but now I can't read anything from thw wii-remote with Labview...
Any suggestion?
Thanks,
Andrew
10-24-2009 07:32 AM
....now I am trying to start from the low level following the details described in http://blogs.msdn.com/coding4fun/archive/2007/03/14/1879033.aspx
I am still at the beginning because the setupai.dll_stetupdienumdeviceinterface gives a 0 value in return parameter (meaning not succesful) and does not return information on any device.
I have attached the vi if someone would help me to understand the problem and to go forward....
Andrew
10-26-2009 05:52 PM
Hi glogloglo,
What happens when you use the WiimoteTest.exe? I believe it's not written using LabVIEW, so you can test the Wiimote connection.
10-27-2009 11:38 AM
Dear Kyle ST,
thank you for the suggestion. I have resolved by reactivating the Microsoft bluetooth stack. Now the .vi library works cery well.
But here is anothe issue:
I have read that the wiimote shoud send data at 100Hz, but it seems to me that some samples are read twice and some are missing, so the actual number of real samples that I receive in a while loop is about 80/sec. Could you help me understanding why? I guess that it could be due to how the hidD_GetInputReport works?
Thank you,
Andrew
10-29-2009 10:35 AM
Hi Andrew,
How are you requesting the data? If your while loop is running faster than the Wiimote can send data, you're probably seeing duplicate samples. What is the code you are using?
10-30-2009 06:37 AM
Dear Kyle,
thank you again for your suggestion. I have found on the microsoft web site that the hidd_getreport (used in the .vi posted on the beginning of this tread) is not the best chioce to acquire data over time because indeed it can lost data!
The best chioce is to use the kernel32_readfile function that works with buffering capability. The trick is to use a read buffer with a dimension that is a multiple of 22 (the basic report sent by the wiimote). I have successfuly used an initialized array of dimension 17x22 to pass to the kernel32_readfile function; this permits to acquire data at 100samples/sec without any lost.
I post the library that I have modified and an example to whom it may concern.
Best regard,
Andrew