x7c2aq
Last Updated: February 25, 2016
·
883
· dwilkins
1137844d852e86fb0cb36f571a0fc2f7

Ruby-serialport on Fedora requires a baud change

When using Ruby-serialport on Fedora 18 Linux (and maybe others), you have to change the baud rate after you "open the file" to keep it from hanging up:

@@arduino = SerialPort.new("/dev/ttyUSB0", {baud: 300, databits: 8, stopbits: 1})
@@arduino.baud = 115200
@@arduino.flow_control = SerialPort::NONE
@@arduino.read_timeout = 50
Say Thanks
Respond