Jump to content
Sign in to follow this  
Beege

Wiimote Scripting - Control and Receive Data from Multiple Wiimotes - Updated:12/14/11 - A Wireless Voltage Meter Example

Recommended Posts

Thanks, I'll give that a try when I get home :oops:

I've been wanting to try this out because eventually I'm hoping to be able to write a script to remap the wiimote functions to control the mouse and maybe some hotkeys :bye:

Edited by kaotkbliss

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites

:oops: I think I may need a new dongle or maybe just mess around with it more.

after playing with it last night, I remembered why I had put off testing out this script and working on my re-mapper. I'm having issues with my pc disconnecting the wiimote a few seconds after it finishes installing it.

I got it to work (mostly) using GlovePie 1 time, but have not gotten to work again. (probably because the disconnecting problem)

I'll keep at it though because I think this project is awsome and I would love to use it.

*edit*

I think until I get this working I should move my comments over to the chat since they are only partially related to this topic

Edited by kaotkbliss

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites

Sorry I can't be too sure whats going on when dealing with the pairing. All I have is one of those cheap dongle I got off ebay for a $1 and used windows default bluetooth app to pair it. Make sure any pairs that you have previously made in the past are deleted from the system.

One thing I experianced with one of the wiimotes I have was how all 4 lights shut off during the pair. When that happened I would quickly re-press the sync button.

Do you know if the wiimote you have is a genuine wiimote or a generic?

Share this post


Link to post
Share on other sites

Last night I played around with it some more as I saw your script keeps a stream of data going to the wii-mote (yes mine is authentic)

I realized I didn't need additional software after the pairing and before your script. I tried the pairing script but it didnt work (win7 64 bit) it would keep saying device not found, then it would find the device and say done, but then would go back to device not found.

I'm not sure if I just wasn't doing it right or what.

However, when I paired it manually and ran your test scripts, everything worked (the checkboxes turned on/off the lights and rumble, button presses were recognized, etc.)

the only thing was the wiimote, nunchuck and analog stick all reported using the same x, y on the gui


010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites

Slowly starting edits as I squeeze in time to play with this :oops:

First thing I did was change the _CbHandler so it autoscrolls as the list fills up in the Pair example.

Func _CbHandler($sMsg)
 ConsoleWrite($sMsg & @LF)
;~  GUICtrlCreateListViewItem($List, $sMsg)
 _GUICtrlListView_AddItem($List, $sMsg)
 _GUICtrlListView_Scroll($List,0,32)
EndFunc   ;==>_CbHandler

I did find that even though it never told me before (it found the wiimote but all 3 columns after the address in the top list said false) it now says remembered = true

When I get home I want to play with it some more and see what else I can decipher and come up with :bye:


010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites

alright. I tried the wiipair example again. The first output is with the wiimote stored

BluetoothFindFirstDevice[KAOS]..
BluetoothFindFirstDevice[KAOS]..
BluetoothFindFirstDevice[KAOS]..
Authenticating Wiimote[eb:47:54:a0:a2:78]
BluetoothFindFirstDevice[KAOS]..
BluetoothFindFirstDevice[KAOS]..
BluetoothFindFirstDevice[KAOS]..
Authenticating Wiimote[eb:47:54:a0:a2:78]
BluetoothFindFirstDevice[KAOS]..
BluetoothFindFirstDevice[KAOS]..
BluetoothFindFirstDevice[KAOS]..
Authenticating Wiimote[eb:47:54:a0:a2:78]
BluetoothFindFirstDevice[KAOS]..
BluetoothFindFirstDevice[KAOS]..
BluetoothFindFirstDevice[KAOS]..
Authenticating Wiimote[27:94:58:94:22:00]
BluetoothFindFirstDevice[KAOS]..
BluetoothFindFirstDevice[KAOS]..
>Exit code: 0    Time: 87.465

(I have it set to start the wiimoteMT example that is in the same directory) but the MT example wasn't registering anything from the wiimote.

Next I tried to remove all, refresh, then ezpair to see if it would detect and pair the wiimote.

BluetoothFindFirstDevice[KAOS]..
BluetoothFindFirstDevice[KAOS]..
Removing Wiimote: eb:47:54:a0:a2:78
BluetoothRemoveDevice...
Success.
Done...
BluetoothFindFirstDevice[KAOS]..
No bluetooth devices found.
BluetoothFindFirstDevice[KAOS]..
No bluetooth devices found.
Done...
BluetoothFindFirstDevice[KAOS]..
No bluetooth devices found.
BluetoothFindFirstDevice[KAOS]..
No bluetooth devices found.
BluetoothFindFirstDevice[KAOS]..
No bluetooth devices found.
BluetoothFindFirstDevice[KAOS]..
No bluetooth devices found.
BluetoothFindFirstDevice[KAOS]..
No bluetooth devices found.
BluetoothFindFirstDevice[KAOS]..
Authenticating Wiimote[eb:47:54:a0:a2:78]
BluetoothFindFirstDevice[KAOS]..
No bluetooth devices found.
BluetoothFindFirstDevice[KAOS]..
No bluetooth devices found.
BluetoothFindFirstDevice[KAOS]..
Authenticating Wiimote[eb:47:54:a0:a2:78]
BluetoothFindFirstDevice[KAOS]..
No bluetooth devices found.
BluetoothFindFirstDevice[KAOS]..
No bluetooth devices found.
BluetoothFindFirstDevice[KAOS]..
Authenticating Wiimote[eb:47:54:a0:a2:78]
BluetoothFindFirstDevice[KAOS]..
No bluetooth devices found.
BluetoothFindFirstDevice[KAOS]..
No bluetooth devices found.
BluetoothFindFirstDevice[KAOS]..
Authenticating Wiimote[eb:47:54:a0:a2:78]
BluetoothFindFirstDevice[KAOS]..
No bluetooth devices found.
BluetoothFindFirstDevice[KAOS]..
No bluetooth devices found.
BluetoothFindFirstDevice[KAOS]..
No bluetooth devices found.
BluetoothFindFirstDevice[KAOS]..
No bluetooth devices found.
BluetoothFindFirstDevice[KAOS]..
BluetoothFindFirstDevice[KAOS]..
No bluetooth devices found.
>Exit code: 0    Time: 69.574

maybe this will help determine what I need to do?


010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites

I did find that even though it never told me before (it found the wiimote but all 3 columns after the address in the top list said false) it now says remembered = true

if it just says remembered=true then that means you already paired the wiimote to the pc using the windows pairing wizard and just did a temporty pair. The tool I included shots to get an authenticated pair which will show both remember and authenticated equaling true if successful. Authenticated alows you to turn the wiimote on and off without having to repair the wiimote. Getting a authenticated pair has always been a little bit trickier but then again it's not required.

If the wiimote is already remembered and not authenticated then you need to remove it first (remove all button) before trying to do an authenticated pair. Try the steps I have posted here. Make sure you re-hit the sync button if the wiimote stops flashing during the pair. That parts very important.

the only thing was the wiimote, nunchuck and analog stick all reported using the same x, y on the gui

Your going to have to reword this cause Im not following. The nunchuck reports motion, analog stick, and buttons. The wiimote reports motion, IR, and buttons. Which parts of what were being reported the same? Also is the nunchuck genuine? To this day I have never been able to get any generic accessories to work. I have gotten all generic wiimotes to work (some with limited functionality), but never any generic accessories.

Share this post


Link to post
Share on other sites

if it just says remembered=true then that means you already paired the wiimote to the pc using the windows pairing wizard and just did a temporty pair. The tool I included shots to get an authenticated pair which will show both remember and authenticated equaling true if successful. Authenticated alows you to turn the wiimote on and off without having to repair the wiimote. Getting a authenticated pair has always been a little bit trickier but then again it's not required.

If the wiimote is already remembered and not authenticated then you need to remove it first (remove all button) before trying to do an authenticated pair. Try the steps I have posted here. Make sure you re-hit the sync button if the wiimote stops flashing during the pair. That parts very important.

I've kind of bypassed this for now as I've moved on to creating the gui and system I want for using input boxes to map wiimote actions to keyboard/mouse commands. I'll come back to this part later, perhaps after I get more familiar with the UDF and know more of what everything does.

Your going to have to reword this cause Im not following. The nunchuck reports motion, analog stick, and buttons. The wiimote reports motion, IR, and buttons. Which parts of what were being reported the same? Also is the nunchuck genuine? To this day I have never been able to get any generic accessories to work. I have gotten all generic wiimotes to work (some with limited functionality), but never any generic accessories.

Yes. the nunchuck and wiimote are authentic. The problem is, moving the wiimote, the nuncheck or the joystic all change the same values under the motion tracking. so if I wanted to create events or map keys to specific movements to the joystic or motions from the wiimote, all 3 would register the event. It is a bit hard to explain.


010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites

Hi everyone,

The files disappeared from Dropbox,

Do someone please know how to download the .exe and .au3 files again ?

Thanks a lot.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...