GlovePIE
There are several free programs on the internet that make it possible to interface your Wiimote with PC applications. I used a program called GlovePIE. It takes some time to understand the functions of the program because the documentation seems to be written for people that already know GlovePIE. Also the copyright disclaimer is really strange. But after investing some time to learn the functions of the programm and going through many examples and forums on the internet I found it one of the best solutions currently available. Actually real good solutions do not yet exists.

GlovePIE has no function to send messages to a RS232 port. So there my Visual Basic skills came in handy again. I made a small programm that translated Winsock data to the serialport. I made a GlovePIE script that uses the OSC (Open Sound Control) labraries. This is no more than simple winsock messages.

This is the my GlovePIE script:

ExitScript = HeldDown(Wiimote.Home, 3s)

var.broadcast = false
var.ip = “localhost”
var.port= 51345

// roll to select color
// pitch not yet used
// values from -90 to 90
var.N = wiimote1.smoothpitch
var.M = wiimote1.smoothRoll
debug = var.N + ” ” + var.M

// Red
if ((var.N >= -90) && (var.N < -30))

var.strR = (255*(var.N + 90))/60

elseif ((var.N > 30) && (var.N <= 90))

var.strR = 255-((255*(var.N – 30))/60)

else

var.strR = 255;

endif

// Green
if ((var.N > -90) && (var.N <= -30))

var.strG = 255-((255*(var.N + 90))/60)

elseif ((var.N >= -30) && (var.N < 30))

var.strG = (255*(var.N + 30))/60

else

var.strG = 255;

endif

// blue
if ((var.N > -30) && (var.N <= 30))

var.strB = 255-((255*(var.N + 30))/60)

elseif ((var.N >= 30) && (var.N < 90))

var.strB = (255*(var.N – 30))/60

else

var.strB = 255;

endif

//debug = var.N + ” ” + str(var.strR) + ” ” + str(var.strG) + ” ” + str(var.strB)

var.strR=chr(var.strR)
var.strG=chr(var.strG)
var.strB=chr(var.strB)
//if wiimote.a then

sendosc(var.ip, var.port, “serial”, “C”+ var.strR + var.strG + var.strB + chr(0xff))

So the GlovePIE script sends winsock messages to a visual basic program that sends RS232 messages to the Moodvision controller.

Color Algorithm
I have been playing with many different color algorithms to get the best results. Interesting was the version in which a had defined 3D area’s in which one discrete color was active. I ended with the version shown here. Basically I split the range from -90 degrees to +90 degrees in 3 sections. In section 1 green goes from 0 to 255. In section 2 green goes from 255 to 0 and blue goes from 0 to 255. In section 3 blue goes from 255 to 0 and red from 0 to 255. This way I could make any color and also have smooth transitions between them.

If you wish to contact me, check the contacts page.

If people from Nintendo read this, I really would like to see your development department sometime and dicusse some great ideas I have!

« previous page

goto page: 1 2

13 Responses to “RGWii”

  • Every time i come here I am not disappointed, nice post!

    Greetings from Tim. :)

  • stan says:

    Goede avond,

    Vandaag heb ik een Vogels MoodVision XLF200 LED verlichting gekocht, en zo ben ik ook op uw website uitgekomen. Erg mooi hoe u deze ledverlichting heeft geupgrade. Nu lijkt het mijzelf ook erg mooi om een soort afstandbediening in te bouwen. Zou het ook mogelijk zijn om direct een infrarood ontvanger in te bouwen in de controller zodat je de verlichting zou kunnen verandere met bv je afstandbediening van je tv. En heeft u misschien wat detail foto’s van hoe u de de SUB-D9 connector heeft aangesloten op de TDO en RDI pins.

    Bij voorbaat dank.

    Met vriendelijke groet,

    Stan van den Pol

  • Guy says:

    Hi,

    Very nice website and some great projects.
    I was particularly interested in the RGWii, as I purchased the same set recently.
    I would also like to control it through the serial port.
    Could you post some more details about the connection (I see on the picture you added a resistor?) I did find the pinout of the 7FLITE39, but it doesn’t say much about the serial port.
    I’m also interested on the commands you send to the controller. How did you find the right commands? Are there other commands?

    Thanks
    Guy

  • Normand Boivin says:

    Nice controller interface.

    Can you post or email the Basic program that receives the GPIE OSC stream. I am trying to Wiimotely control a Roomba which also has an RS232 interface.

    Thanks.

  • cant you use a wii remote aswell for like messing with bluetooth laptops. I remember a friend of mine was DJ’ing on his laptop at a party and his cousing took out a remote ( i think it was a Wii Remote) and basically just sync’d up and shut off his laptop during a session. Was funny. but i may be wrong about it being a Wii remote.

Leave a Reply