Arduino code for the accelerometer