Remarks

WiiClassicControllerPro
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation.Sensors.Hid.WiiExtensionControllers

Code Example

WiiClassicControllerPro classicControllerPro;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");

    var i2cBus = Device.CreateI2cBus(WiiClassicControllerPro.DefaultI2cSpeed);

    classicControllerPro = new WiiClassicControllerPro(i2cBus: i2cBus,
                                                 useHighResolutionMode: true);

    //onetime update - could be used in a game loop
    classicControllerPro.Update();

    //check the state of a button
    Resolver.Log.Info("X Button is " + (classicControllerPro.XButton.State == true ? "pressed" : "not pressed"));

    //.NET events
    classicControllerPro.AButton.Clicked += (s, e) => Resolver.Log.Info("A button clicked");
    classicControllerPro.BButton.Clicked += (s, e) => Resolver.Log.Info("B button clicked");
    classicControllerPro.XButton.Clicked += (s, e) => Resolver.Log.Info("X button clicked");
    classicControllerPro.YButton.Clicked += (s, e) => Resolver.Log.Info("Y button clicked");

    classicControllerPro.LButton.Clicked += (s, e) => Resolver.Log.Info("L button clicked");
    classicControllerPro.RButton.Clicked += (s, e) => Resolver.Log.Info("R button clicked");
    classicControllerPro.ZLButton.Clicked += (s, e) => Resolver.Log.Info("ZL button clicked");
    classicControllerPro.ZRButton.Clicked += (s, e) => Resolver.Log.Info("ZR button clicked");

    classicControllerPro.PlusButton.Clicked += (s, e) => Resolver.Log.Info("+ button clicked");
    classicControllerPro.MinusButton.Clicked += (s, e) => Resolver.Log.Info("- button clicked");
    classicControllerPro.HomeButton.Clicked += (s, e) => Resolver.Log.Info("Home button clicked");

    classicControllerPro.DPad.Updated += (s, e) => Resolver.Log.Info($"DPad {e.New}");

    classicControllerPro.LeftAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Left Analog Stick {e.New.Horizontal}, {e.New.Vertical}");
    classicControllerPro.RightAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Right Analog Stick {e.New.Horizontal}, {e.New.Vertical}");

    return Task.CompletedTask;
}

public override Task Run()
{
    classicControllerPro.StartUpdating(TimeSpan.FromMilliseconds(200));
    return Task.CompletedTask;
}

Sample project(s) available on GitHub

Wiring Example

To wire a WiiClassicControllerPro to your Meadow board, connect the following:

WiiClassicControllerPro Meadow Pin
GND GND
SCL D08 (SCL)
SDA D07 (SDA)
VCC 3V3
Characteristic Locus
Inheritance object WiiExtensionControllerBase WiiClassicControllerBase > WiiClassicControllerPro
Implements II2cPeripheral
Inherited Members WiiClassicControllerBase.LeftJoystickX WiiClassicControllerBase.LeftJoystickY WiiClassicControllerBase.RightJoystickX WiiClassicControllerBase.RightJoystickY WiiClassicControllerBase.LeftTriggerPosition WiiClassicControllerBase.RightTriggerPosition WiiClassicControllerBase.PlusButtonPressed WiiClassicControllerBase.MinusButtonPressed WiiClassicControllerBase.HomeButtonPressed WiiClassicControllerBase.LButtonPressed WiiClassicControllerBase.RButtonPressed WiiClassicControllerBase.ZLButtonPressed WiiClassicControllerBase.ZRButtonPressed WiiClassicControllerBase.XButtonPressed WiiClassicControllerBase.YButtonPressed WiiClassicControllerBase.AButtonPressed WiiClassicControllerBase.BButtonPressed WiiClassicControllerBase.DPadLeftPressed WiiClassicControllerBase.DPadRightPressed WiiClassicControllerBase.DPadUpPressed WiiClassicControllerBase.DPadDownPressed WiiClassicControllerBase.useHighResolutionMode WiiClassicControllerBase.Initialize() WiiExtensionControllerBase.DefaultI2cAddress WiiExtensionControllerBase.DefaultI2cSpeed WiiExtensionControllerBase.i2cComms WiiExtensionControllerBase.ReadBuffer WiiExtensionControllerBase.samplingLock WiiExtensionControllerBase.SamplingTokenSource WiiExtensionControllerBase.IsSampling WiiExtensionControllerBase.GetIdentification() WiiExtensionControllerBase.StartUpdating(TimeSpan) WiiExtensionControllerBase.StopUpdating() object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString()
Namespace Meadow.Foundation.Sensors.Hid
Assembly WiiExtensionControllers.dll

Syntax

public class WiiClassicControllerPro : WiiClassicControllerBase, II2cPeripheral

Constructors

WiiClassicControllerPro(II2cBus, bool)

Creates a Wii Classic Controller object

Declaration
public WiiClassicControllerPro(II2cBus i2cBus, bool useHighResolutionMode = false)

Parameters

Type Name Description
II2cBus i2cBus

the I2C bus connected to controller

bool useHighResolutionMode

Enable high resolution mode analog sticks and triggers (8 bits of precision)

Remarks

WiiClassicControllerPro
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation.Sensors.Hid.WiiExtensionControllers

Code Example

WiiClassicControllerPro classicControllerPro;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");

    var i2cBus = Device.CreateI2cBus(WiiClassicControllerPro.DefaultI2cSpeed);

    classicControllerPro = new WiiClassicControllerPro(i2cBus: i2cBus,
                                                 useHighResolutionMode: true);

    //onetime update - could be used in a game loop
    classicControllerPro.Update();

    //check the state of a button
    Resolver.Log.Info("X Button is " + (classicControllerPro.XButton.State == true ? "pressed" : "not pressed"));

    //.NET events
    classicControllerPro.AButton.Clicked += (s, e) => Resolver.Log.Info("A button clicked");
    classicControllerPro.BButton.Clicked += (s, e) => Resolver.Log.Info("B button clicked");
    classicControllerPro.XButton.Clicked += (s, e) => Resolver.Log.Info("X button clicked");
    classicControllerPro.YButton.Clicked += (s, e) => Resolver.Log.Info("Y button clicked");

    classicControllerPro.LButton.Clicked += (s, e) => Resolver.Log.Info("L button clicked");
    classicControllerPro.RButton.Clicked += (s, e) => Resolver.Log.Info("R button clicked");
    classicControllerPro.ZLButton.Clicked += (s, e) => Resolver.Log.Info("ZL button clicked");
    classicControllerPro.ZRButton.Clicked += (s, e) => Resolver.Log.Info("ZR button clicked");

    classicControllerPro.PlusButton.Clicked += (s, e) => Resolver.Log.Info("+ button clicked");
    classicControllerPro.MinusButton.Clicked += (s, e) => Resolver.Log.Info("- button clicked");
    classicControllerPro.HomeButton.Clicked += (s, e) => Resolver.Log.Info("Home button clicked");

    classicControllerPro.DPad.Updated += (s, e) => Resolver.Log.Info($"DPad {e.New}");

    classicControllerPro.LeftAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Left Analog Stick {e.New.Horizontal}, {e.New.Vertical}");
    classicControllerPro.RightAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Right Analog Stick {e.New.Horizontal}, {e.New.Vertical}");

    return Task.CompletedTask;
}

public override Task Run()
{
    classicControllerPro.StartUpdating(TimeSpan.FromMilliseconds(200));
    return Task.CompletedTask;
}

Sample project(s) available on GitHub

Wiring Example

To wire a WiiClassicControllerPro to your Meadow board, connect the following:

WiiClassicControllerPro Meadow Pin
GND GND
SCL D08 (SCL)
SDA D07 (SDA)
VCC 3V3

Properties

AButton

A Button

Declaration
public IButton AButton { get; }

Property Value

Type Description
IButton

Remarks

WiiClassicControllerPro
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation.Sensors.Hid.WiiExtensionControllers

Code Example

WiiClassicControllerPro classicControllerPro;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");

    var i2cBus = Device.CreateI2cBus(WiiClassicControllerPro.DefaultI2cSpeed);

    classicControllerPro = new WiiClassicControllerPro(i2cBus: i2cBus,
                                                 useHighResolutionMode: true);

    //onetime update - could be used in a game loop
    classicControllerPro.Update();

    //check the state of a button
    Resolver.Log.Info("X Button is " + (classicControllerPro.XButton.State == true ? "pressed" : "not pressed"));

    //.NET events
    classicControllerPro.AButton.Clicked += (s, e) => Resolver.Log.Info("A button clicked");
    classicControllerPro.BButton.Clicked += (s, e) => Resolver.Log.Info("B button clicked");
    classicControllerPro.XButton.Clicked += (s, e) => Resolver.Log.Info("X button clicked");
    classicControllerPro.YButton.Clicked += (s, e) => Resolver.Log.Info("Y button clicked");

    classicControllerPro.LButton.Clicked += (s, e) => Resolver.Log.Info("L button clicked");
    classicControllerPro.RButton.Clicked += (s, e) => Resolver.Log.Info("R button clicked");
    classicControllerPro.ZLButton.Clicked += (s, e) => Resolver.Log.Info("ZL button clicked");
    classicControllerPro.ZRButton.Clicked += (s, e) => Resolver.Log.Info("ZR button clicked");

    classicControllerPro.PlusButton.Clicked += (s, e) => Resolver.Log.Info("+ button clicked");
    classicControllerPro.MinusButton.Clicked += (s, e) => Resolver.Log.Info("- button clicked");
    classicControllerPro.HomeButton.Clicked += (s, e) => Resolver.Log.Info("Home button clicked");

    classicControllerPro.DPad.Updated += (s, e) => Resolver.Log.Info($"DPad {e.New}");

    classicControllerPro.LeftAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Left Analog Stick {e.New.Horizontal}, {e.New.Vertical}");
    classicControllerPro.RightAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Right Analog Stick {e.New.Horizontal}, {e.New.Vertical}");

    return Task.CompletedTask;
}

public override Task Run()
{
    classicControllerPro.StartUpdating(TimeSpan.FromMilliseconds(200));
    return Task.CompletedTask;
}

Sample project(s) available on GitHub

Wiring Example

To wire a WiiClassicControllerPro to your Meadow board, connect the following:

WiiClassicControllerPro Meadow Pin
GND GND
SCL D08 (SCL)
SDA D07 (SDA)
VCC 3V3

BButton

B Button

Declaration
public IButton BButton { get; }

Property Value

Type Description
IButton

Remarks

WiiClassicControllerPro
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation.Sensors.Hid.WiiExtensionControllers

Code Example

WiiClassicControllerPro classicControllerPro;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");

    var i2cBus = Device.CreateI2cBus(WiiClassicControllerPro.DefaultI2cSpeed);

    classicControllerPro = new WiiClassicControllerPro(i2cBus: i2cBus,
                                                 useHighResolutionMode: true);

    //onetime update - could be used in a game loop
    classicControllerPro.Update();

    //check the state of a button
    Resolver.Log.Info("X Button is " + (classicControllerPro.XButton.State == true ? "pressed" : "not pressed"));

    //.NET events
    classicControllerPro.AButton.Clicked += (s, e) => Resolver.Log.Info("A button clicked");
    classicControllerPro.BButton.Clicked += (s, e) => Resolver.Log.Info("B button clicked");
    classicControllerPro.XButton.Clicked += (s, e) => Resolver.Log.Info("X button clicked");
    classicControllerPro.YButton.Clicked += (s, e) => Resolver.Log.Info("Y button clicked");

    classicControllerPro.LButton.Clicked += (s, e) => Resolver.Log.Info("L button clicked");
    classicControllerPro.RButton.Clicked += (s, e) => Resolver.Log.Info("R button clicked");
    classicControllerPro.ZLButton.Clicked += (s, e) => Resolver.Log.Info("ZL button clicked");
    classicControllerPro.ZRButton.Clicked += (s, e) => Resolver.Log.Info("ZR button clicked");

    classicControllerPro.PlusButton.Clicked += (s, e) => Resolver.Log.Info("+ button clicked");
    classicControllerPro.MinusButton.Clicked += (s, e) => Resolver.Log.Info("- button clicked");
    classicControllerPro.HomeButton.Clicked += (s, e) => Resolver.Log.Info("Home button clicked");

    classicControllerPro.DPad.Updated += (s, e) => Resolver.Log.Info($"DPad {e.New}");

    classicControllerPro.LeftAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Left Analog Stick {e.New.Horizontal}, {e.New.Vertical}");
    classicControllerPro.RightAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Right Analog Stick {e.New.Horizontal}, {e.New.Vertical}");

    return Task.CompletedTask;
}

public override Task Run()
{
    classicControllerPro.StartUpdating(TimeSpan.FromMilliseconds(200));
    return Task.CompletedTask;
}

Sample project(s) available on GitHub

Wiring Example

To wire a WiiClassicControllerPro to your Meadow board, connect the following:

WiiClassicControllerPro Meadow Pin
GND GND
SCL D08 (SCL)
SDA D07 (SDA)
VCC 3V3

DPad

D-pad

Declaration
public IDigitalJoystick DPad { get; }

Property Value

Type Description
IDigitalJoystick

Remarks

WiiClassicControllerPro
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation.Sensors.Hid.WiiExtensionControllers

Code Example

WiiClassicControllerPro classicControllerPro;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");

    var i2cBus = Device.CreateI2cBus(WiiClassicControllerPro.DefaultI2cSpeed);

    classicControllerPro = new WiiClassicControllerPro(i2cBus: i2cBus,
                                                 useHighResolutionMode: true);

    //onetime update - could be used in a game loop
    classicControllerPro.Update();

    //check the state of a button
    Resolver.Log.Info("X Button is " + (classicControllerPro.XButton.State == true ? "pressed" : "not pressed"));

    //.NET events
    classicControllerPro.AButton.Clicked += (s, e) => Resolver.Log.Info("A button clicked");
    classicControllerPro.BButton.Clicked += (s, e) => Resolver.Log.Info("B button clicked");
    classicControllerPro.XButton.Clicked += (s, e) => Resolver.Log.Info("X button clicked");
    classicControllerPro.YButton.Clicked += (s, e) => Resolver.Log.Info("Y button clicked");

    classicControllerPro.LButton.Clicked += (s, e) => Resolver.Log.Info("L button clicked");
    classicControllerPro.RButton.Clicked += (s, e) => Resolver.Log.Info("R button clicked");
    classicControllerPro.ZLButton.Clicked += (s, e) => Resolver.Log.Info("ZL button clicked");
    classicControllerPro.ZRButton.Clicked += (s, e) => Resolver.Log.Info("ZR button clicked");

    classicControllerPro.PlusButton.Clicked += (s, e) => Resolver.Log.Info("+ button clicked");
    classicControllerPro.MinusButton.Clicked += (s, e) => Resolver.Log.Info("- button clicked");
    classicControllerPro.HomeButton.Clicked += (s, e) => Resolver.Log.Info("Home button clicked");

    classicControllerPro.DPad.Updated += (s, e) => Resolver.Log.Info($"DPad {e.New}");

    classicControllerPro.LeftAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Left Analog Stick {e.New.Horizontal}, {e.New.Vertical}");
    classicControllerPro.RightAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Right Analog Stick {e.New.Horizontal}, {e.New.Vertical}");

    return Task.CompletedTask;
}

public override Task Run()
{
    classicControllerPro.StartUpdating(TimeSpan.FromMilliseconds(200));
    return Task.CompletedTask;
}

Sample project(s) available on GitHub

Wiring Example

To wire a WiiClassicControllerPro to your Meadow board, connect the following:

WiiClassicControllerPro Meadow Pin
GND GND
SCL D08 (SCL)
SDA D07 (SDA)
VCC 3V3

HomeButton

Home Button

Declaration
public IButton HomeButton { get; }

Property Value

Type Description
IButton

Remarks

WiiClassicControllerPro
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation.Sensors.Hid.WiiExtensionControllers

Code Example

WiiClassicControllerPro classicControllerPro;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");

    var i2cBus = Device.CreateI2cBus(WiiClassicControllerPro.DefaultI2cSpeed);

    classicControllerPro = new WiiClassicControllerPro(i2cBus: i2cBus,
                                                 useHighResolutionMode: true);

    //onetime update - could be used in a game loop
    classicControllerPro.Update();

    //check the state of a button
    Resolver.Log.Info("X Button is " + (classicControllerPro.XButton.State == true ? "pressed" : "not pressed"));

    //.NET events
    classicControllerPro.AButton.Clicked += (s, e) => Resolver.Log.Info("A button clicked");
    classicControllerPro.BButton.Clicked += (s, e) => Resolver.Log.Info("B button clicked");
    classicControllerPro.XButton.Clicked += (s, e) => Resolver.Log.Info("X button clicked");
    classicControllerPro.YButton.Clicked += (s, e) => Resolver.Log.Info("Y button clicked");

    classicControllerPro.LButton.Clicked += (s, e) => Resolver.Log.Info("L button clicked");
    classicControllerPro.RButton.Clicked += (s, e) => Resolver.Log.Info("R button clicked");
    classicControllerPro.ZLButton.Clicked += (s, e) => Resolver.Log.Info("ZL button clicked");
    classicControllerPro.ZRButton.Clicked += (s, e) => Resolver.Log.Info("ZR button clicked");

    classicControllerPro.PlusButton.Clicked += (s, e) => Resolver.Log.Info("+ button clicked");
    classicControllerPro.MinusButton.Clicked += (s, e) => Resolver.Log.Info("- button clicked");
    classicControllerPro.HomeButton.Clicked += (s, e) => Resolver.Log.Info("Home button clicked");

    classicControllerPro.DPad.Updated += (s, e) => Resolver.Log.Info($"DPad {e.New}");

    classicControllerPro.LeftAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Left Analog Stick {e.New.Horizontal}, {e.New.Vertical}");
    classicControllerPro.RightAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Right Analog Stick {e.New.Horizontal}, {e.New.Vertical}");

    return Task.CompletedTask;
}

public override Task Run()
{
    classicControllerPro.StartUpdating(TimeSpan.FromMilliseconds(200));
    return Task.CompletedTask;
}

Sample project(s) available on GitHub

Wiring Example

To wire a WiiClassicControllerPro to your Meadow board, connect the following:

WiiClassicControllerPro Meadow Pin
GND GND
SCL D08 (SCL)
SDA D07 (SDA)
VCC 3V3

LButton

L Button

Declaration
public IButton LButton { get; }

Property Value

Type Description
IButton

Remarks

WiiClassicControllerPro
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation.Sensors.Hid.WiiExtensionControllers

Code Example

WiiClassicControllerPro classicControllerPro;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");

    var i2cBus = Device.CreateI2cBus(WiiClassicControllerPro.DefaultI2cSpeed);

    classicControllerPro = new WiiClassicControllerPro(i2cBus: i2cBus,
                                                 useHighResolutionMode: true);

    //onetime update - could be used in a game loop
    classicControllerPro.Update();

    //check the state of a button
    Resolver.Log.Info("X Button is " + (classicControllerPro.XButton.State == true ? "pressed" : "not pressed"));

    //.NET events
    classicControllerPro.AButton.Clicked += (s, e) => Resolver.Log.Info("A button clicked");
    classicControllerPro.BButton.Clicked += (s, e) => Resolver.Log.Info("B button clicked");
    classicControllerPro.XButton.Clicked += (s, e) => Resolver.Log.Info("X button clicked");
    classicControllerPro.YButton.Clicked += (s, e) => Resolver.Log.Info("Y button clicked");

    classicControllerPro.LButton.Clicked += (s, e) => Resolver.Log.Info("L button clicked");
    classicControllerPro.RButton.Clicked += (s, e) => Resolver.Log.Info("R button clicked");
    classicControllerPro.ZLButton.Clicked += (s, e) => Resolver.Log.Info("ZL button clicked");
    classicControllerPro.ZRButton.Clicked += (s, e) => Resolver.Log.Info("ZR button clicked");

    classicControllerPro.PlusButton.Clicked += (s, e) => Resolver.Log.Info("+ button clicked");
    classicControllerPro.MinusButton.Clicked += (s, e) => Resolver.Log.Info("- button clicked");
    classicControllerPro.HomeButton.Clicked += (s, e) => Resolver.Log.Info("Home button clicked");

    classicControllerPro.DPad.Updated += (s, e) => Resolver.Log.Info($"DPad {e.New}");

    classicControllerPro.LeftAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Left Analog Stick {e.New.Horizontal}, {e.New.Vertical}");
    classicControllerPro.RightAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Right Analog Stick {e.New.Horizontal}, {e.New.Vertical}");

    return Task.CompletedTask;
}

public override Task Run()
{
    classicControllerPro.StartUpdating(TimeSpan.FromMilliseconds(200));
    return Task.CompletedTask;
}

Sample project(s) available on GitHub

Wiring Example

To wire a WiiClassicControllerPro to your Meadow board, connect the following:

WiiClassicControllerPro Meadow Pin
GND GND
SCL D08 (SCL)
SDA D07 (SDA)
VCC 3V3

LeftAnalogStick

Left analog joystick (6 or 8 bits of precision)

Declaration
public IAnalogJoystick LeftAnalogStick { get; }

Property Value

Type Description
IAnalogJoystick

Remarks

WiiClassicControllerPro
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation.Sensors.Hid.WiiExtensionControllers

Code Example

WiiClassicControllerPro classicControllerPro;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");

    var i2cBus = Device.CreateI2cBus(WiiClassicControllerPro.DefaultI2cSpeed);

    classicControllerPro = new WiiClassicControllerPro(i2cBus: i2cBus,
                                                 useHighResolutionMode: true);

    //onetime update - could be used in a game loop
    classicControllerPro.Update();

    //check the state of a button
    Resolver.Log.Info("X Button is " + (classicControllerPro.XButton.State == true ? "pressed" : "not pressed"));

    //.NET events
    classicControllerPro.AButton.Clicked += (s, e) => Resolver.Log.Info("A button clicked");
    classicControllerPro.BButton.Clicked += (s, e) => Resolver.Log.Info("B button clicked");
    classicControllerPro.XButton.Clicked += (s, e) => Resolver.Log.Info("X button clicked");
    classicControllerPro.YButton.Clicked += (s, e) => Resolver.Log.Info("Y button clicked");

    classicControllerPro.LButton.Clicked += (s, e) => Resolver.Log.Info("L button clicked");
    classicControllerPro.RButton.Clicked += (s, e) => Resolver.Log.Info("R button clicked");
    classicControllerPro.ZLButton.Clicked += (s, e) => Resolver.Log.Info("ZL button clicked");
    classicControllerPro.ZRButton.Clicked += (s, e) => Resolver.Log.Info("ZR button clicked");

    classicControllerPro.PlusButton.Clicked += (s, e) => Resolver.Log.Info("+ button clicked");
    classicControllerPro.MinusButton.Clicked += (s, e) => Resolver.Log.Info("- button clicked");
    classicControllerPro.HomeButton.Clicked += (s, e) => Resolver.Log.Info("Home button clicked");

    classicControllerPro.DPad.Updated += (s, e) => Resolver.Log.Info($"DPad {e.New}");

    classicControllerPro.LeftAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Left Analog Stick {e.New.Horizontal}, {e.New.Vertical}");
    classicControllerPro.RightAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Right Analog Stick {e.New.Horizontal}, {e.New.Vertical}");

    return Task.CompletedTask;
}

public override Task Run()
{
    classicControllerPro.StartUpdating(TimeSpan.FromMilliseconds(200));
    return Task.CompletedTask;
}

Sample project(s) available on GitHub

Wiring Example

To wire a WiiClassicControllerPro to your Meadow board, connect the following:

WiiClassicControllerPro Meadow Pin
GND GND
SCL D08 (SCL)
SDA D07 (SDA)
VCC 3V3

MinusButton

  • Button
Declaration
public IButton MinusButton { get; }

Property Value

Type Description
IButton

Remarks

WiiClassicControllerPro
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation.Sensors.Hid.WiiExtensionControllers

Code Example

WiiClassicControllerPro classicControllerPro;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");

    var i2cBus = Device.CreateI2cBus(WiiClassicControllerPro.DefaultI2cSpeed);

    classicControllerPro = new WiiClassicControllerPro(i2cBus: i2cBus,
                                                 useHighResolutionMode: true);

    //onetime update - could be used in a game loop
    classicControllerPro.Update();

    //check the state of a button
    Resolver.Log.Info("X Button is " + (classicControllerPro.XButton.State == true ? "pressed" : "not pressed"));

    //.NET events
    classicControllerPro.AButton.Clicked += (s, e) => Resolver.Log.Info("A button clicked");
    classicControllerPro.BButton.Clicked += (s, e) => Resolver.Log.Info("B button clicked");
    classicControllerPro.XButton.Clicked += (s, e) => Resolver.Log.Info("X button clicked");
    classicControllerPro.YButton.Clicked += (s, e) => Resolver.Log.Info("Y button clicked");

    classicControllerPro.LButton.Clicked += (s, e) => Resolver.Log.Info("L button clicked");
    classicControllerPro.RButton.Clicked += (s, e) => Resolver.Log.Info("R button clicked");
    classicControllerPro.ZLButton.Clicked += (s, e) => Resolver.Log.Info("ZL button clicked");
    classicControllerPro.ZRButton.Clicked += (s, e) => Resolver.Log.Info("ZR button clicked");

    classicControllerPro.PlusButton.Clicked += (s, e) => Resolver.Log.Info("+ button clicked");
    classicControllerPro.MinusButton.Clicked += (s, e) => Resolver.Log.Info("- button clicked");
    classicControllerPro.HomeButton.Clicked += (s, e) => Resolver.Log.Info("Home button clicked");

    classicControllerPro.DPad.Updated += (s, e) => Resolver.Log.Info($"DPad {e.New}");

    classicControllerPro.LeftAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Left Analog Stick {e.New.Horizontal}, {e.New.Vertical}");
    classicControllerPro.RightAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Right Analog Stick {e.New.Horizontal}, {e.New.Vertical}");

    return Task.CompletedTask;
}

public override Task Run()
{
    classicControllerPro.StartUpdating(TimeSpan.FromMilliseconds(200));
    return Task.CompletedTask;
}

Sample project(s) available on GitHub

Wiring Example

To wire a WiiClassicControllerPro to your Meadow board, connect the following:

WiiClassicControllerPro Meadow Pin
GND GND
SCL D08 (SCL)
SDA D07 (SDA)
VCC 3V3

PlusButton

  • Button
Declaration
public IButton PlusButton { get; }

Property Value

Type Description
IButton

Remarks

WiiClassicControllerPro
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation.Sensors.Hid.WiiExtensionControllers

Code Example

WiiClassicControllerPro classicControllerPro;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");

    var i2cBus = Device.CreateI2cBus(WiiClassicControllerPro.DefaultI2cSpeed);

    classicControllerPro = new WiiClassicControllerPro(i2cBus: i2cBus,
                                                 useHighResolutionMode: true);

    //onetime update - could be used in a game loop
    classicControllerPro.Update();

    //check the state of a button
    Resolver.Log.Info("X Button is " + (classicControllerPro.XButton.State == true ? "pressed" : "not pressed"));

    //.NET events
    classicControllerPro.AButton.Clicked += (s, e) => Resolver.Log.Info("A button clicked");
    classicControllerPro.BButton.Clicked += (s, e) => Resolver.Log.Info("B button clicked");
    classicControllerPro.XButton.Clicked += (s, e) => Resolver.Log.Info("X button clicked");
    classicControllerPro.YButton.Clicked += (s, e) => Resolver.Log.Info("Y button clicked");

    classicControllerPro.LButton.Clicked += (s, e) => Resolver.Log.Info("L button clicked");
    classicControllerPro.RButton.Clicked += (s, e) => Resolver.Log.Info("R button clicked");
    classicControllerPro.ZLButton.Clicked += (s, e) => Resolver.Log.Info("ZL button clicked");
    classicControllerPro.ZRButton.Clicked += (s, e) => Resolver.Log.Info("ZR button clicked");

    classicControllerPro.PlusButton.Clicked += (s, e) => Resolver.Log.Info("+ button clicked");
    classicControllerPro.MinusButton.Clicked += (s, e) => Resolver.Log.Info("- button clicked");
    classicControllerPro.HomeButton.Clicked += (s, e) => Resolver.Log.Info("Home button clicked");

    classicControllerPro.DPad.Updated += (s, e) => Resolver.Log.Info($"DPad {e.New}");

    classicControllerPro.LeftAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Left Analog Stick {e.New.Horizontal}, {e.New.Vertical}");
    classicControllerPro.RightAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Right Analog Stick {e.New.Horizontal}, {e.New.Vertical}");

    return Task.CompletedTask;
}

public override Task Run()
{
    classicControllerPro.StartUpdating(TimeSpan.FromMilliseconds(200));
    return Task.CompletedTask;
}

Sample project(s) available on GitHub

Wiring Example

To wire a WiiClassicControllerPro to your Meadow board, connect the following:

WiiClassicControllerPro Meadow Pin
GND GND
SCL D08 (SCL)
SDA D07 (SDA)
VCC 3V3

RButton

R Button

Declaration
public IButton RButton { get; }

Property Value

Type Description
IButton

Remarks

WiiClassicControllerPro
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation.Sensors.Hid.WiiExtensionControllers

Code Example

WiiClassicControllerPro classicControllerPro;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");

    var i2cBus = Device.CreateI2cBus(WiiClassicControllerPro.DefaultI2cSpeed);

    classicControllerPro = new WiiClassicControllerPro(i2cBus: i2cBus,
                                                 useHighResolutionMode: true);

    //onetime update - could be used in a game loop
    classicControllerPro.Update();

    //check the state of a button
    Resolver.Log.Info("X Button is " + (classicControllerPro.XButton.State == true ? "pressed" : "not pressed"));

    //.NET events
    classicControllerPro.AButton.Clicked += (s, e) => Resolver.Log.Info("A button clicked");
    classicControllerPro.BButton.Clicked += (s, e) => Resolver.Log.Info("B button clicked");
    classicControllerPro.XButton.Clicked += (s, e) => Resolver.Log.Info("X button clicked");
    classicControllerPro.YButton.Clicked += (s, e) => Resolver.Log.Info("Y button clicked");

    classicControllerPro.LButton.Clicked += (s, e) => Resolver.Log.Info("L button clicked");
    classicControllerPro.RButton.Clicked += (s, e) => Resolver.Log.Info("R button clicked");
    classicControllerPro.ZLButton.Clicked += (s, e) => Resolver.Log.Info("ZL button clicked");
    classicControllerPro.ZRButton.Clicked += (s, e) => Resolver.Log.Info("ZR button clicked");

    classicControllerPro.PlusButton.Clicked += (s, e) => Resolver.Log.Info("+ button clicked");
    classicControllerPro.MinusButton.Clicked += (s, e) => Resolver.Log.Info("- button clicked");
    classicControllerPro.HomeButton.Clicked += (s, e) => Resolver.Log.Info("Home button clicked");

    classicControllerPro.DPad.Updated += (s, e) => Resolver.Log.Info($"DPad {e.New}");

    classicControllerPro.LeftAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Left Analog Stick {e.New.Horizontal}, {e.New.Vertical}");
    classicControllerPro.RightAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Right Analog Stick {e.New.Horizontal}, {e.New.Vertical}");

    return Task.CompletedTask;
}

public override Task Run()
{
    classicControllerPro.StartUpdating(TimeSpan.FromMilliseconds(200));
    return Task.CompletedTask;
}

Sample project(s) available on GitHub

Wiring Example

To wire a WiiClassicControllerPro to your Meadow board, connect the following:

WiiClassicControllerPro Meadow Pin
GND GND
SCL D08 (SCL)
SDA D07 (SDA)
VCC 3V3

RightAnalogStick

Right analog joystick (5 or 8 bits of precision)

Declaration
public IAnalogJoystick RightAnalogStick { get; }

Property Value

Type Description
IAnalogJoystick

Remarks

WiiClassicControllerPro
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation.Sensors.Hid.WiiExtensionControllers

Code Example

WiiClassicControllerPro classicControllerPro;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");

    var i2cBus = Device.CreateI2cBus(WiiClassicControllerPro.DefaultI2cSpeed);

    classicControllerPro = new WiiClassicControllerPro(i2cBus: i2cBus,
                                                 useHighResolutionMode: true);

    //onetime update - could be used in a game loop
    classicControllerPro.Update();

    //check the state of a button
    Resolver.Log.Info("X Button is " + (classicControllerPro.XButton.State == true ? "pressed" : "not pressed"));

    //.NET events
    classicControllerPro.AButton.Clicked += (s, e) => Resolver.Log.Info("A button clicked");
    classicControllerPro.BButton.Clicked += (s, e) => Resolver.Log.Info("B button clicked");
    classicControllerPro.XButton.Clicked += (s, e) => Resolver.Log.Info("X button clicked");
    classicControllerPro.YButton.Clicked += (s, e) => Resolver.Log.Info("Y button clicked");

    classicControllerPro.LButton.Clicked += (s, e) => Resolver.Log.Info("L button clicked");
    classicControllerPro.RButton.Clicked += (s, e) => Resolver.Log.Info("R button clicked");
    classicControllerPro.ZLButton.Clicked += (s, e) => Resolver.Log.Info("ZL button clicked");
    classicControllerPro.ZRButton.Clicked += (s, e) => Resolver.Log.Info("ZR button clicked");

    classicControllerPro.PlusButton.Clicked += (s, e) => Resolver.Log.Info("+ button clicked");
    classicControllerPro.MinusButton.Clicked += (s, e) => Resolver.Log.Info("- button clicked");
    classicControllerPro.HomeButton.Clicked += (s, e) => Resolver.Log.Info("Home button clicked");

    classicControllerPro.DPad.Updated += (s, e) => Resolver.Log.Info($"DPad {e.New}");

    classicControllerPro.LeftAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Left Analog Stick {e.New.Horizontal}, {e.New.Vertical}");
    classicControllerPro.RightAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Right Analog Stick {e.New.Horizontal}, {e.New.Vertical}");

    return Task.CompletedTask;
}

public override Task Run()
{
    classicControllerPro.StartUpdating(TimeSpan.FromMilliseconds(200));
    return Task.CompletedTask;
}

Sample project(s) available on GitHub

Wiring Example

To wire a WiiClassicControllerPro to your Meadow board, connect the following:

WiiClassicControllerPro Meadow Pin
GND GND
SCL D08 (SCL)
SDA D07 (SDA)
VCC 3V3

XButton

X Button

Declaration
public IButton XButton { get; }

Property Value

Type Description
IButton

Remarks

WiiClassicControllerPro
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation.Sensors.Hid.WiiExtensionControllers

Code Example

WiiClassicControllerPro classicControllerPro;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");

    var i2cBus = Device.CreateI2cBus(WiiClassicControllerPro.DefaultI2cSpeed);

    classicControllerPro = new WiiClassicControllerPro(i2cBus: i2cBus,
                                                 useHighResolutionMode: true);

    //onetime update - could be used in a game loop
    classicControllerPro.Update();

    //check the state of a button
    Resolver.Log.Info("X Button is " + (classicControllerPro.XButton.State == true ? "pressed" : "not pressed"));

    //.NET events
    classicControllerPro.AButton.Clicked += (s, e) => Resolver.Log.Info("A button clicked");
    classicControllerPro.BButton.Clicked += (s, e) => Resolver.Log.Info("B button clicked");
    classicControllerPro.XButton.Clicked += (s, e) => Resolver.Log.Info("X button clicked");
    classicControllerPro.YButton.Clicked += (s, e) => Resolver.Log.Info("Y button clicked");

    classicControllerPro.LButton.Clicked += (s, e) => Resolver.Log.Info("L button clicked");
    classicControllerPro.RButton.Clicked += (s, e) => Resolver.Log.Info("R button clicked");
    classicControllerPro.ZLButton.Clicked += (s, e) => Resolver.Log.Info("ZL button clicked");
    classicControllerPro.ZRButton.Clicked += (s, e) => Resolver.Log.Info("ZR button clicked");

    classicControllerPro.PlusButton.Clicked += (s, e) => Resolver.Log.Info("+ button clicked");
    classicControllerPro.MinusButton.Clicked += (s, e) => Resolver.Log.Info("- button clicked");
    classicControllerPro.HomeButton.Clicked += (s, e) => Resolver.Log.Info("Home button clicked");

    classicControllerPro.DPad.Updated += (s, e) => Resolver.Log.Info($"DPad {e.New}");

    classicControllerPro.LeftAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Left Analog Stick {e.New.Horizontal}, {e.New.Vertical}");
    classicControllerPro.RightAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Right Analog Stick {e.New.Horizontal}, {e.New.Vertical}");

    return Task.CompletedTask;
}

public override Task Run()
{
    classicControllerPro.StartUpdating(TimeSpan.FromMilliseconds(200));
    return Task.CompletedTask;
}

Sample project(s) available on GitHub

Wiring Example

To wire a WiiClassicControllerPro to your Meadow board, connect the following:

WiiClassicControllerPro Meadow Pin
GND GND
SCL D08 (SCL)
SDA D07 (SDA)
VCC 3V3

YButton

Y Button

Declaration
public IButton YButton { get; }

Property Value

Type Description
IButton

Remarks

WiiClassicControllerPro
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation.Sensors.Hid.WiiExtensionControllers

Code Example

WiiClassicControllerPro classicControllerPro;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");

    var i2cBus = Device.CreateI2cBus(WiiClassicControllerPro.DefaultI2cSpeed);

    classicControllerPro = new WiiClassicControllerPro(i2cBus: i2cBus,
                                                 useHighResolutionMode: true);

    //onetime update - could be used in a game loop
    classicControllerPro.Update();

    //check the state of a button
    Resolver.Log.Info("X Button is " + (classicControllerPro.XButton.State == true ? "pressed" : "not pressed"));

    //.NET events
    classicControllerPro.AButton.Clicked += (s, e) => Resolver.Log.Info("A button clicked");
    classicControllerPro.BButton.Clicked += (s, e) => Resolver.Log.Info("B button clicked");
    classicControllerPro.XButton.Clicked += (s, e) => Resolver.Log.Info("X button clicked");
    classicControllerPro.YButton.Clicked += (s, e) => Resolver.Log.Info("Y button clicked");

    classicControllerPro.LButton.Clicked += (s, e) => Resolver.Log.Info("L button clicked");
    classicControllerPro.RButton.Clicked += (s, e) => Resolver.Log.Info("R button clicked");
    classicControllerPro.ZLButton.Clicked += (s, e) => Resolver.Log.Info("ZL button clicked");
    classicControllerPro.ZRButton.Clicked += (s, e) => Resolver.Log.Info("ZR button clicked");

    classicControllerPro.PlusButton.Clicked += (s, e) => Resolver.Log.Info("+ button clicked");
    classicControllerPro.MinusButton.Clicked += (s, e) => Resolver.Log.Info("- button clicked");
    classicControllerPro.HomeButton.Clicked += (s, e) => Resolver.Log.Info("Home button clicked");

    classicControllerPro.DPad.Updated += (s, e) => Resolver.Log.Info($"DPad {e.New}");

    classicControllerPro.LeftAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Left Analog Stick {e.New.Horizontal}, {e.New.Vertical}");
    classicControllerPro.RightAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Right Analog Stick {e.New.Horizontal}, {e.New.Vertical}");

    return Task.CompletedTask;
}

public override Task Run()
{
    classicControllerPro.StartUpdating(TimeSpan.FromMilliseconds(200));
    return Task.CompletedTask;
}

Sample project(s) available on GitHub

Wiring Example

To wire a WiiClassicControllerPro to your Meadow board, connect the following:

WiiClassicControllerPro Meadow Pin
GND GND
SCL D08 (SCL)
SDA D07 (SDA)
VCC 3V3

ZLButton

ZL Button (at bottom of trigger)

Declaration
public IButton ZLButton { get; }

Property Value

Type Description
IButton

Remarks

WiiClassicControllerPro
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation.Sensors.Hid.WiiExtensionControllers

Code Example

WiiClassicControllerPro classicControllerPro;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");

    var i2cBus = Device.CreateI2cBus(WiiClassicControllerPro.DefaultI2cSpeed);

    classicControllerPro = new WiiClassicControllerPro(i2cBus: i2cBus,
                                                 useHighResolutionMode: true);

    //onetime update - could be used in a game loop
    classicControllerPro.Update();

    //check the state of a button
    Resolver.Log.Info("X Button is " + (classicControllerPro.XButton.State == true ? "pressed" : "not pressed"));

    //.NET events
    classicControllerPro.AButton.Clicked += (s, e) => Resolver.Log.Info("A button clicked");
    classicControllerPro.BButton.Clicked += (s, e) => Resolver.Log.Info("B button clicked");
    classicControllerPro.XButton.Clicked += (s, e) => Resolver.Log.Info("X button clicked");
    classicControllerPro.YButton.Clicked += (s, e) => Resolver.Log.Info("Y button clicked");

    classicControllerPro.LButton.Clicked += (s, e) => Resolver.Log.Info("L button clicked");
    classicControllerPro.RButton.Clicked += (s, e) => Resolver.Log.Info("R button clicked");
    classicControllerPro.ZLButton.Clicked += (s, e) => Resolver.Log.Info("ZL button clicked");
    classicControllerPro.ZRButton.Clicked += (s, e) => Resolver.Log.Info("ZR button clicked");

    classicControllerPro.PlusButton.Clicked += (s, e) => Resolver.Log.Info("+ button clicked");
    classicControllerPro.MinusButton.Clicked += (s, e) => Resolver.Log.Info("- button clicked");
    classicControllerPro.HomeButton.Clicked += (s, e) => Resolver.Log.Info("Home button clicked");

    classicControllerPro.DPad.Updated += (s, e) => Resolver.Log.Info($"DPad {e.New}");

    classicControllerPro.LeftAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Left Analog Stick {e.New.Horizontal}, {e.New.Vertical}");
    classicControllerPro.RightAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Right Analog Stick {e.New.Horizontal}, {e.New.Vertical}");

    return Task.CompletedTask;
}

public override Task Run()
{
    classicControllerPro.StartUpdating(TimeSpan.FromMilliseconds(200));
    return Task.CompletedTask;
}

Sample project(s) available on GitHub

Wiring Example

To wire a WiiClassicControllerPro to your Meadow board, connect the following:

WiiClassicControllerPro Meadow Pin
GND GND
SCL D08 (SCL)
SDA D07 (SDA)
VCC 3V3

ZRButton

ZR Button (at bottom of trigger)

Declaration
public IButton ZRButton { get; }

Property Value

Type Description
IButton

Remarks

WiiClassicControllerPro
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation.Sensors.Hid.WiiExtensionControllers

Code Example

WiiClassicControllerPro classicControllerPro;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");

    var i2cBus = Device.CreateI2cBus(WiiClassicControllerPro.DefaultI2cSpeed);

    classicControllerPro = new WiiClassicControllerPro(i2cBus: i2cBus,
                                                 useHighResolutionMode: true);

    //onetime update - could be used in a game loop
    classicControllerPro.Update();

    //check the state of a button
    Resolver.Log.Info("X Button is " + (classicControllerPro.XButton.State == true ? "pressed" : "not pressed"));

    //.NET events
    classicControllerPro.AButton.Clicked += (s, e) => Resolver.Log.Info("A button clicked");
    classicControllerPro.BButton.Clicked += (s, e) => Resolver.Log.Info("B button clicked");
    classicControllerPro.XButton.Clicked += (s, e) => Resolver.Log.Info("X button clicked");
    classicControllerPro.YButton.Clicked += (s, e) => Resolver.Log.Info("Y button clicked");

    classicControllerPro.LButton.Clicked += (s, e) => Resolver.Log.Info("L button clicked");
    classicControllerPro.RButton.Clicked += (s, e) => Resolver.Log.Info("R button clicked");
    classicControllerPro.ZLButton.Clicked += (s, e) => Resolver.Log.Info("ZL button clicked");
    classicControllerPro.ZRButton.Clicked += (s, e) => Resolver.Log.Info("ZR button clicked");

    classicControllerPro.PlusButton.Clicked += (s, e) => Resolver.Log.Info("+ button clicked");
    classicControllerPro.MinusButton.Clicked += (s, e) => Resolver.Log.Info("- button clicked");
    classicControllerPro.HomeButton.Clicked += (s, e) => Resolver.Log.Info("Home button clicked");

    classicControllerPro.DPad.Updated += (s, e) => Resolver.Log.Info($"DPad {e.New}");

    classicControllerPro.LeftAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Left Analog Stick {e.New.Horizontal}, {e.New.Vertical}");
    classicControllerPro.RightAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Right Analog Stick {e.New.Horizontal}, {e.New.Vertical}");

    return Task.CompletedTask;
}

public override Task Run()
{
    classicControllerPro.StartUpdating(TimeSpan.FromMilliseconds(200));
    return Task.CompletedTask;
}

Sample project(s) available on GitHub

Wiring Example

To wire a WiiClassicControllerPro to your Meadow board, connect the following:

WiiClassicControllerPro Meadow Pin
GND GND
SCL D08 (SCL)
SDA D07 (SDA)
VCC 3V3

Methods

Update()

Get the latest sensor data from the device

Declaration
public override void Update()

Overrides

Remarks

WiiClassicControllerPro
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation.Sensors.Hid.WiiExtensionControllers

Code Example

WiiClassicControllerPro classicControllerPro;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");

    var i2cBus = Device.CreateI2cBus(WiiClassicControllerPro.DefaultI2cSpeed);

    classicControllerPro = new WiiClassicControllerPro(i2cBus: i2cBus,
                                                 useHighResolutionMode: true);

    //onetime update - could be used in a game loop
    classicControllerPro.Update();

    //check the state of a button
    Resolver.Log.Info("X Button is " + (classicControllerPro.XButton.State == true ? "pressed" : "not pressed"));

    //.NET events
    classicControllerPro.AButton.Clicked += (s, e) => Resolver.Log.Info("A button clicked");
    classicControllerPro.BButton.Clicked += (s, e) => Resolver.Log.Info("B button clicked");
    classicControllerPro.XButton.Clicked += (s, e) => Resolver.Log.Info("X button clicked");
    classicControllerPro.YButton.Clicked += (s, e) => Resolver.Log.Info("Y button clicked");

    classicControllerPro.LButton.Clicked += (s, e) => Resolver.Log.Info("L button clicked");
    classicControllerPro.RButton.Clicked += (s, e) => Resolver.Log.Info("R button clicked");
    classicControllerPro.ZLButton.Clicked += (s, e) => Resolver.Log.Info("ZL button clicked");
    classicControllerPro.ZRButton.Clicked += (s, e) => Resolver.Log.Info("ZR button clicked");

    classicControllerPro.PlusButton.Clicked += (s, e) => Resolver.Log.Info("+ button clicked");
    classicControllerPro.MinusButton.Clicked += (s, e) => Resolver.Log.Info("- button clicked");
    classicControllerPro.HomeButton.Clicked += (s, e) => Resolver.Log.Info("Home button clicked");

    classicControllerPro.DPad.Updated += (s, e) => Resolver.Log.Info($"DPad {e.New}");

    classicControllerPro.LeftAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Left Analog Stick {e.New.Horizontal}, {e.New.Vertical}");
    classicControllerPro.RightAnalogStick.Updated += (s, e) => Resolver.Log.Info($"Right Analog Stick {e.New.Horizontal}, {e.New.Vertical}");

    return Task.CompletedTask;
}

public override Task Run()
{
    classicControllerPro.StartUpdating(TimeSpan.FromMilliseconds(200));
    return Task.CompletedTask;
}

Sample project(s) available on GitHub

Wiring Example

To wire a WiiClassicControllerPro to your Meadow board, connect the following:

WiiClassicControllerPro Meadow Pin
GND GND
SCL D08 (SCL)
SDA D07 (SDA)
VCC 3V3