Jump to content

esp32 + SSD1306


malachib

Recommended Posts

Hey everyone, I am a newcomer to uGFX.  But not a newcomer to programming :)

I believe I nearly have uGFX running on an ESP32 with an I2C SSD1306.  A proper "uGFX" branding appears on display init.  But then, after that, screen goes black and remains black no matter what I've tried.  Running at 100Khz, just to ensure things work.  I2C APIs not reporting any errors.  Any ideas?  Thanks in advance!

EDIT: Running the "basic" gdisp code, modified slightly:

const char tag[] = "displayTask2";

// Yanking this in direct from "basic" demo for gdisp
void displayTask2(void *pvParameters)
{
	coord_t		width, height;
	coord_t		i, j;

    ESP_LOGD(tag, "Display init start");

    // Initialize and clear the display
    gfxInit();

    ESP_LOGD(tag, "Display init done");

    // Get the screen size
    width = gdispGetWidth();
    height = gdispGetHeight();

    // Code Here
	gdispDrawBox(10, 10, width/2, height/2, White);
    gdispFillArea(width/2, height/2, width/2-10, height/2-10, White);
    gdispDrawLine(5, 30, width-50, height-40, White);

    while(TRUE) {
        for(i = 5, j = 0; i < width && j < height; i += 7, j += i/20)
            gdispDrawPixel(i, j, White);

    	gfxSleepMilliseconds(5000);
        gdispClear(Black);

        ESP_LOGI(tag, "Display redraw");
    }       
}

 

Edited by malachib
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...