   if(res.getArgc() == 1) {
     res.popArgs((uint8_t*)&status, 4);
     if(status == STATION_GOT_IP) {
-      debugPort.println("WIFI CONNECTED");
+      Serial.println("WIFI CONNECTED");
      
       wifiConnected = true;
     } else {

 *       Tuan PM <tuanpm@live.com>
 */

#include <SoftwareSerial.h>
#include <espduino.h>
#include <rest.h>
#include <dht.h>

dht DHT;


SoftwareSerial debugPort(4, 5); // RX, TX

ESP esp(&Serial, &debugPort, 6);

REST rest(&esp);


  esp.process();
  if(wifiConnected && readyToSend) {
      sprintf(data_buf, "{\"type\": \"note\", \"title\": \"PIR Motion\", \"body\": \"Status = [%s]\"}", pirStatus[pirState]);
      Serial.println(data_buf);
      rest.post("/v2/pushes", (const char*)data_buf);
      Serial.println("ARDUINO: send post");

      if(rest.getResponse(data_buf, 256) == HTTP_STATUS_OK){
        Serial.println("ARDUINO: POST successful");

    
      } else {
        Serial.println("ARDUINO: POST error");
      }
      delay(2000);
      readyToSend = false;
      
    } 
}
