Playground for jruby and the blinkstick
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.bundle
extlibs
.gitignore
Gemfile
LICENSE
README.md
Rakefile
blinkserver.rb
jblinkstick.rb

README.md

jruby-blinkstick - blinkstick fun with jRuby

I just got my blinkstick and couldn't wait to play with it. I soldered it - plugged into my MacBook and everything was working. When I used for Windows 8 I had to install drivers for it, however, not everyone has the chance to install drivers so I went through the different options.

The blinkstick ruby api is using the ruby gem libusb - which requires the installation of the driver.

The working processing example for the blinkstick, however, was working without any driver installions. This implementation uses the hidapi library as driver. I looked through the processing sample applications and rebuilt the BlinkStick.jar from it with out any modifications. I gave jRuby 1.7.3 and jRuby 1.7.11 a shot and it worked. Most of the tricky work to find a proper way to access the Java classes and how to set it up.

Take this code example as working state for your own experiments.

You can run the example by running the command:

jruby jblinkstick.rb

The script blinkserver.rb features a sinatra enabled blinkserver.