Returns an 8 bit byte or nil if no data is available.Ī wrapper error type that returns the underlying system error code and inherits from IOError. Length specified, and will return an empty string if no data isĪvailable. It is not guaranteed to return the entire new ' /dev/ttyACM0 ', 57600 serialport = Serial. ![]() new ' /dev/ttyACM0 ' # Defaults to 9600 baud, 8 data bits, and no parity Usage require ' rubyserial ' serialport = Serial. If not, please let us know so we can address any issues. The interface to RubySerial should be (mostly) compatible with other Ruby serialport gems, so you should be able to drop in the new gem, change the require and use it as a replacement. ![]() And it does not require any native compilation thanks to using RubyFFI. Unlike other Ruby serial port implementations, it supports all of the most popular Ruby implementations (MRI, JRuby, & Rubinius) on the most popular operating systems (OSX, Linux, & Windows). RubySerial is a simple Ruby gem for reading from and writing to serial ports.
0 Comments
Leave a Reply. |