iPhone gyroscope test code