Giter Club home page Giter Club logo

pi-xbox-lirc's Introduction

pi-xbox-lirc

This project allows you to control a YouView device from an Xbox360 controller using a Raspberry Pi and an infra-red LED.

It works with both Humax and Huawei devices, although you need to configure which device you are using, as the remote control protols differ.

Hardware Construction

This project assumes that an infra-red emitting diode has been connected to GPIO in P17 of the Raspberry Pi.

+3v3 ------------
          |
         +-+
         | |   300R
         | |
         +-+
          |
          |
         +-+
         \ /  ->  Infrared emitter
         ---  ->
          |
          |
          |
P17 --------------

I used an infrared LED from maplin (order code CY85G) and a 300 ohm resistor (order code M300R) which gives a lousy range, but doesn't require a transistor to drive the LED. You can increase the range by reducing the resistance. A 200 ohm resistor is safe, but do not go below 130 ohms as you risk destorying the GPIO port.

Automatic Install for Humax

To automatically download and install this package, and all of the packages it depends upon, log in the Raspberry Pi and type:

curl -L http://tinyurl.com/ncca9nr | sh

The tiny URL is a link to https://raw.github.com/asrashley/pi-xbox-lirc/master/install-humax.sh

Automatic Install for Huawei

To automatically download and install this package, and all of the packages it depends upon, log in the Raspberry Pi and type:

curl -L http://tinyurl.com/na943cn | sh

The tiny URL is a link to https://raw.github.com/asrashley/pi-xbox-lirc/master/install-huawei.sh

Manual Install

To perform the steps in the automatic installer one-by-one:

sudo apt-get install git
sudo apt-get install xboxdrv
sudo apt-get install lirc
sudo apt-get install python-dev
sudo apt-get install python-pip
git clone https://github.com/asrashley/pi-xbox-lirc.git
cd pi-xbox-lirc

Edit src/xboxlirc/target.py to select which device (Humax / Huawei) you want to control.

sudo cp lircd.conf /etc/lirc/
sudo cp hardware.conf /etc/lirc/
sudo /etc/init.d/lirc restart

Enable auto-start

The automatical installation scripts will also automatically enable the driver when the gamepad is installed, but if you used the manual install procedure, you will need to perform the following steps to enable auto-start:

sudo python setup.py install
sudo cp xbox-daemon /usr/local/sbin
sudo chmod u+rx /usr/local/sbin/xbox-daemon
sudo cp 80-xbox360.rules /etc/udev/rules.d
sudo chmod u+rx /etc/udev/rules.d/80-xbox360.rules

Usage

If auto-start has been enabled, when the Xbox controller is inserted in to a USB port, the Xbox driver and the lirc bridge should be auto-started

To manually start:

/usr/bin/xboxdrv --trigger-as-button --id 0 --led 2 --deadzone 4000 --silent &
python -m xboxlirc

pi-xbox-lirc's People

Contributors

asrashley avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.