Giter Club home page Giter Club logo

ir_control's Introduction

PN003_ir_control

The project uses the IR RX and TX sensors on a Matrix Creator linked to a Raspberry Pi. It enables the functions of an IR remote control (that uses the NEC protocol) to be read, essentially learning the remote. This data can the be used to program the device that the remote was linked to.

Project Requirements

  • Raspberry Pi
  • Matrix Creator
  • ISE (if the VHDL code is to be modified)

Project Outline

The FPGA is used to decode and encode IR signals, with the Raspberry Pi acting as the controller which interactes with the FPGA via the SPI. When a IR signal is detected, the FPGA decodes the signal and stores the 32 bit word.

When running the learn function of the program, the RPi poles the FPGA every 0.2ms to see if the an IR word has been detected and decoded, if not the FPGA will return 4 bytes of 0x00, else it will return the full IR word. All the commands are stored in a file in the same folder called ctlData.txt.

After the commands have been learned, the write [cmdName] function can be used to program the device. This will load the data from the .txt file for the requested function, and send it over the the FPGA which encodes the data and modulates it with a 38kHz carrier frequency for tranmission to the IR TX led.

Run Instructions

  1. Set up the Matrix Creator HAL, following the guide here
  2. Transfer irCtl.c and the Makefile, as well as the irCtl_top.bit file to the Raspberry Pi
  3. Load the FPGA bit file using sudo xc3sprog -c matrix_creator irCtl_top.bit -p 1
  4. Run make to compile the program
  5. Run ./irCtl to the see the full usage statement.

General Info

The program is currently setup to learn the Volume Up, Volume Down, Channel Up, Channel Down, Mute and Power commands. This can be modified by adding, removing or altering the names at the top of the the irCtl.c file. Note that both cmdNames and cmdNameShort needs to have the same number of commands, the exact name of commands can be specified by the user.

Disclaimer: It is not a fool proof system, more of a proof of concept. Errors can occurs if a button has been pressed on the remote before running the 'learn' function. I will make modifications, but would prefer that any modifications are made by the requesting user, and subitted in a PR.

ir_control's People

Contributors

ghowelldsp avatar

Stargazers

 avatar Andrés Felipe Calderón de Restrepo avatar

Watchers

James Cloos 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.