File: set_readtimeout.rb

package info (click to toggle)
ruby-serialport 1.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 172 kB
  • sloc: ansic: 1,441; ruby: 67; makefile: 2
file content (7 lines) | stat: -rwxr-xr-x 143 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
#!/usr/bin/ruby
require "rubygems"
require "serialport"

sp = SerialPort.new("/dev/tty.usbserial", "9600".to_i)
sp.read_timeout = 100
sp.close