   char status;
   if(bmp180Temperature(T)) {
     Serial.println(T);
-    delay(500);
     status = pressure.startPressure(3);
     if (status != 0) {
         delay(status);

  Serial.begin(9600); // set the baud rate
  if (pressure.begin()) Serial.println("BMP180 init success");
  else Serial.println("BMP180 init fail\n\n");
  
  for (int i = 0; i < count(updateTimes); i++) {
    pinMode(pins[i], INPUT);

#include <Wire.h>
#include <SFE_BMP180.h>
#include "DHT.h"

#define count(x) sizeof(x)/sizeof(unsigned long)
#define groundPin A0


#define ALTITUDE 570 // We need it for the barometric pressure calculus

#define BMP180T 0   // Temperature
#define BMP180P 1   // Pressure
#define DHT22T  2   // Temperature
#define DHT22H  3   // Humidity
#define DHT22HI 4   // Heat Index

#define NOTUSED -1  // For BMP180/DHT22 sensor.

#define DHTTYPE DHT22
#define DHTPIN  4

SFE_BMP180 pressure;
DHT dht(DHTPIN, DHTTYPE);

int types[] = {BMP180T,BMP180P,DHT22T,DHT22H,DHT22HI};
unsigned long lastUpdate[] = {0,0,0,0,0};
unsigned long updateTimes[] = {30000,60000,30000,30000,60000};
int pins[] = {NOTUSED,NOTUSED,NOTUSED,NOTUSED,NOTUSED};

int secureAnalogRead(int pin) {
  //delay(0.01);
  //analogRead(groundPin);
  //delay(0.01);
  return analogRead(pin);
  
}
