     wifi_connect();
   }
 
-  if ((millis() - sentMills) > ( REPORT_INTERVAL / 2) ) {
+  if ((millis() - sentMills) > ( 700) ) {
     unsigned long emonmillis = millis();
-    VIrms = emon1.calcIrms(1480) * 220.0;
+    //VIrms = emon1.calcIrms(1480) * 220.0;
+    VIrms = emon1.calcIrms(2960) * 220.0;
     calcIrmsmillis = millis() - emonmillis;
 
     ave.push(VIrms);

  revValue  = 0 ;
  oldrevMills = 0 ;
  oldrevValue = 0 ;

  pinMode(IRPIN, INPUT);
  pinMode(DOORPIN, INPUT_PULLUP);

  doorStatus = digitalRead(DOORPIN);
  olddoorStatus = doorStatus;

  attachInterrupt(4, IRCHECKING_START, RISING);
  attachInterrupt(5, DOORCHECKING, CHANGE);

  emon1.current(A0, 75);
  oldirStatus = LOW ;


  //OTA

// CPU : 160MHz
// FLASH : 4M/1M
#include <PubSubClient.h>
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
