GithubHelp home page GithubHelp logo

iot-rmt's Introduction

IoT-RMT

项目初心

远程控制家中老式空调,当然市场上有很多产品,但都不提供对外接口,无法自定义,也无法加入各厂家的智能家居平台。短期内看不到统一的可能性,长期来看也不太可能。

所需软硬件

红外接收,红外发射模块 IR Receiver & Transmitter

逻辑分析仪 + PulseView - 用于分析遥控器信号规则和后期调试。 Logic Analyzer PulseView

ESP32c3 - 使用ESP IDF框架开发 ESP32c3

原理

使用红外接收模块接收遥控器红外信号,送入逻辑分析仪中,解析出遥控器红外编码规则。 红外接收模块空闲时输出高电平,接收到红外信号后输出低电平。 以NEC红外协议为例,一定时间的低电平+一定时间高电平表示为1bit数据。 好难表达,以后再说吧,都能搜索到。

获取规则后,通过ESP32 IDF RMT库调制38KHz载波,使用RMT编码器将数据信号编码为RMT Symbol。 RMT的编码器有两种: rmt_new_copy_encoder() 用来编码1bit数据,就是手填RMT Symbol里面的数据,它原封不动的复制过去。 rmt_new_bytes_encoder() 编码1Byte数据(8bit),根据rmt_bytes_encoder_config_t里面的设定将1字节数据编码为8个RMT Symbol。

搞定编码器后,就能直接发射红外信号了。

然后加入Wifi,使用SmartConfig进行配网,配置信息存储到nvs里面,通过MQTT协议与外部通信。IO 6接地后,按reset键重启后清楚配网信息。

iot-rmt's People

Contributors

wangconglin87 avatar

Watchers

 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.