put serial_port in blocking read
This commit is contained in:
@@ -24,6 +24,9 @@ if __FILE__ == $0
|
||||
|
||||
sp = SerialPort.new(port_str, baud_rate, data_bits, stop_bits, parity)
|
||||
|
||||
# Make reading blocking
|
||||
sp.read_timeout = 0
|
||||
|
||||
#just read forever
|
||||
while true do
|
||||
printf("%c", sp.getc)
|
||||
|
||||
Reference in New Issue
Block a user