{"id":161013,"date":"2024-08-06T13:17:12","date_gmt":"2024-08-06T13:17:12","guid":{"rendered":"https:\/\/randomnerdtutorials.com\/?p=161013"},"modified":"2024-08-06T13:17:14","modified_gmt":"2024-08-06T13:17:14","slug":"programming-esp32-cyd-cheap-yellow-display-vs-code","status":"publish","type":"post","link":"https:\/\/randomnerdtutorials.com\/programming-esp32-cyd-cheap-yellow-display-vs-code\/","title":{"rendered":"Programming the ESP32 CYD (Cheap Yellow Display) with VS Code"},"content":{"rendered":"\n<p>In this tutorial, we&#8217;ll show you how to program the ESP32 CYD (Cheap Yellow Display) using VS Code with the PlatformIO extension. We&#8217;ll show you how to load and configure the TFT_eSPI library, the XPT2046_Touchscreen library, and set up the LVGL library on VS Code with PlatformIO.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" width=\"1200\" height=\"675\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/07\/ESP32-Cheap-Yellow-Display-VS-Code-PlatformIO.jpg?resize=1200%2C675&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Programming the ESP32 CYD Cheap Yellow Display with VS Code and PlatformIO\" class=\"wp-image-161037\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/07\/ESP32-Cheap-Yellow-Display-VS-Code-PlatformIO.jpg?w=1920&amp;quality=100&amp;strip=all&amp;ssl=1 1920w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/07\/ESP32-Cheap-Yellow-Display-VS-Code-PlatformIO.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/07\/ESP32-Cheap-Yellow-Display-VS-Code-PlatformIO.jpg?resize=1024%2C576&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/07\/ESP32-Cheap-Yellow-Display-VS-Code-PlatformIO.jpg?resize=768%2C432&amp;quality=100&amp;strip=all&amp;ssl=1 768w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/07\/ESP32-Cheap-Yellow-Display-VS-Code-PlatformIO.jpg?resize=1536%2C864&amp;quality=100&amp;strip=all&amp;ssl=1 1536w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/figure><\/div>\n\n\n<p class=\"rntbox rntclgreen\"><strong>New to the ESP32 Cheap Yellow Display?<\/strong> Get started here: <a href=\"https:\/\/randomnerdtutorials.com\/cheap-yellow-display-esp32-2432s028r\/\">Getting Started with ESP32 Cheap Yellow Display Board \u2013 CYD (ESP32-2432S028R)<\/a><\/p>\n\n\n\n<p>This tutorial also applies if you use an <a href=\"https:\/\/randomnerdtutorials.com\/esp32-tft-touchscreen-display-2-8-ili9341-arduino\/\" title=\"\">ESP32 with a separate 2.8 inch ILI9341 240&#215;320 TFT LCD touchscreen<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p>Before proceeding with this tutorial:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You need <a href=\"https:\/\/randomnerdtutorials.com\/vs-code-platformio-ide-esp32-esp8266-arduino\/\" title=\"\">VS Code and the PlatformIO extension installed on your computer<\/a>.<\/li>\n\n\n\n<li>We assume you are familiar with programming the ESP32 using VS Code and the platformIO extension.<\/li>\n\n\n\n<li>You should be familiar with the ESP32 Cheap Yellow Display Board\u2014<a href=\"https:\/\/randomnerdtutorials.com\/cheap-yellow-display-esp32-2432s028r\/\" title=\"\">start here<\/a>.<\/li>\n\n\n\n<li>We recommend that you have programmed the ESP32 CYD board using Arduino IDE before and you are familiar with the <a href=\"https:\/\/randomnerdtutorials.com\/cheap-yellow-display-esp32-2432s028r\/\" title=\"\">TFT_eSPI<\/a>, <a href=\"https:\/\/randomnerdtutorials.com\/cheap-yellow-display-esp32-2432s028r\/\" title=\"\">XPT2046_Touchscreen library<\/a>, and <a href=\"https:\/\/randomnerdtutorials.com\/lvgl-cheap-yellow-display-esp32-2432s028r\/\" title=\"\">LVGL<\/a> libraries installation procedure on Arduino IDE.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Installing the XPT2046_Touchscreen library on VS Code<\/h2>\n\n\n\n<p>To install the <span class=\"rnthl rntliteral\">XPT2046_Touchscreen<\/span> library on VS Code, you must add the following line to the <span class=\"rnthl rntliteral\">platformio.ini<\/span> file of your current project.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lib_deps = https:\/\/github.com\/PaulStoffregen\/XPT2046_Touchscreen.git<\/code><\/pre>\n\n\n\n<p>There&#8217;s currently an issue in VS Code when loading this library from the <em>Libraries <\/em>interface. So, you must load it like this using the library Gihub link, so that it uses the latest version.<\/p>\n\n\n\n<p>Most of your projects will use a 115200 baud rate, so also add the following line to the <span class=\"rnthl rntliteral\">platformio.ini<\/span> file.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>monitor_speed = 115200<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Installing the TFT_eSPI Library on VS Code<\/h2>\n\n\n\n<p>To install the <span class=\"rnthl rntliteral\">TFT_eSPI<\/span> library, you can click on the <strong>Home <\/strong>icon, select the <strong>Libraries <\/strong>tab at the left, and then search for <strong>TFT_eSPI<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"750\" height=\"437\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/07\/TFT_eSPI_VS_Code_search_library.png?resize=750%2C437&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Searching TFT_eSPI Library on VS Code\" class=\"wp-image-161020\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/07\/TFT_eSPI_VS_Code_search_library.png?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/07\/TFT_eSPI_VS_Code_search_library.png?resize=300%2C175&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>Select the <strong>TFT_eSPI by Bodmer<\/strong> and then click <strong>Add to Project<\/strong>. Select the project you&#8217;re currently working on.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"750\" height=\"436\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/07\/TFT_eSPI_add_to_project.png?resize=750%2C436&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Add TFT_eSPI Library to Project, VS Code\" class=\"wp-image-161021\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/07\/TFT_eSPI_add_to_project.png?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/07\/TFT_eSPI_add_to_project.png?resize=300%2C174&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>After that, the library will be automatically added to your <span class=\"rnthl rntliteral\">platformio.ini<\/span> file. The <span class=\"rnthl rntliteral\">lib_deps<\/span> directive will look as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lib_deps = \n\thttps:&#47;&#47;github.com\/PaulStoffregen\/XPT2046_Touchscreen.git\n\tbodmer\/TFT_eSPI@^2.5.43<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Configuring the TFT_eSPI Library on VS Code &#8211; the User_Setup.h config file<\/h2>\n\n\n\n<p>To properly use the <span class=\"rnthl rntliteral\">TFT_eSPI<\/span> library, you need a configuration file called<strong><em>&nbsp;User_Setup.h<\/em><\/strong>&nbsp;with the right definitions for the display model you&#8217;re using.<\/p>\n\n\n\n<p>We\u2019ve already prepared that file so that you don\u2019t have any configuration issues following our examples. Follow the next instructions to learn how to do it.<\/p>\n\n\n\n<p class=\"rntbox rntclgray\"><strong>Note<\/strong>: we tested this on the <a href=\"https:\/\/makeradvisor.com\/tools\/cyd-cheap-yellow-display-esp32-2432s028r\/\" target=\"_blank\" rel=\"noopener\" title=\"\">ESP32-2432S028R<\/a> and the <a href=\"https:\/\/makeradvisor.com\/tools\/2-8-inch-ili9341-tft-240x320\/\" target=\"_blank\" rel=\"noopener\" title=\"\">2.8 inch ILI9341 240&#215;320 TFT LCD touchscreen<\/a>. If you have different models with different sizes, you&#8217;ll probably need to adjust the <strong><em>User_Setup.h<\/em><\/strong> file.<\/p>\n\n\n\n<p><strong>1)<\/strong> On the Explorer tab at the left sidebar, under the project folder, navigate to <strong>.pio<\/strong> &gt; <strong>libdeps<\/strong>\\[you_board_model] &gt; <strong>TFT_eSPI<\/strong> &gt; <strong>User_Setup.h<\/strong>.<\/p>\n\n\n\n<p><strong>2)<\/strong> Open the <strong>User_Setup.h<\/strong> file.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"891\" height=\"822\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/07\/open-user-setup-tft-espi-VS-Code.png?resize=891%2C822&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Opening the user_setup TFT eSPI in VS Code\" class=\"wp-image-161022\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/07\/open-user-setup-tft-espi-VS-Code.png?w=891&amp;quality=100&amp;strip=all&amp;ssl=1 891w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/07\/open-user-setup-tft-espi-VS-Code.png?resize=300%2C277&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/07\/open-user-setup-tft-espi-VS-Code.png?resize=768%2C709&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 891px) 100vw, 891px\" \/><\/figure><\/div>\n\n\n<p><strong>3)<\/strong> <strong>Replace <\/strong>the code in the <strong>User_Setup.h<\/strong> file with the code provided in our <strong>User_Setup.h<\/strong> file. You can get our <strong>User_Setup.h<\/strong> file below.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/github.com\/RuiSantosdotme\/ESP32-TFT-Touchscreen\/raw\/main\/configs\/User_Setup.zip\" target=\"_blank\" rel=\"noreferrer noopener\">Click here to download .zip folder<\/a>&nbsp;with the&nbsp;<strong><em>User_Setup.h<\/em><\/strong>&nbsp;config file (<a href=\"https:\/\/raw.githubusercontent.com\/RuiSantosdotme\/ESP32-TFT-Touchscreen\/main\/configs\/User_Setup.h\" target=\"_blank\" rel=\"noreferrer noopener\">view raw file<\/a>)<\/li>\n<\/ul>\n\n\n\n<p><strong>4)<\/strong> Save the <strong><em>User_Setup.h<\/em><\/strong> file.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Testing the Installation<\/h3>\n\n\n\n<p>To test if you&#8217;ve installed and configured the libraries properly, you can run the following code on your board. It displays text and tests the touchscreen.<\/p>\n\n\n<pre style=\"max-height: 40em; margin-bottom: 20px;\"><code class=\"language-c\">\/*  Rui Santos &amp; Sara Santos - Random Nerd Tutorials\n    THIS EXAMPLE WAS TESTED WITH THE FOLLOWING HARDWARE:\n    1) ESP32-2432S028R 2.8 inch 240\u00d7320 also known as the Cheap Yellow Display (CYD): https:\/\/makeradvisor.com\/tools\/cyd-cheap-yellow-display-esp32-2432s028r\/\n      SET UP INSTRUCTIONS: https:\/\/RandomNerdTutorials.com\/cyd\/\n    2) REGULAR ESP32 Dev Board + 2.8 inch 240x320 TFT Display: https:\/\/makeradvisor.com\/tools\/2-8-inch-ili9341-tft-240x320\/ and https:\/\/makeradvisor.com\/tools\/esp32-dev-board-wi-fi-bluetooth\/\n      SET UP INSTRUCTIONS: https:\/\/RandomNerdTutorials.com\/esp32-tft\/\n    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files.\n    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n*\/\n\n#include &lt;SPI.h&gt;\n\n\/*  Install the &quot;TFT_eSPI&quot; library by Bodmer to interface with the TFT Display - https:\/\/github.com\/Bodmer\/TFT_eSPI\n    *** IMPORTANT: User_Setup.h available on the internet will probably NOT work with the examples available at Random Nerd Tutorials ***\n    *** YOU MUST USE THE User_Setup.h FILE PROVIDED IN THE LINK BELOW IN ORDER TO USE THE EXAMPLES FROM RANDOM NERD TUTORIALS ***\n    FULL INSTRUCTIONS AVAILABLE ON HOW CONFIGURE THE LIBRARY: https:\/\/RandomNerdTutorials.com\/cyd\/ or https:\/\/RandomNerdTutorials.com\/esp32-tft\/   *\/\n#include &lt;TFT_eSPI.h&gt;\n\n\/\/ Install the &quot;XPT2046_Touchscreen&quot; library by Paul Stoffregen to use the Touchscreen - https:\/\/github.com\/PaulStoffregen\/XPT2046_Touchscreen\n\/\/ Note: this library doesn't require further configuration\n#include &lt;XPT2046_Touchscreen.h&gt;\n\nTFT_eSPI tft = TFT_eSPI();\n\n\/\/ Touchscreen pins\n#define XPT2046_IRQ 36   \/\/ T_IRQ\n#define XPT2046_MOSI 32  \/\/ T_DIN\n#define XPT2046_MISO 39  \/\/ T_OUT\n#define XPT2046_CLK 25   \/\/ T_CLK\n#define XPT2046_CS 33    \/\/ T_CS\n\nSPIClass touchscreenSPI = SPIClass(VSPI);\nXPT2046_Touchscreen touchscreen(XPT2046_CS, XPT2046_IRQ);\n\n#define SCREEN_WIDTH 320\n#define SCREEN_HEIGHT 240\n#define FONT_SIZE 2\n\n\/\/ Touchscreen coordinates: (x, y) and pressure (z)\nint x, y, z;\n\n\/\/ Print Touchscreen info about X, Y and Pressure (Z) on the Serial Monitor\nvoid printTouchToSerial(int touchX, int touchY, int touchZ) {\n  Serial.print(&quot;X = &quot;);\n  Serial.print(touchX);\n  Serial.print(&quot; | Y = &quot;);\n  Serial.print(touchY);\n  Serial.print(&quot; | Pressure = &quot;);\n  Serial.print(touchZ);\n  Serial.println();\n}\n\n\/\/ Print Touchscreen info about X, Y and Pressure (Z) on the TFT Display\nvoid printTouchToDisplay(int touchX, int touchY, int touchZ) {\n  \/\/ Clear TFT screen\n  tft.fillScreen(TFT_WHITE);\n  tft.setTextColor(TFT_BLACK, TFT_WHITE);\n\n  int centerX = SCREEN_WIDTH \/ 2;\n  int textY = 80;\n \n  String tempText = &quot;X = &quot; + String(touchX);\n  tft.drawCentreString(tempText, centerX, textY, FONT_SIZE);\n\n  textY += 20;\n  tempText = &quot;Y = &quot; + String(touchY);\n  tft.drawCentreString(tempText, centerX, textY, FONT_SIZE);\n\n  textY += 20;\n  tempText = &quot;Pressure = &quot; + String(touchZ);\n  tft.drawCentreString(tempText, centerX, textY, FONT_SIZE);\n}\n\nvoid setup() {\n  Serial.begin(115200);\n\n  \/\/ Start the SPI for the touchscreen and init the touchscreen\n  touchscreenSPI.begin(XPT2046_CLK, XPT2046_MISO, XPT2046_MOSI, XPT2046_CS);\n  touchscreen.begin(touchscreenSPI);\n  \/\/ Set the Touchscreen rotation in landscape mode\n  \/\/ Note: in some displays, the touchscreen might be upside down, so you might need to set the rotation to 3: touchscreen.setRotation(3);\n  touchscreen.setRotation(1);\n\n  \/\/ Start the tft display\n  tft.init();\n  \/\/ Set the TFT display rotation in landscape mode\n  tft.setRotation(1);\n\n  \/\/ Clear the screen before writing to it\n  tft.fillScreen(TFT_WHITE);\n  tft.setTextColor(TFT_BLACK, TFT_WHITE);\n  \n  \/\/ Set X and Y coordinates for center of display\n  int centerX = SCREEN_WIDTH \/ 2;\n  int centerY = SCREEN_HEIGHT \/ 2;\n\n  tft.drawCentreString(&quot;Hello, world!&quot;, centerX, 30, FONT_SIZE);\n  tft.drawCentreString(&quot;Touch screen to test&quot;, centerX, centerY, FONT_SIZE);\n}\n\nvoid loop() {\n  \/\/ Checks if Touchscreen was touched, and prints X, Y and Pressure (Z) info on the TFT display and Serial Monitor\n  if (touchscreen.tirqTouched() &amp;&amp; touchscreen.touched()) {\n    \/\/ Get Touchscreen points\n    TS_Point p = touchscreen.getPoint();\n    \/\/ Calibrate Touchscreen points with map function to the correct width and height\n    x = map(p.x, 200, 3700, 1, SCREEN_WIDTH);\n    y = map(p.y, 240, 3800, 1, SCREEN_HEIGHT);\n    z = p.z;\n\n    printTouchToSerial(x, y, z);\n    printTouchToDisplay(x, y, z);\n\n    delay(100);\n  }\n}\n<\/code><\/pre>\n\t<p style=\"text-align:center\"><a class=\"rntwhite\" href=\"https:\/\/github.com\/RuiSantosdotme\/ESP32-TFT-Touchscreen\/raw\/main\/examples\/ESP32_TFT_Touchscreen_Basic\/ESP32_TFT_Touchscreen_Basic.ino\" target=\"_blank\">View raw code<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Demonstration<\/h3>\n\n\n\n<p>Upload the code to your board.<\/p>\n\n\n\n<p>After uploading the code to your board, it should display the sample \u201cHello, world!\u201d text centered at the top. Press the touchscreen with your finger to test it. It should print the coordinates: (x, y) and pressure (z) in the TFT display.&nbsp;<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"422\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/03\/ESP32-Cheap-Yellow-Display-CYD-Board-ESP32-2432S028R-Touchscreen-Demonstration.jpg?resize=750%2C422&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP32 Cheap Yellow Display CYD Board ESP32-2432S028R Touchscreen Demonstration\" class=\"wp-image-149593\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/03\/ESP32-Cheap-Yellow-Display-CYD-Board-ESP32-2432S028R-Touchscreen-Demonstration.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/03\/ESP32-Cheap-Yellow-Display-CYD-Board-ESP32-2432S028R-Touchscreen-Demonstration.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p class=\"rntbox rntcred\"><strong>Important note:<\/strong> you need to do all the installation procedure and setting up the configuration file for each new project in VS Code. You&#8217;ll also need to repeat this if you update the libraries in your project.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installing and Configuring the LVGL Library in VS Code<\/h2>\n\n\n\n<p><strong>1)<\/strong> After creating or opening a project in VS Code, click on the <strong>Home <\/strong>icon and select the <strong>Libraries <\/strong>tab. Search for <strong>LVGL<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"354\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/07\/LVGL_install_VS_Code.png?resize=750%2C354&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"install LVGL library VS Code\" class=\"wp-image-161026\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/07\/LVGL_install_VS_Code.png?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/07\/LVGL_install_VS_Code.png?resize=300%2C142&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p><strong>2)<\/strong> Add<strong> LVGL Version 9<\/strong> to your project.<\/p>\n\n\n\n<p><strong>3)<\/strong> At the left sidebar, open the Explorer tab. Go the the following path <strong>.pio<\/strong> &gt; <strong>libdeps<\/strong>.<\/p>\n\n\n\n<p><strong>4)<\/strong> Create a new file under the <strong><em>libdeps <\/em><\/strong>folder called <strong>lv_conf.h<\/strong>.<\/p>\n\n\n\n<p><strong>5)<\/strong> Add the following code to the<strong> lv_conf.h<\/strong> file.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/github.com\/RuiSantosdotme\/ESP32-TFT-Touchscreen\/raw\/main\/configs\/lv_conf.zip\" target=\"_blank\" rel=\"noreferrer noopener\">Click here to download .zip folder<\/a>&nbsp;with the&nbsp;<strong><em>lv_conf.h<\/em><\/strong>&nbsp;config file (<a href=\"https:\/\/raw.githubusercontent.com\/RuiSantosdotme\/ESP32-TFT-Touchscreen\/main\/configs\/lv_conf.h\" target=\"_blank\" rel=\"noreferrer noopener\">view raw file<\/a>)<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"874\" height=\"610\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/07\/create_lv_conf_file_LVGL_library_VS_Code_f.png?resize=874%2C610&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Create lv_conf file LVGL Library in VS Code\" class=\"wp-image-161028\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/07\/create_lv_conf_file_LVGL_library_VS_Code_f.png?w=874&amp;quality=100&amp;strip=all&amp;ssl=1 874w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/07\/create_lv_conf_file_LVGL_library_VS_Code_f.png?resize=300%2C209&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/07\/create_lv_conf_file_LVGL_library_VS_Code_f.png?resize=768%2C536&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 874px) 100vw, 874px\" \/><\/figure><\/div>\n\n\n<p><strong>6) <\/strong>Then, open the <strong>lvgl <\/strong>folder. Move the <strong>demos <\/strong>and <strong>examples <\/strong>folders to the <strong>src <\/strong>folder.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"610\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/07\/move_examples_demos_src_folder_LVGL_library_VS_Code.png?resize=750%2C610&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"move examples demos to source LVGL library VS Code\" class=\"wp-image-161029\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/07\/move_examples_demos_src_folder_LVGL_library_VS_Code.png?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/07\/move_examples_demos_src_folder_LVGL_library_VS_Code.png?resize=300%2C244&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>Now, you have everything set up to use the LVGL library in VS Code.<\/p>\n\n\n\n<p>To use the <span class=\"rnthl rntliteral\">LVGL<\/span> library you also need to install the <span class=\"rnthl rntliteral\">TFT_eSPI<\/span> and <span class=\"rnthl rntliteral\">XPT2046_Touchscreen<\/span> libraries as mentioned earlier.<\/p>\n\n\n\n<p class=\"rntbox rntcred\"><strong>Important note:<\/strong> you need to do all the installation procedure and setting up the configuration files for each new project in VS Code.<\/p>\n\n\n\n<p>To test if all the libraries were properly set up, you can test the following code.<\/p>\n\n\n<pre style=\"max-height: 40em; margin-bottom: 20px;\"><code class=\"language-c\">\/*  Rui Santos &amp; Sara Santos - Random Nerd Tutorials\n    THIS EXAMPLE WAS TESTED WITH THE FOLLOWING HARDWARE:\n    1) ESP32-2432S028R 2.8 inch 240\u00d7320 also known as the Cheap Yellow Display (CYD): https:\/\/makeradvisor.com\/tools\/cyd-cheap-yellow-display-esp32-2432s028r\/\n      SET UP INSTRUCTIONS: https:\/\/RandomNerdTutorials.com\/cyd-lvgl\/\n    2) REGULAR ESP32 Dev Board + 2.8 inch 240x320 TFT Display: https:\/\/makeradvisor.com\/tools\/2-8-inch-ili9341-tft-240x320\/ and https:\/\/makeradvisor.com\/tools\/esp32-dev-board-wi-fi-bluetooth\/\n      SET UP INSTRUCTIONS: https:\/\/RandomNerdTutorials.com\/esp32-tft-lvgl\/\n    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files.\n    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n*\/\n\n\/*  Install the &quot;lvgl&quot; library version 9.2 by kisvegabor to interface with the TFT Display - https:\/\/lvgl.io\/\n    *** IMPORTANT: lv_conf.h available on the internet will probably NOT work with the examples available at Random Nerd Tutorials ***\n    *** YOU MUST USE THE lv_conf.h FILE PROVIDED IN THE LINK BELOW IN ORDER TO USE THE EXAMPLES FROM RANDOM NERD TUTORIALS ***\n    FULL INSTRUCTIONS AVAILABLE ON HOW CONFIGURE THE LIBRARY: https:\/\/RandomNerdTutorials.com\/cyd-lvgl\/ or https:\/\/RandomNerdTutorials.com\/esp32-tft-lvgl\/   *\/\n#include &lt;lvgl.h&gt;\n\n\/*  Install the &quot;TFT_eSPI&quot; library by Bodmer to interface with the TFT Display - https:\/\/github.com\/Bodmer\/TFT_eSPI\n    *** IMPORTANT: User_Setup.h available on the internet will probably NOT work with the examples available at Random Nerd Tutorials ***\n    *** YOU MUST USE THE User_Setup.h FILE PROVIDED IN THE LINK BELOW IN ORDER TO USE THE EXAMPLES FROM RANDOM NERD TUTORIALS ***\n    FULL INSTRUCTIONS AVAILABLE ON HOW CONFIGURE THE LIBRARY: https:\/\/RandomNerdTutorials.com\/cyd-lvgl\/ or https:\/\/RandomNerdTutorials.com\/esp32-tft-lvgl\/   *\/\n#include &lt;TFT_eSPI.h&gt;\n\n\/\/ Install the &quot;XPT2046_Touchscreen&quot; library by Paul Stoffregen to use the Touchscreen - https:\/\/github.com\/PaulStoffregen\/XPT2046_Touchscreen - Note: this library doesn't require further configuration\n#include &lt;XPT2046_Touchscreen.h&gt;\n\n\/\/ Touchscreen pins\n#define XPT2046_IRQ 36   \/\/ T_IRQ\n#define XPT2046_MOSI 32  \/\/ T_DIN\n#define XPT2046_MISO 39  \/\/ T_OUT\n#define XPT2046_CLK 25   \/\/ T_CLK\n#define XPT2046_CS 33    \/\/ T_CS\n\nSPIClass touchscreenSPI = SPIClass(VSPI);\nXPT2046_Touchscreen touchscreen(XPT2046_CS, XPT2046_IRQ);\n\n#define SCREEN_WIDTH 240\n#define SCREEN_HEIGHT 320\n\n\/\/ Touchscreen coordinates: (x, y) and pressure (z)\nint x, y, z;\n\n#define DRAW_BUF_SIZE (SCREEN_WIDTH * SCREEN_HEIGHT \/ 10 * (LV_COLOR_DEPTH \/ 8))\nuint32_t draw_buf[DRAW_BUF_SIZE \/ 4];\n\n\/\/ If logging is enabled, it will inform the user about what is happening in the library\nvoid log_print(lv_log_level_t level, const char * buf) {\n  LV_UNUSED(level);\n  Serial.println(buf);\n  Serial.flush();\n}\n\n\/\/ Get the Touchscreen data\nvoid touchscreen_read(lv_indev_t * indev, lv_indev_data_t * data) {\n  \/\/ Checks if Touchscreen was touched, and prints X, Y and Pressure (Z)\n  if(touchscreen.tirqTouched() &amp;&amp; touchscreen.touched()) {\n    \/\/ Get Touchscreen points\n    TS_Point p = touchscreen.getPoint();\n    \/\/ Calibrate Touchscreen points with map function to the correct width and height\n    x = map(p.x, 200, 3700, 1, SCREEN_WIDTH);\n    y = map(p.y, 240, 3800, 1, SCREEN_HEIGHT);\n    z = p.z;\n\n    data-&gt;state = LV_INDEV_STATE_PRESSED;\n\n    \/\/ Set the coordinates\n    data-&gt;point.x = x;\n    data-&gt;point.y = y;\n\n    \/\/ Print Touchscreen info about X, Y and Pressure (Z) on the Serial Monitor\n    \/* Serial.print(&quot;X = &quot;);\n    Serial.print(x);\n    Serial.print(&quot; | Y = &quot;);\n    Serial.print(y);\n    Serial.print(&quot; | Pressure = &quot;);\n    Serial.print(z);\n    Serial.println();*\/\n  }\n  else {\n    data-&gt;state = LV_INDEV_STATE_RELEASED;\n  }\n}\n\nint btn1_count = 0;\n\/\/ Callback that is triggered when btn1 is clicked\nstatic void event_handler_btn1(lv_event_t * e) {\n  lv_event_code_t code = lv_event_get_code(e);\n  if(code == LV_EVENT_CLICKED) {\n    btn1_count++;\n    LV_LOG_USER(&quot;Button clicked %d&quot;, (int)btn1_count);\n  }\n}\n\n\/\/ Callback that is triggered when btn2 is clicked\/toggled\nstatic void event_handler_btn2(lv_event_t * e) {\n  lv_event_code_t code = lv_event_get_code(e);\n  lv_obj_t * obj = (lv_obj_t*) lv_event_get_target(e);\n  if(code == LV_EVENT_VALUE_CHANGED) {\n    LV_UNUSED(obj);\n    LV_LOG_USER(&quot;Toggled %s&quot;, lv_obj_has_state(obj, LV_STATE_CHECKED) ? &quot;on&quot; : &quot;off&quot;);\n  }\n}\n\nstatic lv_obj_t * slider_label;\n\/\/ Callback that prints the current slider value on the TFT display and Serial Monitor for debugging purposes\nstatic void slider_event_callback(lv_event_t * e) {\n  lv_obj_t * slider = (lv_obj_t*) lv_event_get_target(e);\n  char buf[8];\n  lv_snprintf(buf, sizeof(buf), &quot;%d%%&quot;, (int)lv_slider_get_value(slider));\n  lv_label_set_text(slider_label, buf);\n  lv_obj_align_to(slider_label, slider, LV_ALIGN_OUT_BOTTOM_MID, 0, 10);\n  LV_LOG_USER(&quot;Slider changed to %d%%&quot;, (int)lv_slider_get_value(slider));\n}\n\nvoid lv_create_main_gui(void) {\n  \/\/ Create a text label aligned center on top (&quot;Hello, world!&quot;)\n  lv_obj_t * text_label = lv_label_create(lv_screen_active());\n  lv_label_set_long_mode(text_label, LV_LABEL_LONG_WRAP);    \/\/ Breaks the long lines\n  lv_label_set_text(text_label, &quot;Hello, world!&quot;);\n  lv_obj_set_width(text_label, 150);    \/\/ Set smaller width to make the lines wrap\n  lv_obj_set_style_text_align(text_label, LV_TEXT_ALIGN_CENTER, 0);\n  lv_obj_align(text_label, LV_ALIGN_CENTER, 0, -90);\n\n  lv_obj_t * btn_label;\n  \/\/ Create a Button (btn1)\n  lv_obj_t * btn1 = lv_button_create(lv_screen_active());\n  lv_obj_add_event_cb(btn1, event_handler_btn1, LV_EVENT_ALL, NULL);\n  lv_obj_align(btn1, LV_ALIGN_CENTER, 0, -50);\n  lv_obj_remove_flag(btn1, LV_OBJ_FLAG_PRESS_LOCK);\n\n  btn_label = lv_label_create(btn1);\n  lv_label_set_text(btn_label, &quot;Button&quot;);\n  lv_obj_center(btn_label);\n\n  \/\/ Create a Toggle button (btn2)\n  lv_obj_t * btn2 = lv_button_create(lv_screen_active());\n  lv_obj_add_event_cb(btn2, event_handler_btn2, LV_EVENT_ALL, NULL);\n  lv_obj_align(btn2, LV_ALIGN_CENTER, 0, 10);\n  lv_obj_add_flag(btn2, LV_OBJ_FLAG_CHECKABLE);\n  lv_obj_set_height(btn2, LV_SIZE_CONTENT);\n\n  btn_label = lv_label_create(btn2);\n  lv_label_set_text(btn_label, &quot;Toggle&quot;);\n  lv_obj_center(btn_label);\n  \n  \/\/ Create a slider aligned in the center bottom of the TFT display\n  lv_obj_t * slider = lv_slider_create(lv_screen_active());\n  lv_obj_align(slider, LV_ALIGN_CENTER, 0, 60);\n  lv_obj_add_event_cb(slider, slider_event_callback, LV_EVENT_VALUE_CHANGED, NULL);\n  lv_slider_set_range(slider, 0, 100);\n  lv_obj_set_style_anim_duration(slider, 2000, 0);\n\n  \/\/ Create a label below the slider to display the current slider value\n  slider_label = lv_label_create(lv_screen_active());\n  lv_label_set_text(slider_label, &quot;0%&quot;);\n  lv_obj_align_to(slider_label, slider, LV_ALIGN_OUT_BOTTOM_MID, 0, 10);\n}\n\nvoid setup() {\n  String LVGL_Arduino = String(&quot;LVGL Library Version: &quot;) + lv_version_major() + &quot;.&quot; + lv_version_minor() + &quot;.&quot; + lv_version_patch();\n  Serial.begin(115200);\n  Serial.println(LVGL_Arduino);\n  \n  \/\/ Start LVGL\n  lv_init();\n  \/\/ Register print function for debugging\n  lv_log_register_print_cb(log_print);\n\n  \/\/ Start the SPI for the touchscreen and init the touchscreen\n  touchscreenSPI.begin(XPT2046_CLK, XPT2046_MISO, XPT2046_MOSI, XPT2046_CS);\n  touchscreen.begin(touchscreenSPI);\n  \/\/ Set the Touchscreen rotation in landscape mode\n  \/\/ Note: in some displays, the touchscreen might be upside down, so you might need to set the rotation to 0: touchscreen.setRotation(0);\n  touchscreen.setRotation(2);\n\n  \/\/ Create a display object\n  lv_display_t * disp;\n  \/\/ Initialize the TFT display using the TFT_eSPI library\n  disp = lv_tft_espi_create(SCREEN_WIDTH, SCREEN_HEIGHT, draw_buf, sizeof(draw_buf));\n  lv_display_set_rotation(disp, LV_DISPLAY_ROTATION_270);\n    \n  \/\/ Initialize an LVGL input device object (Touchscreen)\n  lv_indev_t * indev = lv_indev_create();\n  lv_indev_set_type(indev, LV_INDEV_TYPE_POINTER);\n  \/\/ Set the callback function to read Touchscreen input\n  lv_indev_set_read_cb(indev, touchscreen_read);\n\n  \/\/ Function to draw the GUI (text, buttons and sliders)\n  lv_create_main_gui();\n}\n\nvoid loop() {\n  lv_task_handler();  \/\/ let the GUI do its work\n  lv_tick_inc(5);     \/\/ tell LVGL how much time has passed\n  delay(5);           \/\/ let this time pass\n}\n<\/code><\/pre>\n\t<p style=\"text-align:center\"><a class=\"rntwhite\" href=\"https:\/\/github.com\/RuiSantosdotme\/ESP32-TFT-Touchscreen\/raw\/main\/examples\/ESP32_LVGL_Basic\/ESP32_LVGL_Basic.ino\" target=\"_blank\">View raw code<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Testing the Installation<\/h3>\n\n\n\n<p>Upload the code to your board.<\/p>\n\n\n\n<p>After uploading the code to your board, it should display the sample &#8220;Hello, world!&#8221; text centered at the top, two buttons, and one slider. <\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"421\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/05\/ESP32-Cheap-Yellow-Display-Board-CYD-TFT-Display-Touchscreen-LVGL-Library-Example.jpg?resize=750%2C421&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP32 Cheap Yellow Display Board CYD TFT Display Touchscreen LVGL Library Example\" class=\"wp-image-155028\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/05\/ESP32-Cheap-Yellow-Display-Board-CYD-TFT-Display-Touchscreen-LVGL-Library-Example.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/05\/ESP32-Cheap-Yellow-Display-Board-CYD-TFT-Display-Touchscreen-LVGL-Library-Example.jpg?resize=300%2C168&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>Interact with the widgets and see the results in the Serial Monitor. If the example is working as expected, all the libraries were successfully added and configured.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Wrapping Up<\/h2>\n\n\n\n<p>In this quick tutorial, we&#8217;ve shown you how to set up the TFT, touchscreen, and LVGL libraries on VS Code to program the ESP32 CYD Display.<\/p>\n\n\n\n<p>We hope you&#8217;ve found this guide useful. If you have a better or different approach to set up the libraries, please share it below.<\/p>\n\n\n\n<p>Other projects you may like:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/randomnerdtutorials.com\/lvgl-cheap-yellow-display-esp32-2432s028r\/\" title=\"\">LVGL with ESP32 Cheap Yellow Display Board (ESP32-2432S028R) (Arduino IDE)<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/esp32-cyd-lvgl-temperature-ds18b20\/\">ESP32 CYD with LVGL: Display Temperature with DS18B20 Sensor (Text and Arc)<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/esp32-cheap-yellow-display-cyd-pinout-esp32-2432s028r\/\">ESP32 Cheap Yellow Display (CYD) Pinout (ESP32-2432S028R)<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/touchscreen-on-off-button-cheap-yellow-display-esp32-2432s028r\/\">ESP32 Touchscreen On\/Off Button \u2013 Cheap Yellow Display (ESP32-2432S028R)<\/a><\/li>\n<\/ul>\n\n\n\n<p>Learn more about building GUIs using LVGL with our eBook:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/randomnerdtutorials.com\/learn-lvgl-esp32-ebook\/\" title=\"\">Learn LVGL: Build GUIs for ESP32 Projects (eBook)<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we&#8217;ll show you how to program the ESP32 CYD (Cheap Yellow Display) using VS Code with the PlatformIO extension. We&#8217;ll show you how to load and configure &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Programming the ESP32 CYD (Cheap Yellow Display) with VS Code\" class=\"read-more button\" href=\"https:\/\/randomnerdtutorials.com\/programming-esp32-cyd-cheap-yellow-display-vs-code\/#more-161013\" aria-label=\"Read more about Programming the ESP32 CYD (Cheap Yellow Display) with VS Code\">CONTINUE READING \u00bb<\/a><\/p>\n","protected":false},"author":5,"featured_media":161037,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[276,281,299,264],"tags":[],"class_list":["post-161013","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-esp32","category-esp32-project","category-0-esp32","category-project"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/07\/ESP32-Cheap-Yellow-Display-VS-Code-PlatformIO.jpg?fit=1920%2C1080&quality=100&strip=all&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/161013","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/comments?post=161013"}],"version-history":[{"count":10,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/161013\/revisions"}],"predecessor-version":[{"id":161480,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/161013\/revisions\/161480"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media\/161037"}],"wp:attachment":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media?parent=161013"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/categories?post=161013"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/tags?post=161013"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}