]> git.zerfleddert.de Git - fnordlicht-mini/blob - firmware/tests/fade_hsv.rb
init eeprom
[fnordlicht-mini] / firmware / tests / fade_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
17 puts "fade to hsv color"
18 fade_hsv(255, 0, 255, 255, 2, 1)
19 sleep 2
20 fade_hsv(255, 120, 255, 255, 2, 1)
21 sleep 2
22 fade_hsv(255, 180, 255, 255, 2, 1)
23 sleep 2
24 fade_hsv(255, 240, 255, 255, 2, 1)
25 sleep 2
26
27 fade_hsv(255, 200, 255, 150, 2, 1)
28 sleep 2
29 fade_hsv(255, 200, 255, 20, 2, 1)
30 sleep 2
31 fade_hsv(255, 200, 255, 100, 2, 1)
32 sleep 2
33 fade_hsv(255, 200, 30, 100, 2, 1)
34 sleep 2
35 fade_hsv(255, 200, 100, 100, 2, 1)
36 sleep 2
37
Impressum, Datenschutz