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