<?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[M5stack BASIC v2.6 GPIO16 input problem]]></title><description><![CDATA[<p dir="auto">I want to use GPIO16 on M5stack basic v2.6 as digital input but it doesn't work.<br />
I have tried on the code below but it always return 1.<br />
・It's work well on M5 stack gray (default 0, when input 3.3V it return 1).<br />
・In case I use GPIO17,25,26, it can also work well.<br />
・I have 2 of basic v2.6 but both of them have same issue.</p>
<p dir="auto">This is the code I have tested.</p>
<pre><code>#include "Wire.h"
#include &lt;M5Stack.h&gt;

#define DIN 16
void setup() {
  //start serial connection
  M5.begin();
  M5.Power.begin();
  Wire.begin();
  Serial.begin(9600);
  pinMode(DIN, INPUT_PULLDOWN);
}

void loop() {
  int sensorVal = digitalRead(DIN);
  Serial.println(sensorVal);
}
</code></pre>
<p dir="auto">Do you have any solution or find issue on my code?<br />
Thank you in advance for your help.</p>
]]></description><link>https://community.m5stack.com/topic/4384/m5stack-basic-v2-6-gpio16-input-problem</link><generator>RSS for Node</generator><lastBuildDate>Mon, 11 May 2026 14:20:37 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/4384.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 21 Jun 2022 23:25:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to M5stack BASIC v2.6 GPIO16 input problem on Thu, 23 Jun 2022 03:23:29 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/macsbug" aria-label="Profile: macsbug">@<bdi>macsbug</bdi></a></p>
<p dir="auto">I've noticed that too. However there is insulation (capton tape) on the back of the speaker in my M5Stack base v2.6.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/17793</link><guid isPermaLink="true">https://community.m5stack.com/post/17793</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Thu, 23 Jun 2022 03:23:29 GMT</pubDate></item><item><title><![CDATA[Reply to M5stack BASIC v2.6 GPIO16 input problem on Thu, 23 Jun 2022 02:47:31 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/kazyam53" aria-label="Profile: kazyam53">@<bdi>kazyam53</bdi></a></p>
<p dir="auto">M5Stack Basic V2.6</p>
<p dir="auto">There is a small clearance between the M-BUS and the metal surface on the back of the Speaker, and some are in contact with each other.<br />
There is a risk of short circuit of M-BUS (GND, 23,19,18,3,16,21).</p>
<p dir="auto"><img src="/assets/uploads/files/1655952414538-unknown.jpeg" alt="0_1655952413452_Unknown.jpeg" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/17792</link><guid isPermaLink="true">https://community.m5stack.com/post/17792</guid><dc:creator><![CDATA[macsbug]]></dc:creator><pubDate>Thu, 23 Jun 2022 02:47:31 GMT</pubDate></item><item><title><![CDATA[Reply to M5stack BASIC v2.6 GPIO16 input problem on Wed, 22 Jun 2022 04:42:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/felmue" aria-label="Profile: felmue">@<bdi>felmue</bdi></a><br />
Then I need to change design... thank you so much for answer.</p>
]]></description><link>https://community.m5stack.com/post/17787</link><guid isPermaLink="true">https://community.m5stack.com/post/17787</guid><dc:creator><![CDATA[kazyam53]]></dc:creator><pubDate>Wed, 22 Jun 2022 04:42:33 GMT</pubDate></item><item><title><![CDATA[Reply to M5stack BASIC v2.6 GPIO16 input problem on Wed, 22 Jun 2022 03:52:30 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/kazyam53" aria-label="Profile: kazyam53">@<bdi>kazyam53</bdi></a></p>
<p dir="auto">M5Stack basic v2.6 seems to have some kind of pull-up resistor (about 3.3 k) on GPIO16. Not sure why and not sure why only on GPIO16.</p>
<p dir="auto">That said, you'll need to change your code to <code>pinMode(DIN, INPUT_PULLUP);</code> and then either leave GPIO16 open (reads 1) or connected to GND (read 0).</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/17786</link><guid isPermaLink="true">https://community.m5stack.com/post/17786</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Wed, 22 Jun 2022 03:52:30 GMT</pubDate></item></channel></rss>