SO, I’m a copycat… I copied a GH repo for an ESP32(TTGO) uPython-Reflow oven. GitHub - dukeduck1984/uReflowOven-Esp32-Micropython: μReflow Oven controller based on ESP32 with MicroPython & LVGL. The oven works ok, But I would like to rotate the display 180. Can it be done? Or should I just mount the whole thing 180 deg out?
I would rather change it in the code:
disp = ili9341(
miso = config[‘tft_pins’][‘miso’],
mosi = config[‘tft_pins’][‘mosi’],
clk = config[‘tft_pins’][‘sck’],
cs = config[‘tft_pins’][‘cs’],
dc = config[‘tft_pins’][‘dc’],
rst = config[‘tft_pins’][‘rst’],
power = config[‘tft_pins’][‘acc’],
backlight = config[‘tft_pins’][‘led’],
power_on = 0 if config[‘tft_pins’][‘acc_active_low’] else 1,
backlight_on = 0 if config[‘tft_pins’][‘led_active_low’] else 1,
width = 240 if config[‘tft_pins’][‘is_portrait’] else 320,
height = 320 if config[‘tft_pins’][‘is_portrait’] else 240,
rot = ili9341.PORTRAIT if config[‘tft_pins’][‘is_portrait’] else ili9341.LANDSCAPE
)
touch_args = {}
if config.get(‘touch_cali_file’) in uos.listdir():
with open(config.get(‘touch_cali_file’), ‘r’) as f:
touch_args = ujson.load(f)
touch_args[‘cs’] = config[‘touch_pins’][‘cs’]
touch_args[‘transpose’] = config[‘tft_pins’][‘is_portrait’]
touch = xpt2046(**touch_args)