Is it possible to programmatically find out whether the display is connected to I2C or not?
Posted: Sun Nov 26, 2023 6:20 am
Is it possible to understand programmatically whether the display is physically connected?
When trying to initialize the display
in the monitor I get the error
I repeat again, the display itself may or may not be connected to ESP 32 and I need to determine this.
When trying to initialize the display
Code: Select all
ESP_LOGI(DISPLAY_TAG, "Install SSD1306 panel driver");
esp_lcd_panel_handle_t panel_handle = NULL;
esp_lcd_panel_dev_config_t panel_config = {
.bits_per_pixel = 1,
.reset_gpio_num = PIN_NUM_RST,
};
ESP_ERROR_CHECK(esp_lcd_new_panel_ssd1306(io_handle, &panel_config, &panel_handle));
ESP_ERROR_CHECK(esp_lcd_panel_reset(panel_handle));
ESP_ERROR_CHECK(esp_lcd_panel_init(panel_handle));
but ESP_ERROR_CHECK still outputs ESP_OKE (2319) lcd_panel.io.i2c: panel_io_i2c_tx_buffer(177): i2c transaction failed
I repeat again, the display itself may or may not be connected to ESP 32 and I need to determine this.