hawkw / eclss

Environmental Controls and Life Support Systems
14 stars 1 forks source link

support the Seeed XIAO expansion base OLED #15

Open hawkw opened 1 year ago

hawkw commented 1 year ago

the seeedstudio XIAO expansion base is a nice carrier board that the QT Py ESP32C3 can be plugged into. it has an 0.96" OLED display.

the Seeedstudio docs don't explicitly say what part the OLED is, but in their examples with u8g2, their code initializes it like this:

U8X8_SSD1306_128X64_NONAME_HW_I2C u8x8(/* clock=*/ PIN_WIRE_SCL, /* data=*/ PIN_WIRE_SDA, /* reset=*/ U8X8_PIN_NONE);   // OLEDs without Reset of the Display

so i believe the display controller is an SSD1306 and it's talked to over i2c.

hawkw commented 1 year ago

there's an embedded-graphics driver for the SSD1306: https://crates.io/crates/ssd1306

hawkw commented 1 year ago

this display is an OLED, so its pixels will burn in if we let it display the same image for too long. we make sure its not left rubbing constantly. we could either only draw it briefly when the board's "user" button is pressed, or maybe have it cycle through displaying different things?