Presentation is loading. Please wait.

Presentation is loading. Please wait.

Wii mote interfacing. The product It is a wireless device, using standard Bluetooth technology to communicate The Wii Remote uses the standard Bluetooth.

Similar presentations


Presentation on theme: "Wii mote interfacing. The product It is a wireless device, using standard Bluetooth technology to communicate The Wii Remote uses the standard Bluetooth."— Presentation transcript:

1 Wii mote interfacing

2 The product It is a wireless device, using standard Bluetooth technology to communicate The Wii Remote uses the standard Bluetooth human interface device (HID) protocol to communicate with the host, which is directly based upon the USB HID standard (used to describe human interface devices such as the mouse and keyboard)

3 Wiimote Library for C# WiimoteLib Functions by Brian Peek (http://www.codeplex.com/WiimoteLib and http://blogs.msdn.com/coding4fun/archive/2007/03/14/1879033.aspx)http://www.codeplex.com/WiimoteLib http://blogs.msdn.com/coding4fun/archive/2007/03/14/1879033.aspx Supports a handful of report types such as: Buttons - Button data only ButtonsAccel - Button and accelerometer data IRAccel - Button, accelerometer and IR data ButtonsExtension – Button and extension data ExtensionAccel - Button, accelerometer and extension data IRExtensionAccel - Button, accelerometer, extension and IR data – The report type can be set by calling the SetReportType method

4 Sample using WiimoteLib; private void Form1_Load(object sender, EventArgs e) { // create a new instance of the Wiimote Wiimote wm = new Wiimote(); // setup the event to handle state changes wm.WiimoteChanged += wm_WiimoteChanged; // setup the event to handle insertion/removal of extensions wm.WiimoteExtensionChanged += wm_WiimoteExtensionChanged; // connect to the Wiimote wm.Connect(); // set the report type to return the IR sensor and accelerometer data (buttons always come back) wm.SetReportType(Wiimote.InputReport.IRAccel, true); } void wm_WiimoteExtensionChanged(object sender, WiimoteExtensionChangedEventArgs args) { if(args.Inserted) wm.SetReportType(Wiimote.InputReport.IRExtensionAccel, true); // return extension data else wm.SetReportType(Wiimote.InputReport.IRAccel, true); // back to original mode } void wm_WiimoteChanged(object sender, WiimoteChangedEventArgs args) { // current state information WiimoteState ws = args.WiimoteState; // write out the state of the A button Debug.WriteLine(ws.ButtonState.A); }

5 Other libraries Wii Device Library BobcatwiiLib

6 Progress… Wii Program – Version by Sir Daniel – Detects IR coordinates What needs to be done – Create new code – Buy bluetooth device – Create a Sensor Bar


Download ppt "Wii mote interfacing. The product It is a wireless device, using standard Bluetooth technology to communicate The Wii Remote uses the standard Bluetooth."

Similar presentations


Ads by Google