![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
bio robot
Dependencies: MPU6050-DMP QEI_hw mbed-rpc mbed
Fork of MPU6050_Example by
main.cpp
- Committer:
- amandaghassaei
- Date:
- 2015-12-03
- Revision:
- 7:7efcd3bf3302
- Parent:
- 6:12b6be801ad8
- Child:
- 8:1a3a69fecedf
File content as of revision 7:7efcd3bf3302:
#include "mbed.h" #include "mbed_rpc.h" #include "Comm.h" #include "Controls.h" Controls controls; Comm comm(&(controls.gains), &(controls.target), &(controls.myMPU6050_1)); int main() { while(1) { controls.loop(); comm.check(); comm.printPosition(); } } //wrappers for comm stack void openGripper1Wrapper(Arguments * input, Reply * output){ comm.openGripper1(input, output); }; RPCFunction OpenGripper1(&openGripper1Wrapper, "OpenGripper1"); void closeGripper1Wrapper(Arguments * input, Reply * output){ comm.closeGripper1(input, output); }; RPCFunction CloseGripper1(&closeGripper1Wrapper, "CloseGripper1"); void openGripper2Wrapper(Arguments * input, Reply * output){ comm.openGripper2(input, output); }; RPCFunction OpenGripper2(&openGripper2Wrapper, "OpenGripper2"); void closeGripper2Wrapper(Arguments * input, Reply * output){ comm.closeGripper2(input, output); }; RPCFunction CloseGripper2(&closeGripper2Wrapper, "CloseGripper2"); void setGains(Arguments * input, Reply * output){ comm.setGains(input, output); }; RPCFunction SetGains(&setGains, "SetGains"); void setTarget(Arguments * input, Reply * output){ comm.setTarget(input, output); }; RPCFunction SetTarget(&setTarget, "SetTarget");