Communication between PC and HID device is possible? #141
Unanswered
Willsky209
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am sorry but I am a beginner with such emulatuon task and searching for the answers.
Background: my PC will regularly reboot at certain time everyday, and requires to press 'Y' after reboot to jump over some warning message. I want to realize this 'press Y' action by arduino UNO R3 acting as a HID keyboard automatically.
Idea: before rebooting, PC sends a "key code" to UNO board, and my expecting is that UNO starts to count certain time (5 mins) and sends 'Y' to my PC. In PC rebooting stage, UNO should be detected as a HID keyboard so it can send correct 'Y' to PC.
Background 2: UNO has been reprogrammed by Hoodloader2, so it should be able to write different codes separately into 16U2 and 328p.
Problems:
when UNO acts as a HID keyboard, can it still receive PC's "key code"? If yes, how to do it?
I suppose two sketche programs would be needed, one is "sending 'Y'" sketch, but where should I upload? To 16U2 or 328p?
And another sketch is to handle the receiving "key code" from PC, but how do I write this sketch? Is there any example or just using serial.read()? And where should I upload to? 16U2 or 328p?
Beta Was this translation helpful? Give feedback.
All reactions