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
Written by David H. Wilkins
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#