Using an IR Remote with a Raspberry Pi Media Center



Similar documents
PiFace Control & Display

Adafruit's Raspberry Pi Lesson 7. Remote Control with VNC

Adafruit's Raspberry Pi Lesson 6. Using SSH

Adafruit's Raspberry Pi Lesson 5. Using a Console Cable

Adafruit's Raspberry Pi Lesson 5. Using a Console Cable

Adafruit's Raspberry Pi Lesson 5. Using a Console Cable. Created by Simon Monk

Adafruit's Raspberry Pi Lesson 9. Controlling a DC Motor

SSH to BeagleBone Black over USB

5inch HDMI LCD User Manual

Arduino Lesson 1. Blink

Table 1 below is a complete list of MPTH commands with descriptions. Table 1 : MPTH Commands. Command Name Code Setting Value Description

Adafruit's Raspberry Pi Lesson 3. Network Setup

Monitor Your Home With the Raspberry Pi B+

Adafruit's Raspberry Pi Lesson 11. DS18B20 Temperature Sensing

application note LAN Power: HP Web QoS with HP ProCurve Switches What is WebQoS? How WebQoS Classifies and Prioritizes Traffic

Arduino Lesson 14. Servo Motors

Arduino Lesson 17. Sending Movement Detector

Adafruit NFC/RFID on Raspberry Pi

Playing sounds and using buttons with Raspberry Pi

How To Connect A Raspberry Pi To The Internet On A Microsoft Moonstone 2 (Microsoft) Microsoft Powerbook 2 (Powerbook 2) (Powerboard 2) And Powerbook 3 (Powerstation 2)

Bluetooth HID Profile

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide

Raspberry Pi Setup Tutorial

Adafruit MCP9808 Precision I2C Temperature Sensor Guide

Arduino Lesson 0. Getting Started

Arduino Lesson 5. The Serial Monitor

M8 basics. Setting Up Your M8 Android Box Remote Essentials Using Your M8 Android Box Setting up Wireless... 6

Arduino Lesson 13. DC Motors. Created by Simon Monk

Arduino Lesson 9. Sensing Light

Arduino Lesson 4. Eight LEDs and a Shift Register

Table of Contents. Part I Introduction 2. Part II Keyboard Monitor 2. Part III Console Viewer 4. Part IV FAQ 5. Part V Support 6. Index 0.

WIZnet S2E (Serial-to-Ethernet) Device s Configuration Tool Programming Guide

Revision History. Revision Revision History Date

In-System Programmer USER MANUAL RN-ISP-UM RN-WIFLYCR-UM

UPS PIco. to be used with. Raspberry Pi B+, A+, B, and A. HAT Compliant. Raspberry Pi is a trademark of the Raspberry Pi Foundation

Raspberry Pi Adding a Real Time Clock (RTC)

How to Install Microsoft Windows Server 2008 R2 in VMware ESXi

Adafruit Pi Box Plus. Created by Phillip Burgess. Last updated on :45:08 PM EDT

UniPi technical documentation REV 1.1

TestManager Administration Guide

Shellshock Security Patch for X86

ViPNet ThinClient 3.3. Quick Start

This techno knowledge paper can help you if: You need to setup a WAN connection between a Patton Router and a NetGuardian.

3.5 EXTERNAL NETWORK HDD. User s Manual

Dilshan R Jayakody. (jayakody2000lk@gmail.com)

Soft-Starter SSW-06 V1.6X

Registering with Cisco UCM

AR1100 Resistive Touch Screen Controller Guide

Arduino Lesson 16. Stepper Motors

Quick installation guide for the Vista Quantum QNVR Network Video Recorder

To add Citrix XenApp Client Setup for home PC/Office using the 32bit Windows client.

SFTP Server User Login Instructions. Open Internet explorer and enter the following url:

Having Fun with QNAP and your Home Automation

Using the IPMI interface

Remote Desktop In OpenSUSE 10.3

Red Hat Linux 7.2 Installation Guide

Building A Computer: A Beginners Guide

CANnes PC CAN Interface Manual

Load Balancing. Outlook Web Access. Web Mail Using Equalizer

Connections and wiring Diagram

LOCKSS on LINUX. CentOS6 Installation Manual 08/22/2013

Setting up a Raspberry Pi as a WiFi access point

LOCKSS on LINUX. Installation Manual and the OpenBSD Transition 02/17/2011

Yun Shield User Manual VERSION: 1.0. Yun Shield User Manual 1 / 22.

Outlook Tips & Tricks. Training For Current & New Employees

REMOTE DESKTOP SETUP INSTRUCTIONS

Using pcduino's WiFi Dongle With the Pi a

MXQ basics. Setting Up Your MXQ Android Box Remote Essentials Using Your MXQ Android Box Setting up Wireless...

Installation Guide for Microsoft SQL Server 2008 R2 Express. October 2011 (GUIDE 1)

How To Use Mview On A Powerline 2.2 (Powerline) On A Pc Or Macbook 2 (Powerplst) On An Iphone Or Ipa 2 (Aldo) On Your Iphon 2 (

warpct.com Basic Computer Skills MS Windows XP Workbook courseware by WARP! Computer Training

Modern Robotics, Inc Core Device Discovery Utility. Modern Robotics Inc, 2015

Raspberry Pi Android Projects. Raspberry Pi Android Projects. Gökhan Kurt. Create exciting projects by connecting Raspberry Pi to your Android phone

CPSC 226 Lab Nine Fall 2015

To begin, visit this URL:

Adafruit's Raspberry Pi Lesson 1. Preparing an SD Card for your Raspberry Pi

Bob Rathbone Computer Consultancy

UPiS - Uninterruptible Power intelligent Supply

eztcp Technical Document Modbus/TCP of eztcp Caution: Specifications of this document may be changed without prior notice for improvement.

secucam User Manual Version 1.1.x Darhon Software

CRM Connector Installation & Integration USER GUIDE

USER GUIDE Version 2.0

Updates Click to check for a newer version of the CD Press next and confirm the disc burner selection before pressing finish.

LAN / WAN Connection Of Instruments with Serial Interface By Using a Terminal Server

PN7120 Windows IoT Porting Guidelines. Rev October

MAIL MERGE TUTORIAL. (For Microsoft Word on PC)

DSL Self-install Kit Instructions

Network Probe User Guide

Citrix Client Install Instructions

Beginner s Guide to the PI MATRIX. by Bruce E. Hall, W8BH 1) INTRODUCTION

Testing your Linux Virtual Box

LINDY ELECTRONICS LIMITED & LINDY-ELEKTRONIK GMBH - SECOND EDITION

Spam Marshall SpamWall Step-by-Step Installation Guide for Exchange 5.5

1200/1400 Series as standard iscsi disk array. Quick Installation Guide

Remote Desktop Instructions for the Remote PC Running Windows Vista

Schneider OS-Loader usage via Ethernet or USB.

Representative Console for Android Phone. Version 2.1

SETTING UP RASPBERRY PI FOR TOPPY FTP ACCESS. (Draft 5)

FUGU - SFTP FOR MACS- REFERENCE GUIDE

Transcription:

Using an IR Remote with a Raspberry Pi Media Center Created by Simon Monk Last updated on 2013-05-03 08:00:31 PM EDT

Guide Contents Guide Contents Overview Parts Part Qty Hardware LIRC Configure and Test Using Other Remotes 2 3 4 4 4 6 7 9 12 Page 2 of 12

Overview In this tutorial, you will learn how to use an Infrared remote with a Raspberry Pi configured as a media center. The IR receiver is attached to the GPIO connector on the Raspberry Pi. Before tackling this project, you need to follow this tutorial (http://adafru.it/c2s) to set up your Raspberry Pi as a media center. Page 3 of 12

Parts To build this project, you will need everything from the Media Center setup tutorial (http://adafru.it/c2s) and the following items. Part Qty IR Sensor http://adafruit.com/products/157 1 IR Remote http://adafruit.com/products/389 1 Female to Female leads http://adafruit.com/products/794 1 Page 4 of 12

Page 5 of 12

Hardware The IR sensor has just three pins, that will connect with three pins on the GPIO connector. To do the connecting, we can use female to female jumper leads. These make a good reliable connection as the IR sensor has unusually thick leads for an IC. Make the connections as shown below. Note that you do not have to use the same colored jumper wires. But selecting adjacent wires that are still in a 'ribbon' will help keep things neat. Note that the IR sensor chip needs to be operated at 3.3V not 5V when used with the Raspberry Pi. Page 6 of 12

LIRC The interface between the hardware and the Raspberry Pi media centre is managed by a piece of software called LIRC (Linux Infrared Remote Control). This is pre-installed on most recent Raspberry Pi distributions and is included in the Rasbmc distribution, so there is nothing to install, however, there is some setting up to do. To make sure that the IR hardware is correct, we can connect to the Raspberry Pi running Rasbmc using SSH, which is automatically enabled on this distribution. If you have not connected to a Raspberry Pi using SSH before, please see this tutorial. (http://adafru.it/cag) You can find the IP address of the Raspberry Pi using the XBMC System Info page. To be able to test the IR receiver without XBMC, you need to make sure that the IR remote feature is turned off, or you will not be able to use LIRC from the SSH. So run the Rasbmc Settings program and make sure that the option Enable GPIO TSOP IR Receiver is disabled. Page 7 of 12

If you needed to change this you will need to reboot. Now connect to the Raspberry Pi using SSH and issue the commands shown below: Now hold the remote in front of the receiver and you should see a series of 'pulse' / 'space' messages appear each time you press a button. Congratualtions! The IR receiver is working. Page 8 of 12

Configure and Test Now that we know that the hardware is okay, we need to give LIRC a config file to tell it about the keys on the remote that we are using. From the SSH session, issue the command: nano lircd.conf... and then paste the following text into it, before saving the file by clicking CTRL-x then Y. # Please make this file available to others # by sending it to <lirc@bartelmus.de> # # this config file was automatically generated # using lirc-0.9.0-pre1(default) on Thu Mar 14 14:21:25 2013 # # contributed by # # brand: /home/pi/lircd.conf # model no. of remote control: # devices being controlled by this remote: # begin remote name /home/pi/lircd.conf bits 16 flags SPACE_ENC CONST_LENGTH eps 30 aeps 100 header 8945 4421 one 594 1634 zero 594 519 ptrail 598 repeat 8949 2187 pre_data_bits 16 pre_data 0xFD gap 106959 toggle_bit_mask 0x0 begin codes KEY_VOLUMEDOWN 0x00FF KEY_PLAYPAUSE 0x807F KEY_VOLUMEUP 0x40BF KEY_SETUP 0x20DF KEY_UP 0xA05F KEY_STOP 0x609F KEY_LEFT 0x10EF Page 9 of 12

KEY_LEFT KEY_ENTER KEY_RIGHT KEY_KP0 KEY_DOWN KEY_BACK KEY_KP1 KEY_KP2 KEY_KP3 KEY_KP4 KEY_KP5 KEY_KP6 KEY_KP7 KEY_KP8 KEY_KP9 end codes 0x10EF 0x906F 0x50AF 0x30CF 0xB04F 0x708F 0x08F7 0x8877 0x48B7 0x28D7 0xA857 0x6897 0x18E7 0x9867 0x58A7 end remote This file should be saved in the home directory for the user pi. Now, return to the Rasbmc Settings program and enable the option Enable GPIO TSOP IR Receiver. At the same time, change the GPIO Remote Profile as shown below: Restart XMBC and when it has rebooted, you should see a small popup message in the bottom right corner like the one below. Page 10 of 12

You should now find that your IR remote control will work and that you no longer need the keyboard and mouse to control XMBC. Page 11 of 12

Using Other Remotes I generated the config file for this remote using a utility that is part of LIRC called 'irrecord'. If you have a different remote, then you can generate a config file for it using this tool. The process is as follows: Turn the remote off on XMBC using Rasbmc as we did before using 'mode2'. Rename the existing lircd.conf out of the way Type the command 'irrecord list-namespace'. This will tell you the allowed key names that you can use when prompted. Type the command 'irrecord -d /dev/lirc0 ~/lircd.conf' Follow the instructions to the letter. It all seems a bit odd, but the program has to work out the timings and encodings used by the remote. Adafruit Industries Last Updated: 2013-05-03 08:00:32 PM EDT Page 12 of 12