 
     ether.printIp("[N] SRV: ", ether.hisip);
   }
-  sendToTwitter();
 }
 
 float getTemp() {

  {
    if (sensors.getAddress(tempDeviceAddress, i))
    {
      Serial.print("[T] Found device ");
      Serial.println(i, DEC);
      sensors.setResolution(tempDeviceAddress, TEMPERATURE_PRECISION);
    } else
    {
      Serial.print("[T] Found ghost device at ");
      Serial.print(i, DEC);
      Serial.print(" but could not detect address. Check power and cabling");
    }
  }
}

static void sendToTwitter () {
  Serial.println("Sending tweet...");
  byte sd = stash.create();

  const char tweet[] = "@solarkennedy the test Twitter sketch works!";
  stash.print("token=");
  stash.print(TOKEN);
  stash.print("&status=");
  stash.println(tweet);
  stash.save();
  int stash_size = stash.size();

  // Compose the http POST request, taking the headers below and appending
  // previously created stash in the sd holder.
  Stash::prepare(PSTR("POST http://$F/update HTTP/1.0" "\r\n"
    "Host: $F" "\r\n"
    "Content-Length: $D" "\r\n"
    "\r\n"
    "$H"),
  api, api, stash_size, sd);

  // send the packet - this also releases all stash buffers once done
  // Save the session ID so we can watch for it in the main loop.
  session = ether.tcpSend();
}

void setup () {


  if (DEBUG) return;

  snprintf(sendBuffer, sizeof sendBuffer, "key=%s&temp=%d \0", TOKEN, (int)temp);
  ether.httpPost(endpoint, api, NULL, sendBuffer, NULL);

//  Serial.println("[>] Done sending temperature!");
}

static void updateDoorstatus(int isOpen) {
  Serial.println("[>] Sending new doorstatus ...");
  
  if (DEBUG) return;

  snprintf(sendBuffer, sizeof sendBuffer, "key=%s&door=%d \0", TOKEN, isOpen);
  ether.httpPost(endpoint, api, NULL, sendBuffer, NULL);
  
//  Serial.println("[>] Done sending doorstatus!");
}

void findTempSensor() {
