RX and TX

Hi everyone,

I’m wondering if it’s possible to use the RX or TX line as a 5v digital input/output line.
Because i need more space on my uno board.
Also if its possible, should i write a specific code ?
And finaly, is it possible to use them as digital input/output for all the arduino's ?

Thanks.

The RX and TX pins are used for uploading sketches to your board and for communication with the computer via Serial. If you connect anything to those pins, it can interfere with that functionality. For that reason, it's best to leave those pins alone. That said, it is possible to use them for other purposes.

Are you aware that you can use the analog pins on the Uno as digital pins also?

Yes you can. Which Arduino do you have?

Yup im already using them.

A Uno

If you are really desperate to use the TX and RX pins as the digital output lines, you can do it in the following way:

Before uploading a sketch, disconnect all kinds of external connections/circuits with the TX and RX pins.

After uploading the sketch, put back the circuits with the TX and RX pins.