Main > Main Forum

Its time to give back...beginning work on Wiimote Driver

Pages: << < (8/13) > >>

wbassett:

It's actually easier than all that...

There is a Wii mote accessory, a rechargeable battery pack that replaces the battery cover and it has a USB connection.  It's not meant to use the Wii mote while connected to the USB port, it is used to charge the batteries.  So basically this is already done for us and just needs to be integrated in the gun being built.

It would be very easy to just extend that USB connection to some place on the gun, or in the case of rifles I plan on putting it in the mag and extending the battery pack USB port to somewhere on the magazine case, probably the bottom.  Once we get to that point of building custom guns, I plan on having spare mags on charge/charged and then I can just swap out a magazine like you would when you're out of ammo! :)

Timstuff:


--- Quote from: Minwah on June 16, 2008, 08:04:10 am ---But I am guessing not many people would want to do this anyway, as it would make the Wiimote not-wireless. I don't have a problem with a wired gun, but making something wireless have a wire seems a bit illogical...
--- End quote ---

In arcades, all light guns are corded, so many people would probably want cords to be arcade-authentic. Also, it would mean you'd never have to bother with the batteries. Wireless is great when you're sitting on a couch 8 feet away from a 40" LCD, but when you're standing in front of an arcade machine with a screen that's 27" or smaller, wireless becomes less of a necessity, especially when you have to deal with batteries.

But as wbassett pointed out, there's a simple solution that I think most people would be happy with, whether they want cordless or not. Just use a USB Wiimote charge kit, and you'll be all set either way.

jban4us:

The managed library (read C#) for the wiimote is excellent. It would take about 15 minutes of googling for system calls to turn it into a mouse using the IR sensors(I've done it before), another half hour for a smoothing algorithm (exponential moving average works excellent and can be made user adjustable) and then a little while longer to get some sort of calibration process so that where you point at the screen is where the mouse is.
The hardest part is making "multiple" mice for two player games. I haven't the slightest idea how you would go about this. If I remember correctly, the library can handle multiple wiimotes (I think you just create multiple wiimote objects), just again it would be modifying the library to trick windows.

wbassett:


--- Quote from: Timstuff on June 16, 2008, 07:34:56 pm ---
--- Quote from: Minwah on June 16, 2008, 08:04:10 am ---But I am guessing not many people would want to do this anyway, as it would make the Wiimote not-wireless. I don't have a problem with a wired gun, but making something wireless have a wire seems a bit illogical...
--- End quote ---

In arcades, all light guns are corded, so many people would probably want cords to be arcade-authentic. Also, it would mean you'd never have to bother with the batteries. Wireless is great when you're sitting on a couch 8 feet away from a 40" LCD, but when you're standing in front of an arcade machine with a screen that's 27" or smaller, wireless becomes less of a necessity, especially when you have to deal with batteries.

But as wbassett pointed out, there's a simple solution that I think most people would be happy with, whether they want cordless or not. Just use a USB Wiimote charge kit, and you'll be all set either way.

--- End quote ---
You're right Tim, some people have already stated they'd want a cord gun.  Others like myself want a cordless gun...  anyone that wants a gun with a cord could just add one!  I'm sure there is a way to power the Wii mote, but as pointed out a voltage regulator would most likely be needed, or just attach a hose for that Arcade feel.


--- Quote from: jban4us ---The managed library (read C#) for the wiimote is excellent. It would take about 15 minutes of googling for system calls to turn it into a mouse using the IR sensors(I've done it before), another half hour for a smoothing algorithm (exponential moving average works excellent and can be made user adjustable) and then a little while longer to get some sort of calibration process so that where you point at the screen is where the mouse is.
The hardest part is making "multiple" mice for two player games. I haven't the slightest idea how you would go about this. If I remember correctly, the library can handle multiple wiimotes (I think you just create multiple wiimote objects), just again it would be modifying the library to trick windows.
--- End quote ---
I've seen some interesting sites too.  There are GlovePie scripts that support two Wii motes and a sensor bar, but my hope is for a true driver.

I also saw a site where they hacked the Wii mote and are now able to write code directly to the Wii hardware.  I'm amazed that they can do that and there isn't a PC driver and suite yet.

Have you been able to put the system calls together into something useable?  I'm a hardware guy and not a programmer so to me it would be like trying to speak a foriegn language, but for you, merhmann and others, this is probably easy and the hardware part may sound difficult.  If we all work together I know we are going to have something cool come out of this project! :)

jban4us:

What I worked on was controlling a robotic arm with the wiimote, so getting it to fully work as a mouse wasn't really part of it. However I was able to control the cursor with the IR sensor and click and right click with the buttons on the wiimote. Without any sort of smoothing it was very difficult to use, but once the smoothing was in place it was easy to use. I didn't try it in any "real" games but I played solitaire at work one day from across the cube for you know, testing :angel:

I just looked at the library's page (http://blogs.msdn.com/coding4fun/archive/2007/03/14/1879033.aspx) and it does support multiple wiimotes, most of the extensions (nunchuck, classic controller, wii fit board) and tracking of up to 4  IR points. This isn't a "driver" per se, but the library handles the HID system calls and such to get data from the wiimote and then .net framework / some win api stuff can be used to emulate the mouse. It would get the job done, maybe too much research use for a PIII, but if you are running light gun games you probably don't have a lowend computer anyway.

Wanting to use it as a light gun you'd want to calibrate it. I haven't done this but I have a vague idea of how it would be done. Search for Johnny Lee's projects to see an example of this. A few of his projects used a calibration system.  (Sorry for being a little long-winded)

Pages: << < (8/13) > >>

Go to full version