logo elektroda
logo elektroda
X
logo elektroda

Using an IR remote control receiver as an interrupter in a light with WS2812 LEDs on ESP32 and Ardui

Juni[]r 468 3
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 19941009
    Juni[]r
    Level 16  
    I have a question how can I use the receiver for the IR remote control as an interrupt ? I mean exactly that I built a lamp for the children's room. And during the animation on the WS2812 LEDs (16x16), the remote control is obviously not working because the controller is busy with another part of the program. Or is there any other way to make the remote control "active" all the time during program execution ? I tried to set the interrupt as IR leg in the setup but it doesn't work at all. I hope there is some way. Or maybe I run one core only as IR support ?

    I am using ESP32 and Arduino.
    Do you have a problem with Arduino? Ask question. Visit our forum Arduino.
  • ADVERTISEMENT
  • #2 19941810
    JacekCz
    Level 42  
    You have said more than you have said.
    You can guess the code you have with delay()

    Code?
  • ADVERTISEMENT
  • #3 19942650
    khoam
    Level 42  
    Juni[] r wrote:
    Or is there another way to make the remote control "active" all the time during program execution ?
    .
    Yes, execute the handler in a separate thread since you are using ESP32.

    Juni[] r wrote:
    Or maybe I run one core only as an IR handler ?
    .
    You can, but this also needs to be a separate thread.
  • #4 19944348
    Juni[]r
    Level 16  
    JacekCz is about whether it is possible - as for the code, I will write it quickly

    Code: C / C++
    Log in, to see the code


    There in the loop there are many animations depending on the variable "check" but I did not paste because it would clutter the screen
ADVERTISEMENT