I have an Arduino UNO board and an ESP8266 D1 Mini V2 micro USB (CH340 module based on NodeMcu Lua ESP-12), and I'm trying to set up communication between them using the TXS0108E logic level converter. But nothing works. Neither sees any transmitted information. I'm attaching the code and the connection method. Please help me solve the problem.
Arduino UNO:
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.println("Hi, ESP8266!");
delay(2000);
}
ESP8266:
void setup() {
Serial.begin(9600);
}
void loop() {
if (Serial.available()) {
String data = Serial.readString();
Serial.print("Message: ");
Serial.println(data);
}
}
I tried switching pins on the TXS0108E, tried connecting OE to VA with a wire and a 10K resistor, tried directly connecting Arduino RX - ESP8266 TX and Arduino TX - ESP8266 RX. Nothing happens.
Arduino UNO:
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // TX, RX
void setup() {
mySerial.begin(9600);
Serial.begin(9600);
}
void loop() {
if (mySerial.available()) {
Serial.write(mySerial.read());
}
if (Serial.available()) {
mySerial.write(Serial.read());
}
}
ESP8266:
void setup() {
Serial.begin(9600);
}
void loop() {
if (Serial.available()) {
String data = Serial.readString();
Serial.println(data);
}
}