Sponsors of Wiimoteproject.com
IR Pens for Wiimote Whiteboard
Pages: [1]
Print
Author Topic: 2 Wiimotes and Cursor  (Read 2798 times)
0 Members and 1 Guest are viewing this topic.
*
Karma: +0/-0
Posts: 4
Offline Offline
View Profile Email
« on: March 03, 2010, 09:27:33 AM »

Hello,
So i have been writing a game for the past month or so using head tracking and its going great. I am trying to incorporate a second wiimote into my code to enable user input...

However, it won't seem to work. I put in the config file that there are multiple wiimotes, and set the cursor mode to on, but it wont move. I am using two wiimote sensor bars (one sits on my hat, and the other sits below the screen). I already tried switching the wiimotes to see if maybe I was using the wrong one...any thoughts? anyone got this working?
--Ashley
Logged
Guru
*
Karma: +28/-0
Posts: 928
Offline Offline
Smoothboard Developer
View Profile WWW
« Reply #1 on: March 03, 2010, 11:08:40 AM »

Hi Ashley,

It would be better if you provide more background regarding your project.

Are you using one Wiimote for head tracking and holding the other Wiimote for pointing?
What applications are you using for this? From your description, it sounds like you are using the Head Tracking and Wiimote Whiteboard software together.

How are you connecting the multiple Wiimotes?

How are you receiving the inputs of the two Wiimotes?

Regards,
Boon Jin
Logged

Smoothboard
Wii Whiteboard/Wiimote Whiteboard with annotation features and collaborate with multiple iPads and Android Tablets!

Smoothboard for Mac
Using a Mac? Now you can annotate on PowerPoint or Keynote slideshows!

BoonJin[/url
*
Karma: +0/-0
Posts: 4
Offline Offline
View Profile Email
« Reply #2 on: March 05, 2010, 01:49:22 AM »

I am modifying the headtracking software that I downloaded from johnny's site.  Currently I am trying to connect two wiimotes, but it seems that it can only connect 1 (it connects the first, and then upon seeing code connect a second, connects to the same wiimote again...) do you recommend trying to use the smart board software in conjuction with the head tracking software?

so yes: i am using one wiimote for head tracking, the other for point, but only using the headtracking software (that I have modified quite a bit for the purposes of my game, but I haven't modified any code that actually controls the wiimote except to attempt to connect two separte wiimotes).


update: when you run the sample app johnny provides, it works perfectly with two wiimotes. However, when you run the code he provides, it does not.

« Last Edit: March 05, 2010, 02:36:02 AM by ashgavs » Logged
Guru
*
Karma: +28/-0
Posts: 928
Offline Offline
Smoothboard Developer
View Profile WWW
« Reply #3 on: March 05, 2010, 02:58:11 AM »

Hi,

Which Head Tracking code are you using?

I have quickly gone through the WiiDesktopVR02 and it does not connect to a single Wiimote. There is just a boolean class member that holds the value, doWiimote2. However, it is not referenced to connect the second Wiimote.

If you have modified this section, and it connects to the same Wiimote, most probably you are getting the reference of the same Wiimote. You should take a look at Brian Peek's WiimoteLib API for more information.

Even if you are to connect a second Wiimote, I am not certain how are you going the process the data coming from both Wiimotes.

Regards,
Boon Jin
Logged

Smoothboard
Wii Whiteboard/Wiimote Whiteboard with annotation features and collaborate with multiple iPads and Android Tablets!

Smoothboard for Mac
Using a Mac? Now you can annotate on PowerPoint or Keynote slideshows!

BoonJin[/url
*
Karma: +0/-0
Posts: 4
Offline Offline
View Profile Email
« Reply #4 on: March 05, 2010, 04:06:43 AM »

Hey Guys,
I got it working. I read the documentation of the wiimote library on connecting two wiimotes and it worked fine.
Then I modified the parse wiimote data and changed it such that it cycled through all wiimotes connected, and depending on which one it was on, parsed for head movement data or for cursor data. If anyone needs the code, PM me.
Logged
Pages: [1]
Print
Jump to:  

Clicky Web Analytics