InterfacePanel com port

Support forum for MegunoLink
Post Reply
User avatar
RoboBill
Posts: 31
Joined: Mon May 23, 2016 4:13 pm

Wed Oct 04, 2017 11:19 pm

I assume that the Interfacepanel wants the Arduino to communicate with the UI via the Serial port.

But how do I change that port to Serial2?


Thanks

RoboBill
User avatar
RoboBill
Posts: 31
Joined: Mon May 23, 2016 4:13 pm

Thu Oct 05, 2017 12:06 am

Wow... Took a guess and figured this one out too. Couldn't find any docs on this though

InterfacePanel Panel("Panel_Message", Serial2);

RoboBill
philr
Posts: 446
Joined: Mon May 26, 2014 10:58 am

Thu Oct 05, 2017 1:40 am

Nice one! The relevant documentation can be found here
https://www.megunolink.com/documentatio ... zer-class/

Another approach is to jump into the library code (I find github a great place to do this) and see if you can see the sort of functionality you're hunting. For example
https://github.com/Megunolink/MLP/blob/ ... acePanel.h

That link shows the interfacepanel header file. You can see under public it has Print &rDestination = Serial. That is inside the constructor and the default is Serial. In your guess, you correctly changed it to Serial2.

Cheers
Phil
User avatar
RoboBill
Posts: 31
Joined: Mon May 23, 2016 4:13 pm

Thu Oct 05, 2017 2:41 am

That was my first approach. But since I'm not a programmer, I had no clue what &rDestination = Serial really meant. But I did see how you did the XYPLOY stuff, so I figured you probably would do the same for interfacepanel.

Just got lucky :D

RoboBill
Post Reply