I want to send data from arduino to ESP8266. I have done all the RX and TX connections. The problem is that data is not sent every second, it stops after a single byte. When I remove the arduino cable then data is read.
My Arduino Code :
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.write("50");
delay(1000);
}
My ESP8266 Code :
void setup() {
Serial.begin(9600);
// connect to wifi.
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
}
Serial.println("Connected !");
}
void loop() {
Serial.print(Serial.readString());
}
The problem is that the data is not sent every second it stops after single byte,then I remove the arduino cable then data is read. I just want to send data from arduino to ESP8266. I have done all the RX TX connections !