Post topics, source code that relate to the Arduino Platform

User avatar
By vis321
#57525 Hi everyone,

So I got my esp8266 finally working and able to request from an api I make with thing speak.
All it does it pull the current time from a site, super basic but just wanted to learn how to pull info from the web.

In the serial and arduino side everything work well and I get what I want except in the serial monitor I get more then I want.

AT+CIPSTART="TCP","api.thingspeak.com",80

CONNECT

OK


E¹�ÍÁ•…­¹com/apps/thinghttp/send_request?api_key=P4DO5B6RJWAJBI62

busy s...

busy s...

busy s...

SEND OK

+IPD,11:10:18:37 PM


Is what I get once it send the request and it successfully returns the time, "+IPD,11:10:18:37 PM"

If I try to just print what I read from the serial monitor using

ESP8266.println("AT+CIPSTART=\"TCP\",\"api.thingspeak.com\",80");
delay(6000);
ESP8266.println("\r\n AT+CIPSEND=85");
delay(6000);

//String temp = ESP8266.readString();
ESP8266.println("GET https://api.thingspeak.com/apps/thinght ... 6RJWAJBI62");

while (ESP8266.available()) {
ESP8266.println("\r\n\r\n");
temp = ESP8266.readString();

The serial and lcd print

com/apps/thinghttp/send_request?api_key=P4DO5B6RJWAJBI62

busy s...

busy s...

busy s...

SEND OK

+IPD,11:10:18:37 PM

That is the outcome from above.

How am I able to narrow down only to the time" 11:10:18:37 PM " or at least "+IPD,11:10:18:37 PM" to only print?

Thanks so much!