hcitool scan
wiipresent - tool to control applications using a Nintendo wiimote
wiipresent [-v] [-i] [-l length] [-t] -b bluetooth-address
wiipresent is a tool to control applications using the wiimote. It was originally developed for using the wiimote to give presentations using openoffice or xpdf, but is now turned into a tool to control your mouse and/or other applications.
Wiimote bluetooth address (use hcitool scan)
X display to use
use infrared sensor to move mouse pointer
presentation length in minutes
on disconnect, wait for reconnect
use tilt sensors to move mouse pointer
display this help and exit
increase verbosity
output version information and exit
Before you can start using wiipresent you need to know the bluetooth address of the wiimote you want to use. You can scan your bluetooth viscinity by using hcitool like:
hcitool scan
after having pressed the 1 and 2 keys on your wiimote once. You will then see something like:
[root@moria ~]# hcitool scan Scanning ... 00:21:64:EF:62:F5 Nokia E71 00:1B:7A:F8:B5:64 Nintendo RVL-CNT-01
Then start wiipresent using the following syntax:
[dag@moria ~]# wiipresent -b 00:1B:7A:F8:B5:64 Please press 1+2 on the wiimote with address 00:1B:7A:F8:B5:64... Battery level now is 81%.
When you press a button on your Nintendo Wiimote, WiiPresent sends a Key event to the application that has the focus. Depending on the application, the buttons have a different meaning even though there is some consistency to what happens.
Currently the key mappings for each application is hard-coded in the wiipresent tool, but in the future we plan to make this dynamically configurable so you have more control over the behaviour of your wiimote for your favorite applications.
Since we have a limited number of buttons on a Ninendo Wiimote we are limited in functionality we can map to the application, however to overcome this limitation combinations of keys have a special meaning.
When you press any button, you are using NORMAL mode. If you keep the B button pressed together with other buttons, you are in WINDOW mode. If you press button B and button A together you toggle between MOUSE mode and NORMAL mode.
The following keys are mapped in NORMAL mode, depending on the application that has the focus this may vary.
change slide, change channel, change tab
change volume, change links
change volume, zoom out/in
toggle play/pause, change source
toggle fullscreen
change aspect ratio
go back, home key
exit wiipresent (not implemented yet due to libwiimote bug)
The following keys are mapped in WINDOW mode, depending on the application that has the focus this may vary. The B button is pressed together with the buttons below.
scroll up/down
switch between applications (window manager)
change workspace
toggle MOUSE mode
blank screen, mute audio (censor info)
The following keys are mapped in MOUSE mode, depending on the application that has the focus this may vary. MOUSE mode is toggled by pressing the A button and B button at the same time.
scroll up/down
switch between applications
left/right mouse buttons
left mouse button
This program is free of bugs. Yeah right.
If you have improvements or bugreports, please send them to: dag@wieers.com
Note
|
Please see the TODO file for known bugs and future plans. |
hcitool(1)
The idea of using the wiimote for giving presentations was devised at LinuxTag 2008 in Berlin and a basic hack (based on WMD) was showcased at LinuxTag the second day at the CentOS booth. It included infrared mouse support and was written by Dag Wieers.
Because we need deadlines for getting anything done, we instantly submitted a paper for FrOSCon 2008 that was selected. And a second hack written in C (using cwiid) implemented tilt mouse support and timely rumbles was showcased at FrOSCon and was written by Geerd-Dietger Hoffman.
At FOSDEM 2009 the current version was written from scratch at the CentOS booth (in C using libwiimote) and demonstrated before a live audience. Nobody (that we know of) was injured during this demonstration.
Written by Dag Wieers dag@wieers.com
Homepage at http://dag.wieers.com/home-made/wiipresent/