- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
I am working on an application that runs a few tasks in the main loop, but has to be sensitive to inputs from an USB joystick
I have come across Intel Edison codes (https://software.intel.com/sites/default/files/managed/7e/79/maker-garage-joystick-guide.pdf https://software.intel.com/sites/default/files/managed/7e/79/maker-garage-joystick-guide.pdf ) where the Joystick is read using polling.
I have come across Intel Edison codes wherein the GPIO is read using interrupts.
Is there a way to respond/ read the inputs from an USB joystick (or any USB device) using interrupt or a non-thread-blocking way. Any pointers/ resources would be welcome!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
I haven't tried this on Edison, but normally when you plug a USB joystick into a linux machine, a node is created at /dev/js1 (or similar) and then you can use normal "read" code to read events from the joystick.
You could put the read loop in a separate thread and post callbacks to your main thread.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Ramnath,
Thanks for your interest in the Intel® Edison™ Platform.
Unfortunately, there isn't a guide explaining how to use interrupts with a Joystick. Nevertheless, I did some research on my own and I found this video https://software.intel.com/en-us/videos/episode-8-using-a-joystick-with-intel-edison-technology Episode 8 | Using a Joystick with Intel® Edison Technology | Intel® Software that shows how to set up a joystick with the Intel® Edison.
Maybe you can use this video and the suggestion provided by SpiderKenny as reference in order to achieve your project goals.
Hope you find this information useful, have a nice day!
Best Regards,
-Jose P.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Thank you Keeny for the reply. Will check the read and post to callback route using Python
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Ramnath,
Were you able to try SpiderKenny suggestion? Please let us know in order to assist you.
Have a great day!
Best Regards,
-Jose P.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page