How to represent running live data on OLED screen? (XYZ angle)

Hello,

My project is to create a tiltmeter/inclinometer. I have the following hardwares:

-Adafruit OLED 128x64 i2c // with Adafruit_GFX.h and Adafruit_SSD1306.h
-Keyestudio Mega
-MPU6050 // MPU6050_6Axis_MotionApps20.h

I sorted out the core of the measuring device but the display is not want to do what I wish.
I would like to show the 3 running angle value like this:

| X: 23,2° |
| Y: 15,4° |

Z: 40,6°
I tried to change this example code to not use the serial but use the display instead.

#ifdef OUTPUT_READABLE_YAWPITCHROLL
// display Euler angles in degrees
mpu.dmpGetQuaternion(&q, fifoBuffer);
mpu.dmpGetGravity(&gravity, &q);
mpu.dmpGetYawPitchRoll(ypr, &q, &gravity);
Serial.print("ypr\t");
Serial.print(ypr[0] * 180/M_PI);
Serial.print("\t");
Serial.print(ypr[1] * 180/M_PI);
Serial.print("\t");
Serial.println(ypr[2] * 180/M_PI);
#endif

I do not show my code here because it not works at all. The characters are overlap each other, and some of them remained permanently on screen. The numbers need to be readable so I think I need a delay(500); between screen updates.
I have another problem with the screen. I want to monitor the initialization process on the following way:

Display...
(delay(2000):wink:
Display...OK
SD card...
(SD card init routine)
SD card...OK (/NOK)
Gyro...
(Gyro init routine)
Gyro...OK (/NOK)

I want to "Something..." remains on screen and just the OK/NOK status appear next to it when the routine is done.

display.clearDisplay();
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(0, 0);

display.println("Display...");
display.display();
delay(2000);
display.println("Display...OK"); // Until there everything is fine

display.display();
display.setCursor(15, 0);
display.println("SD card..."); // The text is showing up in the first line (0, 0), and push down the "Display...OK" text with some pixels (not 15) and sometimes it shift a little right too.

What is the problem with these lines?
Thanks for the help!

Data is printed to an internal buffer first. To see something, you need to send the buffer to the display. I am not an expert for the Adafruit lib, but i am sure it is documented somewhere.

As an alternative approach you could use u8x8 lib or ssd1306ascii lib. Both will write to the display without this buffer.

Oliver

Information is printed to an interior cradle first. To see something, you have to send the support to the showcase. I am not a specialist for the Ada fruit lib, but rather I am certain it is reported some place.

As an elective methodology you could utilise u8x8 lib or ssd1306ascii lib. Both will keep in touch with the showcase without this cradle.

@insaha: It is a little bit strange that you rephrase my posts. Any reason for this? Is my english that bad?

Oliver