<?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[Core2 keeps crashing when I try to connect a CardKB module using Arduino IDE]]></title><description><![CDATA[<p dir="auto">Hello, i am having trouble uploading a code to Core2, trying to connect a CardKB module.<br />
Does anyone know how to fix it?</p>
<pre><code>#include "Wire.h"
#include "Arduino.h"
#include "M5GFX.h"
#include "M5Unified.h"
#define CARDKB_ADDR 0x5F

int x=10,y=10;

M5GFX display;
M5Canvas canvas(&amp;display);

void setup()
{
 auto cfg = M5.config();
 M5.begin(cfg);
 Serial.begin(115200);
 Wire.begin();
 pinMode(5, INPUT);
 digitalWrite(5, HIGH);
 M5.Lcd.fillScreen(YELLOW);
 M5.Lcd.setCursor(1, 10);
 M5.Lcd.setTextColor(YELLOW);
 M5.Lcd.setTextSize(2);
 M5.Lcd.printf("IIC Address: 0x5F\n");
 M5.Lcd.printf("&gt;&gt;");
}
void loop()
{
  
 Wire.requestFrom(CARDKB_ADDR, 1);
 while (Wire.available())
 {
 char c = Wire.read(); // receive a byte as characterif
 if (c != 0)
 {
  if(c==180){
    //M5.clear();
    //x=x-10;
    M5.Lcd.fillCircle(50, 50, 22, TFT_RED);
  }
  if(c==181){
    //M5.Display.clear();
    y=y-10;
    M5.Lcd.fillCircle(100, 50, 22, TFT_BLUE);
  }
  if(c==182){
    //M5.Display.clear();
    y=y+10;
    M5.Lcd.fillCircle(50, 100 , 22, TFT_YELLOW);
  }
  if(c==183){
    M5.Display.setCursor(0,0);
    //M5.Lcd.fillScreen(WHITE);
    delay(1000);
    M5.update();
    x=x+10;
    M5.Lcd.fillCircle(100, 100, 22, TFT_GREEN);
  }
 //M5.Lcd.printf("%c", c);
 //Serial.println(c, HEX);
 // M5.Speaker.beep();
 }
 }
}
</code></pre>
]]></description><link>https://community.m5stack.com/topic/7102/core2-keeps-crashing-when-i-try-to-connect-a-cardkb-module-using-arduino-ide</link><generator>RSS for Node</generator><lastBuildDate>Thu, 30 Apr 2026 15:16:48 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/7102.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 19 Dec 2024 23:14:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Core2 keeps crashing when I try to connect a CardKB module using Arduino IDE on Sun, 22 Dec 2024 08:15:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/avmg2502" aria-label="Profile: avmg2502">@<bdi>avmg2502</bdi></a> How is it crashing?<br />
What is the error message?</p>
]]></description><link>https://community.m5stack.com/post/27544</link><guid isPermaLink="true">https://community.m5stack.com/post/27544</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sun, 22 Dec 2024 08:15:16 GMT</pubDate></item><item><title><![CDATA[Reply to Core2 keeps crashing when I try to connect a CardKB module using Arduino IDE on Sat, 21 Dec 2024 18:57:11 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/kuriko" aria-label="Profile: kuriko">@<bdi>kuriko</bdi></a></p>
<p dir="auto">just curious - why are your setting GPIO5 to <code>input</code>? This disables the display - is that what you intended?</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/27540</link><guid isPermaLink="true">https://community.m5stack.com/post/27540</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Sat, 21 Dec 2024 18:57:11 GMT</pubDate></item><item><title><![CDATA[Reply to Core2 keeps crashing when I try to connect a CardKB module using Arduino IDE on Fri, 20 Dec 2024 06:19:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/avmg2502" aria-label="Profile: avmg2502">@<bdi>avmg2502</bdi></a><br />
You should debug line by line to see which operation caused it.</p>
]]></description><link>https://community.m5stack.com/post/27521</link><guid isPermaLink="true">https://community.m5stack.com/post/27521</guid><dc:creator><![CDATA[kuriko]]></dc:creator><pubDate>Fri, 20 Dec 2024 06:19:09 GMT</pubDate></item></channel></rss>