// define pins const int motorl1 = 3; // dont do a function for each but define TURNRIGHT 3, then have one function move(direction) {analogWrite(direction)}!!! const int motorl2 = 8; const int motorr1 = 10; const int motorr2 = 11; const int motorb1 = 5; const int motorb2 = 6; const int LED = 13; // Accelerometer ADXL345 #define ACC (0x53) //ADXL345 ACC address #define A_TO_READ (6) //num of bytes we are going to read each time (two bytes for each axis) #define MAXultra 350 #define ARRCOUNT 30 #define XARRCOUNT 10 // Gyroscope ITG3200 #define GYRO 0x68 // gyro address, binary = 11101001 when AD0 is connected to Vcc (see schematics of your breakout board) #define G_SMPLRT_DIV 0x15 #define G_DLPF_FS 0x16 #define G_INT_CFG 0x17 #define G_PWR_MGM 0x3E #define G_TO_READ 8 // 2 bytes for each axis x, y, z // offsets are chip specific. int g_offx = 12;//14;//120; int g_offy = 13;//10;//20; int g_offz = 14;//5;//93;