Comments (10)
Hi,
Have succesfully enabled the display of the CYD-module with USB-C.
I used the following init-sequence:
static const ili9341_lcd_init_cmd_t vendor_specific_init_ILI9431_2[] = {
{0xCF, (uint8_t []){0x00, 0xC1, 0X30}, 3, 0},
{0xED, (uint8_t []){0x64, 0x03, 0X12, 0X81}, 4, 0},
{0xE8, (uint8_t []){0x85, 0x00, 0x78}, 3, 0},
{0xCB, (uint8_t []){0x39, 0x2C, 0x00, 0x34, 0x02}, 5, 0},
{0xF7, (uint8_t []){0x20}, 1, 0},
{0xEA, (uint8_t []){0x00, 0x00}, 2, 0},
{0xC0, (uint8_t []){0x10}, 1, 0},
{0xC1, (uint8_t []){0x00}, 1, 0},
{0xC5, (uint8_t []){0x30, 0x30}, 2, 0},
{0xC7, (uint8_t []){0xB7}, 1, 0},
{0x3A, (uint8_t []){0x55}, 1, 0},
{0x36, (uint8_t []){0x08}, 1, 0},
{0xB1, (uint8_t []){0x00, 0x1a}, 2, 0},
{0xB6, (uint8_t []){0x08, 0x82, 0x27}, 3, 0},
{0xF2, (uint8_t []){0x00}, 1, 0},
{0x26, (uint8_t []){0x01}, 1, 0},
{0xE0, (uint8_t []){0x0F,0x2A,0x28,0x08,0x0E,0x08,0x54,0xA9,0x43,0x0A,0x0F,0x00,0x00,0x00,0x00}, 15, 0},
{0xE1, (uint8_t []){0x00,0x15,0x17,0x07,0x11,0x06,0x2B,0x56,0x3C,0x05,0x10,0x0F,0x3F,0x3F,0x0F}, 15, 0},
{0x2B, (uint8_t []){0x00, 0x00, 0x01, 0x3f}, 4, 0},
{0x2A, (uint8_t []){0x00, 0x00, 0x00, 0xef}, 4, 0},
{0x21, NULL, 0, 0}, // Inversion on
{0x11, NULL, 0, 120},
{0x29, NULL, 0, 1}
};
Next to this the display has it's contents by default rotated. To correct I defined the following in my platformio.ini build-flags:
-DLCD_SWAP_XY=true
-DLCD_MIRROR_X=false
-DLCD_MIRROR_Y=false
-DLCD_WIDTH=320
-DLCD_HEIGHT=240
-DTOUCH_DEV_CONFIG={.x_max=LCD_WIDTH,.y_max=LCD_HEIGHT,.rst_gpio_num=GPIO_NUM_NC,.int_gpio_num=GPIO_NUM_36}
-DTOUCH_SWAP_X=true
-DTOUCH_SWAP_Y=true
Now rotation is ok. Unfortunately this is a small offset in the touch-screen coordinates. I will further investigate
from esp32-smartdisplay.
Hi JoDaNI,
I looked it up: ILI9341_Init.h - Strange graphic issues depending on TFT ยท Issue #1172 ยท Bodmer/TFT_eSPI (github.com)
Issue is caused by differences in chipsets.
If you want you can change the initialization sequence in the file esp_lcd_ili9341.cpp. However, this is from the official EspressIf repo.
It is possible to supply an alternative init sequence. This cab be done by providing an initialization sequence in the file lvgl_ili9341.c calling ESP_ERROR_CHECK(esp_lcd_new_panel_ili9341(io_handle, &panel_dev_config, &panel_handle));
If supply me with a working init sequence identical to the one defined in esp_lcd_ili9341.c, I can make a new alternative board definition.
typedef struct {
int cmd; /*<! The specific LCD command */
const void data; /<! Buffer that holds the command specific data /
size_t data_bytes; /<! Size of data
in memory, in bytes /
unsigned int delay_ms; /<! Delay in milliseconds after this command */
} ili9341_lcd_init_cmd_t;
You can test by temporarily putting this initialization sequence like:
const esp_lcd_panel_dev_config_t panel_dev_config = LCD_PANEL_DEV_CONFIG;
panel_dev_config.vendor_config = ....
from esp32-smartdisplay.
I also have the same issue, this is a link to the boards that I bought. How would I go about finding the special init for this?
display: - platform: ili9xxx model: ILI9341 rotation: 180 dimensions: 320x240 spi_id: lcd cs_pin: 15 dc_pin: 2
from esp32-smartdisplay.
Thank you this worked, maybe we can run a calibration to fix it in software
from esp32-smartdisplay.
Hi JoDaNl,
I made a new board definition for the V2 version. See https://github.com/rzeldent/platformio-espressif32-sunton.
This board is also added to the develop branch of the demo. The custom initialization string is in the board definition and no code has to be updated (for the v2 version of the smartdisplay library).
The board name is ESP32-2432S028v2
I ran the code on my (normal/micro-usb) device and get the strange display that you had. So minus + minus is plus and think this will work for you.
Demo code for develop can be found at: https://github.com/rzeldent/esp32-smartdisplay/tree/develop
Hope this works, let me know.
from esp32-smartdisplay.
I can confirm I get correct colors on the USB-C version. The image is in the same orientation as shown above.
I'm curious (as this is my first go with these type of boardxs & LVGL)...is this the correct orientation, or should the demo by default be in landscape format instead of portrait?
from esp32-smartdisplay.
This orientation is the default 240x320, hence 2432S028 (cable on the bottom). You can change the orientation in the demo by enabling one of the lines:
auto disp = lv_disp_get_default();
// lv_disp_set_rotation(disp, LV_DISP_ROT_90);
// lv_disp_set_rotation(disp, LV_DISP_ROT_180);
// lv_disp_set_rotation(disp, LV_DISP_ROT_270);
from esp32-smartdisplay.
Ok, thanks for your response!
So I tried the 'landscape' layout by uncommenting the line containing lv_disp_set_rotation(disp, LV_DISP_ROT_90);
This works as eepected.
Unfortunately there's a small ofsset in the touch screen, in both the X & Y direction. Does you library provide some means for correcting this ?
from esp32-smartdisplay.
I am in the process of adding 3 point calibration corrections. Code is present but still struggling with the GUI.
Take a look in feature/calibration
from esp32-smartdisplay.
Yes,
There are two variables called; DISPLAY_GAP_X and DISPLAY_GAP_Y that can be used for an offset...
from esp32-smartdisplay.
Related Issues (20)
- esp32-8048S070C HOT 4
- ESP32-8048S050C - Display Flickers top to bottom after touching the screen HOT 5
- ESP32-4848S040CIY1 - ESP_ERR_NOT_SUPPORTED esp_lcd_panel_swap_xy(panel_handle, DISPLAY_SWAP_XY) HOT 7
- Remove demo image HOT 3
- smartdisplay_lcd_adaptive_brightness_cds not exposed HOT 2
- Parts of the screens aren't redrawn HOT 5
- ESP32-8048S043C sdcard configuration for plattformio HOT 2
- 8048S070C - external I2C bus unusable due to conflict with GT911_TOUCH_CONFIG_INT_GPIO_NUM HOT 3
- Support for JC4827W543C (successor of Sunton 4827S043C) HOT 8
- esp32-4848S040CIY3 flickering screen will performing update HOT 10
- Backlight intensity set at 50% shows random pixels at startup/init HOT 1
- how to i get touch event so i can control backlight after a time period? HOT 3
- esp32-8048S070C Slowing becoming unresponsive HOT 3
- 4827S043C GT911 Interrupt Pin used? HOT 1
- Auto Upload not working HOT 1
- display frozen/unresponsive
- For Displays with sw_rotate =1 (ST7262) ,Rotation is broken now (works in the main branch though). HOT 1
- esp32-2432S024C, compilation of the library fails HOT 2
- Eager for JC4827W543C to be added fully. Tired of Apple's illegal (and corruptly censored) app store monopolies. HOT 2
- esp32-8048S050C Wrong colors HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp32-smartdisplay.