
Don't want to screw something by updating the code as Ivelin updated himself while I was writing so I am forking it.
Dependencies: LocalPositionSystem MMA8451Q Motor_Driver Sensors mbed
Fork of TDP_main by
Diff: Shooting_fun.cpp
- Revision:
- 12:bb21b76b6375
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Shooting_fun.cpp Fri Mar 06 16:09:31 2015 +0000 @@ -0,0 +1,32 @@ +// +//#include "MMA8451Q.h" +// +//#define MMA8451_I2C_ADDRESS (0x1d<<1) +// +// +//MMA8451Q acc(PTE25, PTE24, MMA8451_I2C_ADDRESS); +// int fire = 0; +// while (1) { +// fire = 0; +// if (abs(acc.getAccY()) > 0.5f){ +// fire = 1; +// } +// shoot( (1.0 - abs(acc.getAccX())), fire); +// wait(0.2); +// } + + +// TESTING FOR SHOOTER +//int count = 0; +// while (1) { +// count = count%4; +// if (count == 0) { +// shoot(0.0); +// wait(1); +// } +// else { +// shoot (0.3*(float)count); +// wait(0.2); +// } +// count ++; +// } \ No newline at end of file