see Image (Do note that the (RX, TX) pins in the Image are different)
Once I connect the Arduino via USB and while the ESP8266 is powered the IDE spits out an error:
"Board at COM3 is not available"
avrdude: ser_open(): Can't open device "\.\COM3" the system cannot find the file specified
I have tried uploading the code first and than plug in the ESP8266 but it will not work
I have the same issue on MAC and Windows.
To sum it up. The issue is when the ESP8266 is connected (CH_PD), the Serial Monitor cannot start. and i cannot communicate between arduino uno and the esp8266.
I have tried changing the pins of TX, RX but it does not seems to solve anything
When the ESP is connected and powered I cannot even upload the code to the Arduino.
Sure, your ESP blocks the UART interface that is used for upload.
As your software makes a SoftwareSerial connection on pins 2 and 3 why don't you use these pins? Or better, use pins 8 and 9 and change to the better AltSoftSerial library. SoftwareSerial is a crippled piece of software.