Howto - 7" esp32-8048s070 captivetouch TFT and squareline studio for interface controll

hi there for people who might be interested here a relatively cheap TFT screen that people can use for OEM and smarthome control the ESP32-8048S070

this is a how to setup for squareline studio
first download the drivers for the board - you need to be patient they exceed the download limits daily so might take a couple days before you can download it

unzip it and copy all the libraries to Arduino IDE ( found in 1-demo folder ) - - just follow the directions in the User Manual found in the zip file. once you trialled run and you got the screen running properly with Lvgl examples: TFT-LVGL-Benchmark or TFT-LVGL-Widget . we can set up Squareline Studio

setting up the board for squareline studio:
download the sqarestudio driver i made for it :
arduino_tft_espi esp32.zip (5.9 MB)

now this driver is missing some components as it is simply to big to upload here. unzip the driver,
in there you will see a zip file called arduino_tft_espi.zip. Open it with Ark and drag and drop the board’s library files into the folder called libraries add these → Arduino_GFX_master, Touch_GT911, and gt911_arduino-main ( you can add the others it will not hurt but not necessary )

now download a copy of Squareline studio. unzip it then copy the board driver to boards/Arduino/ ( if the folder Arduino is not present create it. then copy it into that folder )
if using a linux desktop and having issues starting it. the easiest way to get it to work is download version 1.0.5 start that first. leave it open. then start the newer one 1.2.3 (or you can hammer away at program it will start too but sometime it be quite a few clicks to get it running).

setting up a new project go to "create new " → Arduino you will see the board driver that you just installed click on it and then create.

after this go to Project setting and set up your paths and Call function export files → .cpp

now you are ready to create your interfaces :slight_smile:

once you created your interface and you set up a button event (call function) to get it to work with Arduino IDE
First export your project 1st → Create template project 2nd → Export UI files

once they are exported go to where you exported them. open ui_events.cpp copy all the the Void (events) you created and copy and paste into ui.ino at the bottom. save and then delete or rename ui_events.cpp ( ui_events.cpp-bak) then load ui.ino into Arduino.IDE and add in all your other functions you want ie wifi , mqtt, etc …

here a screen shot of the new interface I made for TFT - it has energy monitor function in , home automation control, and interfaces with inhouse AI

will upload the arduino.ino for it. if someone wants to adapt for their own needs. just a few more finishing touches for it …


smarthome-AI-textbox.zip (104.8 KB)
for those who might be interested here a release version of the screen
you can adapt to your needs easy enough - if you want to change names of switches and buttons it all found in ui.c
I ran out of widget space so I had to adapt… for hp and evac solar tubes to just program it to be sent to the AI text pox by switching aux 1 and aux to switch on the front screen ( or what ever data you want displayed there . it interacts with my opernwrt_ai program for full inhouse AI. also useful if you are some what hearing impaired or could not understand its reply as you can ask the AI questions and it will print it to the screen for your reading consumption. I probably adapt my mycroft recipe skill for my AI now . you can ask for recipes off the web and it just print the recipe to the screen for you . since my this smarthome screen is situated in my kitchen anyways

1 Like

one last tid bit here are some stl files for 3D printing the case I made for it
esp32screen.zip (595.9 KB)



the access door is for an esp that i am using instead of the built in esp32 wifi as - it powered by the board p4 . the reason for it use is that it allow the screen to run smoothly with out wifi interruption causing the screen to freeze as i find esp wifi more stable then the esp32’s

here a little video of it in action .now it based on openwrt and my openwrt software found on my github. but can be easily adapted to any os type

added in a visualcrossing 14 day forecat screen to it - you just need to set your location and get your own api.
okay good luck have fun

ino sketches for current screen format and bash scripts for weather - radio and interface example controls
weather-radio-ai-info-auto.zip (87.7 KB)

adjust your lvgl memory size ( found in lv_conf.h) from 48U * 1024U to 56U * 1024U for this to work otherwise the screen will display blank

Hello, thank you very much for the information, it has been very useful for me.

I am using the 7" screen. But I have a problem that is being in common with any example that brings the screen, also with the example of your interface and with some that I have made.

It is an error with the touch and it can be seen in the serial as the following:

[E][Wire.cpp:513] requestFrom(): i2cRead returned Error -1

I am not sure i had that error but I believe i did at first . I believe the touch screen still worked you just get the error … i down graded some of my software to work better with no errors . I am just not sure which one it was, again i think it was esp32 → 2.0.7 . or i commented out a line lvgl.conf file

also with this screen it does not play nice with the wifi or the bluetooth and lvgl and the touch the over lap . hence why i also do my wifi via a secondary basic esp. but I think you can remap some of the address to correct the issue I just have not tried, as the esp was a much easy and more stable solution