I’ve changed this reply since first written
You could use an accelerometer (such as a BMA180) in this application, you’ll have to filter the data as it is a little noisy, but not bad.
A device that you may consider using is an IMU (Inertial Measurement Unit), a chip that is built into most smart devices today. Conceptually the IMU gives the orientation of the device in 3 space. Most software applications see this data as pitch, roll, and yaw (similar to the way people talk about airplanes).
There are a wide variety of chips on the market, here’s an article about a Bosch BNO055 which I use:
The Bosch does math on board and returns Euler angles directly. Where as an accelerometer returns the acceleration of each axis (usually -1 to 1 G in practice on a tablet), an IMU gives a 3 space vector to give device orientation. The Bosch also has a magnetometer built in for absolute headings and such.
For either type of device interfacing with the Jetson is do it yourself at this point. The most common interfaces for these types of devices are I2C and SPI, both of which are available through the J3 headers on the Jetson board. Depending on your application, you’ll need to figure out how to interface with the J3 headers using either a header or custom interface board. I2C is somewhat easier to use.
I’ve heard that there are companies who offer IMUs that are accessible through USB, though they don’t seem to be very common. If you’d like to interface via USB instead of through the Jetson headers, you could cobble together your own Accelerometer/IMU through I2C to USB board using a relatively common FT232H breakout board. The FT232H chip is from FTDI and converts ‘multi-protocol synchronous serial’ (like I2C and SPI) to USB. You’ll have to add some pull up resistors between the IMU and FT232H to make I2C happy, but that shouldn’t be too hard.
You’ll also have to work out the software parts of course, but it should be relatively straightforward.