| View previous topic :: View next topic |
| Author |
Message |
punkstar
Joined: 24 Nov 2006 Posts: 14
Digg It |
Posted: Sun Dec 03, 2006 7:29 pm Post subject: Glove pie. can you help me? |
|
|
| i looked at the glovepie thingy and i downloaded it cuz i would love to play games on my computer with my wiimote! but i dont know how to use it. can someone help me? |
|
| Back to top |
|
 |
OptimumCoder Site Admin

Joined: 03 Dec 2006 Posts: 7 Location: NCSU
Digg It |
Posted: Mon Dec 04, 2006 4:19 am Post subject: |
|
|
The easiest way to use the GlovePIE is to create scripts that emulate Keyboard keys via a Wiimote button press.
If you don't want to use the motion sensing part, it's easy to map the buttons. Just past the text below into the program and press run to have it working.
| Code: |
Up = Wiimote.Up
Down = Wiimote.Down
Left = Wiimote.Left
Right = Wiimote.Right
A = Wiimote.A
B = Wiimote.B
One = Wiimote.One
Two = Wiimote.Two
Home = Wiimote.Home
Minus = Wiimote.Minus
Equals = Wiimote.Plus
|
If you want to move the mouse with the wiimote, try this code I adopted from other parts of this forum
NOTE you will have to hold B trigger to make the mouse move. A is the left click while the HOME is the right click in my version. Check the other thread for different code.
Also the LEDs are controled by the 1 and 2 keys, and they adjust the horizontal sensitivity.
| Code: |
// Show wiimote forces
//debug = "X="+Wiimote.RawForceX+' Y='+Wiimote.RawForceY+' Z='+Wiimote.RawForceZ
if wiimote.Up then
Key.Up = true
wait 120 ms
Key.Up = false
endif
if wiimote.Down then
Key.Down = true
wait 120 ms
Key.Down = false
endif
if wiimote.Left then
Key.Left = true
wait 120 ms
Key.Left = false
endif
if wiimote.Right then
Key.Right = true
wait 120 ms
Key.Right = false
endif
/*Key.Up = Wiimote.Up
Keyboard.Down = Wiimote.Down
Keyboard.Left = Wiimote.Left
Keyboard.Right = Wiimote.Right*/
Mouse.RightButton = Wiimote.Home
Mouse.LeftButton = Wiimote.A
//Mouse.MiddleButton = Wiimote.Home
Keyboard.Equals = Wiimote.Plus
Keyboard.Minus= Wiimote.Minus
if wiimote.one then
if(wiimote.leds+1>15)
wiimote.leds=0
else
wiimote.leds = wiimote.leds + 1
endif
wait 120 ms
endif
if wiimote.two then
if(wiimote.leds-1<0) then
wiimote.leds = 15
else
wiimote.leds = wiimote.leds - 1
endif
wait 120 ms
endif
if wiimote.B then
mouse.y = mouse.y + .002 * (wiimote.rawforcey - wiimote.rawforcez - 32)
mouse.x = mouse.x - .002 * (wiimote.rawforcex + 15 - wiimote.Leds*2)
endif
|
|
|
| Back to top |
|
 |
punkstar
Joined: 24 Nov 2006 Posts: 14
Digg It |
Posted: Tue Dec 05, 2006 2:46 am Post subject: |
|
|
thank you this helps. alot. lol _________________
 |
|
| Back to top |
|
 |
CarlKenner Site Admin
Joined: 29 Nov 2006 Posts: 614
Digg It |
Posted: Tue Dec 05, 2006 5:04 am Post subject: |
|
|
There is a TestWiimote.PIE file that comes with GlovePIE that you can load. It will display the acceleration data in the box near the stop button, and it will vibrate when you press shift. Some people have trouble getting the acceleration, LEDs and vibration to work, but the buttons still work for them. This seems to be a problem with some brands of bluetooth stack.
By the way, there is a bug which stops the wiimote from working when you stop it and press run a second time. For now you have to exit and restart if you want to run it a second time. This will be fixed in the next version. |
|
| Back to top |
|
 |
Marauding Master

Joined: 11 Dec 2006 Posts: 56 Location: :3!
Digg It |
Posted: Mon Dec 11, 2006 2:36 am Post subject: |
|
|
| CarlKenner wrote: | There is a TestWiimote.PIE file that comes with GlovePIE that you can load. It will display the acceleration data in the box near the stop button, and it will vibrate when you press shift. Some people have trouble getting the acceleration, LEDs and vibration to work, but the buttons still work for them. This seems to be a problem with some brands of bluetooth stack.
By the way, there is a bug which stops the wiimote from working when you stop it and press run a second time. For now you have to exit and restart if you want to run it a second time. This will be fixed in the next version. |
I ran a script which had that bug. I'm glad it had it though because my mouse kept moving even though I didn't even move the Wii-Mote. Everything works fine now though. _________________
 |
|
| Back to top |
|
 |
DeadPixel Site Admin

Joined: 19 Nov 2006 Posts: 103 Location: France
Digg It |
Posted: Mon Dec 11, 2006 9:00 pm Post subject: |
|
|
| Topic moved to the right section (Wii Remote and Nunchuck) |
|
| Back to top |
|
 |
toxicer
Joined: 13 Dec 2006 Posts: 1
Digg It |
Posted: Wed Dec 13, 2006 12:17 pm Post subject: Issue with motion sensing |
|
|
Hi,
I managed to get the WiiMouse Accel.PIE script working.
However, the WiiMouse IR.PIE doesn't work (at least using the Wiimote as a mouse). The buttons are working fine. When uncommenting the debug line I can see changing acceleration values.
I have the sensorbar on top of my monitor.
Any hints?
[EDIT]:
When using the script provided above I can see that the mouse pointer is going to the right side of the monitor (when pressing B). There I can move the pointer up and down but not left and right.
thx,
toxicer
Last edited by toxicer on Wed Dec 13, 2006 12:27 pm; edited 1 time in total |
|
| Back to top |
|
 |
|