Need the following code to be edited for another accelerometer Iam using adxl345 instea dof MMA8452Q
//I used 4.5″ flex sensor and MMA8452Q acceleration sensor found insparkfun’s essential sensor kit.
//altitude – fly higher or lower
//yaw – turning around in places around Y axis of the drone, didntuse it in the end :/
// directionXY – controls the direction of the drone
// inslude the SPI library:
#include <SPI.h>
#include <Wire.h> // Must include Wire library for I2C
#include <SparkFun_MMA8452Q.h> // Includes the SFE_MMA8452Qlibrary
#include <math.h>
MMA8452Q accel;
// set pin 10 as the slave select for the digital pot, otherwiseit wont work, probably a bug
int XaccelLow;
int XaccelHigh;
int YaccelLow;
int YaccelHigh;
int
PayPal Gateway not configured
PayPal Gateway not configured