<?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[M5 CORE INK]]></title><description><![CDATA[<p dir="auto">Hello Everyone,</p>
<p dir="auto">Hope my question is in the right section, if not please let me know, thanks!</p>
<p dir="auto">I got a M5 CORE INK and i want connect it with an encoder (360PPR). The goal is to be able to read the value of an angle (in degree)<br />
Here an example of what i want to do: <a href="https://www.youtube.com/watch?v=jN9B3y1iPeA&amp;ab_channel=JpbBricole-" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.youtube.com/watch?v=jN9B3y1iPeA&amp;ab_channel=JpbBricole-</a><br />
I'm a real beginer in code, i use Arduino IDE.</p>
<p dir="auto"><strong>My problem is about how to put the value of the angle on the Core Ink screen's</strong></p>
<p dir="auto">Currently, my code work with a visualization on the serial monitorbut i don't know how to push it on the Core Ink screen's</p>
<p dir="auto">Here my code:<br />
'''</p>
<p dir="auto">/* Encoder Library - Basic Example</p>
<ul>
<li><a href="http://www.pjrc.com/teensy/td_libs_Encoder.html" target="_blank" rel="noopener noreferrer nofollow ugc">http://www.pjrc.com/teensy/td_libs_Encoder.html</a></li>
<li></li>
<li>This example code is in the public domain.<br />
*/</li>
</ul>
<p dir="auto">#include &lt;Encoder.h&gt;</p>
<p dir="auto">// Change these two numbers to the pins connected to your encoder.<br />
//   Best Performance: both pins have interrupt capability<br />
//   Good Performance: only the first pin has interrupt capability<br />
//   Low Performance:  neither pin has interrupt capability<br />
Encoder myEnc(25, 26);<br />
//   avoid using pins with LEDs attached<br />
int newPosition;<br />
float angle;</p>
<p dir="auto">void setup() {<br />
Serial.begin(9600);<br />
Serial.println("Basic Encoder Test:");</p>
<p dir="auto">}<br />
long oldPosition  = -999;</p>
<p dir="auto">void loop() {<br />
long newPosition = myEnc.read();<br />
if (newPosition != oldPosition) {<br />
oldPosition = newPosition;<br />
angle = newPosition * 0.005;<br />
Serial.println(angle);<br />
}</p>
<p dir="auto">}<br />
'''<br />
I want also put a reset function.</p>
<p dir="auto">Thanks</p>
<p dir="auto">BM22</p>
]]></description><link>https://community.m5stack.com/topic/4211/m5-core-ink</link><generator>RSS for Node</generator><lastBuildDate>Fri, 15 May 2026 13:27:03 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/4211.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 16 Apr 2022 09:37:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to M5 CORE INK on Sat, 16 Apr 2022 15:21:21 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/bm22" aria-label="Profile: BM22">@<bdi>BM22</bdi></a></p>
<p dir="auto">have a look at this <a href="https://github.com/m5stack/M5-CoreInk/blob/master/examples/HelloWorld/HelloWorld.ino" target="_blank" rel="noopener noreferrer nofollow ugc">example</a>. It shows how to put 'Hello World!' onto the M5CoreInk screen.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/17196</link><guid isPermaLink="true">https://community.m5stack.com/post/17196</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Sat, 16 Apr 2022 15:21:21 GMT</pubDate></item></channel></rss>