OnLineWii usa cookies para mejorar su experiencia de navegación y mostrarle contenido personalizado.
Si quiere deshabilitar cookies en su dispositivo, revise nuestra información.
Tenga en cuenta que algunas partes de nuestro sitio web no funcionará de forma correcta si deshabilita las cookies.
Al cerrar este mensaje, usted acepta el uso de cookies en este dispositivo, de acuerdo con nuestra política de cookies, a menos que usted las haya desactivado. Acepto, y quiero cerrar esta ventana.
 Ayudar a la Asociación es fácil
La mejor manera de ayudar a la Asociación es con el donativo directo, pero para el que no quiera/pueda, existe una forma de ayudar con algo. Para ello, os podéis registrar en 20dollars2surf desde el siguiente banner:

Gana dinero y colabora con la Asociación OLW


En ESTE tema os lo explicamos más detenidamente.
 DONATIVOS
Colabora con la Asociación.

 

 

¡Gracias!

Use a Nintendo Wii to control the color of your LED Lighting

Imagen

Todo lo relacionado con nuestra querida Scene. Aprende como instalar tu Homebrew Channel, reproduce archivos .avi y mp4 en tu wii, convierte tu wii en una pizarra......

Moderador: Enock

Reglas del Foro
OnLineWii no da soporte a la piratería, todo los artículos expuestos son con carácter informativo y de investigación.
Ni los autores ni OnLineWii, son responsables del uso final que hagan los usuarios de este material ni de posibles problemas con la Wii por su mal uso.
Términos de búsqueda
the, var, fgt, color, and, http, img, controller, from, wiimote, glovepie, wii, with, that, strb
Desconectado

Use a Nintendo Wii to control the color of your LED Lighting

NotaAutor: teddy_san » Lun 22 Jun 2009, 19:44

Aqui os dejo otro "haztelo tu mismo" este trata de como controlar un monton de luces led con el mando, como siempre, ademas del video dejo el como se puede hacer, desde los materiales hasta el script, asi qeu lo dicho, si a alguien le interesa de verdad hacerlo, que me lo diga y se lo traduzco sin problemas:

Imagen

<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/FyBjt5KYyZ8&color1=0xb1b1b1&color2=0xcfcfcf&feature=player_embedded&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.youtube.com/v/FyBjt5KYyZ8&color1=0xb1b1b1&color2=0xcfcfcf&feature=player_embedded&fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344"></embed></object>


The RGB Controller
The controller I used is from a Vogel's Moodvision XLF200 set. These real nice looking, very intense LED lighting tubes are available in 2 versions. There is a button controlled version (XLF200) and a remote controlled version (XLF300). Extra LED tubes are available in the XLF100 package. I used the XLF200 controller with a nice blue button.

Imagen

Hacking the controller
I wanted to be able to make any color and not only simulate button presses with my Wiimote. So I had to modify the controller a bit. It's rather easy to open the controller. Inside is a microcontroller, some fet's that drive the LEDs and a switch. I wanted to talk to this controller by RS232 so I soldered a SUB-D9 connector to the TDO and RDI pins of the micro. Picture below:

Imagen

Imagen

Bluetooth Dongle
On the PC I attached a cheap USB Bluetooth dongle that I bought in China. It comes with a free version of the Blue Soleil bluetooth stack.

I paired my Wiimote with my PC. This is done by holding down the 1 and 2 button on the Wiimote (leds will flash) and use the bluetooth software to set op a connection with a HID device.

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> 30) && (var.N <90> -90) && (var.N <30>= -30) && (var.N <30> -30) && (var.N <30>= 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.

Imagen

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.


Fuente: wii.hasse.nl

Avatar de Usuario
teddy_san

Mod.Global
OLWiiero Plata
OLWiiero Plata
 
Años como miembroAños como miembroAños como miembroAños como miembroAños como miembroAños como miembroAños como miembroAños como miembroAños como miembroAños como miembroAños como miembroAños como miembroAños como miembroAños como miembroAños como miembroAños como miembroAños como miembro
Bookmark and Share
 
Info. Usuario Info. Usuario
 
    Desconocido Desconocido

Anuncio



Contribuye con la labor social de la Asociación, haz una Donación.
También contribuirás al mantenimiento de OnLineWii.es y todas sus actividades.
Al instante dejarás de ver estos anuncios.


Volver A Scene/homebrew Channel

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 1 invitado

cron