I'm beginner in Arduino and recently programmed an Arduino uno board with various PS/2 to USB converters. They work when typing in Serial Monitor of Arduino IDE, but not in the other programs such as Notepad.
How can I connect the board as HID keyboard for usual works with my PS/2 keyboard?
Update:
As @KIIV mentioned in the comments, Uno hasn't native USB and his suggestion is to start with boards such as Leonardo.
I want to ask, what is the straightforward way of using Uno for this purpose?
-
1Start with board with native USB and not UNO with USB-to-serial on different chip. Arduino leonardo for exampleKIIV– KIIV07/24/2023 14:42:41Commented Jul 24, 2023 at 14:42
-
2please do not post a picture of text ... post the text insteadjsotola– jsotola07/24/2023 15:00:23Commented Jul 24, 2023 at 15:00
-
Thank you @KIIV, great answer! I googled your guide and found that some types of Arduino haven't built-in USB communication. As new question, is any way to work with Uno, as well?Khabarkhaan– Khabarkhaan07/24/2023 15:09:11Commented Jul 24, 2023 at 15:09
-
Thank you @jsotola for your hint about site's laws, I'm not so familiar with them. The question and its text has been edited.Khabarkhaan– Khabarkhaan07/24/2023 20:42:17Commented Jul 24, 2023 at 20:42
-
1I thought I answered this question. Oh, I did... stackoverflow.com/questions/76755556/…Delta_G– Delta_G07/24/2023 22:30:00Commented Jul 24, 2023 at 22:30
1 Answer 1
As the Uno has no generic USB module, it generally works only as a virtual serial device. Without additional hardware you cannot make a Uno work as a USB keyboard. In principle.
A possible solution is the usage of V-USB. This nice library uses bit-banging to realize low-speed USB communication. A USB keyboard commonly is such a low-speed USB device.
Another possible solution is an accompanying software "driver" on the PC. It will receive the key events via the USB serial port and translate them to key events for the operating system. But I'm sure you will not want this.
-
I learned new things from your answer, @the busybee. Thanks.Khabarkhaan– Khabarkhaan07/25/2023 15:43:12Commented Jul 25, 2023 at 15:43
-
@Khabarkhaan You might want to take the tour to learn how this site works. For example, you are not supposed to comment "thanks!" but to mark an answer as accepted. This is the best way to help future visitors on the same issue.the busybee– the busybee07/25/2023 16:04:59Commented Jul 25, 2023 at 16:04