use wiimote as control
#1
hi all,

just looking for a bit of help using the wiimote.

I have it connected on my windows pc using some widcomm drivers and I've fired up glovepie and managed to get a bit of input from it, enough to select icons crudely on the desktop.

One problem I'm having is that the wiimote just constantly flashees its LEDs.

The other thing I noticed there was a glovepie script posted for xbmc a while ago, has there been any developments in this or anything else that might help.

Cheers
Reply
#2
technically this is probably one for the glovepie forums, but I'm feeling generous...

There are commands to control the LEDs. I set mine to flash the LED1 every second. (see beginning of the script attached). You could just set them to off if you want.

My controls are set up to work to control games more than XBMC, but you can get the idea and substitute your own keycodes in if you'd like.

There is also a handy script that I found elsewhere which does a pretty good job of tracking the pointer, but I won't post it all here since it's pretty long and isn't mine. Of course, the script below was a modified version of someone else's script, but I don't know who anymore.

// My best IR Mouse Script, with 5DOF Tracking
// By Carl Kenner

Code:
%hidepie
if true then
wiimote.led1 = true
wiimote.led2 = false
wiimote.led3 = false
wiimote.led4 = false
wait 100ms
wiimote.led1 = false
wiimote.led2 = false
wiimote.led3 = false
wiimote.led4 = false
wait 1000mS
endif

if wiimote.Up then
  Key.left = true
  wait 150 ms
  Key.left = false
endif
if wiimote.Down then
  Key.right = true
  wait 150 ms
  Key.right = false
endif
if wiimote.Left then
  Key.down = true
  wait 150 ms
  Key.down = false
endif
if wiimote.Right then
  Key.up = true
  wait 150 ms
  Key.up = false
endif
if wiimote.one
  key.comma = true
  wait 120 ms
  key.comma = false
ENDIF
if wiimote.Two
  key.dot = true
  wait 120 ms
  key.dot = false
endif
if wiimote.Plus
  key.enter = true
  wait 200 ms
  key.enter = false
endif
if wiimote.A
   key.Escape = true
   debug = "pressedA"
   wait 150 ms
   debug = ""
   key.escape = false
endif
if wiimote.B
   key.x = true
   wait 120 ms
   key.x = false
endif
if wiimote.Minus
  key.Ctrl = true
  wait 120 ms
  key.ctrl= false
endif
if wiimote.Home
   key.alt = true
   key.x = true
   wait 60 ms
   key.x= false
   key.alt= false
endif
if doubleclicked(wiimote.Home)
   key.alt = true
   key.Tab = true
   wait 60 ms
   key.tab = false
   key.alt = false
endif
Reply

Logout Mark Read Team Forum Stats Members Help
use wiimote as control0