I am very new to this arduino programming.
I use a "Wifi Kit 32" with oled display. I wanted to test different ways of writing to the screen.
In u8g2 both print and println are implemented, but I don't see any difference. Either one I use, the next print command writes directly behind the line before. So there is no cr/lf performed. Also when I include \r\n codes in the print statement it doesn't advance to the next line.

Why is this so? Do I have to activate something that also vertical cursor position gets automatically modified, and not only horizontal position?

It only handles print()
But since it remembers where the horizontal cursor is you don’t have to setCursor() for subsequent items on the same line.

i.e. it is easier than using drawStr()

This is seldom a problem with small 128x64 displays.

I suggest that you do your own experiments.


#include <U8g2lib.h>

U8G2_SH1106_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);    //

int lineht;

void setup()
    lineht = u8g2.getMaxCharHeight();

void loop()
    u8g2.clear();     //clears buffer and updates physical display
    u8g2.setCursor(0, 0); //start at the beginning
    u8g2.updateDisplay(); //show it
    u8g2.setCursor(0, lineht); //start on next line
    u8g2.updateDisplay(); //show it

Ok, then it is confusing at least that println is implemented and compiled without error, despite beeing not documented.
And I incorrectly assumed obviously, that \r\n would be handled like in serial.print.

I agree with you.

But it is seldom a problem with small displays.

It is easy to implement \r and \n. Perhaps this will be implemented in the future.
Mind you, U8g2 can handle utf8 and Unifont text. Something that few other Arduino libraries can do.