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

    IR LED seems to be always on, even freshly after a reboot

    Scheduled Pinned Locked Moved General
    2 Posts 2 Posters 3.6k Views
    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.
    • F Offline
      frank26080115
      last edited by

      I am using UIFlow v1.9.7

      This is weird. Point your phone's camera at the IR LED of a M5Stick or M5Stack that has the IR LED. Even just after a reboot, it seems to be glowing.

      I cannot use the built-in "ir" object because it implements NEC protocol, which is not what I need. I need to generate a 40KHz pulse train for SIRC protocol

      Taking manual control over the LED by deinitializing the RMT, I can turn off the pin using machine.Pin

      But after reinitializing RMT module, the LED starts to glow again.

      I am trying code that looks like

      >>> rmt.loop(True)
      >>> rmt.write_pulses([1, 100000], start=0) # this should make the LED dim
      

      and

      >>> rmt.loop(True)
      >>> rmt.write_pulses([1, 100000], start=1) # this should make the LED bright
      

      The weird thing is that one of these should make the LED appear off, or at least dim. The opposite snippet should make the LED appear very bright. This is not the case. I see no change in brightness

      What am I doing wrong?

      Has anybody successfully used the IR LED for anything? The MicroPython version implemented in UIFlow is extremely old and won't match the latest documentation, the best documentation is actually this particular commit in the official ESP32 port of MicroPython https://github.com/micropython/micropython/blob/1678f417445703750e187b1b8a83c8c3e0e3796f/ports/esp32/esp32_rmt.c

      oh and in case anybody needs to know, to deinitialize the RMT because you can't use the settings M5Stack is forcing upon you, I'm using this

              try:
                  ir.__dict__['_tx_encode']._rmt.deinit()
                  del ir.__dict__['_tx_encode']._rmt
                  del ir
              except:
                  pass
      
      1 Reply Last reply Reply Quote 0
      • felmueF Offline
        felmue
        last edited by

        Hello @frank26080115

        this seems to be an issue from UIFlow firmware 1.9.x and later. UIFlow 1.7.5 doesn't light up the IR LED just after reboot. It's probably the same issue as reported here.

        Also digital write pin 9 to 1 turns the IR LED off. It seems that it might be inverted?

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post