FreeJ scripting

Class WiiController

Object
   |
   +--Controller
         |
         +--WiiController

class WiiController
extends Controller


The WiiController connects via bluetooth to a Nintendo wii remote controller.

For more information on this device see http://abstrakraft.org/cwiid/


Author: jaromil, chris, shammash
Defined in Controller.js


Constructor Summary
WiiController(outdevice)
            Nintendo Wii remote control.
 
Method Summary
 void callback acceleration(<double> x, <double> y, <double> z)
           Callback on accelleration changes
 double battery()
           Battery status
 void callback button(<int> button, <bool> state, <int> mask, <int> old_mask)
           Callback on button changes
 void close()
           Disconnect the wii
 void callback connect()
           Callback on sucessful connect
 void callback disconnect()
           Callback on disconnect.
 void dump()
           Dumps out some information about WiiController state to the console.
 bool callback error(<int> status)
           Callback on errors.
 void callback ir(<int> source, <int> x, <int> y, <int> size)
           Callback on infrared changes
 void open(<string> bdaddr)
           Connect to wii.
 bool toggle_accel(<bool> state)
           toggle acceleration data on/off
 bool toggle_buttons(<bool> state)
           toggle button data on/off
 bool toggle_ir(<bool> state)
           toggle infrared data on/off
 bool toggle_led(<int> led, <bool> state)
           toggle led on/off
 bool toggle_rumble(<bool> state)
           toggle rumble on/off
 int x()
           Last x accel state
 int y()
           Last y accel state
 int z()
           Last z accel state
 
Methods inherited from class Controller
activate, get_name
 

Constructor Detail

WiiController

WiiController(outdevice)

Method Detail

acceleration

void callback acceleration(<double> x, <double> y, <double> z)

battery

double battery()

button

void callback button(<int> button, <bool> state, <int> mask, <int> old_mask)

close

void close()

connect

void callback connect()

disconnect

void callback disconnect()

dump

void dump()

error

bool callback error(<int> status)

ir

void callback ir(<int> source, <int> x, <int> y, <int> size)

open

void open(<string> bdaddr)

toggle_accel

bool toggle_accel(<bool> state)

toggle_buttons

bool toggle_buttons(<bool> state)

toggle_ir

bool toggle_ir(<bool> state)

toggle_led

bool toggle_led(<int> led, <bool> state)

toggle_rumble

bool toggle_rumble(<bool> state)

x

int x()

y

int y()

z

int z()

FreeJ scripting

| FreeJ scripting documentation is Copyleft (C) 2000 - 2007 dyne.org foundation. Verbatim copying and distribution of this entire page is permitted in any medium, provided this notice is preserved.
Send inquiries & questions to dyne.org's hackers.
Documentation generated by JSDoc on Sat Sep 25 20:53:29 2010