ESP8266 help -- serial port data is showing data from sensor. Thinkspeak only receiving lines of zero data points.
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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!
0 comentarios
Respuestas (1)
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.
2 comentarios
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.
Comunidades de usuarios
Más respuestas en ThingSpeak Community
Ver también
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!