Lol smth

Dependencies:   LocalPositionSystem MMA8451Q Motor_Driver Sensors mbed

Fork of TDP_main_BartFork by Yelfie

Committer:
orsharp
Date:
Fri Mar 06 16:09:31 2015 +0000
Revision:
12:bb21b76b6375
SHOOTER IMPLEMENTED - IK & OS

Who changed what in which revision?

UserRevisionLine numberNew contents of line
orsharp 12:bb21b76b6375 1 //
orsharp 12:bb21b76b6375 2 //#include "MMA8451Q.h"
orsharp 12:bb21b76b6375 3 //
orsharp 12:bb21b76b6375 4 //#define MMA8451_I2C_ADDRESS (0x1d<<1)
orsharp 12:bb21b76b6375 5 //
orsharp 12:bb21b76b6375 6 //
orsharp 12:bb21b76b6375 7 //MMA8451Q acc(PTE25, PTE24, MMA8451_I2C_ADDRESS);
orsharp 12:bb21b76b6375 8 // int fire = 0;
orsharp 12:bb21b76b6375 9 // while (1) {
orsharp 12:bb21b76b6375 10 // fire = 0;
orsharp 12:bb21b76b6375 11 // if (abs(acc.getAccY()) > 0.5f){
orsharp 12:bb21b76b6375 12 // fire = 1;
orsharp 12:bb21b76b6375 13 // }
orsharp 12:bb21b76b6375 14 // shoot( (1.0 - abs(acc.getAccX())), fire);
orsharp 12:bb21b76b6375 15 // wait(0.2);
orsharp 12:bb21b76b6375 16 // }
orsharp 12:bb21b76b6375 17
orsharp 12:bb21b76b6375 18
orsharp 12:bb21b76b6375 19 // TESTING FOR SHOOTER
orsharp 12:bb21b76b6375 20 //int count = 0;
orsharp 12:bb21b76b6375 21 // while (1) {
orsharp 12:bb21b76b6375 22 // count = count%4;
orsharp 12:bb21b76b6375 23 // if (count == 0) {
orsharp 12:bb21b76b6375 24 // shoot(0.0);
orsharp 12:bb21b76b6375 25 // wait(1);
orsharp 12:bb21b76b6375 26 // }
orsharp 12:bb21b76b6375 27 // else {
orsharp 12:bb21b76b6375 28 // shoot (0.3*(float)count);
orsharp 12:bb21b76b6375 29 // wait(0.2);
orsharp 12:bb21b76b6375 30 // }
orsharp 12:bb21b76b6375 31 // count ++;
orsharp 12:bb21b76b6375 32 // }