<?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[Is the Grove port on the M5Stack Basic Core digital or analog?]]></title><description><![CDATA[<p dir="auto">I'm trying to connect this Seeed Studio button but not having any luck <a href="https://www.seeedstudio.com/Grove-Button.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.seeedstudio.com/Grove-Button.html</a>.</p>
<p dir="auto">Here is the code:</p>
<p dir="auto">#include &lt;M5Stack.h&gt;</p>
<p dir="auto">int last_value = 0;<br />
int cur_value  = 0;</p>
<p dir="auto">void setup() {<br />
M5.begin();        // Init M5Stack.<br />
M5.Power.begin();  // Init power.<br />
pinMode(21, INPUT);  // set pin mode to input.<br />
M5.Lcd.setTextColor(YELLOW);  // Set the font color to yellow.<br />
M5.Lcd.setTextSize(2);  // Setting the Font size.<br />
M5.Lcd.setCursor(80, 0);  // Set the cursor position to (80,0).<br />
M5.Lcd.println("Button example");<br />
M5.Lcd.setTextColor(WHITE);<br />
}</p>
<p dir="auto">void loop() {<br />
cur_value = digitalRead(21);  // read the value of BUTTON.<br />
M5.Lcd.setCursor(80, 25);<br />
M5.Lcd.print("Button");<br />
M5.Lcd.setCursor(0, 45);<br />
M5.Lcd.print("Value: ");<br />
M5.Lcd.setCursor(0, 85);<br />
M5.Lcd.print("State: ");<br />
if (cur_value != last_value) {<br />
M5.Lcd.fillRect(85, 45, 75, 85, BLACK);  // Draw a black rectangle 75 by 85 at (85,45).<br />
if (cur_value == 0) {<br />
M5.Lcd.setCursor(95, 45);<br />
M5.Lcd.print("0");  // display the status<br />
M5.Lcd.setCursor(95, 85);<br />
M5.Lcd.print("pre");<br />
} else {<br />
M5.Lcd.setCursor(95, 45);<br />
M5.Lcd.print("1");  // display the status<br />
M5.Lcd.setCursor(95, 85);<br />
M5.Lcd.print("rel");<br />
}<br />
last_value = cur_value;<br />
}<br />
}</p>
<p dir="auto">Thanks in advance.</p>
]]></description><link>https://community.m5stack.com/topic/4796/is-the-grove-port-on-the-m5stack-basic-core-digital-or-analog</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 11:06:08 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/4796.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 11 Nov 2022 15:12:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Is the Grove port on the M5Stack Basic Core digital or analog? on Fri, 11 Nov 2022 23:35:18 GMT]]></title><description><![CDATA[<p dir="auto">Thanks #teastain that works!</p>
<p dir="auto">I simply changed ADXL345 accel(ADXL345_STD) to ADXL345 accel(ADXL345_ALT) in example code ReadXYZ.ino.</p>
<p dir="auto">Thanks again.</p>
]]></description><link>https://community.m5stack.com/post/19272</link><guid isPermaLink="true">https://community.m5stack.com/post/19272</guid><dc:creator><![CDATA[wwhite]]></dc:creator><pubDate>Fri, 11 Nov 2022 23:35:18 GMT</pubDate></item><item><title><![CDATA[Reply to Is the Grove port on the M5Stack Basic Core digital or analog? on Fri, 11 Nov 2022 21:23:12 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://github.com/Seeed-Studio/Accelerometer_ADXL345" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/Seeed-Studio/Accelerometer_ADXL345</a><br />
This is all you need to get a demo running.<br />
-You will also have to install these libraries:<br />
#include &lt;Wire.h&gt;<br />
#include &lt;ADXL345.h&gt;</p>
]]></description><link>https://community.m5stack.com/post/19271</link><guid isPermaLink="true">https://community.m5stack.com/post/19271</guid><dc:creator><![CDATA[teastain]]></dc:creator><pubDate>Fri, 11 Nov 2022 21:23:12 GMT</pubDate></item><item><title><![CDATA[Reply to Is the Grove port on the M5Stack Basic Core digital or analog? on Fri, 11 Nov 2022 20:21:12 GMT]]></title><description><![CDATA[<p dir="auto">Thanks ajb2k3. I have established that I have an I2C device at address 0x53. The device is a Seeed Studio101020054 Grove - 3-Axis Digital Accelerometer. Now how do I read a value from that address?</p>
<p dir="auto">Thanks again.</p>
]]></description><link>https://community.m5stack.com/post/19270</link><guid isPermaLink="true">https://community.m5stack.com/post/19270</guid><dc:creator><![CDATA[wwhite]]></dc:creator><pubDate>Fri, 11 Nov 2022 20:21:12 GMT</pubDate></item><item><title><![CDATA[Reply to Is the Grove port on the M5Stack Basic Core digital or analog? on Fri, 11 Nov 2022 16:55:45 GMT]]></title><description><![CDATA[<p dir="auto">The Red One?</p>
<p dir="auto">Its I2C/ digital</p>
]]></description><link>https://community.m5stack.com/post/19266</link><guid isPermaLink="true">https://community.m5stack.com/post/19266</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Fri, 11 Nov 2022 16:55:45 GMT</pubDate></item></channel></rss>