I figured the next step after controlling my TV with a Arduino, and sonar, would be to control VLC(a media player) on my computer with a old VCR remote.
The Arduino receive a IR signal from the remote, and if the decoded(to DEC) IR code matches one on the remote, it sends a number(assigned only to that button) over serial to the C# app. I haven't run into any misreading issues with the IR codes, so that's good. See my previous posts on IR remotes for how to get codes etc.
Then depending on what button is pressed, the C# app selects the right program and injects the key combo equivalent. Since I'm really new to C#, I used a window switching trick. Instead of attempting to directly interface with an application running, for example VLC media player, it switches to that window(similar to ALT+TAB) really fast, injects the keys and jumps back to the original window before the button was pressed; all of this with no apparent on screen artifacts.
C# code written in Visual Studio so it is more of a group Arduino files rather than just one source file. Download Arduino and C# code together HERE as a zip*.
*note: the file is .zip but I renamed it to '.zipp' to get around Google's file protection. Download it, then remove a 'p' from the end of the file name and extract! Below in comments, let me know if you have any issues.
PS See the moppy(musical floppy) post again for a quick start guide that should have everything you need to get started :)
No comments:
Post a Comment