My display required a few weird things to get it looking correct. First was setting the offset to -24 on the Y. Probably has to do with how the chip is connected to the display. Not an ESPHome issue.
The next issue I ran into is the first page (8 sequential rows) of memory written is displayed in the last modified pages area. Not sure what is going on there but adding another write for the first 8 rows fixes it...
ssd1306_spi.cpp:
void HOT SPISSD1306::write_display_data() {
if (this->is_sh1106_()) {
for (uint8_t y = 0; y < (uint8_t) this->get_height_internal() / 8; y++) {
this->command(0xB0 + y);
this->command(0x02);
this->command(0x10);
this->dc_pin_->digital_write(true);
for (uint8_t x = 0; x < (uint8_t) this->get_width_internal(); x++) {
this->enable();
this->write_byte(this->buffer_[x + y * this->get_width_internal()]);
this->disable();
App.feed_wdt();
}
}
// Write the first page again... not sure why.
this->command(0xB0);
this->command(0x02);
this->command(0x10);
this->dc_pin_->digital_write(true);
for (uint8_t x = 0; x < (uint8_t) this->get_width_internal(); x++) {
this->enable();
this->write_byte(this->buffer_[x]);
this->disable();
App.feed_wdt();
}
} else {
this->dc_pin_->digital_write(true);
this->enable();
this->write_array(this->buffer_, this->get_buffer_length_());
this->disable();
}
}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
The problem
My display required a few weird things to get it looking correct. First was setting the offset to -24 on the Y. Probably has to do with how the chip is connected to the display. Not an ESPHome issue.
The next issue I ran into is the first page (8 sequential rows) of memory written is displayed in the last modified pages area. Not sure what is going on there but adding another write for the first 8 rows fixes it...
ssd1306_spi.cpp:
Which version of ESPHome has the issue?
2023.11.6
What type of installation are you using?
pip
Which version of Home Assistant has the issue?
No response
What platform are you using?
ESP8266
Board
ESP12F
Component causing the issue
SH1106
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response