]> git.zerfleddert.de Git - fnordlicht-mini/blame - firmware/tests/save_current.rb
more lean and mean, switching still doesn't work... :-(
[fnordlicht-mini] / firmware / tests / save_current.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()
14
15stop(255)
16
17puts "starting slow fade from red to green"
18fade_rgb(255, 255, 0, 0, 255, 1)
19sleep 0.1
20
21puts "save start color"
22save_current(255, 0, 8, 1, 10)
23
24fade_rgb(255, 0, 255, 0, 1, 2)
25
26sleep 1.8
27puts "save in the middle"
28save_current(255, 1, 8, 1, 10)
29
30sleep 3
31puts "save at the end"
32save_current(255, 2, 8, 1, 10)
33
34sleep 0.1
35
36puts "start program replay, 0-2, repeat from start"
37start_program(255, 2, [0, 2, 1])
Impressum, Datenschutz