<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[IR LED seems to be always on, even freshly after a reboot]]></title><description><![CDATA[<p dir="auto">I am using UIFlow v1.9.7</p>
<p dir="auto">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.</p>
<p dir="auto">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</p>
<p dir="auto">Taking manual control over the LED by deinitializing the RMT, I can turn off the pin using machine.Pin</p>
<p dir="auto">But after reinitializing RMT module, the LED starts to glow again.</p>
<p dir="auto">I am trying code that looks like</p>
<pre><code>&gt;&gt;&gt; rmt.loop(True)
&gt;&gt;&gt; rmt.write_pulses([1, 100000], start=0) # this should make the LED dim
</code></pre>
<p dir="auto">and</p>
<pre><code>&gt;&gt;&gt; rmt.loop(True)
&gt;&gt;&gt; rmt.write_pulses([1, 100000], start=1) # this should make the LED bright
</code></pre>
<p dir="auto">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</p>
<p dir="auto">What am I doing wrong?</p>
<p dir="auto">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 <a href="https://github.com/micropython/micropython/blob/1678f417445703750e187b1b8a83c8c3e0e3796f/ports/esp32/esp32_rmt.c" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/micropython/micropython/blob/1678f417445703750e187b1b8a83c8c3e0e3796f/ports/esp32/esp32_rmt.c</a></p>
<p dir="auto">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</p>
<pre><code>        try:
            ir.__dict__['_tx_encode']._rmt.deinit()
            del ir.__dict__['_tx_encode']._rmt
            del ir
        except:
            pass
</code></pre>
]]></description><link>https://community.m5stack.com/topic/4353/ir-led-seems-to-be-always-on-even-freshly-after-a-reboot</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 04:47:22 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/4353.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 08 Jun 2022 20:03:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to IR LED seems to be always on, even freshly after a reboot on Thu, 09 Jun 2022 13:26:27 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/frank26080115" aria-label="Profile: frank26080115">@<bdi>frank26080115</bdi></a></p>
<p dir="auto">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 <a href="https://github.com/m5stack/M5StickC-Plus/issues/32" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>.</p>
<p dir="auto">Also <code>digital write pin 9</code> to <code>1</code> turns the IR LED off. It seems that it might be inverted?</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/17685</link><guid isPermaLink="true">https://community.m5stack.com/post/17685</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Thu, 09 Jun 2022 13:26:27 GMT</pubDate></item></channel></rss>