Post topics, source code that relate to the Arduino Platform

User avatar
By swilson
#11709 Now that I think about it the bad request doesn't look like it would be because of the amount of chars I sent. If thingspeak was only taking 80 chars from me it would just truncate the stuff at the end after the &tweet= and would still go through as good. Very strange. I can put the url in my web browser adn update it just fine. I can also put Nodemcu on an esp8266 and send it through just fine. Possibly I could have the arduino trigger the command on an esp8266 running nodemcu, just have to figure out the code to try that.

BTW, I played with the sprintf a bit but don't know if I did it right. Got the same results.

Thanks.
User avatar
By ricg
#11737 Looking at your code i see that you send the AT+CIPSEND=# and the string as one send to the esp module.
The documentation shows an example where AT+CIPSEND=100 is sent first, then wait for the esp to reply with '>' and then send the 100 bytes. That's also the way i've been communicating with the esp. Note my code from previous post.
User avatar
By swilson
#11743 If you look more closely at the code you will see I am not sending the strings at the same time.

Code: Select all if(Serial.find( ">" ) )
      {
        debug.print(">");
        if (genState == HIGH)
        {
          Serial.println(getStr);
          debug.println(getStr);
        } else


That is the code that comes after AT+CIPSEND=#. It waits for the > before it sends the string.

Thing is that it works perfect for string length of 80 or under. I am going to strip out the laststate stuff and see what happens. If that makes it work then I guess it is a memory problem.