Page 1 of 1

InterfacePanel com port

Posted: Wed Oct 04, 2017 11:19 pm
by RoboBill
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

Re: InterfacePanel com port

Posted: Thu Oct 05, 2017 12:06 am
by RoboBill
Wow... Took a guess and figured this one out too. Couldn't find any docs on this though

InterfacePanel Panel("Panel_Message", Serial2);

RoboBill

Re: InterfacePanel com port

Posted: Thu Oct 05, 2017 1:40 am
by philr
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

Re: InterfacePanel com port

Posted: Thu Oct 05, 2017 2:41 am
by RoboBill
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