Hi, i was looking for a method equivalent to Arduino's Serial.available(), which returns the amount of bytes received / readable, if there's nothing it returns -1.
First, I've looked in the docs, but couldn't find sth. similar. Than i've done a puts Serialport.instance_methods. This gave me a huge amount of methods like the usefull getc which I've not seen in the docs, but I also need. Finally I'm confused how to get full Information about API of SerialPort.
When I looked in the Source I couldn't find the getc too. Excuse me Im a ruby-noob, so maybe I've gone the false way.
Hi, i was looking for a method equivalent to Arduino's
Serial.available()
, which returns the amount of bytes received / readable, if there's nothing it returns -1. First, I've looked in the docs, but couldn't find sth. similar. Than i've done aputs Serialport.instance_methods
. This gave me a huge amount of methods like the usefullgetc
which I've not seen in the docs, but I also need. Finally I'm confused how to get full Information about API of SerialPort. When I looked in the Source I couldn't find the getc too. Excuse me Im a ruby-noob, so maybe I've gone the false way.