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