So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By BRV64
#75707 Hello!

I've been having a lot of trouble posting on a google sheets.
I'm using an XMEGA micro controller for a proyect so I only need to send this data via Serial Com.
I Already have google sheets and the script set up, but I can't send data to it.

I tried this:
AT+CIPSTART="TCP","POST /macros/s/(Script_ID)/R1M1=24&R1M2=25&R1M3=26&R1M4=32&R1M5=50&R1M6=71 HTTP/1.1
Host: script.google.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 47",80

"/R1M1=24&R1M2=25&R1M3=26&R1M4=32&R1M5=50&R1M6=71" is the data I want to send.

Do i need other command or is the format wrong?

Thanks for the help in advance
c:
User avatar
By QuickFix
#75716
BRV64 wrote:Do i need other command or is the format wrong?

Yes, don't use the AT-command set.

It's nice to try things out and maybe for some basic stuff, but is essentially useless in real life applications.
You'd better write some (Arduino/LUA/...) code for the ESP that accepts serial data and transforms it into a valdd POST-request for the website in question.
User avatar
By BRV64
#75718
QuickFix wrote:
BRV64 wrote:Do i need other command or is the format wrong?

Yes, don't use the AT-command set.

It's nice to try things out and maybe for some basic stuff, but is essentially useless in real life applications.
You'd better write some (Arduino/LUA/...) code for the ESP that accepts serial data and transforms it into a valdd POST-request for the website in question.


Since I was asked to develop an Industrial application, Arduino is not an option
:/
User avatar
By QuickFix
#75764
BRV64 wrote:Arduino is not an option

Not sure what to think of this... :?

You are aware that I was referring to the Arduino IDE with ESP-core (the software product), not an Arduino board (the hardware with Atmel controller)?
So you write your own firmware (using the Arduino IDE) in C/C++ and flash it into the ESP.

This code would accept requests as serial (or if you'd like I2C, SPI, parallel, ...) data, forms that into a valid request Google understands and do a POST to the Google Sheets-server.