]> git.zerfleddert.de Git - fnordlicht-mini/blame_incremental - firmware/tests/powerdown.rb
more lean and mean, switching still doesn't work... :-(
[fnordlicht-mini] / firmware / tests / powerdown.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
12if ARGV.length != 1
13 $stderr.puts "USAGE: #{$0} <addr>"
14 exit 1
15end
16
17addr = ARGV.shift.to_i
18
19puts "sending sync sequence"
20sync()
21
22puts "powerdown"
23powerdown(addr)
Impressum, Datenschutz