   mq131_Ro = flash.readFloat(0);
   tgs2602_Ro = flash.readFloat(4);
   // Register a Spark variable here
-  Spark.variable("temperature", &temperature, DOUBLE);
-  Spark.variable("humidity", &humidity, DOUBLE);
+  Spark.variable("temperature", &sample.temperature, DOUBLE);
+  Spark.variable("humidity", &sample.humidity, DOUBLE);
   Spark.variable("unix_time", &unix_time, INT);
   Spark.variable("stage", &stage, INT);
   //Spark.variable("tgs2602", &tgs2602_sample_avg, INT);

  DHT22.acquire();
  while (DHT22.acquiring());    
    
  humidity = DHT22.getHumidity();
  temperature = DHT22.getCelsius(); 
}

void beep(int delay_ms) {

        }
        if(!dust.isSamplingComplete()) {
          unsigned long duration = pulseIn(DUST_PIN, LOW);
          sample.dust_concentration = dust.getConcentration(duration, current_ms);          
        }
        if(mq131.isSamplingComplete() && dust.isSamplingComplete() && tgs2602.isSamplingComplete()) {
          sample.tgs2602_sewer = tgs2602.getSewerGasPercentage(tgs2602_sample_avg, tgs2602_Ro);            
          sample.mq131_ozone = mq131.getOzoneGasPercentage(mq131_sample_avg, mq131_Ro);
          sample.mq131_chlorine = mq131.getChlorineGasPercentage(mq131_sample_avg, mq131_Ro);          
          rs.setSamplingComplete();         
        }
        delay_ms=0;
