Giter VIP home page Giter VIP logo

Comments (8)

cyborg5 avatar cyborg5 commented on September 15, 2024

The length is indeed probably your problem. Air conditioning protocols are notoriously very long. Look in IRLib2/IRLibGlobals.h line number 27

#define RECV_BUF_LENGTH 100

from irlib2.

karanmakharia avatar karanmakharia commented on September 15, 2024

@cyborg5 It worked! But now the issue is each and every button has a different raw code of around 198 values. So is there a way to store those values? For all my Air conditioners the protocol is zero, so can I somehow make a protocol+hex combo to send data easily.
There is one more issue in this: Each temperature value has a different hex code. So how to implement temperature low or high button - no matter what the temperature is.

from irlib2.

cyborg5 avatar cyborg5 commented on September 15, 2024

There is a section of the users manual that gives tips on how to create your own protocol but it requires pretty good knowledge of how IR protocols work and some pretty significant programming skills.

from irlib2.

cameleon77 avatar cameleon77 commented on September 15, 2024

@cyborg5 great library! I'm trying to analyze digital signal (not IR) and it works perfectly but only below 256 values, when I change RECV_BUF_LENGTH to e.g. 1000 it does not detect any signal any more (Arduino MEGA). Any other change is needed to go beyond 255? My code is based on rawRecv.ino example. Thanks

from irlib2.

cyborg5 avatar cyborg5 commented on September 15, 2024

@cameleon77 I'm not able to re-create your issue. I've tried increasing the buffer length to 1000 on an Arduino Mega and had no problems. I also took the opportunity to double check the code to make sure that it is always indexed by a variable of type bufIndex_t which is fit to a values if the rings is 255 or less and 16 bit values if it is more. I don't have a source of signal that is more than 255 bytes long so I tried arbitrarily shortening the buffer length to just 50 so that it would overflow. The code worked okay. Of course it doesn't recognize the protocols because the end of the signal was truncated but it did detect a signal. I suppose there's a slim possibility that when the buffer overflows it may be overwriting a bite of data. My limit test could conceivably be off by one value. Perhaps there somewhere in the code I should have checked for greater than or equal to RECV_BUF_LENGTH-1. But I don't think so. Is your signal overflowing the buffer? Your description says that it somehow disables everything by increasing the buffer size and I just can't re-create that behavior.

from irlib2.

projectkk2glider avatar projectkk2glider commented on September 15, 2024

@cameleon77 I had the same issue when setting RECV_BUF_LENGTH bigger than 256 and I already found where the problem lies. I will post a PR soon to fix this.

from irlib2.

cameleon77 avatar cameleon77 commented on September 15, 2024

Good catch, thanks for the prompt response :). Due to timing issues I had to move to ESP8266 and used some other library dedicated there. With ESP8266 got very stable readings so I now can log all OJ Electronics temperature sensors at home directly from the bus. I'll test the fix on my Arduino MEGA module once I have some time. Again, great job!

from irlib2.

cameleon77 avatar cameleon77 commented on September 15, 2024

OK, I did the test straight away and the fix works for me, kudos to @projectkk2glider !

from irlib2.

Related Issues (20)

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.