Using digital pin 0 and 1 just like any other Digital Pin?

EdsArduino:
You would be able to use pin 1 as a GPIO pin, however you cannot use pin 0 as a GPIO, this is because the arguing has TX/RX pins that are used to program the Arduino and connect to some external modules.

RX is the receiver part of this communication system, it can then output normally if you are not using any external modules. TX is always transmitting so it cannot be used just like any other pin.

This is why they say the UNO is said to have 13 GPIO pins even though the there are 14 digital pins

This makes absolutely no sense.

You can use pins 0 and 1 as normal GPIO pins (input, input_pullup or output), as long as you're not using the hardware UART (i.e. if you don't call Serial.begin(...)).
If you connect pins 0 and 1 to some peripheral that has a low-impedance path to ground or 5v (like a switch, for example, or the output of a digital device), this could possibly short out the TX pin of the Arduino during a Serial transmission or during upload.

On a genuine Arduino board, the USB-to-Serial converter has a resistor in series with the TX pin, so you won't damage that pin when connecting something to the RX pin of the Arduino. However, you won't be able to receive anything.

This just means that you have to disconnect whatever is connected to pins 0 and 1 during upload.
During the execution of the program, you can do whatever you want with them.

Pieter

4 Likes