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: More..