Hi all,
I recently bought ESP32-3248S035 (https://tinyurl.com/nwttm4xw) and trying to get the right configuration to get it up and running (screen/touch).
Did anyone have any success in that?
Thank you so much!
Hi all,
I recently bought ESP32-3248S035 (https://tinyurl.com/nwttm4xw) and trying to get the right configuration to get it up and running (screen/touch).
Did anyone have any success in that?
Thank you so much!
Try Googling the board name and doing some digging. This page platformio-espressif32-sunton/esp32-3248S035C.json at 59ec63edd07c4d5d75d5b1e46083c2ab6446ab46 · rzeldent/platformio-espressif32-sunton · GitHub suggests that’s an ST7796 display driver, which is supported by the ili9xxx
ESPHome component, so you just need to set up the correct pins for SPI and the display control lines.
There is no PSRAM so it’s unlikely the ESPHome display drawing functions will work, but LVGL with a 25% buffer_size
should be ok.
The capacitive touch version appears to use a GT911 which is also supported in ESPHome.
That page says 8MB PSRAM at the top, but later in 2 places it says no PSRAM.
Thanks for the help, I’ve tried setting the configuration, and get the following:
[23:40:00][C][logger:185]: Logger:
[23:40:00][C][logger:186]: Level: DEBUG
[23:40:00][C][logger:188]: Log Baud Rate: 115200
[23:40:00][C][logger:189]: Hardware UART: UART0
[23:40:00][C][spi:068]: SPI bus:
[23:40:00][C][spi:069]: CLK Pin: GPIO14
[23:40:00][C][spi:070]: SDI Pin: GPIO12
[23:40:00][C][spi:071]: SDO Pin: GPIO13
[23:40:00][C][spi:076]: Using HW SPI: SPI
[23:40:00][C][spi:068]: SPI bus:
[23:40:00][C][spi:069]: CLK Pin: GPIO18
[23:40:00][C][ledc.output:181]: Bit depth: 16
[23:40:00][C][ledc.output:176]: LEDC Output:
[23:40:00][C][ledc.output:177]: Pin GPIO4
[23:40:00][C][ledc.output:178]: LEDC Channel: 1
[23:40:00][C][ledc.output:179]: PWM Frequency: 1000.0 Hz
[23:40:00][C][ledc.output:180]: Phase angle: 0.0°
[23:40:00][C][ledc.output:181]: Bit depth: 16
[23:40:00][C][ledc.output:176]: LEDC Output:
[23:40:00][C][ledc.output:177]: Pin GPIO16
[23:40:00][C][ledc.output:178]: LEDC Channel: 2
[23:40:00][C][ledc.output:179]: PWM Frequency: 1000.0 Hz
[23:40:00][C][ledc.output:180]: Phase angle: 0.0°
[23:40:00][C][ledc.output:181]: Bit depth: 16
[23:40:00][C][ledc.output:176]: LEDC Output:
[23:40:00][C][ledc.output:177]: Pin GPIO17
[23:40:00][C][ili9xxx:094]: Dimensions: 320px x 480px
[23:40:00][C][ili9xxx:095]: Width Offset: 0
[23:40:00][C][ili9xxx:105]: Color mode: 8bit 332 mode
[23:40:00][C][ili9xxx:111]: Data rate: 40MHz
[23:40:00][C][ili9xxx:114]: CS Pin: GPIO15
[23:40:00][C][ili9xxx:115]: DC Pin: GPIO2
[23:40:00][C][ili9xxx:117]: Color order: BGR
[23:40:00][C][ili9xxx:118]: Swap_xy: NO
[23:40:00][C][ili9xxx:119]: Mirror_x: YES
[23:40:00][C][ili9xxx:120]: Mirror_y: NO
[23:40:00][C][ili9xxx:123]: => Failed to init Memory: YES!
[23:40:00][C][ili9xxx:125]: Update Interval: 1.0s
[23:40:00][E][component:082]: Component display is marked FAILED
[23:40:00][C][light:103]: Light 'LED'
[23:40:00][C][light:105]: Default Transition Length: 1.0s
[23:40:00][C][light:106]: Gamma Correct: 2.80
[23:40:00][C][esp32_improv.component:261]: ESP32 Improv:
[23:40:00][C][esp32_improv.component:266]: Status Indicator: 'NO'
[23:40:00][C][captive_portal:088]: Captive Portal:
[23:40:00][C][web_server:173]: Web Server:
[23:40:00][C][web_server:174]: Address: esphome-web-4560ec.local:80
[23:40:00][C][mdns:115]: mDNS:
[23:40:00][C][mdns:116]: Hostname: esphome-web-4560ec
[23:40:00][C][esphome.ota:073]: Over-The-Air updates:
[23:40:00][C][esphome.ota:074]: Address: esphome-web-4560ec.local:3232
[23:40:00][C][esphome.ota:075]: Version: 2
[23:40:00][C][safe_mode:018]: Safe Mode:
[23:40:00][C][api:140]: Address: esphome-web-4560ec.local:6053
The configuration I’m using is:
spi:
- id: tft
clk_pin: GPIO14
mosi_pin: GPIO13
miso_pin: GPIO12
- id: touch
clk_pin: GPIO18
mosi_pin: GPIO23
miso_pin: GPIO19
display:
- platform: ili9xxx
model: ST7796
cs_pin: GPIO15
dc_pin: GPIO2
spi_id: tft
Any thoughts what I still might be missing?
Thanks!
Yes, you are right, that needs fixing doesn’t it, and careful reading.
Like I said, it won’t work with the standard display operations due to insufficient memory. You’ll need update_interval: never
and auto_clear_enabled: false
then use LVGL - LVGL implementation for ESPHome by clydebarrow · Pull Request #6363 · esphome/esphome · GitHub - read the docs linked there and make sure to set buffer_size: 25%
Also best to log via UART so you capture all the messages after startup.
I struggled getting this to work as well, but it works fine with Openhasp if you want it to just work. I’ve realised I’m not a big fan of that software though and I also plan to add some controls to the device which would be easier using Esphome.
[edit]: I forgot to change the buffer size, now it works!
So I tried @clydebarrow’s suggestions and that works. I used the following yaml for a hello world example:
esphome:
name: tv-controller
friendly_name: TV-controller
external_components:
- source: github://pr#6363
refresh: 10min
components: [lvgl]
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
level: DEBUG
# Enable Home Assistant API
api:
encryption:
key: "xxx"
ota:
platform: esphome
password: "xxx"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
i2c:
sda: 33
scl: 32
scan: true
id: bus_a
spi:
clk_pin: 14
mosi_pin: 13
miso_pin: 12
light:
- platform: rgb
name: "Status Light"
red: red_GPIO
green: green_GPIO
blue: blue_GPIO
- platform: monochromatic
output: backlight_pin
name: "Display Backlight"
id: back_light
restore_mode: ALWAYS_ON
output:
- platform: ledc
pin: 4
id: red_GPIO
inverted: True
- platform: ledc
pin: 16
id: green_GPIO
inverted: True
- platform: ledc
pin: 17
id: blue_GPIO
inverted: True
- platform: ledc
pin: 27
id: backlight_pin
display:
- platform: ili9xxx
id: my_display
model: ST7796
dc_pin: 2
cs_pin: 15
dimensions: 320x480
update_interval: never
auto_clear_enabled: false
touchscreen:
platform: gt911
id: my_touch
update_interval: 50ms
# interrupt_pin: 21 # maybe not connected?
# reset_pin: 25 # From a openhasp config, appears to be the 'normal' esp32 reset pin?
color:
- id: my_red
red: 100%
green: 0%
blue: 0%
# font:
# - file: "gfonts://Martian+Mono"
# id: large
# size: 40
# - file: "gfonts://Martian+Mono"
# id: small
# size: 20
lvgl:
touchscreens:
- my_touch
buffer_size: 25%
pages:
- id: main_page
widgets:
- label:
align: CENTER
text: 'Hello World!'
Yatush,
I was having all sorts of problems with the ESP32-3248S035C until I happened on the Annex RDS site and after that (if you know BASIC) it is easy - it does all the hard work for you just set the Config to ESP32-3248S035C and voila. The Annex RDS puts the BASIC in the chip and uses your WiFi to communicate with it.
Starraker
For all attempting to use the ESP32-3248S035C (or ESP32-3248S035R)
For Touch on these boards the following applies (GPIO Pins):
Resistive Touch : INT = 36, SCLK = 14, MOSI = 13, MISO =12, CS = 33 (XPT2046)
Capacitative Touch: INT = 21, SCL = 32, SDA = 33, RST = 25 (GT911)
The Resistive Touch needs to align the touchscreen before it can be used whereas the Capacitive Touch does not need this Step as it is prealigned.
LED1 has three GPIO pins : RED = 4, GREEN = 16, BLUE = 17
BACKLIGHT = GPIO 27
AUDIO AMP : GPIO 26 - Careful when using a speaker an 8 ohm speaker needs to have a series resistor to prevent overloading the amp.
GPIO 39 is unwired but can still be used
Careful with Capacitive Touch - pin 21 has two other definitions (min)
SCREEN SPI: DC = 2, SCLK = 14, MOSI = 13, MISO = 12, CS = 15 RST = EN(-1) - Please note the Screen SPI and Resistive Touch share SCLK, MOSI, & MISO
This board does not act like other ESP32 boards as many of the pins are hard wired and predefined. However , If you prefer easier manipulation / programming of this board go to Annex 32 Rapid Development Suite and use the BASIC Language where this board and its large number of capabilities are all accessible.
This is great board have fun.
I hope that this helps