add test function for test accelerometer