If i load an empty sketch and open the serial monitor, i can send AT commands and see the response, but if i try to use some very simple code to send commands, nothing happens, neither the blue light blink. So this means that arduino doesn't send anything via serial pins.
I tried this:
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println("AT");
}
And this:
#inport<SoftwareSerial.h>
SoftwareSerial wifi(3,4);
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
wifi.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
wifi.println("AT");
Serial.println("AT");
while(wifi.available() > 0){
Serial.print(wifi.read());
}
}
I also tried using a power supply for esp8266, but in this case i was not able to send commands neither using an empty sketch and the serial monitor. I can only see the response of esp when i turn it on, but i cannot send anything (it is like only RX works if i don't use the arduino 5V power).
Can someone help me please?