当前位置:网站首页>Solve the problem that only one line of text is displayed or not displayed in u8glib

Solve the problem that only one line of text is displayed or not displayed in u8glib

2022-06-27 00:52:00 arenascat

The problem we just encountered ,OLED In the use of u8glib When this library , The display is incomplete , I called these two during initialization , Each has its own merits , One is to display only two lines of text, the other is not to display at all

U8G2_SSD1306_128X64_NONAME_2_HW_I2C u8g2(U8G2_R0); // Only two lines are displayed 
U8G2_SSD1306_128X64_VCOMH0_F_HW_I2C u8g2(U8G2_R0); // No display 

 

One reason is that RAM The reason for using up , Therefore, it cannot be displayed normally ,u8g To use hardware I2C, It takes up a lot of RAM Used as a Buffer

 

If say RAM It's not enough , The software can only be used during initialization I2C

U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // Slow speed 

 

 

原网站

版权声明
本文为[arenascat]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/178/202206270009550948.html