]> git.zerfleddert.de Git - fnordlicht-mini/blob - firmware/tests/offset_hsv.rb
move fixcrc to patcheeprom, add patching of node id (pretty ugly)
[fnordlicht-mini] / firmware / tests / offset_hsv.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 to blue"
21 fade_updown_hsv(255, 240, 255, 255, 10, 1, 1)
22
23 puts "configuring saturation scale"
24 config_offsets(255, 10, 0, 0, 100, 255)
25
26 puts "fade to blue (modified to light blue)"
27 fade_updown_hsv(255, 240, 255, 255, 10, 1, 1)
28
29 puts "reset offsets "
30 config_offsets(255, 0, 0, 0, 255, 255)
31
32 puts "fade to blue"
33 fade_updown_hsv(255, 240, 255, 255, 10, 1, 1)
34
35 puts "configuring value scale"
36 config_offsets(255, 10, 0, 0, 255, 100)
37
38 puts "fade to blue (modified to blue, low intensity)"
39 fade_updown_hsv(255, 240, 255, 255, 10, 1, 1)
40
41 puts "reset offsets "
42 config_offsets(255, 0, 0, 0, 255, 255)
43
44 puts "fade to blue"
45 fade_updown_hsv(255, 240, 255, 255, 10, 1, 1)
46
47 puts "configuring hue offset"
48 config_offsets(255, 10, 0, 80, 255, 255)
49
50 puts "fade to blue (modified to pink)"
51 fade_updown_hsv(255, 240, 255, 255, 10, 1, 1)
52
53 puts "configuring negative hue offset"
54 config_offsets(255, 10, 0, -80, 255, 255)
55
56 puts "fade to blue (modified to light green)"
57 fade_updown_hsv(255, 240, 255, 255, 10, 1, 1)
58
Impressum, Datenschutz