Arduino serial is a multi-platform library to communicate to arduino devices throught the serial port using the same function's names and code structure.
You should read the installation guide to setup all the necessary libraries and get your serial communication ready to run.
This is the guide for the library:
Functions | Description |
---|---|
(constructor) | Creates the serial port object. |
if(serial) | Indicates if the specified Serial port is ready. |
available() | Get the number of bytes (characters) available for reading. |
available_for_write() | Get the number of bytes (characters) available for writing in the serial buffer without blocking the write operation. |
begin() | Opening serial communication. |
end() | Disables serial communication. |
find() | Reads data from the serial buffer until the target is found. |
find_until() | Reads data from the serial buffer until the target is found. |
flush() | Waits for the transmission of outgoing serial data to complete. |
parse_float() | |
parse_int() | |
peek() | Peeking the next character in the reading buffer |
print() | |
print_ln() | |
read() | Reads incoming serial data. |
read_bytes() | Read a certain quantity of bytes |
read_bytes_until() | Read a certain quantity of bytes or until certain character is reached |
read_string() | Reading a string |
read_string_until() | Reading a string up to a termination character |
set_timeout() | Sets the maximum milliseconds to wait for serial data. It defaults to 1000 milliseconds. |
write() | Writing a single byte |
serial_event() | Writing a string |