Wrapped readSensor call in try-except to see if it throws an error