Hello! i am working on a project here but i am having a little problem. I try to connect the Arduino Mega using the esp8266 to internet. the code is shown below:
#include <SoftwareSerial.h>
SoftwareSerial wifi (2, 3); //Rx, Tx
void setup() {
Serial.begin(115200);
Serial.println("Wifi Started");
wifi.begin(115200);
}void loop() {
if (Serial.available() > 0) {
byte b = Serial.read(); wifi.write(b);
}
if (wifi.available() > 0) {
byte b = wifi.read(); Serial.write(b);
}
}
After uploading, i try the at command in the serial monitor but nothing shows up. The connection is as follows:
rx --> pin 2 (with voltage divider)
tx --> pin 3
gnd --> gnd
ch_pd,vcc --> 3.3v
GPIO0 --> gnd
I dont my think my esp8266 is working with my Arduino Mega. Im not really sure. Any help will be appreciated. Thanks!