I'm using the WifiEsp.h library and the webclient example it has, found here : GitHub - bportaluri/WiFiEsp: Arduino WiFi library for ESP8266 modules
So i have an arduino Uno and a Mega. The Mega does some other stuff but im gona use it later as a server. For now i want to test everything works from base to the top. So i put the same program on both of Uno and Mega with only differences the pins for the Tx Rx of the ESP.
I have configured the esp's to work on 9600 baud rate through at commands and flashed to version 1.1.1.
Now this is so weird for me ... On the Uno the ESP works like a charm! It connects right away to my network and prints the info as the example shows. I then tried with Mega and its own ESP... No luck.. I just won't initialize. I then used the same ESP as the one i had on Uno that worked (in case i got a faulty chip).
Yet again , it does not initialize. Showed me the error that no Wifi Shield found... I change the connection, the Rx Tx so i go into the config mode with the AT commands and i can see it!!! I send AT commands and it works... I change back the cables and it just won't initialize...
i have a voltage divider for the arduino pin cause pins give 0 or 5 V . And i have external power supply 3.3V for the ESPs as arduino doesn't have anough mA to supply.
I tried different pins 24-25 , 17-18 , 18-19(saw there is a grouping in some cases) and some other ones. I then borrowed another Mega arduino to test that my arduino isn't faulty. I had the exact same problem.
Can someone bless me with what the hell am i doing wrong ?