     + "Content-Length: " + payload.length() + "\r\n"
     + "\r\n"
     + payload + "\r\n";
-  http_post(request, payload);
+  http_post(request);
  }
  
  void lg_sensor(int val) {

#include <wino.h>
#include "config.h" 

int loopcnt = 0;
int errcnt = 0;


void serial_setup(void) {
  SerialUSB.begin(115200); //Opens USB-Serial connection for terminal
  delay(5000);
  logDebug("serial interface is ready");
}

void wifi_setup(void) {
  wifi.on(115200);
  if (wifi.wait(15000)) {
    logDebug("wifi_setup(): WIFI module started.");
  } else {
    logDebug("wifi_setup(): could not start WIFI.");
  }
  delay(1000),
  SerialUSB.println(wifi.info());
 
  delay(5000);

  wifi.setMode(0);

  logDebug(wifi.list());
  while (! wifi.join(WIFI_SSID, WIFI_PASSWORD)) {
    logDebug('wifi_setup(): connecting to WIFI...');
    delay(2000);
  }
  SerialUSB.print("wifi_setuip(): connected to WIFI. IP: ");
  SerialUSB.println(wifi.getip());
  SerialUSB.print("wifi_setup(): connected to WIFI. MAC: ");
  SerialUSB.println(wifi.getmac());
  SerialUSB.print("wifi_setup(): IP from my own getip(): ");
  SerialUSB.println( getIP(true)); // short version of IP, cached
  SerialUSB.print("wifi_setup(): gethostname(): ");
  SerialUSB.println(gethostname(true)); // short version of hostname, cached
  
}
