Digistump Forums
The Digispark => Digispark Libraries => Topic started by: Akasurde on April 08, 2016, 05:55:05 am
-
Hi All,
I am trying to get input from Keyboard to my Digispark. The Keyboard in connected to my computer and I want to trigger event using input received from the Keyboard.
I tried look into DigiKeyboard.h but I am not able to find any function which is related to "Receiveing" input from Keyboard.
Can anyone point me in right direction ?
-
Can anyone point me in right direction ?
Turn around ;)
Using the DigiKeyboard library, your Digispark looks like a USB keyboard to your computer.
How would two keyboards talk to each other? Even the only way to talk to a keyboard (e.g. turning light on) is not supported by the DigiKeyboard.h library.
Serial or CDC is bidirectional.
-
To read from another keyboard, adding an USB Host would be needed.
With a USB Host, you connect the real keyboard to the USB Host, read it's keystrokes and send them to the computer via the DigiKeyboard library.
There are USB Host shields for Arduino, they are connected over SPI. I am not sure if the digistrumps can handle it.