<?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[Serial2 on M5StickC]]></title><description><![CDATA[<p dir="auto">Has anyone been able to get Serial2 working on the M5StickC?<br />
I've tried all that I can think of but I'm stuck.</p>
<p dir="auto">I'm trying to use the hat pins at the top of the board, and from what I've read the ESP32 has the ability to assign almost any function to a particular pin. In my case I wanted to use pins 26 and 36 for TX and RX.</p>
<p dir="auto">I've tried a few different things including:</p>
<ul>
<li>Using pins 36, 26 in setup</li>
<li>Using pins 5 and 15 in setup (based on <a href="https://camo.githubusercontent.com/0c8e897375fca048e3bf6d3e6ac7efa45bba54f3/68747470733a2f2f63646e2d73686f702e61646166727569742e636f6d2f70726f647563742d66696c65732f333236392f70696e6f75745f77726f6f6d5f70696e6f75742e706e67" target="_blank" rel="noopener noreferrer nofollow ugc">this diagram</a> I thought the pins might have been wrong)</li>
<li>Switched to just trying digitalWrite on the pins and looking for a result.</li>
</ul>
<p dir="auto">My setup is:</p>
<ul>
<li>M5StickC connected via USB to laptop - COM6</li>
<li>USB to serial device (jumper set to 3.3v) - COM7</li>
</ul>
<pre><code>#include &lt;M5StickC.h&gt;


void setup() {
  // Setup the TFT display
  M5.begin();
  
  // Setup the serial port for debugging
  Serial.begin(115200);
  Serial.println();
  Serial.println("Ready.");

  //Serial2.begin(115200, SERIAL_8N1, 26, 36);
  //Serial2.println("Testing Serial2");
  pinMode(5, OUTPUT);
  pinMode(15, OUTPUT);
}

void loop() {
  //Serial2.print("Testing Serial2: ");
  //Serial2.println(millis());

  digitalWrite(5, HIGH);
  digitalWrite(15, HIGH);
  delay(10);
  digitalWrite(5, LOW);
  digitalWrite(15, LOW);
   
}
</code></pre>
<p dir="auto">Any thoughts?</p>
]]></description><link>https://community.m5stack.com/topic/1521/serial2-on-m5stickc</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 04:18:22 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/1521.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 03 Dec 2019 21:02:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Serial2 on M5StickC on Thu, 05 Dec 2019 06:24:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/klimbot" aria-label="Profile: klimbot">@<bdi>klimbot</bdi></a> Sorry, not a user of arduino, I use micropython but yes, the rshat gives the clue.</p>
<p dir="auto">Pin 26, 0 is the communication port, 36 is the input.</p>
]]></description><link>https://community.m5stack.com/post/6613</link><guid isPermaLink="true">https://community.m5stack.com/post/6613</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Thu, 05 Dec 2019 06:24:40 GMT</pubDate></item><item><title><![CDATA[Reply to Serial2 on M5StickC on Wed, 04 Dec 2019 21:06:37 GMT]]></title><description><![CDATA[<p dir="auto">I think I may have found my answer in the RS485 hat lib: <a href="https://github.com/m5stack/M5StickC/blob/master/examples/Hat/RS485/RS485.ino" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/m5stack/M5StickC/blob/master/examples/Hat/RS485/RS485.ino</a></p>
]]></description><link>https://community.m5stack.com/post/6612</link><guid isPermaLink="true">https://community.m5stack.com/post/6612</guid><dc:creator><![CDATA[klimbot]]></dc:creator><pubDate>Wed, 04 Dec 2019 21:06:37 GMT</pubDate></item><item><title><![CDATA[Reply to Serial2 on M5StickC on Wed, 04 Dec 2019 20:50:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/chriswr" aria-label="Profile: chriswr">@<bdi>chriswr</bdi></a> thanks for the suggestion, but still no luck.</p>
<p dir="auto">I've gone back to basics and tried to do a loopback test but can't even get that working! Will look further in to the manuals and see if there is any restriction on pins used for UART.</p>
<p dir="auto">Out of interest, can anyone tell me if the pin numbers quoted on the GitHub page for the M5StickC are the actual pin numbers we are supposed to use in the Arduino environment? Or do the GPIO numbers need to be converted to pin numbers?</p>
<p dir="auto">Thanks</p>
]]></description><link>https://community.m5stack.com/post/6611</link><guid isPermaLink="true">https://community.m5stack.com/post/6611</guid><dc:creator><![CDATA[klimbot]]></dc:creator><pubDate>Wed, 04 Dec 2019 20:50:00 GMT</pubDate></item><item><title><![CDATA[Reply to Serial2 on M5StickC on Tue, 03 Dec 2019 21:46:16 GMT]]></title><description><![CDATA[<p dir="auto">Pin 36 can only be set as input, so 36 has to be rx</p>
]]></description><link>https://community.m5stack.com/post/6603</link><guid isPermaLink="true">https://community.m5stack.com/post/6603</guid><dc:creator><![CDATA[ChrisWR]]></dc:creator><pubDate>Tue, 03 Dec 2019 21:46:16 GMT</pubDate></item></channel></rss>