Wii4R¶ ↑
Ruby C Extension for controlling Wii Remote devices via bluetooth connection. Binding of C wiiuse library (www.wiiuse.net)
Install¶ ↑
On a supported platform (x86 linux):
$ gem install wii4r
On other platforms:
$ extract the source $ rake native gem $ cd pkg $ gem install wii4r-0.5.0-<platform>.gem
Dependencies¶ ↑
-
wiiuse lib (www.wiiuse.net) (lacks of speaker support and small fixes)
-
wiiuse_fork (github) (lacks of speaker support as for now)
-
rake (>= 0.8.3 and < 0.9)
-
rake-compiler (>= 0.7.0)
Usage¶ ↑
require 'wii4r' include Wii w = WiimoteManager.new w.connect w.poll do |(wiimote, event)| if event == :generic if wiimote.pressed? BUTTON_A puts "button a pressed!" end end end
See rdoc documentation for more details
Copyright¶ ↑
Copyright © 2009 KzMz & BuZz.
LICENSE for details