Adding code for barometer