user68982: I'm using arduino pro micro Atmega32u4 5v 16Mhz
I want to use it to make a HID Keyboard and Mouse but I ran out of pins so I was wondering if I can use the RX and TX pins as digital input pins. Will it work? Will it affect the communication of the arduino  to the computer?

user4143: Using TX and RX on a 32U4 does not affect PC communication. It uses a competent different communication channel.
You can use those pins for digital operation with no problems, you just won't be able to use Serial1 for communication with serial peripherals.

user31668: Welcome to ASE.

Communication between the PC and the Arduino Pro Micro happens through the USB, unlike the Arduino Uno and Mega, which use the RX and TX lines.
In your case, the USB pins of the Micro are used to communicate with the PC. Hence, the RX and TX pins are available for digital input and output operations.



68982: <p>I'm using arduino pro micro Atmega32u4 5v 16Mhz</p>
<p>I want to use it to make a HID Keyboard and Mouse but I ran out of pins so I was wondering if I can use the RX and TX pins as digital input pins. Will it work? Will it affect the communication of the arduino  to the computer?</p>
 4143: <p>Using TX and RX on a 32U4 does not affect PC communication. It uses a competent different communication channel.</p>
<p>You can use those pins for digital operation with no problems, you just won't be able to use <code>Serial1</code> for communication with serial peripherals.</p>
 31668: <p>Welcome to ASE.</p>
<ol>
<li>Communication between the PC and the Arduino Pro Micro happens through the USB, unlike the Arduino Uno and Mega, which use the RX and TX lines.</li>
<li>In your case, the USB pins of the Micro are used to communicate with the PC. Hence, the RX and TX pins are available for digital input and output operations.</li>
</ol>
<p><a href="https://i.stack.imgur.com/OVjSD.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OVjSD.jpg" alt="enter image description here" /></a></p>
