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:
5:c3d671959ef3
Parent:
4:ebb882658c50
Child:
6:12b6be801ad8

File content as of revision 5:c3d671959ef3:

#ifndef Comm_h
#define Comm_h

//#include "mbed.h"
#include "json.h"
#include "Target.h"
#include "CommDelegate.h"  
#include "mbed_rpc.h" 
//#include "MODSERIAL.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