accelerometer code

fixed code to make the triangle stabilise itself with the accelerometer.