What is the easiest way to log

I am looking to log things in an easy way but couldn’t figure it out. It seems that all examples print to some kind of serial…
I am using core2-ros with rpi, Is there a way to open a console in pi and printf to it from core2?

Hi tata,

if I understand your problem correctly, the easiest solution will be simply connecting CORE2 and RPi via USB cable, because serial between CORE2 and RPi is quite busy. After connecting the devices, all you need to do is putting this line in your program:

    Serial.init(19200, Parity::None, StopBits::One);        // configure USB-serial with baudrate == 19200, none parity and with one stop bit

You must precede printf () via the “Serial.” as below:

Serial.printf("someting to print");

After starting the RPi console and setting the correct baudrate, for example:

screen /tty/USB0 19200

you will see all logs. I hope it will help you :smile:

Regards,
Hubert.

You understood correctly, it is exactly what i am looking for. Thanks a lot!