wiiusej是一個可以供java讀取wiimote事件的JAVA API
使用wiiusej這個套件, 可以讀到wiimote中各種訊號
如x, y, z各軸的加速度, 轉動量、按了哪顆鍵等
joystick的資訊也可以抓得到
此套件還實作了一個詳細的UI來讓使用者看到各種訊號的變化
而且撰寫者還加入了一個可以支援guitor hero3三介面
wiiuseJ的快速使用教學
1) import wiiusej.jar in your java project.
2) put the 2 dlls files libWiiUseJ.dll and wiiuse.dll at the root of your project (or the two .so files if you are under linux).Connect your wiimote to your bluetooth stack.
3) In your code : Wiimote[] wiimotes = WiiUseApiManager.getWiimotes(X, true);//x is the number of wiimotes to connect. True : make it rumble the first time you get the wiimotes.
4) Make a class (MyListener) implementing the WiimoteListener interface.
5) wiimote[0].addWiiMoteEventListeners(new MyListener());//register my class as a listener of the first wiimote.
===> MyListener will receive events from the wiimotes is registered on.
wiiuseJ的官網