]> git.zerfleddert.de Git - fnordlicht-mini/blame - firmware/tests/offset_hsv.rb
remove master mode, disable uart tx
[fnordlicht-mini] / firmware / tests / offset_hsv.rb
CommitLineData
ec1bef8e 1#!/usr/bin/env ruby
2
3$:.unshift(File.dirname(__FILE__)+"/lib")
4
5require 'fnordlicht'
6require 'serialport'
7
8include Fnordlicht
9
10$dev = SerialPort.new("/dev/ttyUSB0", 19200)
11
12puts "sending sync sequence"
13sync()
14puts "stop fading"
15stop(255)
16fade_rgb(255, 0, 0, 0, 255, 0)
17puts "reset offsets "
18config_offsets(255, 0, 0, 0, 255, 255)
19
20puts "fade to blue"
21fade_updown_hsv(255, 240, 255, 255, 10, 1, 1)
22
23puts "configuring saturation scale"
24config_offsets(255, 10, 0, 0, 100, 255)
25
26puts "fade to blue (modified to light blue)"
27fade_updown_hsv(255, 240, 255, 255, 10, 1, 1)
28
29puts "reset offsets "
30config_offsets(255, 0, 0, 0, 255, 255)
31
32puts "fade to blue"
33fade_updown_hsv(255, 240, 255, 255, 10, 1, 1)
34
35puts "configuring value scale"
36config_offsets(255, 10, 0, 0, 255, 100)
37
38puts "fade to blue (modified to blue, low intensity)"
39fade_updown_hsv(255, 240, 255, 255, 10, 1, 1)
40
41puts "reset offsets "
42config_offsets(255, 0, 0, 0, 255, 255)
43
44puts "fade to blue"
45fade_updown_hsv(255, 240, 255, 255, 10, 1, 1)
46
47puts "configuring hue offset"
48config_offsets(255, 10, 0, 80, 255, 255)
49
50puts "fade to blue (modified to pink)"
51fade_updown_hsv(255, 240, 255, 255, 10, 1, 1)
52
53puts "configuring negative hue offset"
54config_offsets(255, 10, 0, -80, 255, 255)
55
56puts "fade to blue (modified to light green)"
57fade_updown_hsv(255, 240, 255, 255, 10, 1, 1)
58
Impressum, Datenschutz