Skip to content

Instantly share code, notes, and snippets.

@jph
Created November 19, 2012 23:49
Show Gist options
  • Save jph/4114963 to your computer and use it in GitHub Desktop.
Save jph/4114963 to your computer and use it in GitHub Desktop.
serial interface
require 'rubygems'
require 'serialport'
sp = SerialPort.new "/dev/my-modem", 9600 # baud rate
do
puts sp.read
while !sp.eof?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment