exit status 1

#include <ESP8266WiFi.h>
#include “DHT.h”
#define DHTPIN D2 //Pin to attach the DHT
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);

const char* ssid = “BAAHUBALI”;
const char* password = “shivudu7”;

const char* host = “192.168.1.6”;
void clientscript(String);
WiFiServer server(80);
String readString;
String Action;

void setup() {
Serial.begin(115200);
delay(10);

pinMode(D1, OUTPUT);

// We start by connecting to a WiFi network

Serial.println();
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);

WiFi.begin(ssid, password);

while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}

Serial.println("");
Serial.println(“WiFi connected”);
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
}

void loop() {

int val = analogRead(A0);
int tempc = dht.readTemperature();
// Start the server
server.begin();
delay(1000);
Serial.println(“Server started”);

// Print the IP address
Serial.println(WiFi.localIP());

// Check if a client has connected
WiFiClient client = server.available();
if (client) {
while (client.connected()) {
if (client.available()) {
char c = client.read();

//read char by char HTTP request
if (readString.length() < 100) {
//store characters to string
readString += c;
//Serial.print(c);
}

//if HTTP request has ended
if (c == ‘\n’) {
Serial.println(readString); //print to serial monitor for debuging

delay(1);

//stopping client
client.stop();
//controls the Arduino if you press the buttons

if (val>50&&tempc>25){

digitalWrite(D1, HIGH);
Action = “ALERT”;
clientscript(Action);
}
//clearing string for next read
readString="";
}
}
}
}
}

void clientscript(String Action){

Serial.print("connecting to ");
Serial.println(host);

// Use WiFiClient class to create TCP connections
WiFiClient client;
const int httpPort = 80;
if (!client.connect(host, httpPort)) {
Serial.println(“connection failed”);
return;
}

Serial.print("Sending Message ");
// This will send the request to the server

client.print(String("GET “) + Action + " HTTP/1.1\r\n” +
"Host: " + host + “\r\n” +
“Connection: close\r\n\r\n”);

//client.println(“test123?results”);
delay(10);

// Read all the lines of the reply from server and print them to Serial
while(client.available()){
String line = client.readStringUntil(’\r’);
Serial.print(line);
}

Serial.println();
Serial.println(“closing connection”);
}

Do you want to show your masterpiece? What does "exit status 1" mean?

http://forum.arduino.cc/index.php?topic=97455.0

Hey, and welcome to the forum!

Post your code in code tags </>,

 so your code looks like this!

What is the problem you are having? What is the code supposed to do? What is it not doing? Share as much relevant information as you can.

marco

while compiling it to nodeMCU platform i got error in compiling as follows:

compilation terminated.

exit status 1 Error compiling for board NodeMCU 1.0 (ESP-12E Module).

And what do you see before "compilation terminated" You might need to scroll up a bit? ( We're too lazy here, and probably we're missing other stuff than you do ;) )

i didn't get you

The output window usually contains a lot more than the few lines that you gave.

Place the mouse in there, select all ‘orange’ text, copy it and paste it here, preferably between code tags,

type
** **[code]** **

paste error message after that
type
** **[/code]** **
after that

Will look like

error here

And please modify your opening post using the same principle so it’s easier to read the code