ESP8266 help -- serial port data is showing data from sensor. Thinkspeak only receiving lines of zero data points.

9 visualizaciones (últimos 30 días)
Hello everyone,
I am a relative noob at working with my ESP8266 module to send data to Thinkspeak. I am working on an IoT gardening project based off this project here at:
I have tried many times to compile both components of this project. I am receiving data on serial monitor, and my ESP is connected to my wifi but on thingspeak only receiving a line of zeros.
Here are a few things I have checked: my TX/RX and they are OK, as they get moved in position between these two codes, my API key is correct, as far as I can tell.
Does anyone have any recommendations they could make? I am stumped. I can post my code if that would be helpful. Many thanks!

Respuestas (1)

Christopher Stapels
Christopher Stapels el 17 de Dic. de 2020
I reccomend the ThingSpeak library for Arduino. You can use it to program an ESP 8266. You will likely get better error mesages.
If you install the library in your Arduino IDE, you can use the examples for the library to get good starting code.
If you are using the ESP8266-01 like in that example, I reccomend you upgrade to a Node MCU or something. All the extra hassle of the extra wires and the UNO is not worth the few dolalrs you may have saved.
Share the whole serial output, that will help us debug the issue.
Also have a look at the ThingSpeak examples. May your garden grow large and fast. (and tasty)
  2 comentarios
MATTHEW SKVASIK
MATTHEW SKVASIK el 17 de Dic. de 2020
Editada: MATTHEW SKVASIK el 17 de Dic. de 2020
Thansk Chris. Yes, I am learning that the Node MCU is much better. We are educators, and are working with the supplies that we have unfortuantely.
I will give the Thinkspeak samples a try and see what I can do from there.
THe serial output for the Arduino Uno that's reading from the sensor is showing:
Temperature(*C) = 20
21:42:43.968 -> Humidity(%) = 42
21:42:44.016 -> -------------------------
21:42:45.990 -> Temperature(*C) = 20
21:42:45.990 -> Humidity(%) = 42
21:42:46.037 -> -------------------------
21:42:48.010 -> Temperature(*C) = 20
21:42:48.057 -> Humidity(%) = 42
21:42:48.057 -> -------------------------
This is what it should be showing.
The serial port for the ESP8266 is showing gobbledegook gibberish, but it is conencted, At least I think it is. My dashboard on Thinkspeak is showing datapoints that are uploading, but the values are "0", I've attached a screenshot here. Super weird.
Would it help to see the code we are using? I appreciate the kinds words, suggestions, and encouragment!
Christopher Stapels
Christopher Stapels el 29 de Dic. de 2020
I dont see the screenshot unfortunately. Is your channel public? I can look at it directly if it is.
I looked at the code in the link you providede, the ESP is using the ThingSpeak library. Since you cannot monitor the serial in on the ESP while its running, debugging is hard. I suggest you hard code the esp to write particular values and work backwards until the hard coded values are exacly what you are sending from the UNO.
To start, comment everything out in the loop except keep this part
upload();
and add
value_1 =<some number>;
value_2 = <some other number>;
delay(15000); //dont slam ThnigSpeak
Then you should see that number in thingspeak every 15 seconds. Then work backwards to the input from the UNO. It lees like the code is looking for * and other special characters.

Iniciar sesión para comentar.

Comunidades de usuarios

Más respuestas en  ThingSpeak Community

Categorías

Más información sobre Write Data to Channel en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by