There is a problem as most of the analog output IMU's are vanishing from stores and being replaced with digital ones.
I have looked at the Sparkfun 6dof Digital IMU and tried to incorporate code to read the digital output from this into my existing self balance code. Did not want to do it, but this is coming so someone has to have to have a go else nobody will build any more hobby self-balancing machines.
I have used code from the web, full wiring instructions and orientation instructions are given in the attached arduino sketch.
Code to read the IMU came from here: http://www.varesano.net/blog/fabio/my-first-6-dof-imu-sensors-fusion-implementation-adxl345-itg3200-arduino-and-processing
I have built it into my existing code for a self balancing 2 wheeler that uses rocker switches or buttons for steering and adjustment of balance point.
It is set up at present so you can test it with the IMU attached to an Arduino watching the outputs on an attached computer.
If you want to run it in a real machine then there is a section of code to comment out which then enables all the buttons including the deadman switch.
At present I am using pulldown resistors to GND on the button input pins as in my original instructable here. NOTE: Unfinished. Not sure if even works but is here as a start for others to work with.