Can I use RX or TX pin when using my arduino as a keyboard?

I have a quick question. I want to simulate a keyboard with my arduino and I’m wondering if i can at the same time use RX or TX pins as inputs for the button. I know that you can’t use them when using serial communication but is it the same when using keyboard library?

Thank you in advance for your answer :slight_smile:

Which Arduino?

pro micro 3,3v 8000 MHz

Sorry, I am not familiar with that one and I can't find it on this website. Is it listed here and I can't see it or is it from somewhere else?

I have a chinese copy of this Pro Micro - 3.3V/8MHz - DEV-12587 - SparkFun Electronics

That should be an atmega32u4, Rx and Tx are Serial1, USB is Serial, separate serial ports, and can be used at the same time.

pro micro 3,3v 8000 MHz

You mean 8MHz. 8000MHz, or 8GHz, would be amazing, maybe one day!

Yes, on micro you can use Tx, Rx pins for ordinary digital inputs/outputs, or use them for connecting components that use serial communications, like a GPS module. They are not needed for uploading your sketch or using Serial Monitor.

You can't do that with Uno, Nano, Pro Mini... that's why it's important to remember to say what type of Arduino you have in your first post.