user27205: When programming an ESP-01 with Arduino IDE, how can I make the Tx and Rx into a generic I/O pins reliably? I think there's a command to swap the Tx and Tx with other pins. I  tried serial.swap() but it didn't work. So how to get done with Arduino IDE or is it even possible?. I am using an ESP-01, which means there will be four GPIO pins once this question in answered.
I want to achieve same as in the video, How to add more GPIOs to ESP8266 (ESP-01), but without soldering wire.

user32668: Maybe a little late but it might helps someone else.
ESP-01 GPIO pins (1&3)

user57877: One thing I noticed is that if you're trying to use the Tx/Rx pins for the main serial comm (1 & 3) as a GPIO then you must not use any Serial commands in your code, such as Serial.begin. 
I was having my GPIO digital reads randomly read high (they had their mode set as INPUT_PULLUP) while I had a source pulling them low (I verified that input was indeed pulled low while the ESP8266 digitalRead was reading high)
Removing all Serial commands (begin, print and println) fixed that for me.

user77294: To work TX RX as GPIO Serial.begin() must be deleted from code.

user27157: Tx = GPIO 1
Rx = GPIO 3
Should work but be careful cause if they burn, you won't be able to program or even talk to the ESP anymore.

user41002: Add this to your code at the beginning of set void setup():
//********** CHANGE PIN FUNCTION  TO GPIO **********
//GPIO 1 (TX) swap the pin to a GPIO.
pinMode(1, FUNCTION_3); 
//GPIO 3 (RX) swap the pin to a GPIO.
pinMode(3, FUNCTION_3); 
//**************************************************

You will no longer be able to use the Serial Monitor as TX will now be a GPIO pin and not transmit Serial data. You can still Flash your device as when you boot the device in flash mode it converts GPIO1 and GPIO3 back to TX/RX. Once you reboot into regular running mode GPIO1 and GPIO3 will go back to being GPIO pins. 
To change GPIO1 and GPIO3 back to being TX/RX for regular Serial Monitor use add this to your code at the beginning of set void setup():
//********** CHANGE PIN FUNCTION  TO TX/RX **********
//GPIO 1 (TX) swap the pin to a TX.
pinMode(1, FUNCTION_0); 
//GPIO 3 (RX) swap the pin to a RX.
pinMode(3, FUNCTION_0); 
//***************************************************

If I understand the ESP-01 correctly the pins CANNOT be both TX/RX and GPIO pins at the same time.

27205: <p>When programming an ESP-01 with Arduino IDE, how can I make the Tx and Rx into a generic I/O pins reliably? I think there's a command to swap the Tx and Tx with other pins. I  tried <code>serial.swap()</code> but it didn't work. So how to get done with Arduino IDE or is it even possible?. I am using an ESP-01, which means there will be four GPIO pins once this question in answered.</p>

<p>I want to achieve same as in the video, <a href="https://www.youtube.com/watch?v=9RVyWZCSMtA" rel="noreferrer">How to add more GPIOs to ESP8266 (ESP-01)</a>, but without soldering wire.</p>
 32668: <p>Maybe a little late but it might helps someone else.</p>

<p><a href="http://www.forward.com.au/pfod/ESP8266/GPIOpins/ESP8266_01_pin_magic.html" rel="nofollow noreferrer">ESP-01 GPIO pins (1&amp;3)</a></p>
 57877: <p>One thing I noticed is that if you're trying to use the Tx/Rx pins for the main serial comm (1 &amp; 3) as a GPIO then you must not use any Serial commands in your code, such as Serial.begin. </p>

<p>I was having my GPIO digital reads randomly read high (they had their mode set as INPUT_PULLUP) while I had a source pulling them low (I verified that input was indeed pulled low while the ESP8266 digitalRead was reading high)</p>

<p>Removing all Serial commands (begin, print and println) fixed that for me.</p>
 77294: <p>To work TX RX as GPIO Serial.begin() must be deleted from code.</p>
 27157: <p>Tx = GPIO 1</p>

<p>Rx = GPIO 3</p>

<p>Should work but be careful cause if they burn, you won't be able to program or even talk to the ESP anymore.</p>
 41002: <p>Add this to your code at the beginning of set <code>void setup()</code>:</p>

<pre><code>//********** CHANGE PIN FUNCTION  TO GPIO **********
//GPIO 1 (TX) swap the pin to a GPIO.
pinMode(1, FUNCTION_3); 
//GPIO 3 (RX) swap the pin to a GPIO.
pinMode(3, FUNCTION_3); 
//**************************************************
</code></pre>

<p>You will no longer be able to use the Serial Monitor as TX will now be a GPIO pin and not transmit Serial data. You can still Flash your device as when you boot the device in flash mode it converts GPIO1 and GPIO3 back to TX/RX. Once you reboot into regular running mode GPIO1 and GPIO3 will go back to being GPIO pins. </p>

<p>To change GPIO1 and GPIO3 back to being TX/RX for regular Serial Monitor use add this to your code at the beginning of set <code>void setup()</code>:</p>

<pre><code>//********** CHANGE PIN FUNCTION  TO TX/RX **********
//GPIO 1 (TX) swap the pin to a TX.
pinMode(1, FUNCTION_0); 
//GPIO 3 (RX) swap the pin to a RX.
pinMode(3, FUNCTION_0); 
//***************************************************
</code></pre>

<p>If I understand the ESP-01 correctly the pins CANNOT be both TX/RX and GPIO pins at the same time.</p>
