Giter VIP home page Giter VIP logo

esp32_rmt_midea_ir_tx's Introduction

ESP32 RMT peripheral IR remote control library for Midea Air conditioner.

Arduino friendly library utilizing ESP32 RMT peripheral.

Schema

schema

Usage

Copy the files to your documents\Arduino\libraries\esp32_arduino_rmt_midea_ir_tx folder

Example

#include <Arduino.h>
#include <midea_ir.h>

const uint8_t MIDEA_RMT_CHANNEL = 0;
const uint8_t MIDEA_TX_PIN = 4;

MideaIR ir;

void setup()
{
    // init library
    midea_ir_init(&ir, MIDEA_RMT_CHANNEL, MIDEA_TX_PIN);

    // set mode, temperature and fan level and internal state to enabled
    ir.enabled = true;
    ir.mode = MODE_COOL;
    ir.fan_level = 3;
    ir.temperature = 23;

    // send the IR signal with the previously set properties which will switch the A/C on
    midea_ir_send(&ir);

    delay(5000);

    // starts moving the deflector
    midea_ir_move_deflector();

    delay(5000);

    // set state to disabled
    ir.enabled = false;

    // send the IR signal which will turn the A/C off
    midea_ir_send(&ir);
}

void loop()
{
    delay(1000);
}

Thanks

A big thanks goes to @sheinz His library was used as a base as it was very easy to replace the signal sending part of it with my implementation.

Without the following pages this software couldn't exist. They contain very useful information on how the protocol works.

esp32_rmt_midea_ir_tx's People

Contributors

morcibacsi 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.