Added code for ADXL345 accelerometer