i am new here, if asked before sorry in advance,
i cannot found a related question.

I edited a code for get the thingspeak channel's data, for using with a led or relay on channel 8 on arduino uno. according to data 1 or 0, the led would be on or off. I am using esp8266.

espSerial.find("+IPD,1:0") block is cannot work as it needed to do.

```
#include <SoftwareSerial.h>
SoftwareSerial espSerial(2, 3);   
#define DEBUG true
String mySSID = "ssid";
String myPWD = "pass"; 
String myAPI = "CV4YEARDB91GTOXM";   // API Key
String myHOST = "api.thingspeak.com";
String myPORT = "80";
String myFIELD = "field1";

void setup()
{
  pinMode(8,OUTPUT);
  Serial.begin(9600);
  espSerial.begin(115200);

  espData("AT+RST", 1000, DEBUG);                     
  espData("AT+CWMODE=1", 1000, DEBUG);                 
  espData("AT+CWJAP=\""+ mySSID +"\",\""+ myPWD +"\"", 1000, DEBUG);   
  delay(1000); }

void loop()
  {

    String sendData = "GET /channels/716457/fields/1/last?key=CV4YEARDB91GTOXM";
    espData("AT+CIPMUX=1", 1000, DEBUG);
    espData("AT+CIPSTART=0,\"TCP\",\""+ myHOST +"\","+ myPORT, 1000, DEBUG);
    espData("AT+CIPSEND=0," +String(sendData.length()+4),1000,DEBUG);
    espSerial.find(">");
    espSerial.println(sendData);

    espData("AT+CIPCLOSE=0",1000,DEBUG);
    delay(10000);
  }

String espData(String command, const int timeout, boolean debug)
{
Serial.print(command);
  Serial.println("     ");

  String response = "";
  espSerial.println(command);
  long int time = millis();
  while ( (time + timeout) > millis())
  {
    while (espSerial.available())
    {
      if (espSerial.find("+IPD,1:0")) {
        digitalWrite(8,LOW); }
      if (espSerial.find("+IPD,1:1")) {
        digitalWrite(8,HIGH); }
    }
    }

  if (debug)
  {
    Serial.print(response);
  }
  return response;
}

```