]> git.zerfleddert.de Git - fnordlicht-mini/blob - firmware/tests/offset_step.rb
more lean and mean, switching still doesn't work... :-(
[fnordlicht-mini] / firmware / tests / offset_step.rb
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"
21 fade_updown_rgb(255, 255, 255, 0, 1, 1, 3)
22
23 puts "fade slow hsv"
24 fade_updown_hsv(255, 120, 255, 255, 1, 1, 3)
25
26 puts "configuring positive step offset"
27 config_offsets(255, 10, 0, 0, 255, 255)
28
29 puts "fade slow rgb (but modified to fast)"
30 fade_updown_rgb(255, 255, 255, 0, 1, 1, 1)
31
32 puts "fade slow hsv (but modified to fast)"
33 fade_updown_hsv(255, 120, 255, 255, 1, 1, 1)
34
35 puts "reset offsets "
36 config_offsets(255, 0, 0, 0, 255, 255)
37
38 puts "fade fast rgb"
39 fade_updown_rgb(255, 255, 255, 0, 10, 1, 1)
40
41 puts "fade fast hsv"
42 fade_updown_hsv(255, 120, 255, 255, 10, 1, 1)
43
44 puts "configuring negative step offset"
45 config_offsets(255, -10, 0, 0, 255, 255)
46
47 puts "fade fast rgb (but modified to slow)"
48 fade_updown_rgb(255, 255, 255, 0, 10, 1, 3)
49
50 puts "fade fast hsv (but modified to slow)"
51 fade_updown_hsv(255, 120, 255, 255, 10, 1, 3)
52
Impressum, Datenschutz