
NUI Chapter 15. The Wiimote, the PC, and Java

From the website:

  Killer Game Programming in Java
  http://fivedots.coe.psu.ac.th/~ad/jg

  Dr. Andrew Davison
  Dept. of Computer Engineering
  Prince of Songkla University
  Hat yai, Songkhla 90112, Thailand
  E-mail: ad@fivedots.coe.psu.ac.th


If you use this code, please mention my name, and include a link
to the website.

Thanks,
  Andrew

============================

This directory contains 5 Java files:
  * WiiSimple.java
  * Buttons.java
  * Nunchuk.java
  * Motion.java
  * IRTracker.java

One subdirectory:
  * WiiPosition/
      - this holds the WiiPosition example

There are 3 batch files:
  * compile.bat
  * run.bat
     - make sure these batch files refer to the correct location for your
       download of wiiuseJ API
  * runTests.bat
     - this is a convenient way of calling the three test programs included
       in the wiiuseJ download

----------------------------
Before Compilation/Execution:

* You need a wiimote, Nunchuk, and sensor bar
    - read section 1 of the draft chapter for details

* A Bluetooth dongle
    - this is a good idea even if your laptop has its own Bluetooth hardware

* You need a *good* Bluetooth stack
    - I've had great success with the commercial BlueSoleil stack,
      from http://www.bluesoleil.com/
    - read section 2 for details on installing it

* download the wiimote testing tool, wiinRemote, from
  http://onakasuita.org/wii/index-e.html
     - select the latest version, which is currently WiinRemote_v2007.1.13.zip

* download and install the wiiuseJ library
  from http://code.google.com/p/wiiusej/
    - compile.bat and run.bat assume that wiiuseJ is stored in 
      D:\wiiusej 0.12b
    - if you're using a 64-bit version of Windows then download the 64 bit DLLs
      in win64dlls.zip to replace the 32-bit ones


----------------------------
Wiimote and wiiuseJ Testing

1. Connect the wiimote to BlueSoleil, as explained in section 2.

2. Test the wiimote using wiinRemote

3. Test wiiuseJ using its built-in test programs by calling
   runTests.bat

   > runTests Main  
       // this starts the GUI test program shown in section 2.2.
   
   > runTests Tests
       // this starts a text-based program that writes to stdout
   
   > runTests ClassicControllerGuiTest
      // this tests the Classic Controller expansion device (if you have one)


----------------------------
Compilation of my examples:

> compile *.java

----------------------------
Execution:

> run WiiSimple

> run Buttons

> run Nunchuk

> run Motion

> run IRTracker

---------
Last updated: 25th June 2014