]> git.zerfleddert.de Git - fnordlicht-mini/blob - firmware/tests/fade_rgb.rb
remove master mode, disable uart tx
[fnordlicht-mini] / firmware / tests / fade_rgb.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 rgb color"
18 fade_rgb(255, 0, 0, 0, 255, 1)
19 fade_rgb(255, 255, 0, 0, 2, 1)
20 sleep 2
21 fade_rgb(255, 0, 255, 0, 2, 1)
22 sleep 2
23 fade_rgb(255, 0, 0, 255, 2, 1)
Impressum, Datenschutz