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

User avatar
By keble6
#95646 Newbie to ESP8266 here! I'm working on an extension (library) for the microbit to send measurements to a Google Sheet web app.
The extension is in JavaScript, and I'm basing it on an existing extension (GitHub) that was written to send measurements to ThingSpeak.

The good news is that I can connect to my WiFi OK. But connecting to the web app is a problem.

One tricky bit (to me, anyway) is how to code the string for the AT+CIPSEND= command.

The original code has:
Code: Select allGET /update?api_key=" + write_api_key + "&field1=" + n1


Because I don't have an api key I assumed I could change this to
Code: Select allstring = "GET /?field1=" + n1


But that's not working. Any ideas please?

I've also started getting errors following my
Code: Select allsendAT("AT+CIPSTART=\"TCP\",\"" + url + "\",80", 0)

My serial log shows this message back from ESP8266:

17:03:56.220 AT+CIPSTART="TCP","https://script.google.com/macros/s/AKfycbyk6H_5Bgnadzi_y6UtySSAuv-h5Yh7rsylkCH_oV0/dev",80^M
17:03:56.230 IP ERROR
17:03:56.231
17:03:56.231 ERROR

I'd appreciate any tips on how to debug. I have a USB-TTL gadget (a PL2303 device). Should I try using it with a serial terminal rather than with code perhaps?