dyadica.net

Fun and Games in the Dyadic Sea

Logic3 FreeBird Working with WiimoteLib

permalink image comments image
Wednesday, 4 February '09 :
This post has been updated to include implementation within WiimoteLib.

Hi Just to let you know that I have just had some joy with the Logic3 nunchuck and version 1.7 of WiimoteLib.

You must start with the chuck turned off then once everything has been initialized hit the fc paring button and your all systems go.

497-2497-4

The lib views the chuck as the unknown device: a42000000, thus, in order to get it working at this initial stage I have added the following hack/clause to the ExtensionType case poll:

if (type.ToString("x") == "a420000000") {
mWiimoteState.ExtensionType = ExtensionType.Nunchuk; }
else { throw new WiimoteException("Unknown extension controller found: " + type.ToString("x")); }

An interesting detail at this point is that only the “raw” values are obtainable for both stick and accelerometer data, any Ideas?

I was wondering if this was the case with other chucks too. Are they in fact working with version 1.7, but only detailing raw data. I have also posted these findings over at Brian Peek’s site and am awaiting feedback.

Tomorrow I aim to start implementing the Logic3 FreeBird as an additional ExtensionType within wiimoteLib.

Time for a bit of an update. I may have made a bit of a piratical error that affected the testing of the origional Logic3 Freebird Thumbstick.

Since I first posted about my findings both here and at brianpeek.com I have tested several additional sticks. The first being the intec chuck. Unlike the logic3 stick the values data stream was unaffected.

This is also the case with the Logic3 Freebird Nunchuck Adapter. My guess is at this point that I have been using the adapter receiver for the thumbstick test (I seem to have one missing, humm). This may have caused the strange no values result.

0080492605602_500x500379-2

I rushed straight in to implementing wireless chucks into my wiindows, wiimoteLib application, and was done in about 10 min’s. I will test the Thumbstick again as soon as I have tracked down the missing receiver.

First of all you need to add the id definition to the ExtensionType enumeration within DataTypes.cs. I did this just below the Nunchuck definition as follows:

///
/// Wireless extension
///
Wireless = 0x000000a420000000,

If you want your wireless devices to be seen as standard chucks within your application(s) then all you need to do next is add the following case within the InitializeExtension() function inside Wiimote.cs:

case ExtensionType.Wireless:
mWiimoteState.ExtensionType = ExtensionType.Nunchuk;
Console.WriteLine("wireless detected");
break;

However if like me you would like to display as a different extension type within your application then just add the Wireless case between the Nunchuck and ClassicController, to give the following:

case ExtensionType.Nunchuk:
case ExtensionType.Wireless:
case ExtensionType.ClassicController:
case ExtensionType.Guitar:
case ExtensionType.BalanceBoard:

With this done all you need to do is expand the ExtensionType cases within Wiimote.cs so that they read as Nunchuck or Wireless as follows:

case ExtensionType.Nunchuk:
case ExtensionType.Wireless:

So there you have it, working wireless Nunchucks. An interesting point to note is that so far the Logic3 adapter seems to give the best results. I say this as it is the only one that works inserted from application start up. Also I have not had to re-pair the device and receiver.

Tags: , , ,

page meta

get trackback image get trackback image
details

say what do you think

RSS feed | Trackback URI

css | xhtml | dyadica.net © admin 2010 | powered: wordpress | fuel: ps-wii-elite | top | sign-up