use '!' as end of frame sync
This commit is contained in:
@@ -14,8 +14,8 @@ ActiveRecord::Base.establish_connection(connection_details)
|
||||
# # Open connection to serial port
|
||||
ser = SerialPort.new("/dev/ttyUSB1", 9600, 7, 1, SerialPort::EVEN)
|
||||
lines = ""
|
||||
for i in 0..22
|
||||
lines = lines+ser.readline("\n").gsub(/\r/, '')
|
||||
for i in 0..21
|
||||
lines = lines+ser.readline("\n").gsub(/\r/, '')
|
||||
end
|
||||
|
||||
# # read until newline
|
||||
|
||||
Reference in New Issue
Block a user