All Projects → araffin → Arduino Robust Serial

araffin / Arduino Robust Serial

Licence: mit
A simple and robust serial communication protocol. It was designed for Arduino but can be used for other purposes (e.g. bluetooth, sockets). Implementation in C Arduino, C++, Python and Rust.

Programming Languages

python
139335 projects - #7 most used programming language
c
50402 projects - #5 most used programming language
rust
11053 projects
cpp
1120 projects

Projects that are alternatives of or similar to Arduino Robust Serial

Johnny Five
JavaScript Robotics and IoT programming framework, developed at Bocoup.
Stars: ✭ 12,498 (+14957.83%)
Mutual labels:  arduino, raspberry-pi, serial, bluetooth
Pjon
PJON (Padded Jittering Operative Network) is an experimental, arduino-compatible, multi-master, multi-media network protocol.
Stars: ✭ 2,615 (+3050.6%)
Mutual labels:  arduino, raspberry-pi, communication, protocol
Web Bluetooth Terminal
Progressive Web Application for serial communication with your own Bluetooth Low Energy (Smart) devices
Stars: ✭ 130 (+56.63%)
Mutual labels:  arduino, serial, communication, bluetooth
Blynk Library
Blynk library for embedded hardware. Works with Arduino, ESP8266, Raspberry Pi, Intel Edison/Galileo, LinkIt ONE, Particle Core/Photon, Energia, ARM mbed, etc.
Stars: ✭ 3,305 (+3881.93%)
Mutual labels:  arduino, raspberry-pi, bluetooth
Packetserial
An Arduino Library that facilitates packet-based serial communication using COBS or SLIP encoding.
Stars: ✭ 177 (+113.25%)
Mutual labels:  arduino, serial, communication
Reverse Engineering Bluetooth Protocols
Intercepting Bluetooth device communication and simulating packet responses of an iPhone from a Raspberry Pi 3
Stars: ✭ 105 (+26.51%)
Mutual labels:  raspberry-pi, protocol, bluetooth
Diozero
Java Device I/O library that is portable across Single Board Computers. Tested with Raspberry Pi, Odroid C2, BeagleBone Black, Next Thing CHIP, Asus Tinker Board and Arduinos. Supports GPIO, I2C, SPI as well as Serial communication. Also known to work with Udoo Quad.
Stars: ✭ 167 (+101.2%)
Mutual labels:  arduino, raspberry-pi, serial
bluetooth-terminal
ES6 class for serial communication with your own Bluetooth Low Energy (Smart) devices
Stars: ✭ 43 (-48.19%)
Mutual labels:  serial, communication, bluetooth
yahdlc
yahdlc - Yet Another HDLC implementation
Stars: ✭ 47 (-43.37%)
Mutual labels:  serial, communication, protocol
Node Bluetooth Serial Port
Serial I/O over bluetooth for NodeJS
Stars: ✭ 444 (+434.94%)
Mutual labels:  serial, communication, bluetooth
Arduino Nats
An Arduino / ESP8266 / Particle Photon compatible C++ library for communicating with a NATS (http://nats.io) server
Stars: ✭ 44 (-46.99%)
Mutual labels:  arduino, communication
Pulsesensorstarterproject
The Best Way to Get Started with your PulseSensor and Arduino
Stars: ✭ 38 (-54.22%)
Mutual labels:  arduino, serial
True artificial intelligence
真AI人工智能
Stars: ✭ 38 (-54.22%)
Mutual labels:  arduino, raspberry-pi
Eprom
Python script and Arduino code for burning eproms
Stars: ✭ 35 (-57.83%)
Mutual labels:  arduino, serial
Victron.arduino Esp8266
Code to read the VE.Direct-Protocol from serial into a value array. Uses a non-blocking read loop and does checksum verification before adding the data.
Stars: ✭ 54 (-34.94%)
Mutual labels:  arduino, serial
Jarvis Ai
It is an AI assistant which will automate your task like it can send emails also it can control lights using raspberry pi it can inform about weather and many more features
Stars: ✭ 52 (-37.35%)
Mutual labels:  arduino, raspberry-pi
Bsb Lan
LAN interface for Boiler-System-Bus (BSB) and Local Process Bus (LPB) and Punkt-zu-Punkt Schnittstelle (PPS) used by Elco Thision, Brötje and similar heating systems
Stars: ✭ 83 (+0%)
Mutual labels:  arduino, raspberry-pi
Qdomyos Zwift
Zwift bridge for smart treadmills and bike/cyclette
Stars: ✭ 63 (-24.1%)
Mutual labels:  raspberry-pi, bluetooth
Koduino
Arduino code for STM32 microcontrollers
Stars: ✭ 63 (-24.1%)
Mutual labels:  arduino, serial
Kotihome
Home automation system based on Arduino with sensors, Raspberry Pi, Node.js and React
Stars: ✭ 32 (-61.45%)
Mutual labels:  arduino, raspberry-pi

Robust Arduino Serial Protocol

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.

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

Implementations are available in various programming languages:

Examples are provided in each repository.

To clone all the repositories at once, tou need to use the --recursive command:

git clone https://github.com/araffin/arduino-robust-serial.git --recursive

Table of Contents

Provided Functions

Please check examples in the different repos to have the parameters details for each programming language.

  • read_order(): Read one byte from a file/serial port and convert it to an order (equivalent to read_i8)
  • read_i8(): Read one byte from a file/serial port and convert it to a 8 bits int
  • read_i16(): Read one byte from a file/serial port and convert it to a 16 bits int
  • read_i32(): Read one byte from a file/serial port and convert it to a 32 bits int
  • write_order(): Write an order to a file/serial port. (equivalent to write_i8)
  • write_i8(): Write one byte int to a file/serial port.
  • write_i16(): Write two bytes (16-bits) int to a file/serial port.
  • write_i32(): Write four bytes (32-bits) int to a file/serial port.

Arduino Implementation

1. Using Arduino IDE

Open arduino-board/slave/slave.ino in your Arduino IDE.

2. Using Arduino Makefile (Recommended)

This method only works with Linux/Mac Os systems: https://github.com/sudar/Arduino-Makefile

Install Arduino Makefile.

sudo apt-get install arduino-mk

Compile and upload the code to the Arduino (please check the board name in the Makefile):

cd arduino-board/
make
make upload

Python Implementation

Build Status

Python repository: https://github.com/araffin/python-arduino-serial

C++ Implementation

Build Status

C++ repository: https://github.com/araffin/cpp-arduino-serial

Rust Implementation

Build Status Build status

Rust repository: https://github.com/araffin/rust-arduino-serial

Real Life Example

This protocol was used on the Racing Robot: https://github.com/sergionr2/RacingRobot

The racing robot

Acknowledgments

I would like to thanks Dara Ly for the original idea of communicating with the Arduino via a command parser, and Xuan Zhang for fixing Arduino limited buffer issue.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].