paul accelerometer code