bio robot

Dependencies:   MPU6050-DMP QEI_hw mbed-rpc mbed

Fork of MPU6050_Example by Shundo Kishi

Comm/Comm.h

Committer:
amandaghassaei
Date:
2015-12-03
Revision:
6:12b6be801ad8
Parent:
5:c3d671959ef3
Child:
8:1a3a69fecedf

File content as of revision 6:12b6be801ad8:

#ifndef Comm_h
#define Comm_h

#include "json.h"
#include "Target.h"
#include "CommDelegate.h"  
#include "mbed_rpc.h" 


class Comm{
    
    public:
    
        Comm(CommDelegate *gains, CommDelegate *target, CommDelegate *myMPU6050_1);
        
        void openGripper1(Arguments* input, Reply* output);
        void closeGripper1(Arguments* input, Reply* output);
        void printGripper1State(bool state);
        void openGripper2(Arguments* input, Reply* output);
        void closeGripper2(Arguments* input, Reply* output);
        void printGripper2State(bool state);
        
        void setGains(Arguments* input, Reply* output);
        void printGains();
        
        void setTarget(Arguments* input, Reply* output);
        void printTarget();
        
        void printPosition();
        
        void check();
        
        Serial _pc;
            
    private:
    
        void throwNotEnoughArgsError();
        
        char buf[256], outbuf[256];
        
        JSON _json;
        CommDelegate *_gains;
        CommDelegate *_target;
        CommDelegate *_myMPU6050_1;
//        volatile bool newline_detected = false;
 
};

#endif