     startMills = millis();
   }
 
+// radio 
+  if (radio.available()) {
+    while (radio.available()) {
+      yield();
+      radio.read(&sensor_data, sizeof(sensor_data));
+
+      String radiopayload = "{\"_salt\":";
+      radiopayload += sensor_data._salt;
+      radiopayload += ",\"volt\":";
+      radiopayload += sensor_data.volt;
+      radiopayload += ",\"temp\":";
+      radiopayload += sensor_data.temp;
+      radiopayload += "}";
+
+      sendmqttMsg(radiotopic, radiopayload);
+
+    }
+  }
+
   client.loop();
 
 }


void setup()
{
  if (DEBUG_PRINT) {
    Serial.begin(115200);
  }

#include <WiFiUdp.h>
#include <Time.h>

// radio
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
// radio
#define DEVICE_ID 2
#define CHANNEL 1 //MAX 127

extern "C" {
#include "user_interface.h"
}
