🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    M5Stick IR

    Arduino
    4
    5
    16.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      cepics
      last edited by

      Hi all,

      is there a sketch to test IR receiver on M5Stick??

      I would like to send ir from a remote like this: alt text

      wich arduino library?

      tnks

      m5-docsM 1 Reply Last reply Reply Quote 0
      • m5-docsM
        m5-docs @cepics
        last edited by

        Hello, @cepics There are some projects on Github.com you can refer to.

        https://github.com/schreibfaul1/ESP32-IR-Remote-Control

        https://github.com/luclala/IRremoteESP32

        M5Stack documentation URL

        https://docs.m5stack.com

        S 1 Reply Last reply Reply Quote 0
        • S
          sergey.maysak @m5-docs
          last edited by sergey.maysak

          @m5-docs thanks for pointing on this. digging the rabbit hole ended at this repo: https://github.com/crankyoldgit/IRremoteESP8266. very cool. very stable and very active to the moment.
          but unfortunately my m5stick(gray version) nor stick_c (orange version with color lcd) does not work with it.
          I used G17 for gray stick and G9 for stick_c as ir_pin - no luck - my mitsubishi AC does not respond to sent requests.
          I wondering if I need change anything in IRremoteESP8266 code to make it run over IR or what is the way to verify IR on stick or stick_c works properly.
          Specifically - the IRSend class in IRremoteESP8266 just uses:
          pinMode(IRpin, OUTPUT); -> to start
          and
          digitalWrite(IRpin, outputOn);/digitalWrite(IRpin, outputOff);
          to ledOn and ledOff

          while FactoryTest.ino for stick does this:
          ledcSetup(1, 38000, 10);
          ledcAttachPin(IrPin, 1);

          So my question is - are these two calls significant or I can ignore it?

          S 1 Reply Last reply Reply Quote 0
          • S
            sergey.maysak @sergey.maysak
            last edited by sergey.maysak

            OK - replying to myself just to provide information for further researchers.
            The repo https://github.com/crankyoldgit/IRremoteESP8266 works just fine (I used theirs IRMQTTServer example). compile it specifying 17 as kDefaultIrLed and that 's it. But - I've found that IR works only if I place it very very close to the subject. ie to control my AC I have to place it say in 20 cm to its IR receiver... that was really unexpected....
            @m5-docs so question is - I use default parameter for IRSend library which assumes usage of 50% duty. can I increase duty to 100% safely (w/o risk to destroy IR Led on my M5Stick or on M5StcikC - I have both) in order to increase distance?

            M 1 Reply Last reply Reply Quote 0
            • M
              macsbug @sergey.maysak
              last edited by

              Below are examples of M5StickC and IR.
              https://qiita.com/poruruba/items/34220a4dd6aaf48392aa
              https://lang-ship.com/blog/?p=886
              https://lab.sasapea.mydns.jp/2019/06/28/m5stickc-ir/
              https://note.com/ssktkr/n/ne9f289509bea

              1 Reply Last reply Reply Quote 0
              • First post
                Last post