MyoLinux
|
Class for communication over the serial port. More...
#include <serial.h>
Public Member Functions | |
Serial (const std::string &, const int) | |
Create an object for communication over the serial port. More... | |
Buffer | read (const std::size_t) |
Write to serial port. | |
std::size_t | write (const Buffer &) |
Read from serial port. | |
Class for communication over the serial port.
Serial | ( | const std::string & | device, |
const int | baudrate | ||
) |
Create an object for communication over the serial port.
In case of permission denied exception try running the program with sudo, if that fixes the problem you are not the member of uucp group. Run sudo usermod -a -G uucp <user> to add an user.
device | name of the device file |
baudrate | baudrate for the connection (usually 115200) |