diff --git a/esphome/cat-medication-tracker.yaml b/esphome/cat-medication-tracker.yaml index 5a062a7..c074f26 100644 --- a/esphome/cat-medication-tracker.yaml +++ b/esphome/cat-medication-tracker.yaml @@ -10,6 +10,15 @@ esphome: then: - light.turn_on: backlight - delay: 300ms + - lambda: |- + // Override MADCTL to 0x48: MX=1, BGR=1 — fixes horizontal mirror + // DC pin (GPIO2) is regular GPIO; use SPIDevice for CS/data + digitalWrite(2, LOW); // DC = command + id(my_display)->enable(); // assert CS + id(my_display)->transfer(0x36); // MADCTL command + digitalWrite(2, HIGH); // DC = data + id(my_display)->transfer(0x48); // MX=1, BGR=1 + id(my_display)->disable(); // deassert CS - component.update: my_display esp32: @@ -64,7 +73,7 @@ display: cs_pin: GPIO15 dc_pin: GPIO2 reset_pin: GPIO4 - rotation: 180 + rotation: 0 invert_colors: false color_order: bgr data_rate: 10MHz