Introduction: Build an XBMC/KODI Remote With Arduino, IR Sensor Shield and VB.NET

Build an XBMC/KODI remote with Arduino and an IR Sensor Shield, that will work with any remote.

I wanted to control my XBMC/Kodi PC from my satellite decoder's remote, because I either watch movies on XMBC/Kodi or Satellite TV, So I made sense to have one and the same remote.

How it works
The Arduino sends the remote commands from the arduino to your PC and on your PC a custom developed VB.NET program called TeckTinkerRemoteReceiver will translate the commands into a keyboard stroke.

Step 1: Put Everything Together.

The most important part
Is to connect the IR Sensor shield correctly to your Arduino. See the picture for reference.

Also ensure you connect the Arduino the correct way round.
I added a super bright green LED so that when I'm pressing the button it will light up, this also helps for troubleshooting purposes.

Before closing everything up its a good idea to first test it out.

In the next step I will show you how to test it.

Step 2: Testing Your Setup.

Upload the Arduino IR Receiver Sketch File
Downloadable from here.

Download Arduino Sketch, Techtinker Remote Receiver and VB.NET Source code.

In the above download you will also find the VB.NET application which will translate the received IR commands from your TV remote into computer key strokes.

Before Launching the Remote Receiver application on your PC
Test your receiver by opening the Arduino Serial monitor, point any IR TV , DVD or what ever you have remote at the Arduinio IR sensor Shield and you should see the commands being printed in the serial monitor. At the same time the super bright LED will flicker when it receives IR commands.

After this go ahead and launch the TechtinkerIRReceiver program developed in VB.NET, Select your comport and simply connect. When you press buttons you will see the incomming textbox will show the commands being received.

Having a quick Squizz at the code. (Don't copy and paste below rather download the working sketch)

#include irremote.h

int LEDPin = 13;
int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup() {
pinMode(LEDPin, OUTPUT);
irrecv.enableIRIn(); // Start the receiver
void loop() {
if (irrecv.decode(&results)) {
Serial.print(results.value, HEX);
// Receive the next value digitalWrite(LEDPin, HIGH);
digitalWrite(LEDPin, LOW);



From the above you can see it simply loads the IR Library included in the download, (Not developed by me, but by the creators of the IR Shield)

Step 3: ​Assemble Your IR Receiver Into an Enclosure.

In the video at the end of this instructable you will see I made a window for the IR Shield using the see through plastic from a 2L coke bottle, This is just to round it off a bit but I think it might help to "Spray" the IR signal a bit more into the enclosure.
Once its been assembled proceed to the next step

Step 4: The Techtinker IR Receiver Source Code

As mentioned before the source code can be downloaded here.

There is a bit of a problem with the serial, Everything works perfectly fine, but everytime the serial tries to read the arduino it will momentarily freeze the application until it was done reading, But If you are going to run this minimized all the time it doesn't matter.

All it does is it allows you to record an incoming signal and then map it to a key board stroke.
It saves the map table into "keymaptable.txt" in the same folder as the application. It also saves your com port configuration inside "tecktinkerRemoteConfig.txt"
NOTE:These to .txt files must be present in the same folder as the actual TechTinkerIRReceiver folder, if not the program will crash with an error, but at least it will tell you the files aren't there.

Coded Creations

Participated in the
Coded Creations