Skip to content

jokubokla/ESP32_CYD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESP32_CYD

A lightweight ESP32 CYD "Cheap Yellow Display" sample project with makes usage of LVGL, the Light and Versatile Graphics Library and EEZ Studio

Introduction

By accident I found the "Cheap Yellow Display" board which is one cool piece of equipment for "maker or nerd or geeks" (like myself). With this project you can make use of a nice dev environment for the CYD. I use the 2.8'' version with a resolution of 320 x 240 (ILI9341).

Here is the result:

CYD Image

Dev Environment

I used to work with the classic Arduino IDE with ESP8266 and ESP32 projects, but with this project I decided to switch finally to PlattformIO, because the Arduino IDE build times are way too long when a project gets a bit more complex...

Build hints

My PlatformIO configuation is pretty simple. You need three external libs:

  1. LVGL Version 9.0.3 for the GUI content
  2. TFT_eSPI 2.5.43 from Brodmer to use the display
  3. XPT2046_Touchscreen 1.4 from Paul Stoffregen for the touch.

Here is my platformio.ini content

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 460800
lib_deps = 
	lvgl/lvgl@^9.3.0
	bodmer/TFT_eSPI@^2.5.43

IMPORTANT: For the touch function of the CYD you need the library XPT2046_Touchscreen Version 1.4 (Click here) which can't be found with the PaltformIO library management. I just downloaded the stuff and used it as loacal lib in folder /lib which is part of this repository.

The /src Folder

This is the very cool part of the project. The only two files I wrote myself (by copying code from here and there) are these:

main.cpp
touchscreen.h

It's mainly to initialize the TFT (rotation, touch) and the serial interface in touchscreen.h. The definition of event handlers for Buttons etc is shown in in main.cpp.

EEZ Studio

The other files were generated by the very cool tool EEZ Studio which generates C Code from a kind of "Form Designer" interface.

EEZ Image

I used EEZ Studio Version 0.24.0 which han be downloaded here.

Find my EEZ Studio Project in the EEZ_STUDIO subfolder.

The generated code is LVGL compatible, so that all the source files in the following list must not be touched and can me modified by EEZ Studio

actions.h
fonts.h
images.c
images.h
screens.c
screens.h
structs.h
styles.c
styles.h
ui.c
ui.h
vars.h

3D Stuff

Finally if you are a Maker you might also own a 3D-printer, right? If the answer is yes and you purchased the CYD somwhere and you need some stands for your CYD just have a look here:

CYD Print

CYD Stand

The CYD Stand can be used with 55° as well as 35° angle. Take your pick...

CYD Usage

So if you like, feel free to use the STP File ESP32_STAND_V2.stl provided in folder 3D_PRINT to put your CYD in a convenient position.

Note: I yust found out that Github changes .stl files. My 19kB file became a 239kB file after upload and I can't open it anymore in Cura. Therefore I added an extra .zip file with the original.

That's it, folkes. Have fun...

About

ESP32 CYD "Cheap Yellow Display" sample project with usage of LVGL and EEZ Studio

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published