   const unsigned long SLEEP_TIME = 300000; // once every 5 minutes
 #endif
 
-Adafruit_BMP280 bmp;
+
 float lastPressure = -1;
 float lastTemp = -1;
 float lastVolt = -1;
+float lastHumidity = -1;
+bool initialSetup = true;
+// IDs used
+#define CHILD_ID_TEMP V_TEMP
+#define CHILD_ID_BARO V_PRESSURE
+#define CHILD_ID_BAT V_VOLTAGE
+#define CHILD_ID_HUM V_HUM
 
-// IDs used
-#define CHILD_ID 40
+MyMessage tempMsg(CHILD_ID_TEMP, V_TEMP);
+MyMessage pressureMsg(CHILD_ID_BARO, V_PRESSURE);
+MyMessage pressureMsgPrefix(CHILD_ID_BARO, V_UNIT_PREFIX);
+#ifdef BATTERY_SENSE_PIN
+#ifdef SEND_VOLTAGE
+MyMessage voltMsg(CHILD_ID_BAT, V_VOLTAGE);
+#endif
+#endif
 
-MyMessage tempMsg(CHILD_ID, V_TEMP);
-MyMessage pressureMsg(CHILD_ID, V_PRESSURE);
-MyMessage voltMsg(CHILD_ID, V_VOLTAGE);
+#ifdef BME280
+  MyMessage humidityMsg(CHILD_ID_HUM, V_HUM);
+#endif
+
 
 
 void setup()
 {
+  Serial.begin(57600);
   Serial.println("setup");
-  if (!bmp.begin(0x76))
+  if (!sensor.begin(addr))
   {
-    Serial.println("Could not find a valid BMP280 sensor, check wiring!");
+    Serial.println("Could not find a valid Sensor, check wiring!");
     while (1) {}
   }
   analogReference(INTERNAL);

//////////////////////////////////////////////////////
//#define MY_DEBUG // Enable debug prints to serial monitor

// disable this if you don't want to measure the voltage
//#define BATTERY_SENSE_PIN A0  // select the input pin for the battery sense point
#define VMIN 1.9  // Battery Level 0%
#define VMAX 3.3  // Batter Level 100%
#define VBAT_PER_BITS 0.003363075  // Volts per bit on the A0 pin. For 470k and 1M Ohm @ 3.3V

  #define MY_TRANSPORT_WAIT_READY_MS 1
#endif

#include <math.h>
#include <SPI.h>
#include <MySensors.h>
#include <Wire.h>
#include <Adafruit_Sensor.h>
#ifdef BME280 
  #include <Adafruit_BME280.h>
  Adafruit_BME280 sensor;
  uint8_t addr = 0x76;
#else 
  #include <Adafruit_BMP280.h>
  Adafruit_BMP280 sensor;
  uint8_t addr = 0x76;
#endif

// Sleep time between reads (in milliseconds)
#ifdef MY_DEBUG
