Sitzung: Jeden Freitag in der Vorlesungszeit ab 16 Uhr c. t. im MAR 0.005. In der vorlesungsfreien Zeit unregelmäßig (Jemensch da?). Macht mit!

Wiimote-presentation: Unterschied zwischen den Versionen

(zwischengespeichert)
Zeile 22: Zeile 22:
  
 
Da die default konfigurationen von cwii schrott sind, wurde kurzehand eine eigene geschrieben, basierend auf ''acc_led'' und ''fps_config'' (zu finden unter: ''/etc/cwiid/wminput/'')
 
Da die default konfigurationen von cwii schrott sind, wurde kurzehand eine eigene geschrieben, basierend auf ''acc_led'' und ''fps_config'' (zu finden unter: ''/etc/cwiid/wminput/'')
 +
 +
 +
eine Konfiguration die gut mit dem von uns verwendetet Präsentationsprogramm (pdfpres) funktioniert:
  
 
<pre># Freitagsrunden presentation configuration using acc_led and fps_config
 
<pre># Freitagsrunden presentation configuration using acc_led and fps_config
Zeile 38: Zeile 41:
  
 
#custom buttons
 
#custom buttons
Wiimote.A              = BTN_LEFT  # mouse button left
+
Wiimote.A              = KEY_RIGHT # arrow button left
Wiimote.B              = BTN_RIGHT # mouse button right
+
Wiimote.B              = KEY_LEFT  # arrow button right
  
 
Wiimote.Up              = KEY_UP
 
Wiimote.Up              = KEY_UP
Zeile 48: Zeile 51:
 
Wiimote.Minus  = KEY_1      # fixating the current slide on the beamer
 
Wiimote.Minus  = KEY_1      # fixating the current slide on the beamer
 
Wiimote.Home  = KEY_J      # jump back to current slide  
 
Wiimote.Home  = KEY_J      # jump back to current slide  
Wiimote.Plus  = KEY_PAGEUP 
+
Wiimote.Plus  = # kapital L (dunno KEY_LEFTSHIFT + KEY_L) # unlock fix
  
Wiimote.1      = KEY_F   # fullscreen in pdfpres
+
Wiimote.1      = KEY_F       # fullscreen in pdfpres
Wiimote.2      = KEY_ESC
+
Wiimote.2      = KEY_S      # starts the timer, pauses it and continues if paused
 
</pre>
 
</pre>
  
  
  
eine Konfiguration die besser mit dem von uns verwendetet Präsentationsprogramm (pdfpres) funktioniert:
+
alte config (im Moment noch im Einsatz):
  
 
<pre># Freitagsrunden presentation configuration using acc_led and fps_config
 
<pre># Freitagsrunden presentation configuration using acc_led and fps_config
Zeile 73: Zeile 76:
  
 
#custom buttons
 
#custom buttons
Wiimote.A              = KEY_RIGHT # arrow button left
+
Wiimote.A              = BTN_LEFT  # mouse button left
Wiimote.B              = KEY_LEFT  # arrow button right
+
Wiimote.B              = BTN_RIGHT # mouse button right
  
 
Wiimote.Up              = KEY_UP
 
Wiimote.Up              = KEY_UP

Version vom 15. März 2011, 15:45 Uhr

Einrichten der WiiMote (Wii Remote) für unsere Präsentationen (zum ersten Male im Javakurs2011).

Hardware

  • Bluetooth
    • Zum Einstatz kommt hier ein ThumbBlueToothUSB-Stick


Software


Konfiguration

Da die default konfigurationen von cwii schrott sind, wurde kurzehand eine eigene geschrieben, basierend auf acc_led und fps_config (zu finden unter: /etc/cwiid/wminput/)


eine Konfiguration die gut mit dem von uns verwendetet Präsentationsprogramm (pdfpres) funktioniert:

# Freitagsrunden presentation configuration using acc_led and fps_config

# IR for mouse REL - fps style
Plugin.ir_fps.X	= REL_X
Plugin.ir_fps.Y	= REL_Y

# set freitagsunden special layout of ids if wiimote is connected
Plugin.led.Led1 = 1
Plugin.led.Led2 = 1
Plugin.led.Led3 = 1
Plugin.led.Led4 = 1

Plugin.led.Battery = 1

#custom buttons
Wiimote.A               = KEY_RIGHT # arrow button left
Wiimote.B               = KEY_LEFT  # arrow button right

Wiimote.Up              = KEY_UP
Wiimote.Down    	= KEY_DOWN
Wiimote.Left    	= KEY_LEFT
Wiimote.Right   	= KEY_RIGHT

Wiimote.Minus  		= KEY_1       # fixating the current slide on the beamer
Wiimote.Home  		= KEY_J       # jump back to current slide 
Wiimote.Plus   		= # kapital L (dunno KEY_LEFTSHIFT + KEY_L) # unlock fix

Wiimote.1       	= KEY_F       # fullscreen in pdfpres
Wiimote.2       	= KEY_S       # starts the timer, pauses it and continues if paused


alte config (im Moment noch im Einsatz):

# Freitagsrunden presentation configuration using acc_led and fps_config

# IR for mouse REL - fps style
Plugin.ir_fps.X	= REL_X
Plugin.ir_fps.Y	= REL_Y

# set freitagsunden special layout of ids if wiimote is connected
Plugin.led.Led1 = 1
Plugin.led.Led2 = 1
Plugin.led.Led3 = 1
Plugin.led.Led4 = 1

Plugin.led.Battery = 1

#custom buttons
Wiimote.A               = BTN_LEFT  # mouse button left
Wiimote.B               = BTN_RIGHT # mouse button right

Wiimote.Up              = KEY_UP
Wiimote.Down    	= KEY_DOWN
Wiimote.Left    	= KEY_LEFT
Wiimote.Right   	= KEY_RIGHT

Wiimote.Minus  		= KEY_PAGEDOWN
Wiimote.Plus   		= KEY_PAGEUP
Wiimote.Home  		= KEY_F5

Wiimote.1       	= KEY_TAB
Wiimote.2       	= KEY_ESC

Starten und Beenden der Verbindung zur Wiimote

Um die Verbindung zur Wiimote herzustellen wurden folgende Scripte geschrieben, wobei das erste stets überprüft, ob eine neue FB gefunden wurde. Ist dies der fall, dann werden kurzzeittig alle 4 LEDs aktiviert (solange sie nicht auf die Infrarot leiste zeigen, ist dies der fall, dann wird nur eine LED aktiviert.) Nach dem die 4 LEDs aufgeleuchtet haben, kann die FB wie eine Maus benutzt werden: Zeigen auf dem Monitor wird die Position der Maus verändern, (A) für linke Maustaste, (B) für die rechte. (siehe auch obrigen Abschnitt)

gksudo -- wminput -d -c /home/freitagsrunde/.cwiid/wminput/default ${WIIMOTE_MAC}

Wobei ${WIIMOTE_MAC} durch das Ergebnis von lswm (List Wimotes) ersetzt werden muss.

Das andere erstellte Skript macht prinzipiell dies:

gksudo killall wminput 

Es beendet also die Kommunikation mit der WiiFB und dem Laptop.