Newbie Help For PIC and ESP8266 Connection To Thingspeak

4 ビュー (過去 30 日間)
Jeffrey Marchal
Jeffrey Marchal 2021 年 3 月 23 日
編集済み: Christopher Stapels 2021 年 4 月 6 日
I have been working for tens of hours trying to understand the basics of Thingspeak. I am completely flummoxed...
I am using a PIC and ESP8266 and trying to write to my Thingspeak Channel using a variety of ways that so far have proved useless...
I really have tried to work through this without help. And this Community is only the second time I have been so confused that I am asking for help.
I successfully connect to my local wireless network with the appropriate ESP8266 command:
AT+CWJAP_CUR="MY_NETWORK_SSID","MY_PASSWORD"
I can also get an "OK" response from this (I am leaving out the ESP8266 AT+CIPSEND=##, that just tells the ESP8266 how many bytes to send):
AT+CIPSTART="TCP","API.THINGSPEAK.COM",80 (I sometimes used AT+CIPSTART="TCP","API.THINGSPEAK.COM",80, 50 to use keepalive?)
From this starting point I have tried:
POST /update HTTP/1.1
Host: api.thingspeak.com <- Error +IPD,272:HTTP/1.1 400 Bad Request
and:
api_key=MY_WRITE_API_KEY <- Error +IPD,272:HTTP/1.1 400 Bad Request
and:
X-THINGSPEAKAPIKEY=MY_WRITE_API_KEY <- Error +IPD,272:HTTP/1.1 400 Bad Request
and literally hundreds of other permutations of things I have found on the web. I have tried to use the Arduino IDE and tried to build many examples of various projects with no success... I am pretty familiar with MPLABX, but the Arduino IDE has so far failed to build ANYTHING... I have looked through the various Arduino headers trying to write the simplest versions I can for the PIC I am using - all with no success.. I am desperate for something, anything to help me get something working. I have manually input commands to the ESP8266 unsing the AT command set, again without success in getting Thingspeak to LET ME IN.
I really just need an example of the commands to send...
Thanks In Advance For Anyone Willing To Help. I will not be a bother once I get this going a little better as I try to learn the rest on my own... I REALLY tried.

回答 (1 件)

Christopher Stapels
Christopher Stapels 2021 年 3 月 23 日
Welcome to ThingSpeak. Sorry about the trouble.
Use the ThingSpeak library. We make sure its the easiest way. Look in the examples in the library or the examples in the doc.
And what is your goal?( e.g. I want to write data from the pic to the esp to thingspeak...or just want to write anythign to cloud....or tryig to monitor my garden..)
  3 件のコメント
Jeffrey Marchal
Jeffrey Marchal 2021 年 4 月 6 日
I just wanted to let you know that I am still working on this project, and I really appreciate your help. I finally decided to buy an Arduino Mega to "see" the actual UART transmissions. It took a little effort, but I finally got that upo and running. From that experience, I have been able to use my PIC24FJ256GA705 to at least connect and post data using a really crude bit of software. But it has been fun... I'm ending a 13 hour day today - I love this stuff. Or maybe I just love to beat my head against a wall!
I did finally see how to upvote your reply. And I really appreciate the answer.
Christopher Stapels
Christopher Stapels 2021 年 4 月 6 日
編集済み: Christopher Stapels 2021 年 4 月 6 日
Thanks for the update. Let us know if you still have any troubles. Don't forget to check out the MATLAB features built into ThingSpeak to help visualize and analyze your data.

サインインしてコメントする。

コミュニティ

その他の回答  ThingSpeak コミュニティ

カテゴリ

Help Center および File ExchangeREST API についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by