Jump to content

SSD1306 text not working


Angus Schmaloer

Recommended Posts

Hey,

I want to use the SSD1306 display with the STM32F103 controller.
In the "gfxInit();" the uGFX logo is shown, which implies that the I2C works (the write_cmd  and write_data).
But when i want to display some text, notting happens.
I write:
"  font1 = gdispOpenFont("DejaVuSans12");
  font2 = gdispOpenFont("DejaVuSans20");

  // Show some stuff on the display
  gdispDrawString(5, 5, "Hello uGFX!", font2, Black);
  gdispDrawString(5, 35, "Temp. 1: 24.1", font1, Black);
  gdispDrawString(5, 50, "Temp. 2: 28.3", font1, Black);"


But the write_cmd  and write_data are never called (except in the init funct) and the controller is never sending data.

Link to comment
Share on other sites

The SSD1306 is a flush-based GDISP driver. The driver maintains a framebuffer itself which needs to be copied to the actual display controller's framebuffer. That operation is called flushing. Try to call gdispFlush() after rendering. You will find configuration options for flushing in the configuration file and more information in this forum.

Link to comment
Share on other sites

aaah okey, i will look into that.

35 minutes ago, Joel Bodenmann said:

The SSD1306 is a flush-based GDISP driver.

But i couldn't find anything about flushing in the "stm32f401re_nuleo_ssd1306" example project.


UPDATE
It is working now, thanks, saved me a lot a looking around and searching

Edited by Angus Schmaloer
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...