Forum

The wii remote thread

hi there,

so some of you are already playing with the wii remote, so perhaps we should discuss it here instead of in the shoutbox.
I’m also playing around with it, and it was very easy to simple map it to a gamecontroller. You just need JoyPP and the following Glovepie lines:
{CODE(ln=>1)}PPJoy1.Digital0 = Wiimote1.A
PPJoy1.Digital1 = Wiimote1.B
PPJoy1.Digital2 = Wiimote1.One
PPJoy1.Digital3 = Wiimote1.Two

PPJoy1.Analog0 = MapRange(Wiimote1.Roll, -75 degrees,75 degrees, -1,1)
PPJoy1.Analog1 = MapRange(Wiimote1.Pitch, -45 degrees,45 degrees, -1,1)^

… and the GameController Node should work. But has anyone an idea how to get the Acceleration/Velocity out from the moves? I wasn’t successfull with the RawForce thing, and also not with sending midi from GLovepie to VVVV.

Basically I’d suggest you send the data via OSC.
like so:
var.host = “localhost”
var.Port = 47110
SendOSC(var.host, var.port, “/wiimote”, wiimote.Up,wiimote.Down,wiimote.Left,wiimote.Right,wiimote.A,wiimote.B,wiimote.Minus,wiimote.Home,wiimote.Plus,wiimote.One,Wiimote.Two,wiimote.RawForceX,wiimote.RawForceY,wiimote.RawForceZ,wiimote.dot1size,wiimote.dot1vis,wiimote.dot1x,wiimote.dot1y)

what was your “problem with the rawforce thing” then?

(the source clipping in my previous post is cropped where the word wrap should be. But if you copy+past into an editor, it’s there. That one goes onto the website wishlist…)

thanks, this osc send script helps me a lot!
and i just found out that what i meant RawForce is actually called RelAccX/Y/Z
so I’m currently working with this one:
{CODE(ln=>1)}var.host = “localhost”
var.Port = 47110
SendOSC(var.host, var.port, “/wiimote”, wiimote.roll,wiimote.pitch,wiimote.RelAccX,wiimote.RelAccY,wiimote.RelAccZ)
^

by the way, great wii and in this case glovepie website:
http://www.wiili.org/index.php/GlovePIE

hmm because of some unknown reasons the attached patch crashes in the first minute when glovepie is running. does someone have an idea why? i already tried different queue modes (because i have no idea nor search results what this means).

wii_osc.v4p (12.8 kB)

perhaps you better go the MIDI way.

i also had crashes when trying to use OSC.

don’t forget to install MIDIyoke!

I also was using Carl Kenners GlovePie
with OSC and did some wiimote_osc_vvvv thing
based on kalles DataGlove-Patching.

http://vvvv.org/tiki-index.php?page=kalle-Modules-Devices&highlight=glove

The same trouble.
It crashes sometimes while using OSC.
Are the VVVV-Crashes because of OSC, GlovePie or the Patch?
Anyways - here are the files

things to do

  • check out midi send and recieve possibilities
  • send data back to wiimote (Rumble and LED)
  • add the Wii Sensor Bar

wiimote_osc_vvvv.rar (2.9 kB)

The attached patch should work with midi. It sends the data to MidiYoke1

But I currently have a strange bug with the GetSlice nodes in the vvvv patch - they are sending a whole spread instead of the slice they should send. No idea where this comes from… yesterday the patch worked fine.

wii_midi.rar (1.9 kB)

i have added the wiimote-nunchuk.

i’m trying to add the wiimote sensorbar.
somebody allready did this?

wiimote_midi_vvvv.rar (4.3 kB)

Hi there,
nothing really new, but i did this glovepie script and thought it might be usefull to someone…the cool thing here is you can specify speeds and offsets…now workin on the acceleration feature…

Cheers!

vvvvimote.zip (2.9 kB)

Hi,again!
Just did a little patch for camera controls…for those who wants to play around…also changed a bit the script.

Have vvvvun ;)

WIICAM.zip (16.8 kB)

desax! while i am grateful for your contribution, especially since you posted it on the exact same day that i received my wiimote in the mail, i couldn’t help but notice two important details:

  1. your glovepie-script contains syntax errors in lines 39 to 41, missing SPACES in front of the final 1s: {CODE(ln=>0)}20 m per s per s, 0, 1)^in fact, this stops the code below (buttons to midi) from executing in glovepie 0.3; how did you manage to run it at all?

  2. hardcoding the output to MIDI Device #2 is totally not cool.

anyway, thanks for your code. lets get those wiimotes rocking!

Wiimote_to_MIDI_mod.PIE (2.4 kB)

Hi diki,
Weird, everything works fine here. No errors and doesn’t care about the MIDI device…but thank you a lot for reporting those troubles…
I’ve switched A and B inside the camsystem which is more convenient for controls…and added your script. But still needs finetuning for X and Y controls(mapped values isn’t a really smart way)…I’m sure you’ll do it ten times better…

edit: forget the first one, check the second link please.

Cheers!

WIICAM.zip (17.0 kB)

i just finished my first plugin. no glovepie, no osc, no midi needed.

get ready to rumble:

WiiMote.zip (39.64 Kb)

grrrrrreat!!!
seems to work fine here, i will test more in these days…
but if i connect the nunchuck then vvvv crash !

tnx velcrome

nunchuck support is possible too.

also i am thinking about making it spreadable to enable multiple wiimotes.

problem with both features is i have neither a nunchuck nor a second wiimote. i’ll try to get them from a friend eventually.

hi velcrome i will give you mine next monday. …

what about automatic bluetooth-detection? now i have to push some buttons and to approve and i dont know which wii is #1 and which #2
(im using blue soleil)

I was planning to do the same thing but now I don’t need to!

It seems to be much more responsive than the glovepie/OSC setup I was using before. Multiple wiimote support is something I want, I have two and would gladly help with testing.

One problem I’m having is that it only seems to output up to three IR sources instead of the four the wiimote is capable of tracking.

Very nice…

it is subversioned now:

http://vvvv.svn.sourceforge.net/viewvc/vvvv/plugins/c#/WiiMote/

i included the source code of brian peeks lib, because i had to tamper with it to enable multiple wiimotes

  • four IR blobs should be working now.
  • multiple wiimotes is included
  • nunchuck and the classiccontroller are included, but also untested

anyone with a classiccontroller who’s willing to test?
http://upload.wikimedia.org/wikipedia/commons/thumb/f/f2/Wii_05.jpg/800px-Wii_05.jpg

wiimote2.zip (40.6 kB)