 void loop() {
   pinint_sleep();
   goToSleep ();
-  currentData1 = digitalRead(DATA1PIN);
-  if (currentData1 == 1 ) {
+  doorStatus = digitalRead(DATA1PIN);
+  if (doorStatus == 1 ) {
     return;
   } else {
     unsigned long startmilis = millis();

#define IRENPIN 4 // p3 / A2
#define DATA1PIN 3 // p2 // A3

int16_t currentData1 ;

void setup() {
  delay(20);


  unsigned long stopmilis = millis();
  payload.data2 = ( stopmilis - startmilis ) * 10 ;
  payload.data1  = rollStatus = digitalRead(DATA1PIN) * 10 ;
  payload._salt = 0;
  payload.volt = readVcc();
  payload.devid = DEVICE_ID;
