<?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[TAIL485]]></title><description><![CDATA[<p dir="auto">hi all,<br />
I'm reading a serial machine data out , on ATOM, with <a href="https://img.joomcdn.net/8a0e23cfdf92c65988aa7c9f73a594a8d73bbaf3_1024_1024.jpeg" target="_blank" rel="noopener noreferrer nofollow ugc">this RS422/TTL</a> YL-128 adaptor<br />
<a href="https://www.mantech.co.za/datasheets/products/YL-128-170251_SGT%5E1.pdf" target="_blank" rel="noopener noreferrer nofollow ugc">datasheet</a></p>
<p dir="auto">with this code</p>
<pre><code>void setup() {

  Serial.begin(115200);
  delay(1000);

//              speed, mode,      rx, tx
  Serial2.begin(9600, SERIAL_8N1, 26, 32);
  delay(1000);

void loop() {
  recvBytesWithStartEndMarkers();
  showNewData();
}

void recvBytesWithStartEndMarkers() {
  static boolean recvInProgress = false;
  static byte ndx = 0;
  byte startMarker = 0x7C; // "|"
  byte endMarker = 0x0A; // (LF) "/n"

  //  byte startMarker = 0x0A; // "/n"
  //  byte endMarker = 0x0D; // (CR) "/r"


  byte rb;

  while (Serial2.available() &gt; 0 &amp;&amp; newData == false) {
    rb = Serial2.read();

    if (recvInProgress == true) {
      if (rb != endMarker) {
        receivedBytes[ndx] = rb;
        ndx++;
        if (ndx &gt;= numBytes) {
          ndx = numBytes - 1;
        }
      }
      else {
        receivedBytes[ndx] = '\0'; // terminate the string
        recvInProgress = false;

        numReceived = ndx;  // save the number for use when printing
        ndx = 0;
        newData = true;
      }
    }

    else if (rb == startMarker) {
      recvInProgress = true;
    }
  }
}

void showNewData() {
  if (newData == true) {

    //    Serial.print(" ... HEX Value.. ");
    for (byte n = 0; n &lt; numReceived; n++) {
      Serial.print(receivedBytes[n], HEX);
      Serial.print(' ');

      if (receivedBytes[numReceived - 3] == 0x36 &amp;&amp; receivedBytes[numReceived - 6] == 0x30) {
        unit = 0; // CM ARRI 60
      }

      if (receivedBytes[numReceived - 3] == 0x37 &amp;&amp; receivedBytes[numReceived - 6] == 0x30) {
        unit = 1; //FT ARRI 70
      }

      if (unit == 0 &amp;&amp; receivedBytes[numReceived - 6] == 0x31) {
        cm = receivedBytes[numReceived - 4] * 100 + receivedBytes[numReceived - 3] * 10 + receivedBytes[numReceived - 2];

      }
      if (unit == 1 &amp;&amp; receivedBytes[numReceived - 6] == 0x31) {
        ft = receivedBytes[numReceived - 5] * 10 + receivedBytes[numReceived - 4];
        inc = receivedBytes[numReceived - 3] * 10 + receivedBytes[numReceived - 2];

      }
    }
    Serial.println();
    Serial.print ("cm ");
    Serial.println (cm);
    Serial.print ("ft ");
    Serial.println (ft);
    Serial.print ("inc ");
    Serial.println (inc);

    newData = false;

  }
}
</code></pre>
<p dir="auto">and this connections:</p>
<p dir="auto">machine----------------------------- RS422/TTL<br />
grd ------------------------------------ A ............. Y-----NC<br />
sgl ------------------------------------- B ............. Z----NC<br />
12V ----- +12v</p>
<p dir="auto">RS422/TTL ---------- ATOM<br />
TX ---------------------- RX<br />
RX -----------------------TX<br />
5V ---------------------- 5V<br />
GRD -------------------- GRD</p>
<p dir="auto">the newbie question is:</p>
<p dir="auto">can I use instead  <a href="https://docs.m5stack.com/#/en/atom/tail485" target="_blank" rel="noopener noreferrer nofollow ugc">RS485 module</a> based on SP485EEN-L ??</p>
<p dir="auto">tnks a lot</p>
]]></description><link>https://community.m5stack.com/topic/1990/tail485</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 04:57:04 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/1990.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 26 May 2020 10:50:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to TAIL485 on Fri, 14 Aug 2020 09:01:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/m5stack" aria-label="Profile: m5stack">@<bdi>m5stack</bdi></a> Hello!</p>
<p dir="auto">I would like to know to which bronchi pins A and B of the RS485 extension card are connected to the BUS, please.</p>
<p dir="auto">I can't get my M5 to communicate via RS485, however I soldered the small expansion card well.<br />
For my program I am using an ESP32 based Arduino library for the Modbus RTU</p>
]]></description><link>https://community.m5stack.com/post/9649</link><guid isPermaLink="true">https://community.m5stack.com/post/9649</guid><dc:creator><![CDATA[Johnny241]]></dc:creator><pubDate>Fri, 14 Aug 2020 09:01:02 GMT</pubDate></item><item><title><![CDATA[Reply to TAIL485 on Thu, 28 May 2020 12:59:48 GMT]]></title><description><![CDATA[<p dir="auto">The RS422 module you are using is not compatible with our RS485</p>
]]></description><link>https://community.m5stack.com/post/8853</link><guid isPermaLink="true">https://community.m5stack.com/post/8853</guid><dc:creator><![CDATA[m5stack]]></dc:creator><pubDate>Thu, 28 May 2020 12:59:48 GMT</pubDate></item><item><title><![CDATA[Reply to TAIL485 on Thu, 28 May 2020 08:04:12 GMT]]></title><description><![CDATA[<p dir="auto">nobody?</p>
]]></description><link>https://community.m5stack.com/post/8848</link><guid isPermaLink="true">https://community.m5stack.com/post/8848</guid><dc:creator><![CDATA[cepics]]></dc:creator><pubDate>Thu, 28 May 2020 08:04:12 GMT</pubDate></item></channel></rss>