I just wanted to share a guide I did to get an IMU (Accelerometer, gyroscope and compass) working with an ESP8266 and show the results on a web page.
The angles and the tilt compensated heading(compass) are shown on a web page by the ESP8266 and updated every 1 second
more info here;
http://ozzmaker.com/esp8266-berryimu-simple-web-server/