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
Changing Arduino Serial port to send data to Megunolink visualizers
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
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
