Difference between revisions of "Wiimote"

From X-Moto
Jump to: navigation, search
(Connecting wiimote to your Win-PC)
(Scripting with PIE)
Line 15: Line 15:
 
Press the Big orange ball (My device)then put your wiimote to "discovery mode" by pressing butoons: 1 and 2 simultaneously. Then wait and repeat pressing the buttons if the "discovery mode" ends. Then when the wiimote has been found it's name is something like Nintendo RVL-CNT-01 click left click the image of it and choose "Refresh Services" and put your wiimote to discovery mode again. When The Connection has been made then you can open Glove PIE.
 
Press the Big orange ball (My device)then put your wiimote to "discovery mode" by pressing butoons: 1 and 2 simultaneously. Then wait and repeat pressing the buttons if the "discovery mode" ends. Then when the wiimote has been found it's name is something like Nintendo RVL-CNT-01 click left click the image of it and choose "Refresh Services" and put your wiimote to discovery mode again. When The Connection has been made then you can open Glove PIE.
 
==Scripting with PIE==
 
==Scripting with PIE==
 +
The Getting started at Help->Getting Started is good. And after that you can take a look at the preliminary documentations at Help->Preliminary Documentations.
 +
If you are lazy and wanna get to the action now. Heres basic code for playing x-moto with Wiimote you can modify it and copy it freely
 +
 +
The script:
 +
 +
  /*Wiimote script for X-Moto Version 0.1.0
 +
  _________________
 +
|                |
 +
|    Controls:    |
 +
|_________________|
 +
-----------------------------------------------------------
 +
Notice that the controls are designed for horizontal usage!
 +
-----------------------------------------------------------
 +
Pad:
 +
Up = Accelerate
 +
down = Brake
 +
Left = Lift left wheel
 +
right = Lifht right wheel
 +
Buttons:
 +
A = Enter
 +
+ = Menu/Pause (ESC)
 +
Home = Windows
 +
1 = Brake (Too!)
 +
2 = Accelerate (Too!)
 +
B = Change direction
 +
*/
 +
 +
//Buttons and matching keys
 +
keyboard.Up = wiimote.Two
 +
keyboard.Down = wiimote.One
 +
keyboard.Left = wiimote.Up
 +
keyboard.Right = wiimote.Down
 +
keyboard.Enter = wiimote.A
 +
keyboard.Escape = wiimote.Plus
 +
keyboard.Windows = wiimote.Home
 +
keyboard.Up = wiimote.Right
 +
keyboard.Down = wiimote.Left
 +
keyboard.Space = wiimote.B
 +
 +
//LEDs look somewhat like KITT's grill from Knight Rider ;)
 +
if 0 = 0 then
 +
if var.kitt = 0 then
 +
wiimote.Leds = 1
 +
endif
 +
if var.kitt = 1 then
 +
wiimote.Leds = 3
 +
endif
 +
if var.kitt = 2 then
 +
wiimote.Leds = 6
 +
endif
 +
if var.kitt = 3 then
 +
wiimote.Leds = 12
 +
endif
 +
if var.kitt = 4 then
 +
wiimote.Leds = 8
 +
endif
 +
if var.kitt = 5 then
 +
wiimote.Leds = 12
 +
endif
 +
if var.kitt = 6 then
 +
wiimote.Leds = 6
 +
endif
 +
if var.kitt = 7 then
 +
wiimote.Leds = 3
 +
endif
 +
wait 200 ms
 +
var.kitt = (var.kitt + 1) % 8
 +
endif
 +
 +
The Led script is copied from another script that is opensourcecode too.

Revision as of 09:42, 16 July 2007

Contents

Procrams you will need

You will need IVT Bluesoleil bluetooth sofware

And you will need Glove PIE Programmable input emulator

Now we can start connecting your wiimote to your Win-PC

Connecting wiimote to your Win-PC

Open IVT Bluesoleil left click the System tray icon and choose "Display". Press the Big orange ball (My device)then put your wiimote to "discovery mode" by pressing butoons: 1 and 2 simultaneously. Then wait and repeat pressing the buttons if the "discovery mode" ends. Then when the wiimote has been found it's name is something like Nintendo RVL-CNT-01 click left click the image of it and choose "Refresh Services" and put your wiimote to discovery mode again. When The Connection has been made then you can open Glove PIE.

Scripting with PIE

The Getting started at Help->Getting Started is good. And after that you can take a look at the preliminary documentations at Help->Preliminary Documentations. If you are lazy and wanna get to the action now. Heres basic code for playing x-moto with Wiimote you can modify it and copy it freely

The script:

 /*Wiimote script for X-Moto Version 0.1.0
 _________________
|                 |
|    Controls:    |
|_________________|
-----------------------------------------------------------
Notice that the controls are designed for horizontal usage!
-----------------------------------------------------------
Pad:
Up = Accelerate
down = Brake
Left = Lift left wheel
right = Lifht right wheel
Buttons:
A = Enter
+ = Menu/Pause (ESC)
Home = Windows
1 = Brake (Too!)
2 = Accelerate (Too!)
B = Change direction
*/

//Buttons and matching keys
keyboard.Up = wiimote.Two
keyboard.Down = wiimote.One
keyboard.Left = wiimote.Up
keyboard.Right = wiimote.Down
keyboard.Enter = wiimote.A
keyboard.Escape = wiimote.Plus
keyboard.Windows = wiimote.Home
keyboard.Up = wiimote.Right
keyboard.Down = wiimote.Left
keyboard.Space = wiimote.B

//LEDs look somewhat like KITT's grill from Knight Rider ;)
if 0 = 0 then
if var.kitt = 0 then
wiimote.Leds = 1
endif
if var.kitt = 1 then
wiimote.Leds = 3
endif
if var.kitt = 2 then
wiimote.Leds = 6
endif
if var.kitt = 3 then
wiimote.Leds = 12
endif
if var.kitt = 4 then
wiimote.Leds = 8
endif
if var.kitt = 5 then
wiimote.Leds = 12
endif
if var.kitt = 6 then
wiimote.Leds = 6
endif
if var.kitt = 7 then
wiimote.Leds = 3
endif
wait 200 ms
var.kitt = (var.kitt + 1) % 8
endif

The Led script is copied from another script that is opensourcecode too.