Arduino se queda congelado

Tengo un proyecto conectado a Ubidots, un servidor IoT, el trabaja con normalidad pero con el tiempo aproximadamente va de 1 hora a 4 horas, he registrado las caidas y son irregulares.
El toma dos datos de dos sensores sumergibles de temperatura y los sube a Ubidots luego de eso si la temperatura es menor a x grados el activa un rele de estado solido, para calentar el agua.

Tambien me pidieron que le pusiera una direccion ip, no por dhcp pero no se como seria, si me pueden ayudar con eso seria un exito o al menos instruirme para ver como lo soluciono.
Abierto a cualquier pregunta para poder solucionarlo y proporcionar informacion, muchas gracias

/********************************
 * Libraries included
 *******************************/
#include <Ethernet.h>
#include <SPI.h>
#include <UbidotsEthernet.h>
#include <Wire.h> 
#include <LiquidCrystal_I2C.h>
#include <OneWire.h>
#include <DallasTemperature.h>
/********************************
 * Constants and objects
 *******************************/
/* Assigns the Ubidots parameters */
char const * TOKEN = "BBFF-c2MCoautB0uR69cCZqT6SNQNsmJ7Qy"; // Assign your Ubidots TOKEN
char const * VARIABLE_LABEL_1 = "Sensor#1"; // Assign the unique variable label to send the data
char const * VARIABLE_LABEL_2 = "Sensor#2"; // Assign the unique variable label to send the data
const int pinDatosDQ = 9;
//INSTANCIA A LAS CLASES ONEWIRE Y DALLASTEMPERATURE
OneWire oneWireObjeto(pinDatosDQ);
DallasTemperature sensorDS18B20(&oneWireObjeto);
LiquidCrystal_I2C lcd(0x27,16,2);
int R1= 8;
int R2= 7;
/* Enter a MAC address for your controller below */
/* Newer Ethernet shields have a MAC address printed on a sticker on the shield */
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

/* initialize the instance */
Ubidots client(TOKEN);

/********************************
 * Main Functions
 *******************************/
void setup() {
    pinMode(R1,OUTPUT);
  pinMode(R2,OUTPUT);
  Serial.begin(9600);
  //client.setDebug(true);// uncomment this line to visualize the debug message
  /* start the Ethernet connection */
  Serial.print(F("Starting ethernet..."));
  if (!Ethernet.begin(mac)) {
    Serial.println(F("failed"));
  } else {
    Serial.println(Ethernet.localIP());
  }
  /* Give the Ethernet shield a second to initialize */
  delay(2000);
  Serial.println(F("Ready"));
  //INICIAMOS LA COMUNICACION SERIAL
  Serial.begin(9600);
  //INICIAMOS EL BUS 1-WIRE
  sensorDS18B20.begin();
  // Inicializar el LCD
  lcd.begin();
  //Encender la luz de fondo.
  lcd.backlight();
  lcd.setCursor(0,0);
  lcd.print("SISTEMA DE TEMP");
  lcd.setCursor(2,1);
  lcd.print("INICIANDOSE");
  delay(1000);
  lcd.clear();
  lcd.setCursor(3,0);
  lcd.print("T1      T2");
}

void loop() {
 
Serial.println("Mandando comandos a los Sensores");
 sensorDS18B20.requestTemperatures();


 lcd.setCursor(1,1);
 lcd.print(sensorDS18B20.getTempCByIndex(0));
 lcd.setCursor(10,1);
 lcd.print(sensorDS18B20.getTempCByIndex(1));
 delay(10);
  Ethernet.maintain();

  /* Sensors readings */
  float value_1 = sensorDS18B20.getTempCByIndex(0);
  float value_2 = sensorDS18B20.getTempCByIndex(1);
 
  /* Sending values to Ubidots */
  client.add(VARIABLE_LABEL_1, value_1);
  client.add(VARIABLE_LABEL_2, value_2);
 
  client.sendAll();
  delay(1000);

 if (sensorDS18B20.getTempCByIndex(0) <  22.5 ) {digitalWrite(R1, HIGH);}
 if (sensorDS18B20.getTempCByIndex(1) <  22.5) {digitalWrite(R2, HIGH);}

  if (sensorDS18B20.getTempCByIndex(0) >  23 ) {digitalWrite(R1, LOW);}
 if (sensorDS18B20.getTempCByIndex(1)  >  23) {digitalWrite(R2, LOW);}
 delay(100);

  
}

Sensor1-copia.ino (2.97 KB)