     payload.data1 = digitalRead(DATA1PIN) * 10;
     digitalWrite(IRENPIN, LOW);
     
-    if (payload.data1 == 10) {
+    //if (payload.data1 == 10) {
+    if ( rollStatus != payload.data1 ) {
       radio.powerUp();
       radio.write(&payload , sizeof(payload));
       radio.powerDown();
+      rollStatus = payload.data1;
     }
     unsigned long stopmilis = millis();
     payload.data2 = ( stopmilis - startmilis ) * 10 ;

#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;
