ESP 8266 HELP!

I am trying to upload 1 number to thingspeak.com but the code does not work. It complies and I put in LED switched to know when the program is running, but I cannot get it to work. I am not a great coder so anything help is thanked extremely!!! :confused: :confused:

#include <SoftwareSerial.h>

#define SSID "WIFI"
#define PASS "1234567"
#define IP "184.106.153.149"
String GET = "GET /update?key=E1USJVGN3QYCCN4H&field1=";

void setup()
{
Serial.begin(9600);
Serial.println("AT");
delay(3000);
if(Serial.find("OK")){
connectWiFi();
}
}

void loop() {
pinMode(13, OUTPUT);
digitalWrite(13, LOW); //turn on led
delay(2000);
digitalWrite(13, HIGH);
int Compton = 9;
String cmd = "AT+CIPSTART="TCP","";
cmd += IP;
cmd += "",80";
Serial.println(cmd);
digitalWrite(13, LOW); //turn off led
delay(2000);
cmd = GET;
cmd += Compton;
cmd += "\r\n";
Serial.print("AT+CIPSEND=");
Serial.println(cmd.length());
if(Serial.find(">")){
Serial.print(cmd);
}else{
Serial.println("AT+CIPCLOSE");
}
;
}

boolean connectWiFi(){

Serial.println("AT+CWMODE=1");
delay(2000);
String cmd="AT+CWJAP="";
cmd+=SSID;
cmd+="","";
cmd+=PASS;
cmd+=""";
Serial.println(cmd);
delay(3000);
if(Serial.find("OK")){
return true;
}else{
return false;
}
;
}

Trial_capstone.ino (1.04 KB)

  pinMode(13, OUTPUT);

Do this ONCE, in setup().

  digitalWrite(13, LOW); //turn on led

You got some bizarre LEDs that light up when turned off?

You'll have a lot more success with that device when you get it off the hardware serial port that you should be using to debug your code. Debug by guesswork sucks.

I put the LED to turn off an on so I can see where the code get stuck or if it makes it to a certain point. I was wondering if the code looks correct so that it may send a message to the thingspeak site