<?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[M5StickC Plus and Joystick HAT Problem]]></title><description><![CDATA[<p dir="auto">Hello! I have problem with Joystick Hat , this one "<a href="https://m5stack.com/collections/m5-hat/products/m5stickc-joystick-hat" target="_blank" rel="noopener noreferrer nofollow ugc">https://m5stack.com/collections/m5-hat/products/m5stickc-joystick-hat</a>"<br />
Its working on my M5StickC but i can't make it work on M5StickC Plus. Here is my code:</p>
<p dir="auto">#include &lt;M5StickCPlus.h&gt;<br />
#include "Wire.h"</p>
<p dir="auto">#define JOY_ADDR 0x38</p>
<p dir="auto">void setup() {<br />
M5.Lcd.begin();<br />
<a href="//M5.Lcd.clear" target="_blank" rel="noopener noreferrer nofollow ugc">//M5.Lcd.clear</a>();<br />
//disable the speak noise<br />
//dacWrite(25, 0);<br />
Wire.begin(0,26);</p>
<p dir="auto">M5.Lcd.setRotation(1);<br />
M5.Lcd.drawString("bok",0,0,2);<br />
}</p>
<p dir="auto">uint8_t x_data;<br />
uint8_t y_data;<br />
uint8_t button_data;<br />
char data[100];<br />
void loop() {<br />
// put your main code here, to run repeatedly:<br />
Wire.requestFrom(JOY_ADDR,3);<br />
if (Wire.available()) {<br />
x_data = Wire.read();<br />
y_data = Wire.read();<br />
button_data = Wire.read();<br />
sprintf(data, "x:%d y:%d button:%d\n", x_data, y_data, button_data);</p>
<pre><code>M5.Lcd.setCursor(1, 30, 2);
M5.Lcd.printf("x:%04d y:%04d button:%d\n", x_data, y_data, button_data);
</code></pre>
<p dir="auto">}<br />
delay(200);<br />
}</p>
]]></description><link>https://community.m5stack.com/topic/2879/m5stickc-plus-and-joystick-hat-problem</link><generator>RSS for Node</generator><lastBuildDate>Thu, 14 May 2026 22:51:48 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/2879.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 01 Feb 2021 08:04:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to M5StickC Plus and Joystick HAT Problem on Mon, 01 Feb 2021 22:39:02 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/volos" aria-label="Profile: Volos">@<bdi>Volos</bdi></a></p>
<p dir="auto">have you tried the official <a href="https://github.com/m5stack/M5-ProductExampleCodes/blob/master/Hat/hat-joystick/Arduino/Joystick_hat/Joystick_hat.ino" target="_blank" rel="noopener noreferrer nofollow ugc">Joystick hat example</a>?</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/12237</link><guid isPermaLink="true">https://community.m5stack.com/post/12237</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Mon, 01 Feb 2021 22:39:02 GMT</pubDate></item></channel></rss>