Working compass code. Commented out geolocation.