The Ruby interface for blink(1)
<img src=“https://travis-ci.org/ngs/rb-blink1.png?branch=master” alt=“Build Status” />
gem install rb-blink1
require 'blink1' Blink1.open do |blink1| blink1.set_rgb(255, 255, 255) end
require 'blink1' blink1 = Blink1.new blink1.open blink1.set_rgb(255, 255, 255) blink1.close
blink1.set_rgb(255, 255, 255)
blink1.fade_to_rgb(100, 255, 255, 255)
blink1.write_pattern_line(100, 255, 255, 255, 0) blink1.write_pattern_line(100, 0, 255, 255, 1) blink1.write_pattern_line(100, 255, 255, 0, 2) blink1.write_pattern_line(100, 255, 0, 255, 3) blink1.write_pattern_line(100, 255, 255, 255, 4) blink1.write_pattern_line(100, 0, 255, 255, 5) blink1.write_pattern_line(100, 255, 255, 0, 6) blink1.write_pattern_line(100, 255, 0, 255, 7) blink1.write_pattern_line(100, 255, 255, 255, 8) blink1.write_pattern_line(100, 0, 255, 255, 9) blink1.write_pattern_line(100, 255, 255, 0, 10) blink1.play(0)
blink1.blink(255, 255, 0, 5)
blink1.random(25)
blink1.on
blink1.off