Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/araffin/cpp-arduino-serial
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.
https://github.com/araffin/cpp-arduino-serial
arduino bluetooth communication cpp protocol raspberry-pi serial sockets
Last synced: 24 days ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/araffin/cpp-arduino-serial
- Owner: araffin
- License: mit
- Created: 2018-04-02T14:09:43.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-07T12:09:47.000Z (almost 7 years ago)
- Last Synced: 2024-12-26T23:30:19.556Z (about 1 month ago)
- Topics: arduino, bluetooth, communication, cpp, protocol, raspberry-pi, serial, sockets
- Language: C++
- Homepage:
- Size: 18.6 KB
- Stars: 19
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Robust Arduino Serial Protocol in C++
[![Build Status](https://travis-ci.org/araffin/cpp-arduino-serial.svg?branch=master)](https://travis-ci.org/araffin/cpp-arduino-serial)
**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](https://github.com/araffin/arduino-robust-serial)
**Please read the [Medium Article](https://medium.com/@araffin/simple-and-robust-computer-arduino-serial-communication-f91b95596788) to have an overview of this protocol.**
Implementations are available in various programming languages:
- [Arduino](https://github.com/araffin/arduino-robust-serial)
- [Python](https://github.com/araffin/python-arduino-serial)
- [C++](https://github.com/araffin/cpp-arduino-serial)
- [Rust](https://github.com/araffin/rust-arduino-serial)## 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](https://github.com/araffin/arduino-robust-serial/tree/master/arduino-board/)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
```