Thanks to visit codestin.com
Credit goes to github.com

Skip to content

display spd2010 screen does not turn on. #364

Open
@NickyDark1

Description

@NickyDark1

Hello, Thanks for the new updates, I'm trying to implement the new implementations but I think I'm not understanding well.

Device

https://www.waveshare.com/wiki/ESP32-S3-Touch-LCD-1.46B

Note that you have added new implementations with the SPD2010 driver. I don't know if I'm wrong with the code, but I have this code to use. No error appears, but the screen doesn't turn on either.

# waveshare_esp32s3_146.py
# Configuration for Waveshare ESP32-S3-Touch-LCD-1.46 with SPD2010 controller
'''
https://github.com/lvgl-micropython/lvgl_micropython/blob/main/api_drivers/common_api_drivers/display/spd2010/spd2010.py
https://github.com/lvgl-micropython/lvgl_micropython/blob/main/lcd_bus.pyi

'''
from micropython import const
import machine
import lcd_bus


# Display dimensions for 1.46" display (240x240 is common for this size)
_WIDTH = const(240)
_HEIGHT = const(240)

# LCD pins from schematic
_BL = const(1)        # Backlight pin (IO1)
_RST = const(0)       # Reset pin (IO0)
_DC = const(42)       # Data/Command pin (using IO42/SDA2)
_LCD_CS = const(21)   # Chip select (IO21)

# SPI pins from schematic
_HOST = const(1)     # SPI host
_SCK = const(40)      # Clock pin (LCD_SCK -> IO40)
_MOSI = const(46)     # Data line 0 (LCD_SDA0 -> IO46)
_MISO = const(45)     # Data line 1 (LCD_SDA1 -> IO45)

# SPI frequency for the display
_LCD_FREQ = const(40000000)  # 40MHz


# Configure SPI bus for the ESP32-S3
spi_bus = machine.SPI.Bus(
    host=_HOST,
    mosi=_MOSI,
    miso=_MISO,
    sck=_SCK
)

# Create LCD bus with the SPI bus
display_bus = lcd_bus.SPIBus(
    spi_bus=spi_bus,
    freq=_LCD_FREQ,
    dc=_DC,
    cs=_LCD_CS
)

import lvgl as lv
import spd2010

# Initialize LVGL
lv.init()

# Create the display with SPD2010 driver
print("Initializing SPD2010 display...")
display = spd2010.SPD2010(
    data_bus=display_bus,
    display_width=_WIDTH,
    display_height=_HEIGHT,
    reset_pin=_RST,
    reset_state=spd2010.STATE_LOW,
    backlight_pin=_BL,
    color_space=lv.COLOR_FORMAT.RGB565,
    color_byte_order=spd2010.BYTE_ORDER_RGB
)

# Turn on and configure the display
display.set_power(True)  # you have not supplied a power pin, I do not know if there is one or not. 
display.init()
display.set_backlight(100)  # 100% brightness

scrn = lv.screen_active()
slider = lv.slider(scrn)
slider.center()

import task_handler

# Initialize task handler for LVGL
th = task_handler.TaskHandler()
print("Display initialization complete")

fusion

How would you use the new implementations?

https://github.com/lvgl-micropython/lvgl_micropython/blob/main/fusion.pyi
https://github.com/lvgl-micropython/lvgl_micropython/tree/main/ext_mod/imu_fusion

How can I correctly use the new updates for the device?
Thank you very much.

here I have a basic repository with just one button using the LCD and touch with LVGL Arduino.

https://github.com/NickyDark1/lvgl_arduino_only_btn_msg

I also attach a wiki:
https://www.waveshare.com/wiki/ESP32-S3-Touch-LCD-1.46B

diagrams:
https://files.waveshare.com/wiki/ESP32-S3-Touch-LCD-1.46/ESP32-S3-Touch-LCD-1.46.pdf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions