Here's a very brief note about an analog accelerometer which I tried recently. It is ADXL335 which is a 3-axis accelerometer and can be very easily used with any microcontroller having three analog interfaces. I used an Arduino Uno board for this purpose. For this work, what I exactly used is a module which contains a ADXL335 chip with correct support circuit components. This module just have five output pins, which are VCC, GND, X, Y and Z.
Here's how we connect ADXL335 module with an Arduino Uno board. Connect the GND pin of ADXL335 with GND of Arduino, VCC pin of ADXL335 with 3.3v pin of Arduino and finally connect the X, Y and Z pins of the ADXL335 with the A0, A1 and A2 pins of the Arduino board. Then we are good to go. We can connect the Arduino board as usual and read the analog pins 0, 1 and 2 using the analogRead() function to get the raw output data of X, Y and Z pins from the accelerometer.
Since the raw data readings from the analog pins provide values within a particular range according to the orientation of the accelerometer, we can get an idea of how it is oriented if we know the maximum and minimum values it can show. Additionally, there are some ways to calculate the exact angle as a degree value using these raw data. Following is such a code I used to see the orientation of the accelerometer in degrees. When you run it, serial monitor will show the orientation as degree values for the three axis.
Further details of the ADXL335 accelerometer and the description of the above code can be found in the original place from where I learned it. Those places are given as references in the following section.
 The original source of the above code I have used.
 A good place to understand what is an accelerometer, Gyro and how to select a suitable one for a project.