bio robot
Dependencies: MPU6050-DMP QEI_hw mbed-rpc mbed
Fork of MPU6050_Example by
Comm.h
00001 #ifndef Comm_h 00002 #define Comm_h 00003 00004 #include "json.h" 00005 #include "CommDelegate.h" 00006 #include "mbed_rpc.h" 00007 00008 00009 class Comm{ 00010 00011 public: 00012 00013 Comm(CommDelegate *controls); 00014 00015 void openGripper1(Arguments* input, Reply* output); 00016 void closeGripper1(Arguments* input, Reply* output); 00017 void printGripper1State(bool state); 00018 void openGripper2(Arguments* input, Reply* output); 00019 void closeGripper2(Arguments* input, Reply* output); 00020 void printGripper2State(bool state); 00021 00022 void setSwingUpK(Arguments* input, Reply* output); 00023 void setSwingUpD(Arguments* input, Reply* output); 00024 void setDesiredThetaP(Arguments* input, Reply* output); 00025 void setSoftLimitsP(Arguments* input, Reply* output); 00026 void printGains(); 00027 00028 void setTargetingK(Arguments* input, Reply* output); 00029 void setTargetingD(Arguments* input, Reply* output); 00030 00031 void setTarget(Arguments* input, Reply* output); 00032 void printTarget(); 00033 00034 void setTheta(Arguments * input, Reply * output); 00035 00036 void printPosition(); 00037 void printVelocity(); 00038 00039 void check(); 00040 00041 Serial* getPC(); 00042 00043 private: 00044 00045 Serial _pc; 00046 00047 void throwNotEnoughArgsError(); 00048 00049 char buf[256], outbuf[256]; 00050 00051 JSON _json; 00052 CommDelegate *_controls; 00053 // volatile bool newline_detected = false; 00054 00055 }; 00056 00057 #endif
Generated on Sun Jul 17 2022 01:31:45 by 1.7.2