11-06-2009 03:31 AM
Well it doesn't look pretty but I got something working.
I managed to put the Accelerometer and IR data into graphs and put the data into spreadsheets.
What I don't quite get is that the IR data gives me something like this:
0.244 0.000 0.000 0.000 0.404 0.000 0.000 0.000 0.427 0.000 0.000 0.00
So every reading is followed by 0 three times.. perhaps this is not uncommon but I have to look into that.
I'm also trying to put the button data into a file, I think I'm on to something but it's not giving me clear data yet.
For anyone who's interested:
Screenshot Front Panel
http://i13.photobucket.com/albums/a290/Rorschachinkblot/2.jpg
Screenshot Block Diagram
http://i13.photobucket.com/albums/a290/Rorschachinkblot/1.jpg11-09-2009 02:39 PM
Does anyone know of any problems that have been encountered in Labview with the specific Bluetooth connection used? I am using a Bluetooth USB adapter that uses Widcomm 5.1 but I cant seem to get Labview to read the commands from my Wiimote? I know the Bluetooth adapter works as I can run Johnny Lee's whiteboard and also Brian Peeks multiple Wiimote tester.
Thanks for any help in advance,
Alistair
11-11-2009 08:05 AM
Hi Alistair,
You have probably done this, but learn thru the following DevZone and KB. There is some good information in there regarding what kind of Bluetooth adapter are supported in LabVIEW. The main thing is that the adapter needs to be supported by the Microsoft Bluetooth Stack.
Thank you for choosing National Instruments.
Aaron Pena
National Instruments
Applications Engineer
11-19-2009 10:54 AM
I've managed to store the Acceleration and IR data in a spreadsheet file along with any presses of the A and/or B button (using the polled examples of Sam Shearman). So now I'm trying to figure out what the data actually means (should have started with that in the first place prolly, but from what I understand the wiimote is all about reverse engineering anyway).
Earlier in this thread someone asked about calculating the exact position of the wiimote using the accelerometers, he was told that this was only feasible if you used the IR data as well. I've been looking into that a bit and it would be ideal to know the 6 Degrees of Freedom so you'd know position and orientation of the wiimote. I found pitch and roll data among the event examples posted by Sam and also IR data (with which you could calculate yaw and position perhaps?), but since I lack some serious skills I was curious to know if anyone has tackled this already using LabVIEW or perhaps has been working with the Wii Motion Plus (which I understand has gyroscopes that make tracking of the wiimote easier)? It never hurts to ask, right (or was that help)?
11-29-2009 11:49 AM
Felt like playing a bit with the wiimote speaker functionality. I based the new VIs on the newest version of Johann's wiimote interface code I could find on this thread and the information on WiiBrew relevant to accessing the speaker. My hope was to stream data from a wav file to the speaker. I was able to get sound to come out of the speaker but it sounds nothing like the source wave. From what I could find from a bit of searching on the internet it didn't seem like there had been much success using the speaker for anything other than simple tones yet.
According to WiiBrew you basically stream data 20 bytes at a time to the wiimote speaker and the system completely relies on timing at the host end to send data at the correct rate (i.e. if you send the next 20 bytes too late you get a gap in the audio and if you send them too early you cut off some of the previous data). Team this up with the two sample rates that have been identified to work (1.5kHz and 3kHz) and you don't have the foundation for great sound in the first place. I suspect there is probably some information that has not been reverse engineered yet that would make streaming useful audio easier (such as a double buffer to make some of the strict host timing requirements easier for example). I have heard some decent audio through the speaker in some Wii games so the hardware is capable of producing something useful.
Just wanted to put up these VIs for anyone interested in doing some more playing with the Wiimote speaker.
wiimote - core.zip contains the wiimote VIs from Johann
wiimote - speaker.zip contains the new VIs for accessing the speaker
everything is saved in LV 8.6
Enjoy
12-03-2009 05:55 AM
12-03-2009 07:17 AM
I re-downloded it from the link above and was able to extract it using winrar and the windows XP built in ZIP function but just in case I created a new zip file using a different computer. If this one still doesn't work then I would try using a different computer or decompression program on your end.
12-08-2009 10:18 AM
Hello,
I installed current WiiMoteLib 1.7 and
wml17-Wiimote VIs. WiimoteTest.exe is working fine, after I was able to
establish a Bluetooth connection. But when using e.g. simple
Acquisition(Polled).vi I receive following error message:
Error calling method WiimoteLib.Wiimote.SetReportType of
ObjectId handle: 0xEBD1148 for obj 0xC719F9[WiimoteLib.Wiimote] in domain
[WiimoteExamples.lvproj for Run] and thread 5932,
(System.Reflection.TargetInvocationException: Ein Aufrufziel hat einen
Ausnahmefehler verursacht. Inner
Exception: System.Security.SecurityException: Fehler bei der Anforderung des
Berechtigungstyps "System.Security.Permissions.SecurityPermission,
mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089". ) in Simple Acquisition (Polled).vi
Unfortunately I'm not a LV-pro, so I cannot figure out the reason for my problem. I'm working on Win XP SP3 with LV 8.6.
Is there anybody having an idea, what's the solution to this error?
Thanks for your help,
Frank
12-08-2009 08:53 PM
I tried you WiimoteVI_3_2.zip but don't get any data back from wiimote. If used the early examples, I can get a...
Anyway, thank you for your work.
One problem I have is to parse 0x37 data using low level. the acc data retrieved but IR data can not be retrieve. I mean IR data is no change. Any help will be appreciated.
Z. Y. P
12-10-2009 12:38 PM