]>
Commit | Line | Data |
---|---|---|
ec1bef8e | 1 | #!/usr/bin/env ruby |
2 | ||
3 | $:.unshift(File.dirname(__FILE__)+"/lib") | |
4 | ||
5 | require 'fnordlicht' | |
6 | require 'serialport' | |
7 | ||
8 | include Fnordlicht | |
9 | ||
10 | $dev = SerialPort.new("/dev/ttyUSB0", 19200) | |
11 | ||
12 | puts "sending sync sequence" | |
13 | sync() | |
14 | puts "stop fading" | |
15 | stop(255) | |
16 | fade_rgb(255, 0, 0, 0, 255, 0) | |
17 | puts "reset offsets " | |
18 | config_offsets(255, 0, 0, 0, 255, 255) | |
19 | ||
20 | puts "fade slow rgb (big steps)" | |
21 | fade_updown_rgb(255, 255, 255, 0, 10, 10, 3) | |
22 | ||
23 | puts "fade slow hsv (big steps)" | |
24 | fade_updown_hsv(255, 120, 255, 255, 10, 10, 3) | |
25 | ||
26 | puts "configuring delay offset" | |
27 | config_offsets(255, 0, -5, 0, 255, 255) | |
28 | ||
29 | puts "fade slow rgb (big steps, but modified to fast)" | |
30 | fade_updown_rgb(255, 255, 255, 0, 10, 10, 1) | |
31 | ||
32 | puts "fade slow hsv (big steps, but modified to fast)" | |
33 | fade_updown_hsv(255, 120, 255, 255, 10, 10, 1) |