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?

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.

  • for Mega and Leonardo, there are other recommended pins for rx/tx. do they have it on uno? – slifer Nov 12 '18 at 1:36
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.

  • thanks. So this is alternative library to software serial is it. i will read about it first. – slifer Nov 12 '18 at 1:39

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.