 
     Serial.println("Main> Initializing... ");
 
+    // Calculate the number of times we chack to see if the temp has changed
+    // before we forcefully send the data to the server even if the temp
+    // has not changed.
+    TEMP_LOOP_CNT_THRESHOLD = (FORCE_SEND_TEMP_INTERVAL_MS / LOOP_DELAY_MS);
+
+    Serial.printlnf("Main> Loop delay %f (S), %d (MS).", (LOOP_DELAY_MS / 1000), LOOP_DELAY_MS);
+    Serial.printlnf("Main> Time delay before send %f (S), %d (MS)", (FORCE_SEND_TEMP_INTERVAL_MS / 1000), FORCE_SEND_TEMP_INTERVAL_MS);
+    Serial.printlnf("Main> Check temp counter threshold (MAX counter value): %d", TEMP_LOOP_CNT_THRESHOLD);
+
     led.init();
     led.disable();
     led.setColor(YELLOW);
+
+    RGB.control(true);
+    RGB.brightness(0);
+    RGB.control(false);
 
     Serial.print("Main> My device id: ");
     Serial.println(myDeviceId);


      // If it has failed 5 times to send the data, then assume the service is
      // down and put the system in an error state
      if(counter > 15){
        Serial.println("Main> Failed to send data to the server several times.  Putting system in error state.");
        is_server_available = false;
      }
    }

    counter = counter + 1;
  }

  led.setColor(GREEN);
  Serial.flush();
  delay(2500);
}

double currentTempC = 0;
int counter = 0;

int LOOP_DELAY_MS = 2500; // 2.5 sec
int FORCE_SEND_TEMP_INTERVAL_MS = 120000; // 2 min

int TEMP_LOOP_CNT_THRESHOLD;

void printTemp(float celcius, float fahrenheit)
{
  Serial.printlnf("Main> Temperature: %f C, %f F", celcius, fahrenheit);
}

void test_server(){
