Can i use the RX and TX pins?

Can i use the RX and TX pins on the arduino?

My project needs exactly 13 pins and i cant find a mega arduino.

So can i use them?

You can use A0-A5 as digital inputs/outputs too.

Using D0 and D1 could cause problems.

so what do i have to do to use A0 and A5 ??
do i type the code ( (pinMode,OUTPUT))???

in setup()...
pinMode(A0, OUTPUT);

in loop()...
digitalWrite(A0, HIGH);

or...

declare the pin first
const byte daPin = A0;

then, in setup()...
pinMode(daPin, OUTPUT);

and in loop()...
digitalWrite(daPin, HIGH);

Leo..

Also, A0 is D14, A1 is D15 etc.

ex. set 2-19 to outputs
for(byte x = 2; x < 20; x++)
{
pinMode( x, OUTPUT );
}

True, but 14-19 is not working on every Arduino.
Leo..

Wawa:
True, but 14-19 is not working on every Arduino.
Leo..

how do i check if it works on mine??

Did you try it?

What Arduino board do you have?

A0-A5 or 14-19 both work on an Uno/Nano.
Leo..

ok thanks guys i have an arduino uno