Giter Club home page Giter Club logo

core's Introduction

IRext Encoding and Decoding Core Library

This project contains IRext core encode algorithm and decode algorithm.

Summary

IR code is base on 38000Hz or 56000Hz carrier waves, it is identified by the time interval of carrier waves.

Identical control signal is defined by pairs of physical high and low levels.

The lead code is identified by the 9000us time interval with carrier waves and 4500us interval without carrier waves. The logic 0 is identified by 500us time interval with carrier waves and 500us interval without carrier waves. The logic 1 is identified by 500us time interval with carrier waves and 1500us interval without carrier waves, so are the other types of encoding.

Following are some specifications:

  • Physical high level is constituted by carrier waves and physical low level without any carrier waves.
  • Basic protocol is constructed by different types of elements including lead code, end code, splitter, logic 0 and logic 1, different protocol has its own element structure, eg. NEC, upd6121g, tc9012, etc.
  • 1 or more cycles resists in single element, but often 1 cycle.
  • Lead code, end code and splitter takes 1 bit in element, for example, in NEC above, a '9000-4500' indicates 1 logic bit.
  • Logic 0 and logic 1 take 8 bit in an element.
  • Logic 0 and logic 1 could be big endian or little endian.
  • For some of the protocols, logic 0 and logic 1 have bit masks.
  • For some of the protocols, like mi-1 pattern could be in format of binary, quaternary or hexadecimal.
  • For some of the protocols, like RC5 toggles its bits.
  • For some of the protocols, there are 0us time intervals in lead code or end code.

2 kinds of remote control IR code:

  • Command code: The receiver receives IR code as commands from emitter, and then adjusts status of itself, eg. control code of TV, DVD.
  • Status code: The receiver receives IR code as status, and applies itself to this status, eg. control code of air conditioner.

Encoder

The encoder composes compressed remote control IR binaries from plain text in XML format. Different kind of remote control code are differently composed.

Command code

Command code is composed by 2 parts : protocol segment and control segment which are stored in 2 parts. When encode, the remote control key code would be calculated and translated according to protocol definition and merge separate segments into a complete control frame.

Status code

Status code is defined by various kinds of tags, indication each essential part in one status control frame. It is especially used for air conditioners.

Decoder

The decoder decodes IR remote control binaries into IR control frame which is composed by time series illustrated above.

The input of decode algorithm is the IR remote control binary file or its content in bytes, the keycode and category id get from indexing API.

The output of the algorithm is the time series, which can be sent to IR emit driver function to send IR control waves to the family equipment.

Please refer to https://irext.net/doc/ for details.

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.