<?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[How to get grove pin input?]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">I am using m5stack basic and I have connected a GSR sensor to it with the grove connector. What I cannot seem to figure out is how to get the reading from the sensor. I tried analogRead(20), analogRead(21), analogRead(22) and many others that I found in suggestions on other threads in this forum. No luck however...</p>
<p dir="auto">This is my code:</p>
<pre><code>#include "M5Stack.h"

#define INPUT_PIN 21
#define READ_RATE 400  // How often the serial link is read, in milliseconds
// The setup() function runs once each time the micro-controller starts
void setup()
{
   // init lcd, serial, not init sd card
   M5.begin(true, false, true);
   pinMode(INPUT_PIN, INPUT);
   M5.Lcd.setTextSize(5);
}

// Add the main program code into the continuous loop() function
void loop()
{
   int reading = analogRead(INPUT_PIN);
   M5.Lcd.println(reading);
   Serial.println(reading);

   M5.update();
   delay(READ_RATE);
}
</code></pre>
<p dir="auto">I apologize for the noob question. I'm new to this. Thank you in advance for even taking the time to read this thread.</p>
]]></description><link>https://community.m5stack.com/topic/678/how-to-get-grove-pin-input</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 12:17:39 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/678.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 15 Feb 2019 23:53:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to get grove pin input? on Fri, 22 Feb 2019 05:51:29 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for the photos and nice work there.<br />
Glad its all working for you now.</p>
]]></description><link>https://community.m5stack.com/post/3124</link><guid isPermaLink="true">https://community.m5stack.com/post/3124</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Fri, 22 Feb 2019 05:51:29 GMT</pubDate></item><item><title><![CDATA[Reply to How to get grove pin input? on Thu, 21 Feb 2019 21:02:55 GMT]]></title><description><![CDATA[<p dir="auto">And the seeedino is pretty straight forward. Here I have also a bluetooth module, since the seeeduino values are accurate, so I am using it as part of my prototype. The GSR sensor has a groove connector that plugs straight in the seeeduino port.</p>
<p dir="auto"><img src="/assets/uploads/files/1550782965523-20190221_175604-resized.jpg" alt="0_1550782964075_20190221_175604.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto"><img src="/assets/uploads/files/1550782969899-20190221_175453-resized.jpg" alt="0_1550782968750_20190221_175453.jpg" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/3120</link><guid isPermaLink="true">https://community.m5stack.com/post/3120</guid><dc:creator><![CDATA[rmarinchev]]></dc:creator><pubDate>Thu, 21 Feb 2019 21:02:55 GMT</pubDate></item><item><title><![CDATA[Reply to How to get grove pin input? on Thu, 21 Feb 2019 21:01:32 GMT]]></title><description><![CDATA[<p dir="auto">The setup with the m5stack and the esp32 is as you said, just connect to 35 or 36 and read the analog input.</p>
<p dir="auto"><img src="/assets/uploads/files/1550782876886-20190221_180129-resized.jpg" alt="0_1550782876454_20190221_180129.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto"><img src="/assets/uploads/files/1550782887016-20190221_180209-resized.jpg" alt="0_1550782885866_20190221_180209.jpg" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/3119</link><guid isPermaLink="true">https://community.m5stack.com/post/3119</guid><dc:creator><![CDATA[rmarinchev]]></dc:creator><pubDate>Thu, 21 Feb 2019 21:01:32 GMT</pubDate></item><item><title><![CDATA[Reply to How to get grove pin input? on Mon, 18 Feb 2019 18:45:18 GMT]]></title><description><![CDATA[<p dir="auto">Can you post photos of your setup please?<br />
I curious to how its connected.</p>
]]></description><link>https://community.m5stack.com/post/3066</link><guid isPermaLink="true">https://community.m5stack.com/post/3066</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Mon, 18 Feb 2019 18:45:18 GMT</pubDate></item><item><title><![CDATA[Reply to How to get grove pin input? on Mon, 18 Feb 2019 18:41:33 GMT]]></title><description><![CDATA[<p dir="auto">Yes, I tried this a few weeks ago with another esp32 board. I tried it also with arduino uno and seeeduino v4.2 boards. They work fine, however the esp32 was also giving wrong readings. To be honest, I bought the m5stack because I saw it had groove port, but I am new to this and I didn't know it can only get digital readings. I tried dividing by 4 since the esp32 gets a reading of 0-4092 and the other boards give a value of 0-1023. However the esp32 is still wrong. I also tried changing the</p>
<pre><code>    analogReadResolution(10)
    analogSetWidth(10)
</code></pre>
<p dir="auto">But still the esp32 was giving false readings and I couldn't calibrate it as shown in the tutorials for gsr sensor (by turning the resistance until I get a reading of 512 without using the sensor)</p>
]]></description><link>https://community.m5stack.com/post/3065</link><guid isPermaLink="true">https://community.m5stack.com/post/3065</guid><dc:creator><![CDATA[rmarinchev]]></dc:creator><pubDate>Mon, 18 Feb 2019 18:41:33 GMT</pubDate></item><item><title><![CDATA[Reply to How to get grove pin input? on Mon, 18 Feb 2019 07:02:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/1164">@rmarinchev</a> said in <a href="/post/3053">How to get grove pin input?</a>:</p>
<blockquote>
<p dir="auto">Thank you, that worked. However the sensor values are completely through the rought and I cannot modify it with the resistor as described in the GSR documentation. I think its because of the digital to analog convertion or its just an incompatibility. Anyway, this is outside the scope of this forum. Thank you for your help.</p>
</blockquote>
<p dir="auto">based on the code on the seedstudio site, this UIFlow code may work.<br />
<img src="https://i.pinimg.com/originals/34/66/38/346638f4812755613823afbf3a8904a7.jpg" alt="alt text" class=" img-fluid img-markdown" /></p>
<p dir="auto">but this is guesswork as I dont have the sensor.</p>
]]></description><link>https://community.m5stack.com/post/3056</link><guid isPermaLink="true">https://community.m5stack.com/post/3056</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Mon, 18 Feb 2019 07:02:26 GMT</pubDate></item><item><title><![CDATA[Reply to How to get grove pin input? on Mon, 18 Feb 2019 06:12:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/1164">@rmarinchev</a> said in <a href="/post/3053">How to get grove pin input?</a>:</p>
<blockquote>
<p dir="auto">Thank you, that worked. However the sensor values are completely through the rought and I cannot modify it with the resistor as described in the GSR documentation. I think its because of the digital to analog convertion or its just an incompatibility. Anyway, this is outside the scope of this forum. Thank you for your help.</p>
</blockquote>
<p dir="auto">Have you read this?<br />
<a href="https://community.seeedstudio.com/Arduino+and+Galvanic+Skin+Response+%28GSR%29+Sensor-p-306.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://community.seeedstudio.com/Arduino+and+Galvanic+Skin+Response+(GSR)+Sensor-p-306.html</a></p>
]]></description><link>https://community.m5stack.com/post/3055</link><guid isPermaLink="true">https://community.m5stack.com/post/3055</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Mon, 18 Feb 2019 06:12:56 GMT</pubDate></item><item><title><![CDATA[Reply to How to get grove pin input? on Mon, 18 Feb 2019 06:05:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/1164">@rmarinchev</a> Glad I could help.<br />
If you fix the issue, please come back here and let us know!</p>
]]></description><link>https://community.m5stack.com/post/3054</link><guid isPermaLink="true">https://community.m5stack.com/post/3054</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Mon, 18 Feb 2019 06:05:44 GMT</pubDate></item><item><title><![CDATA[Reply to How to get grove pin input? on Mon, 18 Feb 2019 06:03:40 GMT]]></title><description><![CDATA[<p dir="auto">Thank you, that worked. However the sensor values are completely through the rought and I cannot modify it with the resistor as described in the GSR documentation. I think its because of the digital to analog convertion or its just an incompatibility. Anyway, this is outside the scope of this forum. Thank you for your help.</p>
]]></description><link>https://community.m5stack.com/post/3053</link><guid isPermaLink="true">https://community.m5stack.com/post/3053</guid><dc:creator><![CDATA[rmarinchev]]></dc:creator><pubDate>Mon, 18 Feb 2019 06:03:40 GMT</pubDate></item><item><title><![CDATA[Reply to How to get grove pin input? on Sat, 16 Feb 2019 17:28:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/1164">@rmarinchev</a> Thanks, it was hard to help without know what sensor you were using.<br />
connect the yellow wire (pin1) to pins 35 or 36 (AD) on the base of the core.</p>
]]></description><link>https://community.m5stack.com/post/3039</link><guid isPermaLink="true">https://community.m5stack.com/post/3039</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sat, 16 Feb 2019 17:28:08 GMT</pubDate></item><item><title><![CDATA[Reply to How to get grove pin input? on Sat, 16 Feb 2019 16:24:55 GMT]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">Thank you for your reply. The GSR sensor is "Grove GSR Seeeduino Sensor" and in the documentation it says the output is analog. I will try connecting it to the analog pins.</p>
]]></description><link>https://community.m5stack.com/post/3038</link><guid isPermaLink="true">https://community.m5stack.com/post/3038</guid><dc:creator><![CDATA[rmarinchev]]></dc:creator><pubDate>Sat, 16 Feb 2019 16:24:55 GMT</pubDate></item><item><title><![CDATA[Reply to How to get grove pin input? on Sat, 16 Feb 2019 07:25:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/1164">@rmarinchev</a> said in <a href="/post/3036">How to get grove pin input?</a>:</p>
<blockquote>
<p dir="auto">Hello,</p>
<p dir="auto">I am using m5stack basic and I have connected a GSR sensor to it with the grove connector. What I cannot seem to figure out is how to get the reading from the sensor. I tried analogRead(20), analogRead(21), analogRead(22) and many others that I found in suggestions on other threads in this forum. No luck however...</p>
<p dir="auto">This is my code:</p>
<pre><code>#include "M5Stack.h"

#define INPUT_PIN 21
#define READ_RATE 400  // How often the serial link is read, in milliseconds
// The setup() function runs once each time the micro-controller starts
void setup()
{
   // init lcd, serial, not init sd card
   M5.begin(true, false, true);
   pinMode(INPUT_PIN, INPUT);
   M5.Lcd.setTextSize(5);
}

// Add the main program code into the continuous loop() function
void loop()
{
   int reading = analogRead(INPUT_PIN);
   M5.Lcd.println(reading);
   Serial.println(reading);

   M5.update();
   delay(READ_RATE);
}
</code></pre>
<p dir="auto">I apologize for the noob question. I'm new to this. Thank you in advance for even taking the time to read this thread.</p>
</blockquote>
<p dir="auto">What is the GSR sensor?<br />
The Grove port on the M5Stack Core is only a digital (i2c) port and doesn't work with analogue input. To use analogue sensors you need to use the analog pins on the baseplate.</p>
<p dir="auto">Its still "Work In Progress" but this may help you.<br />
<a href="https://github.com/Ajb2k3/UIFlowHandbook/blob/master/UIFlowhandbook.pdf" target="_blank" rel="noopener noreferrer nofollow ugc">UIFlow Handbook</a></p>
]]></description><link>https://community.m5stack.com/post/3037</link><guid isPermaLink="true">https://community.m5stack.com/post/3037</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sat, 16 Feb 2019 07:25:33 GMT</pubDate></item></channel></rss>