m3Dpi robot, based on the Pololu 3pi and m3pi. m3Dpi has multiple distance sensors, gyroscope, compass and accelerometer sensor to be fully aware of its environment. With the addition of xbee or nrf24n01 module it has wireless communication capabilities.

Dependencies:   m3Dpi mbed-rtos mbed MbedJSONValue

lib/binaryReporter.h

Committer:
sillevl
Date:
2017-08-30
Revision:
17:b73fcdb828f3
Parent:
13:d6374484b953

File content as of revision 17:b73fcdb828f3:

#pragma once

#include "reporter.h"

class BinaryReporter : public Reporter
{
    static const char START = 0x02;
    void print(char* data, int size);
    
    enum COMMAND {
        DISTANCE = 10, 
        DIRECTION = 11, 
        ROTATION = 13, 
        ACCELERATION = 14
    };
    
public:
    BinaryReporter(mbed::Stream* _out, const char _id[]) : Reporter(_out, _id) {};

    virtual void time(time_t seconds);
    virtual void distance(m3dpi::Distance distance);
    virtual void acceleration(m3dpi::Acceleration acc);
    virtual void direction(m3dpi::Direction direction);
    virtual void rotation(m3dpi::Rotation rotation);
    

};