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/jsonReporter.h
- Committer:
- sillevl
- Date:
- 2015-12-19
- Revision:
- 11:ccb8653e285f
- Parent:
- 7:9068fc754a0b
- Child:
- 13:d6374484b953
File content as of revision 11:ccb8653e285f:
#pragma once #include "reporter.h" #include "mbed.h" #include "MbedJSONValue.h" #include "M3Dpi.h" // TODO: only report if value is different? class JsonReporter : public Reporter { mbed::Stream* out; const char* id; public: JsonReporter(mbed::Stream* _out, const char _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); protected: MbedJSONValue* jsonFactory(); void print(MbedJSONValue* json); };