<?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[[Solved]M5stack core not recognizing Button Unit correctly]]></title><description><![CDATA[<p dir="auto">I was using the button unit (Port B) and it doesn't do anything. A press of the "A BUTTON" is recognized instead of the button unit.<br />
I tried the same code in my m5stack gray and worked. Both are at v1.2.2</p>
<p dir="auto">from m5stack import *<br />
from m5ui import *<br />
import units</p>
<p dir="auto">clear_bg(0x222222)<br />
btn0 = units.get(units.button,units.PORTB)<br />
a = 1</p>
<p dir="auto">title1 = M5Title(title="Title", fgcolor=0xFFFFFF, bgcolor=0x0000FF)</p>
<p dir="auto">def btn0_pressed():<br />
global a<br />
a = a +1<br />
title1 = M5Title(title=str(a), fgcolor=0xFFFFFF, bgcolor=0x0000FF)<br />
pass</p>
<p dir="auto">while True:<br />
btn0.wasPressed(callback=btn0_pressed)</p>
]]></description><link>https://community.m5stack.com/topic/923/solved-m5stack-core-not-recognizing-button-unit-correctly</link><generator>RSS for Node</generator><lastBuildDate>Tue, 28 Apr 2026 23:06:28 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/923.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 20 Apr 2019 20:27:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [Solved]M5stack core not recognizing Button Unit correctly on Tue, 23 Apr 2019 01:23:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lastcaress" aria-label="Profile: LastCaress">@<bdi>LastCaress</bdi></a> Maybe it has been updated. UIFlow is updated everyday.</p>
]]></description><link>https://community.m5stack.com/post/3929</link><guid isPermaLink="true">https://community.m5stack.com/post/3929</guid><dc:creator><![CDATA[m5-docs]]></dc:creator><pubDate>Tue, 23 Apr 2019 01:23:48 GMT</pubDate></item><item><title><![CDATA[Reply to [Solved]M5stack core not recognizing Button Unit correctly on Mon, 22 Apr 2019 13:40:41 GMT]]></title><description><![CDATA[<p dir="auto">Simple test, 4 units, two grey, two black, using the same portB and button add on:</p>
<p dir="auto"><img src="https://i.imgur.com/AFpsfII.jpg" alt="alt text" class=" img-fluid img-markdown" /></p>
<p dir="auto">and it is working now. Did you update the flow?</p>
]]></description><link>https://community.m5stack.com/post/3916</link><guid isPermaLink="true">https://community.m5stack.com/post/3916</guid><dc:creator><![CDATA[LastCaress]]></dc:creator><pubDate>Mon, 22 Apr 2019 13:40:41 GMT</pubDate></item><item><title><![CDATA[Reply to [Solved]M5stack core not recognizing Button Unit correctly on Mon, 22 Apr 2019 09:31:23 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/lastcaress" aria-label="Profile: LastCaress">@<bdi>LastCaress</bdi></a></p>
<p dir="auto">The hardware file if BLACK is same as GRAY expect that GRAY OWNS  mpu9250.<br />
So if the BUTTON Unit works weith GRAY, it wil also work with BLACK.<br />
You can check the G36 on BLACK by reading the level of G36 after G36 attached to 3.3V pin.</p>
<p dir="auto"><img src="/assets/uploads/files/1555925458537-%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20190419163740-resized.jpg" alt="0_1555925445994_微信图片_20190419163740.jpg" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/3905</link><guid isPermaLink="true">https://community.m5stack.com/post/3905</guid><dc:creator><![CDATA[m5-docs]]></dc:creator><pubDate>Mon, 22 Apr 2019 09:31:23 GMT</pubDate></item><item><title><![CDATA[Reply to [Solved]M5stack core not recognizing Button Unit correctly on Sat, 20 Apr 2019 22:25:13 GMT]]></title><description><![CDATA[<p dir="auto">Reading pin 36 on the black cores is not possible right now. Please fix, thank you.</p>
]]></description><link>https://community.m5stack.com/post/3895</link><guid isPermaLink="true">https://community.m5stack.com/post/3895</guid><dc:creator><![CDATA[LastCaress]]></dc:creator><pubDate>Sat, 20 Apr 2019 22:25:13 GMT</pubDate></item><item><title><![CDATA[Reply to [Solved]M5stack core not recognizing Button Unit correctly on Sat, 20 Apr 2019 21:22:23 GMT]]></title><description><![CDATA[<p dir="auto">When coding in grey : Wait for press of UNIT button, works, no problem<br />
When coding in black : Wait for press of UNIT button, doesn't work. If press button A, it thinks it was a press by UNIT button</p>
]]></description><link>https://community.m5stack.com/post/3894</link><guid isPermaLink="true">https://community.m5stack.com/post/3894</guid><dc:creator><![CDATA[LastCaress]]></dc:creator><pubDate>Sat, 20 Apr 2019 21:22:23 GMT</pubDate></item><item><title><![CDATA[Reply to [Solved]M5stack core not recognizing Button Unit correctly on Sat, 20 Apr 2019 21:19:57 GMT]]></title><description><![CDATA[<p dir="auto">Black works with port B:<br />
<img src="https://i.imgur.com/4ibTonh.jpg" alt="alt text" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/3893</link><guid isPermaLink="true">https://community.m5stack.com/post/3893</guid><dc:creator><![CDATA[LastCaress]]></dc:creator><pubDate>Sat, 20 Apr 2019 21:19:57 GMT</pubDate></item><item><title><![CDATA[Reply to [Solved]M5stack core not recognizing Button Unit correctly on Sat, 20 Apr 2019 21:17:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lastcaress" aria-label="Profile: LastCaress">@<bdi>LastCaress</bdi></a> Buttons A, B and, C use the event button loop and obtain button (Yellow blocks)</p>
<p dir="auto">Button units use a lightgreen block.(just using blocky for example)</p>
]]></description><link>https://community.m5stack.com/post/3892</link><guid isPermaLink="true">https://community.m5stack.com/post/3892</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sat, 20 Apr 2019 21:17:27 GMT</pubDate></item><item><title><![CDATA[Reply to [Solved]M5stack core not recognizing Button Unit correctly on Sat, 20 Apr 2019 21:10:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lastcaress" aria-label="Profile: lastcaress">@<bdi>lastcaress</bdi></a> The Button unit is not the same as button A, B and, C</p>
<p dir="auto">You have the go base?<br />
Then yes it works on Port B however Units seem to be unselectable at the moment.</p>
]]></description><link>https://community.m5stack.com/post/3891</link><guid isPermaLink="true">https://community.m5stack.com/post/3891</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sat, 20 Apr 2019 21:10:41 GMT</pubDate></item><item><title><![CDATA[Reply to [Solved]M5stack core not recognizing Button Unit correctly on Sat, 20 Apr 2019 21:06:14 GMT]]></title><description><![CDATA[<p dir="auto">But it still recognizes the ButtonA as a unit press :| Also, can't I use the bottom with the Port B &amp; C ?</p>
]]></description><link>https://community.m5stack.com/post/3890</link><guid isPermaLink="true">https://community.m5stack.com/post/3890</guid><dc:creator><![CDATA[LastCaress]]></dc:creator><pubDate>Sat, 20 Apr 2019 21:06:14 GMT</pubDate></item><item><title><![CDATA[Reply to [Solved]M5stack core not recognizing Button Unit correctly on Sat, 20 Apr 2019 21:04:05 GMT]]></title><description><![CDATA[<p dir="auto">The black doesn't have a port B which is the issue, on the black you need to use the A0 pin on the base.<br />
The black only has the red port which doesn't work.</p>
]]></description><link>https://community.m5stack.com/post/3889</link><guid isPermaLink="true">https://community.m5stack.com/post/3889</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sat, 20 Apr 2019 21:04:05 GMT</pubDate></item><item><title><![CDATA[Reply to [Solved]M5stack core not recognizing Button Unit correctly on Sat, 20 Apr 2019 20:47:19 GMT]]></title><description><![CDATA[<p dir="auto">Ok, this is a problem with the m5stack core (black). I tried in two different ones, and they had the same problem. Then I tried in two greys and they did not have the problem. Please fix this.</p>
]]></description><link>https://community.m5stack.com/post/3888</link><guid isPermaLink="true">https://community.m5stack.com/post/3888</guid><dc:creator><![CDATA[LastCaress]]></dc:creator><pubDate>Sat, 20 Apr 2019 20:47:19 GMT</pubDate></item></channel></rss>