<?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[Connecting M5Stack to an MQ-2 smoke&#x2F;gas sensor]]></title><description><![CDATA[<p dir="auto">I am trying to port my ESP8266 project to M5Stack but for the life of me I could not figure out how to connect the wires between M5Stack and the analog MQ-2 gas sensor.</p>
<p dir="auto">This is my wiring for ESP8266 that perfectly works:</p>
<pre><code> MQ-2 Sensor    -&gt;    ESP8266
     A0         -&gt;      A0
     D0         -&gt;      D0
     VCC        -&gt;      VIN (5.5V)
     GRD        -&gt;      GRD
</code></pre>
<p dir="auto">This is what I have tried in M5Stack but did not work. The sensor's D0 LED and power LED do not even lit on.</p>
<pre><code> MQ-2 Sensor    -&gt;      M5Stack
     A0         -&gt;        Pin 36 (I also have tried 35)
     D0         -&gt;        Pin 21 (I also have tried 16)
     VCC        -&gt;        5V
     GRD        -&gt;        G
</code></pre>
<p dir="auto"><strong>How do I wire the analog MQ-2 sensor To M5Stack? Is it doable? Any guidance please?</strong></p>
]]></description><link>https://community.m5stack.com/topic/153/connecting-m5stack-to-an-mq-2-smoke-gas-sensor</link><generator>RSS for Node</generator><lastBuildDate>Thu, 30 Apr 2026 15:15:49 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/153.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 02 Apr 2018 14:49:16 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Connecting M5Stack to an MQ-2 smoke&#x2F;gas sensor on Wed, 25 Apr 2018 15:10:36 GMT]]></title><description><![CDATA[<p dir="auto">I am been able to read the ADC on pin 35. This corresponds to ADC1_CH7 BUT I cannot get ADC on pin 36 to work. I think this is ADC1-CH0. Anybody has any sample code ? Thanks.</p>
]]></description><link>https://community.m5stack.com/post/894</link><guid isPermaLink="true">https://community.m5stack.com/post/894</guid><dc:creator><![CDATA[DrWino]]></dc:creator><pubDate>Wed, 25 Apr 2018 15:10:36 GMT</pubDate></item><item><title><![CDATA[Reply to Connecting M5Stack to an MQ-2 smoke&#x2F;gas sensor on Wed, 04 Apr 2018 19:43:42 GMT]]></title><description><![CDATA[<p dir="auto">@JimiT Yes, I used Pin 36 and 21.</p>
<p dir="auto">Absolutely, I will post the finish product and pictures in the Projects section.</p>
]]></description><link>https://community.m5stack.com/post/719</link><guid isPermaLink="true">https://community.m5stack.com/post/719</guid><dc:creator><![CDATA[Suntzu]]></dc:creator><pubDate>Wed, 04 Apr 2018 19:43:42 GMT</pubDate></item><item><title><![CDATA[Reply to Connecting M5Stack to an MQ-2 smoke&#x2F;gas sensor on Wed, 04 Apr 2018 00:39:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/suntzu" aria-label="Profile: suntzu">@<bdi>suntzu</bdi></a> Glad to hear it worked !!!!</p>
<p dir="auto">And you used pins 36 and 21 ?</p>
<p dir="auto">Now I will have to order some of these MQ-2 sensors !! Thank you for the tip.</p>
<p dir="auto">If you are open to posting a link to your code or a screenshot when done, that would be interesting to see.</p>
]]></description><link>https://community.m5stack.com/post/706</link><guid isPermaLink="true">https://community.m5stack.com/post/706</guid><dc:creator><![CDATA[JJ]]></dc:creator><pubDate>Wed, 04 Apr 2018 00:39:00 GMT</pubDate></item><item><title><![CDATA[Reply to Connecting M5Stack to an MQ-2 smoke&#x2F;gas sensor on Tue, 03 Apr 2018 23:51:17 GMT]]></title><description><![CDATA[<p dir="auto">@jimit 在 <a href="/post/702">Connecting M5Stack to an MQ-2 smoke/gas sensor</a> 中说：</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/suntzu" aria-label="Profile: suntzu">@<bdi>suntzu</bdi></a> Hi Suntu,</p>
<p dir="auto">Try sourcing the 5V from the positive terminal on the Grove connector.</p>
</blockquote>
<p dir="auto">It worked like a charm! Thank you again. It's time to rewrite my sketches for M5Stack.</p>
]]></description><link>https://community.m5stack.com/post/705</link><guid isPermaLink="true">https://community.m5stack.com/post/705</guid><dc:creator><![CDATA[Suntzu]]></dc:creator><pubDate>Tue, 03 Apr 2018 23:51:17 GMT</pubDate></item><item><title><![CDATA[Reply to Connecting M5Stack to an MQ-2 smoke&#x2F;gas sensor on Tue, 03 Apr 2018 14:17:53 GMT]]></title><description><![CDATA[<p dir="auto">@JimiT I will try that when I get back home from the office. And I will make sure to keep you updated.</p>
<p dir="auto">Thank you so much, Jimi.</p>
]]></description><link>https://community.m5stack.com/post/704</link><guid isPermaLink="true">https://community.m5stack.com/post/704</guid><dc:creator><![CDATA[Suntzu]]></dc:creator><pubDate>Tue, 03 Apr 2018 14:17:53 GMT</pubDate></item><item><title><![CDATA[Reply to Connecting M5Stack to an MQ-2 smoke&#x2F;gas sensor on Tue, 03 Apr 2018 08:34:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/suntzu" aria-label="Profile: suntzu">@<bdi>suntzu</bdi></a> Hi Suntu,</p>
<p dir="auto">Try sourcing the 5V from the positive terminal on the Grove connector.</p>
]]></description><link>https://community.m5stack.com/post/702</link><guid isPermaLink="true">https://community.m5stack.com/post/702</guid><dc:creator><![CDATA[JJ]]></dc:creator><pubDate>Tue, 03 Apr 2018 08:34:02 GMT</pubDate></item></channel></rss>