<?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[difficulty to generate interrupt signal with G26 on M5StickC Plus]]></title><description><![CDATA[<p dir="auto">I feel embarrassed to ask for such a stupid issue:<br />
I cannot get a simple button attached to G26 (pressed: G26-&gt;GND) generate an interrupt and light up the on board LED. With digitalRead it works. I want to use the interrupt version to read pwm signals eventually.<br />
I am using Arduino-IDE.</p>
<p dir="auto">Here is my code:</p>
<p dir="auto">#include &lt;M5StickCPlus.h&gt;<br />
/* pin that is attached to interrupt */<br />
uint8_t interruptPin = 26;</p>
<p dir="auto">void pressed() {<br />
digitalWrite(10, LOW); // LED on<br />
delay(100);<br />
digitalWrite(10,HIGH); // LED off<br />
}</p>
<p dir="auto">void setup() {<br />
// when pin G26 goes low, call the pressed function<br />
pinMode(interruptPin,INPUT_PULLUP);<br />
attachInterrupt(digitalPinToInterrupt(interruptPin), pressed, LOW);<br />
pinMode(10,OUTPUT);<br />
digitalWrite(10, HIGH); // LED off to start with<br />
}</p>
<p dir="auto">void loop() {<br />
// put your main code here, to run repeatedly:<br />
}</p>
]]></description><link>https://community.m5stack.com/topic/3881/difficulty-to-generate-interrupt-signal-with-g26-on-m5stickc-plus</link><generator>RSS for Node</generator><lastBuildDate>Sun, 08 Mar 2026 02:47:33 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/3881.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 02 Jan 2022 10:18:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to difficulty to generate interrupt signal with G26 on M5StickC Plus on Mon, 03 Jan 2022 05:53:16 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/9103">@Marco-Cantoni</a></p>
<p dir="auto">try <code>FALLING</code> instead of <code>LOW</code> when calling <code>attachInterrupt()</code>.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/16026</link><guid isPermaLink="true">https://community.m5stack.com/post/16026</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Mon, 03 Jan 2022 05:53:16 GMT</pubDate></item></channel></rss>