   // connection and automatically reconnect when disconnected).  See the MQTT_connect
   // function definition further below.
   MQTT_connect();
-  // try to spend your time here
 
-  Adafruit_MQTT_Subscribe *subscription;
-  while ((subscription = mqtt.readSubscription(10000))) {
+  while (mqtt.readSubscription(10000)) {
 
     if (strcmp((char *)onoffsw.lastread, "{\"On\":1}") == 0 && !led_on) {
 



void setup() {
  // Enable temperature sensor
  temp_sensor.begin();

  pinMode(LED, OUTPUT);
  Serial.begin(74880);
  delay(10);

  // Connect to WiFi access point.
  Serial.println(); Serial.println();
  Serial.print(F("Connecting to "));


  // Setup MQTT subscription for onoff feed.
  mqtt.subscribe(&onoffsw);

  // Initial temperature reading
  updateTemperature();
}

