Simple doubt: which are pins for RX and TX transmission?

Hello.
i wanna use an HC-05 bluetooth but looking around to programs, i see people use different pins of Arduino Uno, like 0,1 and 2,3… so i don’t understand which one is correct.

#include <SoftwareSerial.h>
SoftwareSerial HC-05 (2, 3); // RX = 2, TX = 3
*char appData; *
String inData = “”;
void setup()
{

  • Serial.begin(9600);*
  • Serial.println(“HM10 serial started at 9600”);*
  • HM10.begin(9600); // set HM10 serial at 9600 baud rate*
  • pinMode(13, OUTPUT); // onboard LED*
  • digitalWrite(13, LOW); // switch OFF LED*
    }

or

#include <SoftwareSerial.h>
SoftwareSerial HC-05 (0, 1); // RX = 0, TX = 1
*char appData; *
String inData = “”;
void setup()
{

  • Serial.begin(9600);*
  • Serial.println(“HM10 serial started at 9600”);*
  • HM10.begin(9600); // set HM10 serial at 9600 baud rate*
  • pinMode(13, OUTPUT); // onboard LED*
  • digitalWrite(13, LOW); // switch OFF LED*
    }

The first line of your programme is for using software serial. If that is what you want to do, the pins you are calling are OK.

Never use pins 0,1 with software serial. They are for hardware serial.

The rest of your programme is confusing rubbish. I guess you are already aware of that. The Rx and Tx names are for Arduino and connect to Tx and Rx respectively on Bluetooth.

may be of value