Gaming Gaming Controller Hardware Testberichte

Kabellose PC-Steuerung mit Nintendo Wiimote | Igors Retro

Vor fast 12 Jahren habe ich einmal ein kleines Bastelprojekt veröffentlicht, das mir jetzt zufällig beim Aufräumen wieder in die Finger gefallen ist. Lustigerweise funktioniert das Gnaze immer noch, denn auch den alten PC habe ich wieder rausgekramt. Nur die Akkus der Steuerung musste ich ersetzen, der Rest lief erstaunlicherweise noch wie damals.

So schön die Steuerung über den gyroskopischen Sensor ist, für die genaue Maussteuerung ist sie erst einmal nicht zu gebrauchen. Trotz allem ist auch diese Steuerung einen eigenen Versuch wert. Die X-Achse simulieren wir durch das Rollen der Wiimote um ihre Längsachse, die Y-Achse durch einfaches Auf und Ab der Wiimote bzw. Drehung um die kurze X-Achse.

Zur Erinnerung noch einmal die Steuerungsachsen. Mit den Werten für die Genauigkeit kann je nach Geschmack und Einsatzgebiet natürlich etwas gespielt werden. Und Achtung: die Handgelenk-Schlaufe nicht vergessen!

Maussteuerung ohne IR-Sensorbar direkt über Gyroskop:

var.x = Wiimote.RawForceX + 6  // Werte aus der Kalibrierung
var.y = Wiimote.RawForceY + 20
var.z = Wiimote.RawForceZ + 6
//Genauigkeit

var.sense0 = 500
var.thresh0x = 5
var.thresh0y = 2

//first sensitivity setting
//xaxis
if var.x > var.thresh0x
  mouse.x = mouse.x – 1/var.sense0
endif
if var.x < -var.thresh0x
  mouse.x = mouse.x + 1/var.sense0
endif

//yaxis
if var.z > var.thresh0y
  mouse.y = mouse.y – 1/var.sense0
endif
if var.z < -var.thresh0y
  mouse.y = mouse.y + 1/var.sense0
endif

Theoretisch kann man hier bereits darauf aufbauen und durch eine äquivalente Drehung um die Z-Achse ein Lenkrad simulieren. Dies geschieht im nächsten Script, mit dem man Trackmania Nations mittels Wiimote-„Lenkrad“ spielen kann. Die Wiimote wird dabei wie ein Lenkrad gehalten, der IR-Sensor zeigt in der waagerechten Grundstellung nach links

Trackmania-Script:

var.led = 0 //1 = Leds on ; 0 = Leds off
var.BaseOn = 30
var.AddOn = 4
var.BaseOff = 20
var.AddOff = 0
var.zBase = 0.20
var.zAdd = 0.04

//Steuertasten
Keyboard.Enter = Wiimote.A        //Enter-Taste
Keyboard.Down = Wiimote.One       //Pfeil unten
Keyboard.Up = Wiimote.Two         //Pfeil oben
Keyboard.Escape = Wiimote.Home    //ESC-Taste
Keyboard.NUMPAD1 = Wiimote.Up     //Kamera-Ansicht 1
Keyboard.NUMPAD2 = Wiimote.Right  //Kamera-Ansicht 2
Keyboard.NUMPAD3 = Wiimote.Down   //Cockpit-Ansicht

//Lenkung nach rechts
if Wiimote.gZ >= var.zBase and < (var.zBase + var.zAdd)
   Keyboard.Right = 1
   wait (var.baseon ms)
   Keyboard.Right = 0
   wait (var.baseoff ms)
endif

if Wiimote.gZ >= (var.zBase + var.zAdd) and < (var.zBase + var.zAdd * 2)
   Keyboard.Right = 1
   wait (var.baseon + var.addon ms)
   Keyboard.Right = 0
   wait (var.baseoff + var.addoff ms)
endif
 
if Wiimote.gZ >= (var.zBase + var.zAdd * 2) and < (var.zBase + var.zAdd * 3)
   Keyboard.Right = 1
   wait (var.baseon + var.addon * 2 ms)
   Keyboard.Right = 0
   wait (var.baseoff + var.addoff * 2 ms)
endif
   
if Wiimote.gZ >= (var.zBase + var.zAdd * 3) and < (var.zBase + var.zAdd * 4)
   Keyboard.Right = 1
   wait (var.baseon + var.addon * 3 ms)
   Keyboard.Right = 0
   wait (var.baseoff + var.addoff * 3 ms)
endif
   
if Wiimote.gZ >= (var.zBase + var.zAdd * 4) and < (var.zBase + var.zAdd * 5)
   Keyboard.Right = 1
   wait (var.baseon + var.addon * 4 ms)
   Keyboard.Right = 0
   wait (var.baseoff + var.addoff * 4 ms)
endif
   
if Wiimote.gZ >= (var.zBase + var.zAdd * 5) and < (var.zBase + var.zAdd * 6)
   Keyboard.Right = 1
   wait (var.baseon + var.addon * 5 ms)
   Keyboard.Right = 0
   wait (var.baseoff + var.addoff * 5 ms)
endif
     
if Wiimote.gZ >= (var.zBase + var.zAdd * 6) and < (var.zBase + var.zAdd * 7)
   Keyboard.Right = 1
   wait (var.baseon + var.addon * 6 ms)
   Keyboard.Right = 0
   wait (var.baseoff + var.addoff * 6 ms)
endif
   
if Wiimote.gZ >= (var.zBase + var.zAdd * 7) and < (var.zBase + var.zAdd * 8)
   Keyboard.Right = 1
   wait (var.baseon + var.addon * 7 ms)
   Keyboard.Right = 0
   wait (var.baseoff + var.addoff * 7 ms)
endif
   
if Wiimote.gZ >= (var.zBase + var.zAdd * 8) and < (var.zBase + var.zAdd * 9)
   Keyboard.Right = 1
   wait (var.baseon + var.addon * 8 ms)
   Keyboard.Right = 0
   wait (var.baseoff + var.addoff * 8 ms)
endif
   
if Wiimote.gZ >= (var.zBase + var.zAdd * 9) and < (var.zBase + var.zAdd * 10)
   Keyboard.Right = 1
   wait (var.baseon + var.addon * 9 ms)
   Keyboard.Right = 0
   wait (var.baseoff + var.addoff * 9 ms)
endif
   
if Wiimote.gZ >= (var.zBase + var.zAdd * 10) and < (var.zBase + var.zAdd * 11)
   Keyboard.Right = 1
   wait (var.baseon + var.addon * 10 ms)
   Keyboard.Right = 0
   wait (var.baseoff + var.addoff * 10 ms)
endif

if Wiimote.gZ >= (var.zBase + var.zAdd * 11)
   Keyboard.Right = 1
endif
 

//Lenkung nach links
if Wiimote.gZ <= -(var.zBase) and > -(var.zBase + var.zAdd)
   Keyboard.Left = 1
   wait (var.baseon ms)
   Keyboard.Left = 0
   wait (var.baseoff ms)
endif
   
if Wiimote.gZ <= -(var.zBase + var.zAdd) and > -(var.zBase + var.zAdd * 2)
   Keyboard.Left = 1
   wait (var.baseon + var.addon ms)
   Keyboard.Left = 0
   wait (var.baseoff + var.addoff ms)
endif
   
if Wiimote.gZ <= -(var.zBase + var.zAdd * 2) and > -(var.zBase + var.zAdd * 3)
   Keyboard.Left = 1
   wait (var.baseon + var.addon * 2 ms)
   Keyboard.Left = 0
   wait (var.baseoff + var.addoff * 2 ms)
endif
   
if Wiimote.gZ <= -(var.zBase + var.zAdd * 3) and > -(var.zBase + var.zAdd * 4)
   Keyboard.Left = 1
   wait (var.baseon + var.addon * 3 ms)
   Keyboard.Left = 0
   wait (var.baseoff + var.addoff * 3 ms)
endif
   
if Wiimote.gZ <= -(var.zBase + var.zAdd * 4) and > -(var.zBase + var.zAdd * 5)
   Keyboard.Left = 1
   wait (var.baseon + var.addon * 4 ms)
   Keyboard.Left = 0
   wait (var.baseoff + var.addoff * 4 ms)
endif
   
if Wiimote.gZ <= -(var.zBase + var.zAdd * 5) and > -(var.zBase + var.zAdd * 6)
   Keyboard.Left = 1
   wait (var.baseon + var.addon * 5 ms)
   Keyboard.Left = 0
   wait (var.baseoff + var.addoff * 5 ms)
endif
   
if Wiimote.gZ <= -(var.zBase + var.zAdd * 6) and > -(var.zBase + var.zAdd * 7)
   Keyboard.Left = 1
   wait (var.baseon + var.addon * 6 ms)
   Keyboard.Left = 0
   wait (var.baseoff + var.addoff * 6 ms)
endif
   
if Wiimote.gZ <= -(var.zBase + var.zAdd * 7) and > -(var.zBase + var.zAdd * 8)
   Keyboard.Left = 1
   wait (var.baseon + var.addon * 7 ms)
   Keyboard.Left = 0
   wait 20ms
endif
   
if Wiimote.gZ <= -(var.zBase + var.zAdd * 8) and > -(var.zBase + var.zAdd * 9)
   Keyboard.Left = 1
   wait (var.baseon + var.addon * 8 ms)
   Keyboard.Left = 0
   wait (var.baseoff + var.addoff * 8 ms)
endif
   
if Wiimote.gZ <= -(var.zBase + var.zAdd * 9) and > -(var.zBase + var.zAdd * 10)
   Keyboard.Left = 1
   wait (var.baseon + var.addon * 9 ms)
   Keyboard.Left = 0
   wait (var.baseoff + var.addoff * 9 ms)
endif
   
if Wiimote.gZ <= -(var.zBase + var.zAdd * 10) and > -(var.zBase + var.zAdd * 11)
   Keyboard.Left = 1
   wait (var.baseon + var.addon * 10 ms)
   Keyboard.Left = 0
   wait (var.baseoff + var.addoff * 10 ms)
endif

if Wiimote.gZ <= -(var.zBase + var.zAdd * 11)
   Keyboard.Left = 1
endif
////End of the Controls for steering to the left

//Nullpunkt (Tote Zone)
if Wiimote.gZ > -(var.zBase) and < var.zBase
   Keyboard.Left = 0
   Keyboard.Right = 0
   if var.led = 1
      Wiimote.Leds = 6
   endif
endif

//LED-Steuerung
if var.led = 1 and (Wiimote.gz > 0.20 and < 0.50)
   Wiimote.Leds = 3
endif
if var.led = 1 and Wiimote.gz >= 0.50
   Wiimote.Leds = 1
endif
if var.led = 1 and (Wiimote.gz < -0.20 and > -0.50)
   Wiimote.Leds = 12
endif
if var.led = 1 and Wiimote.gz <= -0.50
   Wiimote.Leds = 8
endif

 


Trackmania Nations mit Wiimote-Steuerung

Zusammenfassung und Fazit

Der Einsatz der Wiimote am Desktop-PC, Notebook und HTPC als Steuer- und Eingabegerät ist in manchen Belangen wirklich sinnvoll und kann unter Umständen sogar richtig Geld sparen  (z.B. beim Einsatz als Whiteboard). Natürlich bietet die Anbindung an den PC nicht automatisch bei Spielen die gleiche Funktionalität wie die Wii selbst. Wer auf diesem Gebiet eine exakte Kopie wünscht und dem ein wenig Programmieraufwand zu viel ist, der sollte sich wohl doch eher die Wii kaufen, da am PC fast jedes einzelne Spiel individuell angepasst werden muss. Und selbst dann ist das perfekte Ergebnis nicht immer garantiert. Wer jedoch gern experimentiert, dem wird die Wiimote mit der Zeit zum unentbehrlichen vierten Steuergerät neben Maus, Tastatur und Gamepad.

Ohne Sensorbar ist kein brauchbarer Einsatz als Mausersatz möglich, deshalb ist entweder der Selbstbau oder der Kauf einer fertigen Sensorbar Pflicht. Wir haben die Wiimote-Steuerung am heimischen HTPC benutzt; das Mediacenter lässt sich damit bequemer steuern, als mit einer normalen IR-Fernbedienung. Außerdem wurde die Wiimote als Zeiger und Steuerung für eine Powerpoint-Präsentation über einen Beamer genutzt. Der Einsatz war wesentlich effizienter als das fummelige Gemisch aus Laptop-Maus und Laser-Pointer. Hier liegen sicher auch die Stärken der vorgestellten Steuerung. Und spielen ließ es sich damit auch recht passabel, wenn man sich erst einmal an die Wiimote gewöhnt hat.

So gesehen hat nicht nur der Eigenbau und das Programmieren Spaß gemacht, sondern am Ende entstand ein wirklich brauchbares, neues Eingabegerät. Wer den Aufwand nicht scheut und wem ca. 40 Euro für eine Wiimote nicht zu viel sind, dem kann man den Nachbau nur empfehlen.

Danke für die Spende



Du fandest, der Beitrag war interessant und möchtest uns unterstützen? Klasse!

Hier erfährst Du, wie: Hier spenden.

Hier kannst Du per PayPal spenden.

About the author

Igor Wallossek

Chefredakteur und Namensgeber von igor'sLAB als inhaltlichem Nachfolger von Tom's Hardware Deutschland, deren Lizenz im Juni 2019 zurückgegeben wurde, um den qualitativen Ansprüchen der Webinhalte und Herausforderungen der neuen Medien wie z.B. YouTube mit einem eigenen Kanal besser gerecht werden zu können.

Computer-Nerd seit 1983, Audio-Freak seit 1979 und seit über 50 Jahren so ziemlich offen für alles, was einen Stecker oder einen Akku hat.

Folge Igor auf:
YouTube   Facebook    Instagram Twitter

Werbung

Werbung