0

Cannot get ESP8266 to send data, does not respond

I created a circuit in Tinkercad where I have the ESP8266 WiFi module. It is connected properly as far as I know with the Tx of the UNO to the Rx of the ESP and RX of UNO to Tx of ESP. The ground and power (+3.3V) are connected, also Enable and DP_PD to +3.3V. I have put the code to connect to my ThingSpeak channel as shown in the tutorial.

The UART is initialzied. When I run the simulation I see both the ESP8266 and UNO LEDs turned on so they are powered. I also checked the voltages with the pseudo multimeter. The Serial Monitor also shows the commands are sent to the ESP8266, And with the pseudo oscilloscope I see the bits being transmitted when the commands are sent. On the RX of the UNO however, there is serial activity only every now and then.

The thing is... the commands are send via the UART but for what I saw the ESP8266 never responds... I don't see the response in the Serial Monitor and also I see that my LED blinks 6 times because I make it blink if it receives no response to a command. So why is the ESP8266 not responding? Below is a transcript from the SErial MOnitor, do note that I have removed my own API Key and used a placeholder.

AT
AT+CWJAP="Simulator WiFi",""
AT+CIPSTART="TCP","api.thingspeak.com",80
AT+CIPSEND=85
GET /update?api_key=MYAPIKEY&field1=32 HTTP/1.1
Host: api.thingspeak.com

AT+CIPSEND=85
GET /update?api_key=MYAPIKEY&field1=32 HTTP/1.1
Host: api.thingspeak.comapi_key=MYAPIKEY&field1=32 HTTP/1.1
Host: api.thingspeak.com

int setupESP8266()
{
// Start our ESP8266 Serial Communication
Serial.begin(115200); // Serial connection over USB to computer
Serial.println("AT"); // Serial connection on Tx / Rx port to ESP8266
delay(10); // Wait a little for the ESP to respond
if (!Serial.find("OK"))
{
digitalWrite(blueErrorLED, HIGH); // check if the ESP is running well
return 1;
}

// Connect to Simulator Wifi
Serial.println("AT+CWJAP=\"" + ssid + "\",\"" + password + "\"");
delay(10); // Wait a little for the ESP to respond
if (!Serial.find("OK"))
{

return 2;
}

// Open TCP connection to the IoT host:
Serial.println("AT+CIPSTART=\"TCP\",\"" + iotHost + "\"," + httpPort);
delay(50); // Wait a little for the ESP to respond
if (!Serial.find("OK"))
{
return 3;
}
return 0;
}

3 comments

Please sign in to leave a comment.