imxieyi / esp32-i2c-ssd1306-oled

A library for esp32 i2c oled ssd1306

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OLED with i2c font more then 2 is not display

pankajverma190 opened this issue · comments

I am trying to use OLED with i2c it is display but when I am trying to display equal or more then 2 font it is not display.

and please tell us how to us scroll and other things with this library.

Can you provide a simplest sample code to reproduce this issue?

// I am trying belo code i am using monochrome OLED 128x32 with esp32 and eclipse idf. if i am trying to use ssd1306_select_font(0, 1); -->0 is panel id and 1 is font it is printing fine but i want to increase bigger font then it is not print any thing like ssd1306_select_font(0, 2); not work
#include "esp_log.h"
#include "ssd1306.h"
#include "fonts.h"

void app_main() {

if (ssd1306_init(0,22 , 21)) {
	ESP_LOGI("OLED", "oled inited");
	ssd1306_select_font(0, 1);
	ssd1306_draw_string(0, 0, 0, "glcd_5x7_font_0", 1, 0);
	ssd1306_select_font(0, 1);
	ssd1306_draw_string(0, 0, 16, "glcd_5x7_font_16", 1, 0);
	ssd1306_select_font(0, 1);
	ssd1306_draw_string(1, 0, 32, "glcd_5x7_font_16", 1, 0);
	ssd1306_select_font(0, 1);
	ssd1306_draw_string(1, 0, 48, "glcd_5x7_font_24", 1, 0);
ssd1306_draw_rectangle(1, 0, 40, 20, 20, 1);
ssd1306_select_font(0, 1);
ssd1306_draw_string(1, 0, 0, "glcd_5x7_font_info", 1, 0);
ssd1306_select_font(0, 1);
	ssd1306_draw_string(0, 0, 18, "tahoma_8pt_font_info", 1, 0);
	ssd1306_draw_string(0, 55, 30, "Hello ESP32!", 1, 0);
	ssd1306_refresh(0, 1);
} else {
	ESP_LOGE("OLED", "oled init failed1234");
}

}

its not work at alla for me i have ; E (314) OLED: oled init failed