ESP8266 with arduino failed AT commands

Hey guys,

I'm on my first project with Arduino and I also use the esp8266. I connected them through SerialSoftware, I have the following configuration:

ESP | Arduino

TX - pin 2
RX - pin 3 ( here I did a voltage divider to lower it from 5V)
GND - GND
VCC - 3.3V
CHPD - 3.3V

The problem is that I get this error: " 0. at command AT..." at every command.
I also tried to change the baudrate with the following command : "sendCommand("AT+UART_CUR=9600,8,1,0,0",5,"OK");"
and I get the same fail message.

I'll post the code as well, maybe someone can help me figure this out. Thanks!

arduino_thingspeak_esp8266.ino (4.68 KB)

you have RX and TX swapped
SoftwareSerial esp8266(aTX_espRX, aRX_espTX);
the first parameter of SoftwareSerial is the number of the RX pin of Arduino