How to convert analogRead value from accelerometer

Okay I was able to get it working thanks to some help from Daniel here.

In order to use an external voltage reference for the ADC you must change two lines in the wiring.c file to the following:

// set a2d reference to external voltage from AREF pin
cbi (ADMUX, REFS1);
cbi (ADMUX, REFS0);

For reference see pages 205 & 206 in the Atmega datasheet.

Mellis informed me that I don't need to modify wiring.c and can make the needed modifications to the ADMUX register in my setup function, I just had to add the following definitions to my program:

#ifndef cbi
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
#endif
#ifndef sbi
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
#endif