     }
     myArray[0] = (sleepmodetosend >> 8 ) & 0xFF;
     myArray[1] = sleepmodetosend & 0xFF;
-
-    Wire.write(myArray, 2);
+    myArray[2] = (int(ave2.mean()) >> 8 ) & 0xFF;
+    myArray[3] = int(ave2.mean()) & 0xFF;
+
+    Wire.write(myArray, 4);
 
     o_sleepmode = sleepmode;
   }


  delay(100);
  irsend.sendLGAC(code, 28);
  
  delay(100);
  irrecv.enableIRIn(); // Start the receiver
}

// ------------------------------------------
int measurePin = A6; //Connect dust sensor to Arduino A6 pin
int ledPower = 2;   //Connect 3 led driver pins of dust sensor to Arduino D2

int moisturePin = A2;

int IR_receive_recv_PIN = 6;
int IR_receive_GND_PIN  = 7;
