Skip to content

A simple and robust serial communication protocol. It was designed for Arduino but can be used for other purposes (e.g. bluetooth, sockets). This is the C++ implementation.

License

Notifications You must be signed in to change notification settings

schwartx/cpp-arduino-serial

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Robust Arduino Serial Protocol in C++

Build Status

Robust Arduino Serial is a simple and robust serial communication protocol. It was designed to make two Arduinos communicate, but can also be useful when you want a computer (e.g. a Raspberry Pi) to communicate with an Arduino.

This repository is part of the Robust Arduino Serial project, main repository: https://github.com/araffin/arduino-robust-serial

Please read the Medium Article to have an overview of this protocol.

Implementations are available in various programming languages:

Dependency

Dependency (libserial):

sudo apt-get install libserial-dev

Examples

To build the two examples, run the build.sh inside the examples/ directory, the binaries will be located in the bin/ folder.

Read write in a file

./file_read_write.x

If you want to use command_parser and serial_reader with a real Arduino, you need to flash it with this code: Arduino Source Code

Run the command parser to send order to the Arduino (optional: you can run it using rlwrap):

./command_parser.x

Idem for listening to the serial port (for now during 30 seconds, it can be changed in the serial_reader.h)

./serial_reader.x

About

A simple and robust serial communication protocol. It was designed for Arduino but can be used for other purposes (e.g. bluetooth, sockets). This is the C++ implementation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 95.1%
  • C 4.9%