Moved temp. and humidity measurements to global variables

This stops from temperature and humidity measurements from interfering
with each other