hello, I am having problems retrieving data from another esp8266 to an esp8266 that contains temp data from a dht22 sensor. Here is what I am trying to do more specifically: I have an esp8266 that has a nextion lcd hooked up to it that will retrieve data from 2 dht22 temperature sensors. The esp8266 will also send commands to turn on/off digital pins on the esp8266. Basicly, one of the esp8266's only has the nextion display hooked up to it(this esp is configured as the acces point) and the other esp has all the electronics(dht22 sensors and the relays that I will put on there).
I am able to send commands to turn on/off digital pins but I am having problems sending the data to the other esp in order to write that data to the nextion lcd. Below is the code for the Accespoint(the one retrieving the sensor data and sending the comamnds for the digital pins):
code for accespoint: //this is the acces point#include <doxygen.h>#include <NexButton.h>#includ - Pastebin.com
Let's say the data from the temperature from the snesor reads 29 degrees. It first prints the temperature then prints what is sent to the AccesPoint, so in this case where the temperature is 29, it will send 29\r
Edit: Also even if "\n" is added at the end it should not matter since the es should stop reading the data when "\r" appears.
I did as J_M_L said but nothing still won't show up on the serial monitor of the Acces Point. This is the code that should read the data and print it, is there something wrong with it?