Community
cancel
Showing results for 
Search instead for 
Did you mean: 
EEdwa2
Beginner
915 Views

Live keyboard input while running Arduino sketch

Hello all,

I'd like to ask for the community's help in setting up live keyboard input while running an Arduino sketch. I've managed to connect to the Edison via SSH, and then command the Arduino program to execute. However after the program starts running, I'm unsure about how to get the program to recognise inputs from the keyboard. My intent is to use the left and right arrow keys to command a certain output, and I'd like to get some advice about how to achieve this. Is there an equivalent to the Serial Monitor in the puTTY environment - a way to interact with the program in real time? Let's assume there is: is there a way for inputs such as keystrokes to be recognised in real time rather than after hitting Enter? I'm not sure if this is an Arduino or Edison or Linux question but hopefully this is enough to go on for now.

Thank you.

0 Kudos
2 Replies
idata
Community Manager
42 Views

Hi Redtedtezza,

 

 

That's a nice question, I think that this is the function that you need: https://www.arduino.cc/en/Reference/KeyPressed, I recommend you to give it a try and let us know if it works. For more information about it you can check this link: https://github.com/arduino-libraries/USBHost. I can't assure you if it works, because there are some Arduino libraries that aren't compatible with the Intel Edison.

 

 

I hope you find this useful.

 

 

Regards,

 

-Leonardo
idata
Community Manager
42 Views

Hi Redtedtezza,,

 

 

Was the information useful? Did it work?

 

 

Please let us know if it worked.

 

 

Regards,

 

-Leonardo
Reply