<?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 display remains black for a certain progamming flow]]></title><description><![CDATA[<p dir="auto">I am facing a realy strange problem. If i leave the marked line (see NOT WORKING IF THIS LINE IS REMOVED) away then the display remains black. With this line its working. Since this line should not have a relevant effect on the general programm i wonder if this is a bug in the library or if i am doing something wrong. Any hint?</p>
<p dir="auto">#include &lt;M5Core2.h&gt;</p>
<p dir="auto">#define TFTW            320     // screen width<br />
#define TFTH            240     // screen height<br />
#define TFTW2           160     // half screen width<br />
#define TFTH2           120     // half screen height</p>
<p dir="auto">void setup()<br />
{<br />
M5.begin();<br />
Serial.begin(115200);<br />
showThermostat();<br />
}</p>
<p dir="auto">void showThermostat()<br />
{<br />
M5.Lcd.fillScreen(TFT_BLACK);<br />
M5.Lcd.setTextColor(TFT_GREEN);<br />
String text = "-28 ";<br />
M5.Lcd.setTextSize(8);</p>
<p dir="auto">int xpos = TFTW2-M5.Lcd.textWidth(text)/2;<br />
int ypos = TFTH2-M5.Lcd.fontHeight()/2;<br />
M5.Lcd.drawString(text, xpos, ypos, 1);<br />
M5.Lcd.drawCircle(210, ypos, 5, TFT_GREEN);<br />
M5.Lcd.drawCircle(210, ypos, 4, TFT_GREEN);<br />
M5.Lcd.drawCircle(210, ypos, 3, TFT_GREEN); // NOT WORKING IF THIS LINE IS REMOVED<br />
}</p>
<p dir="auto">void loop()<br />
{<br />
}</p>
]]></description><link>https://community.m5stack.com/topic/2662/core2-display-remains-black-for-a-certain-progamming-flow</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Mar 2026 19:46:18 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/2662.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 27 Dec 2020 09:28:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Core2 display remains black for a certain progamming flow on Mon, 28 Dec 2020 10:27:22 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/5713">@HausBusDe</a></p>
<p dir="auto">exactly why this is happening I cannot say, but it seems to be related to the double initialisation of <code>Serial.begin()</code> which is already happening through <code>M5.begin()</code>. As soon as I remove the <code>Serial.begin()</code> your code then works w/ or w/o the 'not working line'.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/11402</link><guid isPermaLink="true">https://community.m5stack.com/post/11402</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Mon, 28 Dec 2020 10:27:22 GMT</pubDate></item></channel></rss>