Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ngs/rb-blink1
Ruby interface for blink(1)
https://github.com/ngs/rb-blink1
Last synced: 3 months ago
JSON representation
Ruby interface for blink(1)
- Host: GitHub
- URL: https://github.com/ngs/rb-blink1
- Owner: ngs
- License: mit
- Created: 2012-12-12T23:23:15.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2015-05-16T22:33:16.000Z (over 9 years ago)
- Last Synced: 2024-05-22T13:20:42.866Z (6 months ago)
- Language: C
- Homepage: http://ngs.github.io/rb-blink1/
- Size: 711 KB
- Stars: 50
- Watchers: 4
- Forks: 9
- Open Issues: 6
-
Metadata Files:
- Readme: README.rdoc
- License: LICENSE
Awesome Lists containing this project
README
= rb-blink1
The Ruby interface for blink(1)
{}[https://travis-ci.org/ngs/rb-blink1]
{}[https://codeclimate.com/repos/526fcb48f3ea00043902e584/feed]== Install
gem install rb-blink1
== Usage
=== Play in a block
require 'blink1'
Blink1.open do |blink1|
blink1.set_rgb(255, 255, 255)
end=== Open and close manually
require 'blink1'
blink1 = Blink1.new
blink1.open
blink1.set_rgb(255, 255, 255)
blink1.close=== Set RGB
blink1.set_rgb(255, 255, 255)
=== Fade to RGB
blink1.fade_to_rgb(100, 255, 255, 255)
=== Create and play pattern line
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)=== Blink with specified color
blink1.blink(255, 255, 0, 5)
=== Random color
blink1.random(25)
=== Turn LED on
blink1.on
=== Turn LED off
blink1.off
== Author
{Atsushi Nagase}[http://ngs.io/]