Hardware:
ESP: ESP-32-S3-WROOM-1
Camera: OV5640 (18 pins)
Screen: ST7789V (2inch, 240x320) (8 pins)
Dev setup:
OS: Linux Mint 23
IDE: VS Code
ESP-IDF: v6.0.1
Problem:
I'm trying to get the screen to show the camera, but it's all messed up.
I'm trying (Claude is trying) to modify a dvp_spi_lcd example with no real luck...
I'm attaching the dvp_spi_lcd_main.c, some logs and a photo of the screen.
Current physical pins to GPIO:
Screen:
VCC > 3.3v
GND > GND
DIN > GPIO 11
CLK > GPIO 12
CS > GPIO 21
DC > GPIO 47
RST > 3.3v
BL > GPIO 18
Camera:
3.3v > 3.3v
GND > GND
SIOC > GPIO 4
SIOD > GPIO 5
VSYNC > GPIO 14
HREF > GPIO 16
PCLK > GPIO 13
XCLK > GPIO 10
D9 > GPIO 40
D8 > GPIO 48
D7 > GPIO 45
D6 > GPIO 9
D5 > GPIO 8
D4 > GPIO 17
D3 > GPIO 7
D2 > GPIO 6
RST > not connected
PWDN > GND
Main/CMakeLists.txt (I guess the attachment limit is 3 files...):
idf_component_register(SRCS "dvp_spi_lcd_main.c"
INCLUDE_DIRS "."
REQUIRES esp_lcd driver esp_driver_ledc esp_camera)
Note:
If you'll suggest changing the GPIO pins, keep in mind that I need pins for buttons that'll be under a Resistor Ladder, and some sort of a battery % monitor...
Thanks for the help.
Need help with camera and screen project
-
TheRealThreeeye
- Posts: 2
- Joined: Thu Jul 16, 2026 12:29 pm
Need help with camera and screen project
- Attachments
-
- 20260718_113447.JPG (2.29 MiB) Viewed 45 times
-
- Logs.txt
- (5.75 KiB) Not downloaded yet
-
- dvp_spi_lcd_main.c
- (10.14 KiB) Downloaded 2 times
-
nopnop2002
- Posts: 356
- Joined: Thu Oct 03, 2019 10:52 pm
- Contact:
Re: Need help with camera and screen project
Code: Select all
.pixel_format = PIXFORMAT_RGB565,
You can use JPEG as the camera's capture format.
Here is an example of displaying JPEGs on the ST7789.
https://github.com/nopnop2002/esp-idf-st7789
-
TheRealThreeeye
- Posts: 2
- Joined: Thu Jul 16, 2026 12:29 pm
Re: Need help with camera and screen project
Thanks for the replay.
But I'm stuck on displaying the camera feed...
I might have forgot to mention that the screen is showing what is "supposed" to be me waving my hand in front of the camera.
The colors are all wrong, and it's very grainy.
Thanks
But I'm stuck on displaying the camera feed...
I might have forgot to mention that the screen is showing what is "supposed" to be me waving my hand in front of the camera.
The colors are all wrong, and it's very grainy.
Thanks
-
nopnop2002
- Posts: 356
- Joined: Thu Oct 03, 2019 10:52 pm
- Contact:
Re: Need help with camera and screen project
Is there a possibility that R and B are swapped?
Code: Select all
uint32_t r = ((p0 >> 11) & 0x1F) + ((p1 >> 11) & 0x1F)
+ ((p2 >> 11) & 0x1F) + ((p3 >> 11) & 0x1F);
uint32_t g = ((p0 >> 5) & 0x3F) + ((p1 >> 5) & 0x3F)
+ ((p2 >> 5) & 0x3F) + ((p3 >> 5) & 0x3F);
uint32_t bl = (p0 & 0x1F) + (p1 & 0x1F)
+ (p2 & 0x1F) + (p3 & 0x1F);
Who is online
Users browsing this forum: No registered users and 1 guest