1

Do they have specific pins that is best to be use as Rx/Tx pins (aside from D0 and D1)? If so, what makes them special?

edit: What pin feature i should look out for when choosing the rx/tx pin? Is there any specific pins that will make it a better rx/tx pin?

slifer
  • 11
  • 1
  • 3

2 Answers2

2

Pins D0 and D1 are used for hardware serial, see Serial library reference.

You can use any other pins for virtual Rx/Tx lines employing a software serial mode, for example by using the SoftwareSerial library, see Software Serial example, or by implementing your own custom code, or custom library.

Greenonline
  • 3,152
  • 7
  • 36
  • 48
1

The Arduino SoftwareSerial library can use any pair of pins.

AltSoftSerial uses special pins. AltSoftSerial uses a 16 bit hardware timer to generate the transmit output and measure the receive input waveforms. The timer works on pins 8 and 9 on Uno and Atmega 328p boards.

Juraj
  • 18,264
  • 4
  • 31
  • 49