Added MAGNET compiler definition. Goodness knows why code would be disabled like this.
Added code to read accelorometer and magnetometer and calculate the heading.