Preambles
One of the widely used IMU (Inertial Measurement Unit) chips is MPU-6050. It contains gyroscopes combined with accelerometers and universally used in smart phones, video game remotes, quad-copters, etc. It is very inexpensive and easy to setup with all resources online.
Wiring with Arduino Mega 2560
Two excellent tutorials: DIYHacking and here. The Arduino site has some general information. If you need more information about the ...
JAN