45 Minute Project - £4.10 XBMC Remote Receiver
Posted on 2014-03-01 in makes
I'm a big fan of XBMC, and have an Ouya running XBMC set up in my lounge, streaming from my NAS. I normally use XBMC remote on my phone for controlling it, but this gets annoying when the phone is on charge, or I'm using it for something else.
I noticed that the majority of my TV remote is completely unused when the TV is in HDMI mode, and had a bit of a lightbulb moment!
Almost none of these buttons are used!
I already had an Arduino Pro Micro (£3) lying about i'd bought for testing out as an upgrade path for the minimus based projects i've been playing with. It is leonardo compatible, small, cheap and pretty easily available. I added an IR Receiver (£1.10) to the weekly Hackspace Farnell order to complete the parts list.
The pinout of the IR receiver makes it very easy to connect to the pro micro, using the RAW (VUSB), GND, and A3 pins. I just bent the OUT pin (pin 1) on the receiver to the left a bit as follows:
The body of the receiver fits perfectly behind the USB plug, flat against the voltage regulator. I used the IRremote arduino library to grab data from the remote using the IRrecvDemo sketch and mushed some buttons:
1 |
|
My remote uses 0xFFFFFFFF as a 'key repeat' code, about every 200ms when the button is held down. I found that in practice I had to ignore the first of these, as it was repeating way too fast and doing double presses.
I tweaked the IRrecvDemo sample code, added in a bit of keyboard and came up with some working code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
|
Total cost £4.10, total time 45 minutes. Sorted!