This is a script that will take care of reading from the magnetometer and notifying the user when the Google Cardboard switch is toggled.