2
« on: July 23, 2009, 10:41:48 PM »
I haven't had a whole lot of experience with dealing with the IR/motion sensors, but answering your question about the buttons: you can use simple scripts like so...
Say you want to set the A key on your keyboard to the A button on the wiimote:
Keyboard.A = Wiimote.A
Simple as that, but if you want to make it even more simple...
A = Wiimote.A
Similarly, you could do something like:
Keyboard.UP = Wiimote.UP
Keyboard.DOWN = Wiimote.DOWN
Keyboard.LEFT = Wiimote.LEFT
Keyboard.RIGHT = WIimote.RIGHT
Furthermore, if you want to mess with the LEDs, you need to use simple boolean logic (true/false):
Wiimote.Led1 = true
Wiimote.Led2 = false
Wiimote.Led3 = false
Wiimote.Led4 = true
That script will make it so the first and fourth LEDs will turn on and the second and third will turn off.
One more helpful tip is that if you type in "Keyboard." or "Wiimote." it will give you all of the variables you can use in your script under those subsets.
That's a large part of the basics, if anything was unclear, just say something, someone should get back to you if not me. For more of the advanced stuff though, I'm not gonna be able to help too much.