Here's the code when I try to load the program on serial monitor:
#include <SoftwareSerial.h>
const byte rxPin = 3; // Wire this to Tx Pin of ESP8266
const byte txPin = 2; // Wire this to Rx Pin of ESP8266
// We'll use a software serial interface to connect to ESP8266
SoftwareSerial ESP8266 (rxPin, txPin);
void setup() {
Serial.begin(9600);
ESP8266.begin(9600); // Change this to the baudrate used by ESP8266
delay(2000); // Let the module self-initialize
}
void loop() {
while (Serial.available()){
String Data = ESP8266.readStringUntil('\n');
ESP8266.println(Data);
}
while (ESP8266.available()){
String inData = ESP8266.readStringUntil('\n');
Serial.println("Got reponse from ESP8266: " + inData);
}
}
When I run this, I go to serial monitor and I write "dofile('server.lua')". It should show the IP of the ESP module, but it shows nothing at all. I already checked the baudrate of the serial monitor. Any help is aprecciated