de.jreality.toolsystem.raw
Class WiiMoteOSC
java.lang.Object
de.jreality.toolsystem.raw.WiiMoteOSC
- All Implemented Interfaces:
- RawDevice
public class WiiMoteOSC
- extends java.lang.Object
- implements RawDevice
Receives WiiMote events via OSC
Make sure to uncomment the WiiMoteOSC bits in toolconfig.xml if you want to use this driver.
The OSC detour is a bit of a kludge, but unfortunately none of the Java WiiMote libraries were
satisfactory, and the Bluetooth libraries for Java didn't seem to work well with WiiMotes, either.
Instructions for Mac OS X:
- Install DarwiinRemoteOSC (http://mac.softpedia.com/get/Utilities/darwiinremoteOSC.shtml).
- Launch DarwiinRemoteOSC and pair your WiiMote with the computer (i.e., push 1 and 2 on the WiiMote
at the same time). After a few seconds, you should see some squiggly lines in the DarwiinRemoteOSC
window if you shake the WiiMote.
Instructions for Linux:
- Install wiiosc (http://www.nescivi.nl/wiiosc/).
- Launch wiiosc from the command line, with the following parameters:
wiiosc 5600 57150 127.0.0.1 auto
Pair your WiiMote with your computer (i.e., push 1 and 2 on the WiiMote at the same time). After
a few seconds, wiiosc should confirm the connection with the WiiMote.
Instructions for Windows:
- Not sure; if you're lucky, you may be able to install wiiosc and use the Linux approach.
- Author:
- brinkman
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WiiMoteOSC
public WiiMoteOSC()
dispose
public void dispose()
- Specified by:
dispose
in interface RawDevice
getName
public java.lang.String getName()
- Specified by:
getName
in interface RawDevice
initialize
public void initialize(Viewer viewer,
java.util.Map<java.lang.String,java.lang.Object> config)
- Specified by:
initialize
in interface RawDevice
mapRawDevice
public ToolEvent mapRawDevice(java.lang.String rawDeviceName,
InputSlot inputDevice)
- Specified by:
mapRawDevice
in interface RawDevice
- Returns:
- a ToolEvent representing a reasonable initial
value for the mapping - that means the source
must be the given input slot!
setEventQueue
public void setEventQueue(ToolEventQueue queue)
- Specified by:
setEventQueue
in interface RawDevice
messageReceived
public void messageReceived(OSCMessage msg,
java.net.SocketAddress sender,
long time)