![](/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-05
- Revision:
- 9:1d9b24d7ac77
- Parent:
- 8:1a3a69fecedf
- Child:
- 10:769cc457c3a4
File content as of revision 9:1d9b24d7ac77:
#include "mbed.h" #include "mbed_rpc.h" #include "Comm.h" #include "Controls.h" Controls controls; Comm comm(&controls); long serialCounter = 0; int main() { controls.setPC(comm.getPC()); // comm.printPosition(); // comm.printGains(); while(1) { controls.loop(); comm.check(); if (serialCounter++>100) { // comm.printPosition(); // controls.printPWM(); serialCounter = 0; } } } //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 setSwingUpKWrapper(Arguments * input, Reply * output){ comm.setSwingUpK(input, output); }; RPCFunction SetSwingUpK(&setSwingUpKWrapper, "SetSwingUpK"); void setSwingUpDWrapper(Arguments * input, Reply * output){ comm.setSwingUpD(input, output); }; RPCFunction SetSwingUpD(&setSwingUpDWrapper, "SetSwingUpD"); void setTargetWrapper(Arguments * input, Reply * output){ comm.setTarget(input, output); }; RPCFunction SetTarget(&setTargetWrapper, "SetTarget"); void setTorqueWrapper(Arguments * input, Reply * output){ comm.setTorque(input, output); }; RPCFunction SetTorque(&setTorqueWrapper, "SetTorque");