dyadica.net

Fun and Games in the Dyadic Sea

Posts Tagged ‘wiimoteLib’

permalink image comments image
Friday, 31 July '09: Adding The Step Event

In this Instruction we are going to modify WiimoteLib by including a new event trigger that is activated upon a change in either Quad or Zone value.

This is a very useful addition that allows for “singular” triggering so that you don’t have to rely on “flag checks” within the standard WiimoteState loop and thus allowing the Libary to do all the work!

Before we start, this instruction assumes you have previously completed the Areas Quad and Zone Instruction.

Start off by opening up the Events.cs file and add the following code below the public class WiimoteChangedEventArgs: Read..

Tags: , , , , , , , ,
permalink image comments image
Thursday, 30 July '09: Merging Quadzone and Quadrant

Here we have another step down the path towards full Balance Board Orientation. This time out we are going to merge the Quadrant and Quadzone functionality into a new collective known as “Area” (for want of a better name).

Please note that this instruction assumes familiarity with the Quadrant and Quadzone instructions.

Similar to the Grouping GOG instruction we are going to start by modifying the DataTypes.cs file  by grouping the two existing definitions by grouping them together in a new struct.

Replace both the Quadrant and Quadzone definitions with the following singular block of code:

/// <summary>
/// Area of most Weight/COG
/// </summary>
[DataMember]
public Area Area;

Next we are going to add the new struct so that we can use this definition. Below the BalanceBoardState struct add the following code: Read..

Tags: , , , , , , , , ,
permalink image comments image
Thursday, 23 July '09: Wii Motion Plus Beta Support

Brian has done it again, check out the following cross-posting from brianpeek.com detailing beta support for the Wii Motion Plus:

I have posted a new version of WiimoteLib as a beta for people to play around with the Wii MotionPlus accessory.  Please note that this is not a stable release and should only be used if you wish to mess around with the MotionPlus.  Also note that only C# source code is included in this release as it is not a final build.  Here’s the change log:

v1.8.0.0

  • Taiko Drum Master’s TaTaCon drum controller supported (Dean Herbert)
  • Bare-bones Wii MotionPlus support (wiibrew.org, testing by Tyler Tolley)
  • WiimoteTest UI changed to add MotionPlus data
    • Please note that the current version is VERY flakey and may not work at all for you.
    • Pair your Wiimote, plug in your MotionPlus, call InitializeMotionPlus()
    • Extensions plugged into the MotionPlus will give wacky results…not supported…yet!
    • Internal changes to perhaps fix some threading issues

So remember, it’s a beta, it may not work for you, and the data you’ll get back from the accessory is just the raw data it provides.  You won’t get real orientation values.

That said, head over to CodePlex and give it a try! (Brian Peek)

Great work Brian!

Tags: , , ,
permalink image comments image
Wednesday, 15 July '09: Dampened and Standard COG

A bit of history: Inspired by endquotes WPF implementation of COG I developed an equivalent system for WiimoteLib that provides  facility for Dampened COG output. As stated, I find the two systems can be used to compliment each other greatly depending upon the desired application requirement. To me the next obvious step was to group both of the outputs together as two available types under the single banner CenterOfGravity.

Using the format of the Wiimote Test application, once complete this instruction will enable access to each COG output as follows:

// Standard COG
lblCOG.Text = ws.BalanceBoardState.CenterOfGravity.Standard.ToString();
// Dampened COG
lblDampenedCOG.Text = ws.BalanceBoardState.CenterOfGravity.Dampened.ToString();

Before you start this instruction assumes use of a raw copy of WiimoteLib 1.7 and have looked at the Adding Dampened COG to WiimoteLib instruction.

Here is how its done: Read..

Tags: , , , , , , ,
permalink image comments image
Tuesday, 14 July '09: The Balance Board Quadzone Filter for WiimoteLib

There are times when using the WiiFit Balance Board with WiimoteLib that I find it useful to have direct access to which particular “Zone” currently has focus (most weight or COG applied), just think WiiFit areobics etc. Output is fed back as a string which can then be used as desired eg in a switch or if statement etc.

Here’s how its done:

First of all open up Data Types.cs and add the following code block within the BalanceBoardState struct:

/// <summary>
/// Current Balance Board Zone
/// </summary>
[DataMember]
public string Quadzone;

Next open up Wiimote.cs and locate the parse extension function. For convenience sake the following block shorthands the values included with WiimoteLib to help with RSI. Add the following code below the existing COG code just above the break: Read..

Tags: , , , , , ,
permalink image comments image
Tuesday, 14 July '09: The Balance Board Quadrant Filter for WiimoteLib

There are times when using the WiiFit Balance Board with WiimoteLib that I find it useful to have direct access to which particular “Quadrant” currently has focus (most weight or COG applied), as with the Quadzone Filter just think WiiFit areobics etc.

When used in conjunction with the Quadzone Filter you have the basic tools needed for very simple forms of navigation. As with the Quadzone filter, output is fed back as a string which can then be used as desired eg in a switch or if statement etc.

So without further ado heres how its done:

First of all open up Data Types.cs and add the following code block within the BalanceBoardState struct:

/// <summary>
/// Current Balance Board Quadrant, SJB
/// </summary>
[DataMember]
public string Quadrant;

Next open up Wiimote.cs and locate the parse extension function. For convenience sake the following block shorthands the values included with WiimoteLib. The code is the same as that used in the Quadzone tutorial so if you have already implemented it there you can skip this step, otherwise add the following code below the existing COG code just above the break: Read..

Tags: , , , , , , ,
permalink image comments image
Saturday, 11 July '09: Balance Board BMI

Want to be able to calculate your BMI via WiimoteLib so you can use your board ala WiiFit, heres how its done:

Before we start, for a detailed description of BMI please refer to the following Wikipedia article: http://en.wikipedia.org/wiki/Body_mass_index

The formula for calculating BMI is a simple one and can be defined as follows:

BMI = Weight in kilograms / height in meters² – Metric
BMI = (weight in pounds * 703 ) / height in inches² – Imperial

The following function is passed a WiimoteState value ws and returns BMI as a double. The division by 100 is used to convert a cm user_height value into meters and can quite easily be replaced/removed if desired. Read..

Tags: , , , , , , , ,
permalink image comments image
Friday, 10 July '09: Real Balance Board Orientation

Today is a good day. After a exactly one year and two days, I have finally cracked the enigma of Balance Board Orientation, and have a version which robust enough for release.

Needless to say I am overjoyed, check out the video:

During the last year I have developed numerous implementations for the task, most of which worked, however none strong enough to deal with the heterogeneous error known as untrained users, however no more!

I am now working on implementing the system fully within both WiimoteLib and the WiiCi driver. Check back soon for more details.

Tags: , , , , , ,
permalink image comments image
Friday, 19 June '09: Status of Wii MotionPlus Support for WiimoteLib

Here is a Cross Post from brianpeek.com detailing Brian’s current progress with the Wii Motion Plus: Source

Ok, I get about 10 emails a day on this, so I figure a status update is in order.

The Wii MotionPlus extension for the Wiimote was released last week. Since then, I and others have been working to figure out how the device works. Unfortunately, it does NOT work as every other extension controller has worked up until this point, mostly due to the fact that the Wii MotionPlus accessory has an expansion port of its own so all of the other extension controllers can plug into it.

In the past few days, some progress has been made thanks to the folks over at wiibrew.org, although functionality is nowhere near complete. For example, it’s currently impossible to have the Wiimote notify you when the Wii MotionPlus is inserted into the bottom of the Wiimote, like all of the other extension controllers do.

I have been working with the information at wiibrew.org and am trying to get things working reliably with my library so that developers can actually get some degree of functionality out of it.

So, all that said, expect to see a new (likely beta) version of WiimoteLib “soon” that has some bare-bones Wii MotionPlus functionality included. It won’t be perfect, complete, or bug free, but it will allow you to tinker with the device a bit. I will update my blog when the new version is available. Thanks!

Tags: , , , ,
permalink image comments image
Friday, 12 June '09: Wii Motion Plus

Well its Wii Motion Plus release day here i the uk and the stores are full of them, so I had no need to panic about getting hold of one this morning!

The good news is that the device does not crash either WiimoteLib or my WiiCi application and the bad news is that the device does not crash either WiimoteLib or my WiiCi application so I have no place really to start. Read..

Tags: , , ,

poll tags

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