<?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[Atom Lite, interrupt not working as expected]]></title><description><![CDATA[<p dir="auto">The following code does not work. The LED flickers, no matter what the signal on the used pin is. Tested on two Atoms. Also tested different mode (RISING, FALLING, CHANGE). The code is from Arduino site:</p>
<p dir="auto">#include &lt;M5Atom.h&gt;</p>
<p dir="auto">const byte ledPin = 22;<br />
const byte interruptPin = 19;<br />
volatile byte state = LOW;</p>
<p dir="auto">void IRAM_ATTR blink()<br />
{<br />
state = ~state;<br />
}</p>
<p dir="auto">void setup()<br />
{<br />
pinMode(ledPin, OUTPUT);<br />
pinMode(interruptPin, INPUT_PULLUP);<br />
attachInterrupt(digitalPinToInterrupt(interruptPin), blink, FALLING);<br />
}</p>
<p dir="auto">void loop()<br />
{<br />
digitalWrite(ledPin, state);<br />
}</p>
<p dir="auto">Anyone an idea to solve this?</p>
]]></description><link>https://community.m5stack.com/topic/4100/atom-lite-interrupt-not-working-as-expected</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 18:32:59 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/4100.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 06 Mar 2022 16:37:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Atom Lite, interrupt not working as expected on Wed, 09 Mar 2022 11:14:00 GMT]]></title><description><![CDATA[<p dir="auto">Solved this finally. The Atom Lite does not seem to have a pullup or pulldown resistor. By applying a resistor the problem seems to be solved and it is possible to detect Rising, Falling and Change states.</p>
]]></description><link>https://community.m5stack.com/post/16885</link><guid isPermaLink="true">https://community.m5stack.com/post/16885</guid><dc:creator><![CDATA[Kees]]></dc:creator><pubDate>Wed, 09 Mar 2022 11:14:00 GMT</pubDate></item></channel></rss>