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:
4:ebb882658c50
Parent:
2:17b18ea93551
Child:
5:c3d671959ef3

File content as of revision 4:ebb882658c50:

#ifndef Comm_h
#define Comm_h

//#include "mbed.h"
#include "json.h"
#include "Target.h"
#include "CommDelegate.h"   
//#include "MODSERIAL.h"


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

#endif