bio robot
Dependencies: MPU6050-DMP QEI_hw mbed-rpc mbed
Fork of MPU6050_Example by
main.cpp
- Committer:
- amandaghassaei
- Date:
- 2015-12-03
- Revision:
- 2:17b18ea93551
- Parent:
- 1:ec0a08108442
- Child:
- 3:be5cf450436d
File content as of revision 2:17b18ea93551:
#include "MyMPU6050.h" #include "Gains.h" #include "Target.h" #include "Comm.h" #include "SerialRPCInterface.h" Gains gains; Target target; MyMPU6050 myMPU6050_1(p9, p10);//I2C_SDA, I2C_SCL SerialRPCInterface RPC(USBTX, USBRX); DigitalOut myled(LED1); DigitalOut myled2(LED2); volatile bool ledstate = 1; void ReadRange(char * input, char * output); void ReadRange(char * input, char * output){ //Format the output of the srf08 into the output string ledstate = 0; myled = 0; // comm.printTarget(); // output = "amanda"; } RPCFunction RangeFinder2(&ReadRange, "RangeFinder"); Comm comm(&gains, &target, &myMPU6050_1); int main() { myled = 1; while(1) { myMPU6050_1.loop(); myled2 = ledstate; // comm.printTarget(); } }