Can I use the TX/RX on pins 0, 1 (to a serial slave device) while also having the USB port dedicated PC communication?

  • actually When you uploading a sketch to your board through USB programing port that time the skect might go to the serial device which is connected with Arduino through Rx and Tx pin Commented Apr 7, 2017 at 4:40
  • 1
    @Prayuktibid I couldn't see any signal on pins 0 or 1 with a scope when using the USB port, even with those pins set to an output.
    – 101
    Commented Apr 7, 2017 at 4:47
  • 3
    @Prayuktibid he is using a Leonardo which has separate USB and hardware serial.
    – gre_gor
    Commented Apr 7, 2017 at 13:06
  • How to use USB and TX/RX at the same time? Commented Oct 1, 2018 at 14:44

1 Answer 1


32u4 is multi-serial uC. USB connection works on default serial communication which can be used via Serial.print("somevalue"). On the other hand if you want to use RX/TX on pins 0, 1 which are actually RXD1 and TXD1. So, if you use Serial1.print("somevalue"). So the answer is a yes. You can use USB and RX/TX (hardware serial) at the same time.

  • Great, thanks. Do you know how this compares with other boards? Apparently the Uno can't do use both.
    – 101
    Commented Apr 7, 2017 at 8:50
  • 2
    Arduino Uno can't do this, it has only one hardware serial. Atmega 2560 has 4 hardware serials. Having multiple serials are always handy. With Uno you just stuck and have to use software serial if the case more than one serial. Most of the time Software Serial doesn't treat you well, it is just a workaround after all.
    – Sener
    Commented Apr 7, 2017 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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