Not able to upload data to "thingspeak.com"

Hello, I’m basically a mechanical engineer, work on electronic projects is my hobby. Currently, I’m working on a realtime weather monitoring system using ESP32 + IoT, my code is complying without any errors, but not able to upload data to “thingspeak.com” could anyone please review my code and help me fix the problem? With limited knowledge, I was able to run this same code on ESP8266 earlier but after I changed my board to ESP32 I’m not able to upload data to “thingspeak.com”. I have shared the skitch file in the below link for your ease. Thanks in advance.

https://drive.google.com/file/d/1ELchvtQJpDesjXMqPBiB2VlNxed881BK/view?usp=sharing&fbclid=IwAR2wQzimiNz8Y5pzHE4lRdR-MjbdgYlvDQEA4zWYKKTMa7p-tSdMnvhDit0

You can use a code sharing site like GitHub, Gist, or Pastebin to safely share your code. Remember to not include any keys or tokens. I also recommend using MATLAB Answers (https://www.mathworks.com/matlabcentral/answers/index) - It is single sign on with ThingSpeak and people from the ThingSpeak development team are supporting users.

Are you using the ThingSpeak library for ESP32? In the library we have examples for writing data using the ESP32.

2 Likes

I’d strongly recommend it, if you aren’t using the library here: https://github.com/mathworks/thingspeak-arduino

There are examples there to help you get started easily.