Giter Site home page Giter Site logo

gutierrezps / simple-ac-remote Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 2.0 48 KB

An Arduino-based simple and programmable AC remote control

License: GNU Lesser General Public License v3.0

C++ 100.00%
arduino infrared remote-control air-conditioning

simple-ac-remote's Introduction

Simple AC Remote Control

This is a stripped-down programmable AC remote control made with Arduino Pro Mini. Software is based on Shirriff's IRremote library.

The remote has two buttons and three LEDs. One button turns off the AC unit, and the other sets the cooling level (1, 2 or 3), shown by the LEDs.

Arduino Pins Assignment

  • 2 - IR sensor (VS1838 output)
  • 3 - IR LED (NPN/N-MOSFET transistor driven)
  • 4 - LED 1
  • 5 - LED 2
  • 6 - LED 3
  • 7 - Blink LED (on send and for other info)
  • 10 - Level buton (INPUT_PULLUP)
  • 11 - Off button (INPUT_PULLUP)

How it's done

Instead of decoding specific remote control data, like number of bits, function of each bit, checksum etc, this project aims to reproduce whatever command is presented with a timing decode/encode approach, i.e. raw data is transformed to bits by association with a generic protocol, defined by some timing paratemers.

Once the decode process is done, the data bits are stored on Arduino's EEPROM memory, and then loaded on next system boot.

File structure

IRData.hpp defines a class that holds an IR data packet, consisting of a protocol reference and the decoded data bits.

IRProtocols.hpp defines an IR protocol class with its timings and arbitrary ID number and name; and also defines a storage class for all protocols used in this project.

IRDecoder.hpp and IRSender.hpp defines functions for decoding and encoding of IR data. The decode process compares the raw data provided by IRremote library with the available protocols.

IRRawAnalyzer.hpp holds a function that analyzes the raw IR data, basically counting and printing the occurence of each width found, useful to debug and identify new protocols.

Notes

The following changes were made on IRremote library:

On file IRremoteInt.h:

  • RAWBUF to 300, in order to capture bigger packets.
  • _GAP to 10000, in order to capture shorter headers and repeated data.
  • struct irparams_t, and also on file IRremote.h class decode_results, change rawlen type to uint16_t
  • MARK_EXCESS to 0
  • TOLERANCE to 10

Resources and other projects

Copyright

Copyright 2017 Gutierrez PS

simple-ac-remote's People

Contributors

gutierrezps avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

b-rich roohmadi

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.