Added a basic magnetometer implementation. Doesn't give accurate readings yet.