Friday 2 January 2009

Wii Projects

If you have a Nintendo Wii and want a new way to use it try some of the projects Johny Lee has made, from using it as an interactive whiteboard to a 3d display, the wiimote can be used for anything.  The best way to get started is to download glovepie, you can quickly write applications for the wiimote with minimal efort.  eg, here is a remote application for Windpws Media Centre.

//Calibrate your Wiimote!
//Place the Wiimote face up on a flat surface. Change these values until the
//debug line next to the run button shows zero for each axis.
var.xOffset = 4
var.yOffset = -31
var.zOffset = 6

//Set your Wiimote LEDs to your liking. Binary value, 1-15
var.leds = 6
wiimote.leds = var.leds

//Wait so a key isn't pressed millions of times a seccond!
wait 0.1

//Calibration Data
var.xRot = Wiimote.RawForceX + var.xOffset
var.yRot = Wiimote.RawForceY + var.yOffset
var.zRot = Wiimote.RawForceZ + var.zOffset


//
//Arrow keys
//

//Left
if wiimote.Left = true
   Left = true
   Left = False
endif

//Right
if Wiimote.Right = True
   right = true
   right = false
endif

//Up
if Wiimote.Up = true
   Up = true
   Up = false
endif

//Down
if wiimote.Down = true
   Down = true
   Down = false
endif

if wiimote.A = true then
    Enter = true
else
    Enter = False
endif

if wiimote.B = true
   Backspace = true
else
   Backspace = false
endif

//Play
if wiimote.2=true
   Ctrl+P=true
   Ctrl+P=false
endif


if wiimote.Home= true
   Backspace = true
   Backspace = true
   Backspace = true
   Backspace = true
   Backspace = true
else
   backspace = false
endif

if Wiimote.1 =true
   Alt+Enter = true
else
   Alt+Enter = false
endif

if (Wiimote.1 = true) + (Wiimote.2 = true)
   Alt+F4 = true
endif

No comments:

Post a Comment