<?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[M5Paper Line Break in text]]></title><description><![CDATA[<p dir="auto">I am trying to display a longer text received from Telegram on the M5Paper display. The text includes \n for line breaks, however I am unable to display it properly. This is the snippit from the Arduino code:</p>
<p dir="auto">String Rezept = "Line 1 \n Line 2";</p>
<p dir="auto">void setup() {<br />
Serial.begin(115200);<br />
M5.begin();<br />
M5.EPD.SetRotation(90);<br />
M5.EPD.Clear(true);</p>
<p dir="auto">canvas.createCanvas(540, 960);<br />
canvas.setTextSize(3);<br />
canvas.setTextArea(0, 0, 760, 390);<br />
canvas.setTextWrap(true, false);<br />
canvas.printf(Rezept, 35, 350);<br />
canvas.printf("Line 1 \n Line 2", 35, 350);<br />
canvas.drawString("Line 1 \n Line 2", 35, 350);<br />
canvas.pushCanvas(0,0,UPDATE_MODE_DU4);</p>
<p dir="auto">I tried different methods, but none works:<br />
canvas.printf(Rezept, 35, 350); --&gt; no matching function for call to 'M5EPD_Canvas::println(String&amp;, int, int)'<br />
canvas.printf("Line 1 \n Line 2", 35, 350); --&gt; This works well, but I hard coded text<br />
canvas.drawString("Line 1 \n Line 2", 35, 350); --&gt; does not recognize the \n</p>
<p dir="auto">Any idea what I can do? Thanks a lot!</p>
]]></description><link>https://community.m5stack.com/topic/3779/m5paper-line-break-in-text</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 06:42:36 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/3779.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 26 Nov 2021 14:46:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to M5Paper Line Break in text on Tue, 28 Dec 2021 11:09:28 GMT]]></title><description><![CDATA[<p dir="auto">In case you are interested about the final result: <a href="https://youtu.be/hrmYldbOStQ" target="_blank" rel="noopener noreferrer nofollow ugc">https://youtu.be/hrmYldbOStQ</a></p>
]]></description><link>https://community.m5stack.com/post/15972</link><guid isPermaLink="true">https://community.m5stack.com/post/15972</guid><dc:creator><![CDATA[DiWa]]></dc:creator><pubDate>Tue, 28 Dec 2021 11:09:28 GMT</pubDate></item><item><title><![CDATA[Reply to M5Paper Line Break in text on Sat, 27 Nov 2021 12:14:09 GMT]]></title><description><![CDATA[<p dir="auto">Solved, this works fine:</p>
<p dir="auto">char Rezept[50] = "Line 1 \n Line 2";</p>
<p dir="auto">and</p>
<p dir="auto">canvas.print(Rezept);</p>
]]></description><link>https://community.m5stack.com/post/15630</link><guid isPermaLink="true">https://community.m5stack.com/post/15630</guid><dc:creator><![CDATA[DiWa]]></dc:creator><pubDate>Sat, 27 Nov 2021 12:14:09 GMT</pubDate></item></channel></rss>