<?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[How to set end of line character in UART]]></title><description><![CDATA[<p dir="auto">I'm using UI flow 2.0.  My UART device has special ascii char for end of line (0x7E).  I believe EOL is detected using line feed by default 0x0A.. Is there a way to set custom end of line character in the UART initialization?</p>
<pre><code>uart1 = UART(1, baudrate=115200, bits=8, parity=None, stop=1, tx=32, rx=26, txbuf=256, rxbuf=256, timeout=0, timeout_char=0, invert=0, flow=0)
</code></pre>
]]></description><link>https://community.m5stack.com/topic/7060/how-to-set-end-of-line-character-in-uart</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 20:15:41 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/7060.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 07 Dec 2024 11:06:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to set end of line character in UART on Tue, 17 Dec 2024 14:57:20 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/digiajay" aria-label="Profile: digiajay">@<bdi>digiajay</bdi></a></p>
<p dir="auto">ok, understood.</p>
<p dir="auto">Well, you cannot set a different EOL character and therefore you cannot use UART block <code>read line</code>.</p>
<p dir="auto">However you can use block <code>count of available</code> and <code>read 1 bytes</code> etc. to read chars sent from your device. As long as the char received is not your EOL char, append them into a buffer. And when you receive your EOL char do something with the chars accumulated in the buffer, then clear the buffer and start over.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/27494</link><guid isPermaLink="true">https://community.m5stack.com/post/27494</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Tue, 17 Dec 2024 14:57:20 GMT</pubDate></item><item><title><![CDATA[Reply to How to set end of line character in UART on Mon, 16 Dec 2024 15:44:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/felmue" aria-label="Profile: felmue">@<bdi>felmue</bdi></a> Sorry, this is for reading from UART device.. It's UHF RFID reader device that sends newly read tag data with 7E at the end.</p>
]]></description><link>https://community.m5stack.com/post/27479</link><guid isPermaLink="true">https://community.m5stack.com/post/27479</guid><dc:creator><![CDATA[digiajay]]></dc:creator><pubDate>Mon, 16 Dec 2024 15:44:03 GMT</pubDate></item><item><title><![CDATA[Reply to How to set end of line character in UART on Sat, 07 Dec 2024 20:05:46 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/digiajay" aria-label="Profile: digiajay">@<bdi>digiajay</bdi></a></p>
<p dir="auto">you can use <code>UART x write ""</code> block which will send data without line end and then use <code>UART x write raw Data 0x7E</code> to send the special line end.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/27369</link><guid isPermaLink="true">https://community.m5stack.com/post/27369</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Sat, 07 Dec 2024 20:05:46 GMT</pubDate></item></channel></rss>