File: set_readtimeout.rb

package info (click to toggle)
ruby-serialport 1.3.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 532 kB
  • sloc: ansic: 1,425; ruby: 74; sh: 16; makefile: 4
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