<?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[&#x27;Serial2&#x27; was not declared - Error compiling with Arduino IDE]]></title><description><![CDATA[<p dir="auto">Dear all,</p>
<p dir="auto">although this topic has been covered 9 months ago in this forum, the solutions mentioned there are not working in my environment. So I'm sorry to raise this problem again.<br />
I'm still getting a fatal compiling error with the simple example sketch 'hello world':</p>
<p dir="auto"><em>/Users/matthias/Documents/Arduino/libraries/M5Stack/src/LoRaWan.cpp: In member function 'void LoRaWanClass::init()':<br />
/Users/matthias/Documents/Arduino/libraries/M5Stack/src/LoRaWan.cpp:45:5: error: 'Serial2' was not declared in this scope<br />
Serial2.begin(9600, SERIAL_8N1, 16, 17);<br />
^</em><br />
and</p>
<p dir="auto"><em>In file included from /Users/matthias/Documents/Arduino/libraries/M5Stack/src/LoRaWan.cpp:33:0:<br />
/Users/matthias/Documents/Arduino/libraries/M5Stack/src/LoRaWan.cpp: In member function 'void LoRaWanClass::getVersion(char</em>, short int, unsigned char)':<br />
/Users/matthias/Documents/Arduino/libraries/M5Stack/src/LoRaWan.h:33:29: error: 'Serial2' was not declared in this scope<br />
#define SerialLoRa          Serial2******<br />
^<br />
<em>... continuing with pages of consecutive error messages.</em><br />
I'm using the Arduino IDE 1.8.10 with an M5CORE Grey and have removed and updated all relevant libraries, without any success.<br />
Can anybody give me a hint where to dig ?<br />
best regards</p>
]]></description><link>https://community.m5stack.com/topic/1846/serial2-was-not-declared-error-compiling-with-arduino-ide</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 07:57:00 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/1846.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 13 Apr 2020 21:18:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to &#x27;Serial2&#x27; was not declared - Error compiling with Arduino IDE on Mon, 15 Jun 2020 19:53:54 GMT]]></title><description><![CDATA[<p dir="auto">Hi</p>
<p dir="auto">Just add</p>
<p dir="auto">HardwareSerial Serial2(2);</p>
<p dir="auto">under #include &lt;Arduino.h&gt; in /Users/matthias/Documents/Arduino/libraries/M5Stack/src/LoRaWan.h</p>
]]></description><link>https://community.m5stack.com/post/9019</link><guid isPermaLink="true">https://community.m5stack.com/post/9019</guid><dc:creator><![CDATA[qlion]]></dc:creator><pubDate>Mon, 15 Jun 2020 19:53:54 GMT</pubDate></item><item><title><![CDATA[Reply to &#x27;Serial2&#x27; was not declared - Error compiling with Arduino IDE on Fri, 24 Apr 2020 05:57:18 GMT]]></title><description><![CDATA[<p dir="auto">If you are using windows 7 or lower then you have to install Arduino driver for that left click on my computer icon &gt; properties&gt; devices&gt; update all unknown devices.<br />
for more <a href="https://electronicsmith.com/arduino-for-beginners/" target="_blank" rel="noopener noreferrer nofollow ugc">click here</a></p>
]]></description><link>https://community.m5stack.com/post/8339</link><guid isPermaLink="true">https://community.m5stack.com/post/8339</guid><dc:creator><![CDATA[smith]]></dc:creator><pubDate>Fri, 24 Apr 2020 05:57:18 GMT</pubDate></item></channel></rss>