dyadica.net

Fun and Games in the Dyadic Sea

Posts Tagged ‘HomeBrew: Wii’

permalink image comments image
Thursday, 13 November '08: Im in WiimoteLib

Its official some of my code has been included in the latest release of Brian Peeks WiimoteLib and I must say that I am over the moon. You can find the latest version of Brians managed Wiimote library for .NET up at CodePlex now.

The changes are as follows:

  • Added “center of gravity” calculation to the Wii Fit Balance Board (thanks to Steven Battersby)
  • Structs are now marked [Serializable] (suggested by Caio)
  • Battery property is now a float containing the calculated percentage of battery remaining
  • BatteryRaw is the byte value that used to be stored in the Battery property
  • WiimoteTest app now reads extensions properly when inserted at startup
  • Exposed HID device path in new HIDDevicePath property on Wiimote object
  • Changed the time delay on writes to 50ms from 100ms…this should improve responsiveness of setting LEDs and rumble

Brian feels like he is running out of things to implement and bugs to fix.  So, want’s to hear from the people using his library…

All I can say on this topic is don’t forget the Wii Motion Plus extension out Q2 of next year Brian.

Tags: , , ,
permalink image comments image
Monday, 16 June '08: Adding UK Stones measure to WiimoteLib 1.5.2

Open up Datatypes.cs and add the following definitions to the public struct BalanceBoardState:

/// <summary>
/// Stones per sensor
/// </summary>
public BalanceBoardSensorsF SensorValuesSt;

and

/// <summary>
/// Total stones on the Balance Board
/// </summary>
public float WeightSt;

Next open up Wiimote.cs and add the following variable above the default constructor just below the Kg – Lb vars:

// kilograms to stones
private const float KG2ST = 6.35029318f;

Next we are going to add the code that populates these definitions/variables

Still within Wiimote.cs add the following code to the BalanceBoard case of the ParseExtension function just below the Kg – Lb equivalent code:

mWiimoteState.BalanceBoardState.SensorValuesSt.TopLeft = (mWiimoteState.BalanceBoardState.SensorValuesKg.TopLeft / KG2ST);
mWiimoteState.BalanceBoardState.SensorValuesSt.TopRight = (mWiimoteState.BalanceBoardState.SensorValuesKg.TopRight / KG2ST);
mWiimoteState.BalanceBoardState.SensorValuesSt.BottomLeft = (mWiimoteState.BalanceBoardState.SensorValuesKg.BottomLeft / KG2ST);
mWiimoteState.BalanceBoardState.SensorValuesSt.BottomRight = (mWiimoteState.BalanceBoardState.SensorValuesKg.BottomRight / KG2ST);

The above block of code enables calls to be made to obtain values for each of the four sensors in exactly the same way as you would for Kg’s and Lb’s e.g.

TopLeftInStones = ws.BalanceBoardState.SensorValuesSt.TopLeft;

Finally for total weight in stones add the following line below the equivalent Kg / Lb definitions:

mWiimoteState.BalanceBoardState.WeightSt = (mWiimoteState.BalanceBoardState.SensorValuesSt.TopLeft + mWiimoteState.BalanceBoardState.SensorValuesSt.TopRight + mWiimoteState.BalanceBoardState.SensorValuesSt.BottomLeft + mWiimoteState.BalanceBoardState.SensorValuesSt.BottomRight) / 4.0f;

And there you have it your balance board will now cater for the UK Stones measure and calls can be made using equivalent code to that provided for Kg’s and Lb’s.

Tags: , , , , ,
permalink image comments image
Tuesday, 3 June '08: WiimoteLib v1.4

In an effort to put out more frequent builds with fewer changes, Brian peek has released WiimoteLib v1.4 to CodePlex. This release contains the single most requested feature: multiple Wiimote support.

The original Coding4Fun article has also been updated with some details on how to use multiple Wiimotes, as has the WiimoteTest application included with the distribution.

Changes

  • Multiple Wiimotes supported!
  • Slight change to ExtensionType enum for better extension detection
  • Decided I didn’t like the dependency on System.Drawing for the 2D point so am now using my own Point structs. Sorry…
  • WiimoteTest app updated to show multiple Wiimotes working

SOURCE: Brian Peek

Tags: , , , , , ,
permalink image comments image
Saturday, 29 December '07: Wii Hacked

Those clever LINUX buggers have done it again! This time providing means for homebrew code to run on your wii without need for a mod-chip.

For more details check out the video.

Source: youtube

Some hackers from Germany have just showed off their fully hacked Wii at the 24th Annual Chaos Communication Congress. Nothing fancy is running yet, all they’ve achieved so far is a proof of concept that they’ve bypassed the Wii’s protection with some encryption codes they swiped from the Wii’s memory.

Apparently a bootable Linux DVD is on the way, and we can’t wait to see what homebrew coders manage to pull off with that Wiimote pointed where it belongs.

Source: engadget.com

Tags: , ,

poll tags

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