Pololu - 15.5. Example serial code for Linux and macOS in C