Skip to content

C++ implementation of Ninebot's ES2 Internal Serial Communication Protocol.

Notifications You must be signed in to change notification settings

eudovic/ScooterProtocol

This branch is up to date with BernardoCovas/ScooterProtocol:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Bernardo Covas
Mar 28, 2019
438200c · Mar 28, 2019

History

6 Commits
Mar 28, 2019
Mar 28, 2019
Mar 28, 2019
Mar 28, 2019

Repository files navigation

ScooterProtocol

C++ implementation of Ninebot's ES2 Internal Serial Communication Protocol.

Build instructions

Standard CMake build:

$ mkdir build
$ cd build
$ cmake ..
$ make install

This lib is so small that you can add it as a git submodule instead.

Usage

implement the abstract class:

#include <NinebotMessageIntercept.hpp>

#include "mySerialDefinition.hpp"

class StreamImplem : NinebotMessageStream
{
    private:
        Serial mySerial; // Some serial implementation.

    public:
        void write(int a)
        {
            mySerial.myWrite(a);
        }
        
        int read()
        {
            return mySerial.myRead();
        }
};

Use this new class as input to other methods like:

StreamImplem myStream();
NinebotMessageIntercept myIntercept(&myStream, device);

About

C++ implementation of Ninebot's ES2 Internal Serial Communication Protocol.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 96.7%
  • CMake 3.3%