Page 1 of 1

Changing Arduino Serial port to send data to Megunolink visualizers

Posted: Wed Dec 26, 2018 9:47 am
by Gl0
Hi,

I would like to change the Serial port to be used by the arduino board (Mega2960) to send data to our Megunolink visualizers (We use the Megunolink Arduino library).
I have not been able to figure out how to do it.

The issue with using Serial0 is the Arduino reset which is triggered when we plug the USB connector.

Thank you

Gl

Re: Changing Arduino Serial port to send data to Megunolink visualizers

Posted: Sat Dec 29, 2018 4:37 am
by philr
Hi, Gl, most of our libraries support an alternative destination in the constructors. For example our plotting one
https://github.com/Megunolink/MLP/blob/ ... y/Plot.cpp

If you look at the top it says
Plot::Plot( const __FlashStringHelper *Context, Print &rDestination )

So you could define it as
TimePlot MyPlot((const char*)NULL,Serial1);

That would send the messages out the serial1 port.

Cheers
Phil