Contenido principal

Resultados de

Hello!
The fields sometimes will update most of the times but not always. The Serial monitor shows the following output when it does not update:
while when it update it shows the following:
There is no issue with the update rate since it is more than 15 seconds.
Iam using a feather fona and the chunk of the code Iam using to send the data is the following:
if (gprsSerial.available())
Serial.write(gprsSerial.read());
gprsSerial.println("AT");
delay(1000);
gprsSerial.println("AT+CPIN?");
delay(1000);
gprsSerial.println("AT+CREG?");
delay(1000);
gprsSerial.println("AT+CGATT?");
delay(1000);
gprsSerial.println("AT+CIPSHUT");
delay(1000);
gprsSerial.println("AT+CIPSTATUS");
delay(2000);
gprsSerial.println("AT+CIPMUX=0");
delay(2000);
ShowSerialData();
gprsSerial.println("AT+CSTT=\"internet\"");//start task and setting the APN,
delay(1000);
ShowSerialData();
gprsSerial.println("AT+CIICR");//bring up wireless connection
delay(3000);
ShowSerialData();
gprsSerial.println("AT+CIFSR");//get local IP adress
delay(2000);
ShowSerialData();
gprsSerial.println("AT+CIPSPRT=0");
delay(3000);
ShowSerialData();
gprsSerial.println("AT+CIPSTART=\"TCP\",\"api.thingspeak.com\",\"80\"");//start up the connection
delay(6000);
ShowSerialData();
gprsSerial.println("AT+CIPSEND");//begin send data to remote server
delay(8000);
ShowSerialData();
delay(4000);
gprsSerial.println(str3);//begin send data to remote server
delay(8000);
ShowSerialData();
delay(6000);
gprsSerial.println((char)26);//sending
delay(6000);//waitting for reply, important! the time is base on the condition of internet
gprsSerial.println();
ShowSerialData();
gprsSerial.println("AT+CIPSHUT");//close the connection
delay(3000);
ShowSerialData();
delay(3000);
}
Thank you in advance!