<?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[so exicted to verify the IR unit is working on AtomLite]]></title><description><![CDATA[<p dir="auto">I think I have spent hours to hours to verify the IR unit, it keeps not working as expected on UIFlow and MicroPython, but tonight I tried Arduino, althrough I can not pronounce it correctly and can not remember the weird name, it shows to me the IR unit can receive single from a fan remote!!!</p>
<p dir="auto">I want to share the working code here</p>
<p dir="auto">Notes: this example code is copied from <a href="https://github.com/m5stack/M5Stack/blob/master/examples/Unit/IR/IR.ino" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>, and it's target to M5Stack instead of M5Atom, so the default RECV PIN is 36, but for the M5Atom, you should use 32 as the default RECV PIN, the default means connecting IR unit via the HY2.0-4P cable.</p>
<pre><code>#include &lt;M5Stack.h&gt;

int ir_recv_pin = 32; 
int ir_send_pin = 26;

int last_recv_value = 0;
int cur_recv_value  = 0;

void setup() {
  M5.begin();
  M5.Power.begin();
  pinMode(ir_recv_pin, INPUT);
  pinMode(ir_send_pin, OUTPUT);
  digitalWrite(ir_send_pin, 1);
}

void loop() {
  cur_recv_value = digitalRead(ir_recv_pin);
  if (last_recv_value != cur_recv_value) {
      if (cur_recv_value == 0) {  // 0: detected 1: not detected
          Serial.println("detected");
      }
      last_recv_value = cur_recv_value;
  }
  Serial.println(cur_recv_value);
}
</code></pre>
]]></description><link>https://community.m5stack.com/topic/5976/so-exicted-to-verify-the-ir-unit-is-working-on-atomlite</link><generator>RSS for Node</generator><lastBuildDate>Thu, 30 Apr 2026 06:20:47 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/5976.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 13 Jan 2024 16:07:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to so exicted to verify the IR unit is working on AtomLite on Tue, 16 Jan 2024 16:12:36 GMT]]></title><description><![CDATA[<p dir="auto">I have almost all of them but in this case the M5Stick CPlus. It says IR is G9.</p>
]]></description><link>https://community.m5stack.com/post/23368</link><guid isPermaLink="true">https://community.m5stack.com/post/23368</guid><dc:creator><![CDATA[konacurrents]]></dc:creator><pubDate>Tue, 16 Jan 2024 16:12:36 GMT</pubDate></item><item><title><![CDATA[Reply to so exicted to verify the IR unit is working on AtomLite on Tue, 16 Jan 2024 14:44:28 GMT]]></title><description><![CDATA[<p dir="auto">what's your M5 device?</p>
]]></description><link>https://community.m5stack.com/post/23367</link><guid isPermaLink="true">https://community.m5stack.com/post/23367</guid><dc:creator><![CDATA[dawncold]]></dc:creator><pubDate>Tue, 16 Jan 2024 14:44:28 GMT</pubDate></item><item><title><![CDATA[Reply to so exicted to verify the IR unit is working on AtomLite on Sat, 13 Jan 2024 18:43:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dawncold" aria-label="Profile: dawncold">@<bdi>dawncold</bdi></a> cool. I'm just trying to get the IR to work as well on the ATOM or M5. Well I only have M5 for now with IR. Do you know how that might work on M5 as there are no pins?</p>
<p dir="auto">You also exposed the issue I'm having is that my code base uses M5Stack.h and all these other libraries, like M5Atom don't work nicely together (different pin numbers for same name, etc). Outside of the complicated M5United, it sure seems the M5 community could do a better way of separating their libraries and not overload M5.  I'm still stuck on the M5Core2 merge with M5Stack.<br />
thanks.</p>
]]></description><link>https://community.m5stack.com/post/23330</link><guid isPermaLink="true">https://community.m5stack.com/post/23330</guid><dc:creator><![CDATA[konacurrents]]></dc:creator><pubDate>Sat, 13 Jan 2024 18:43:39 GMT</pubDate></item></channel></rss>