LVGL, ग्राफिक्स लाइब्रेरी जो अधिकांश Cheap Yellow Display UI को power देती है

Cheap Yellow Display (आधिकारिक रूप से ESP32-2432S028R) एक छोटा development board है जो एक ESP32 को 2.8 इंच 320x240 रेजिस्टिव टचस्क्रीन, SD कार्ड स्लॉट, RGB LED और light sensor के साथ combine करता है, सब कुछ दस डॉलर से कम में। यह 2024 में popular हुआ और 2026 तक, यह किसी भी person के लिए default target बन गया है जो एक real touchscreen चाहता है - desk पर, wall पर या 3D printer के सामने। Hardware सिर्फ आधी कहानी है। बाकी आधा desktop toolchain है जिसे हम UIs design करने, firmware लिखने और builds को board पर push करने के लिए use करते हैं। नीचे सात tools दिए गए हैं जिन्हें हम CYD project पर काम करते समय सबसे अधिक use करते हैं, पहली blinking pixel से लेकर एक polished smart-home dashboard तक।

CYD tool में क्या देखना चाहिए

CYD peculiar है। यह SPI के through ILI9341 display driver use करता है और एक separate SPI bus पर XPT2046 resistive touch controller use करता है, और pin assignments वो नहीं हैं जो most ESP32 tutorials assume करते हैं। इसका मतलब है कि CYD work के लिए एक अच्छा tool कुछ specific traits रखता है।

नीचे सब कुछ इन पाँच में से कम से कम तीन पर अच्छी तरह से score करता है।

Quick comparison

Tool सबसे अच्छा है Platforms Free या paid Standout feature
LVGL Graphics layer itself Windows, macOS, Linux Free, MIT CYD और desktop simulator पर same C code चलाता है
SquareLine Studio Visually design करना UIs को Windows, macOS, Linux Free personal tier, paid Pro Clean LVGL C project code export करता है
PlatformIO Manage करना builds और libraries को Windows, macOS, Linux Free core, paid Home features One platformio.ini boards, deps और OTA को handle करता है
Arduino IDE 2 एक first CYD project Windows, macOS, Linux Free Board Manager दो clicks में ESP32 core find करता है
ESP-IDF Deep firmware और low-level work Windows, macOS, Linux Free Espressif drivers और RTOS features में full access
MicroPython Python में rapid prototyping Windows, macOS, Linux Free USB पर live REPL, कोई compile step नहीं
ESPHome Home Assistant dashboards Windows, macOS, Linux Free YAML config firmware में compile होता है, कोई C नहीं

Tools

1. LVGL – Graphics layer के लिए सबसे अच्छा

LVGL (Light and Versatile Graphics Library) वह reason है कि CYD के साथ काम करना fun है। यह हमें buttons, sliders, charts, keyboards और animations देता है जो 320x240 screen पर modern दिखते हैं, और यह almost any microcontroller पर framebuffer के साथ काम करता है। Version 9 ने memory footprint को tighten किया और display और input driver APIs को simplify किया, जो ESP32 के tight RAM budget पर matters करता है।

Beginners के लिए killer feature desktop simulator है: same C code जो CYD को drive करता है वह हमारे laptop पर एक SDL window में run हो सकता है, तो हम board को touch किए बिना layout और interaction पर iterate कर सकते हैं। जब हम flash करते हैं, LVGL cleanly PlatformIO, Arduino और ESP-IDF projects में fit होता है same lv_conf.h file के साथ।

कोई भी चीज़ जो CYD पर two-button demo से अधिक polished है, almost certainly hood के नीचे LVGL use करती है।

Download: Site . GitHub

2. SquareLine Studio – UIs को visually design करने के लिए सबसे अच्छा

LVGL widgets को hand से लिखना एक या दो screens के लिए ठीक है। उसके बाद, हम एक canvas चाहते हैं। SquareLine Studio एक drag-and-drop UI editor है जो specifically LVGL के लिए built है: हम screens lay out करते हैं, event handlers wire करते हैं, fonts pick करते हैं, images drop करते हैं और फिर export hit करते हैं एक full LVGL C project पाने के लिए PlatformIO या Arduino में drop करने के लिए ready।

Free personal tier hobby CYD builds के लिए generous enough है, और एक CYD template community में around है जो correct 320x240 resolution और ILI9341 driver settings को seed करता है। Pro tier unlimited screens, custom widgets और ability को unlock करता है assets को SD card पर रखने की, जो worthwhile है अगर हम projects बेचना start करें।

Workflow जो हमारे लिए काम करता है: SquareLine में UI sketch करना, export करना, फिर generated ui_events.c को manually edit करना Wi-Fi, sensor या MQTT logic wire करने के लिए।

Download: Site

3. PlatformIO – Builds और libraries को manage करने के लिए सबसे अच्छा

एक बार project में एक से अधिक file हो, PlatformIO अपने लिए pay करता है। यह VS Code के अंदर एक extension के रूप में run करता है (और कुछ अन्य editors भी), और यह ad-hoc build steps को replace करता है जो hobbyist ESP32 work को एक single platformio.ini के साथ plague करते हैं जो board, framework, libraries और upload method को declare करता है।

CYD work के लिए, pattern है: board = esp32dev pick करना, LVGL और TFT_eSPI या LovyanGFX display library को lib_deps के रूप में add करना, और correct User_Setup.h को include/ में drop करना ताकि pins CYD के wiring से match करें। उससे, एक single click build करता है, upload करता है और serial monitor को open करता है। Wi-Fi पर OTA एक one-line change है upload_protocol को, जो boards के लिए एक big quality-of-life win है जो एक bezel के पीछे mounted हैं।

Library versions config file में pinned होते हैं, तो एक project जो last year build हुआ था यह year भी build होता है। यह कुछ ऐसा नहीं है जो हम every ESP32 tutorial के बारे में कह सकते हैं।

Download: Site . GitHub

4. Arduino IDE 2 – एक first CYD project के लिए सबसे अच्छा

Arduino IDE 2 (current stable release, old Java 1.x नहीं) वह है जहाँ most people CYD के साथ शुरू करते हैं, और stay करने में कोई गलती नहीं है। यह Board Manager के through ESP32 board package को handle करता है, एक fast Monaco-based editor with autocomplete भेजता है, और built-in serial monitor और plotter है।

Example browser beginners के लिए best-in-class discovery tool है: TFT_eSPI, XPT2046_Touchscreen और LVGL libraries install करें और dozens of runnable sketches File menu में appear होते हैं। Most CYD tutorials YouTube और GitHub पर Arduino के लिए लिखे गए हैं, तो along follow करना friction-free है।

हम इसे choose करते हैं जब हम एक single-file sketch चाहते हैं कुछ को prove करने के लिए कि hardware पर काम करता है, फिर PlatformIO को port करते हैं एक बार project grow हो जाए।

Download: Site

5. ESP-IDF – Deep firmware work के लिए सबसे अच्छा

एक बार Arduino abstraction को outgrow करने के बाद, Espressif का अपना SDK हमारा wait कर रहा है। ESP-IDF हमें FreeRTOS tasks, full component system, deep power management, dual-core control और हर peripheral को access देता है जो ESP32 expose करता है। यह shipping products क्या use करते हैं।

Tradeoff verbosity है। Blinking LED Arduino की तुलना में अधिक code है, और CYD का display driver built-in नहीं है, तो हम या तो LVGL के esp_lcd port को bring करते हैं या TFT_eSPI को एक component के रूप में wire करते हैं। Payoff है कि एक बार plumbing place में है, हम उन चीज़ों को do कर सकते हैं जो Arduino नहीं कर सकता, जैसे double-buffered display refresh with DMA और PSRAM-backed framebuffers।

हम इसे use करते हैं जब CYD project में कुछ भी network-heavy (BLE + Wi-Fi coexistence, mesh, TLS) involve करता है, या जब हम battery पर power draw की care करते हैं।

Download: Site . GitHub

6. MicroPython – Python prototypes के लिए सबसे अच्छा

MicroPython एक Python 3 interpreter को ESP32 पर रखता है USB पर एक REPL के साथ, और यह हमारे prototype बनाने के तरीके को change करता है। एक line type करें, CYD पर pixel change को देखें। कोई compile नहीं, कोई flash cycle नहीं, कोई wait नहीं।

Graphics story LVGL C की तुलना में थोड़ा अधिक fragmented है, लेकिन LVGL itself MicroPython bindings भेजता है और CYD के लिए customized lv_micropython builds community में around हैं। Simpler dashboards के लिए, st7789py और xpt2046 drivers sufficient हैं text, sprites और touch regions को draw करने के लिए कुछ dozen lines में।

हम इसे teaching के लिए use करते हैं, one-off toys के लिए, और इस kind के internal tools के लिए जहाँ हम SSH कर सकते हैं WebREPL पर और behavior को rebuild के बिना change कर सकते हैं।

Download: Site

7. ESPHome – Smart-home dashboards के लिए सबसे अच्छा

अगर CYD एक wall पर जाने वाला है Home Assistant install के साथ, ESPHome एक working dashboard के लिए shortest path है। Firmware लिखने की जगह, हम एक YAML file लिखते हैं जो display, touchscreen, switches, sensors और UI pages को declare करता है। ESPHome इसे एक firmware binary में compile करता है और flash करता है, फिर सब कुछ को automatically Home Assistant में वापस wire करता है।

CYD को ESPHome docs में first-party support मिलता है, जिसमें correct SPI bus assignments, backlight PWM और touchscreen calibration hints भी शामिल हैं। Community configs thermostats, media controllers और multi-room lighting panels को cover करते हैं, और उनमें से कोई भी fork हो सकता है और ESPHome dashboard में एक browser के through edit हो सकता है।

किसी के लिए भी जो एक working smart-home touchscreen चाहता है इस weekend की जगह एक firmware learning project के, यह answer है।

Download: Site . GitHub

सही को कैसे pick करें

सही tool depend करता है कि CYD कहाँ जाने वाला है और हम कितना deep जाना चाहते हैं। कोई जो अभी board pick किया है और आज रात screen पर कुछ होना चाहता है, को Arduino IDE 2 install करना चाहिए, ESP32 core add करना चाहिए और एक TFT_eSPI example load करना चाहिए। यह एक working pixel तक shortest distance है।

एक real UI (menus, screens, animations, keyboard) वाली project के लिए, answer है LVGL rendering के लिए, SquareLine Studio layout के लिए और PlatformIO building के लिए। यह trio है जो most polished CYD projects GitHub पर use करते हैं, और यह combination है जो हम recommend करते हैं किसी को भी जो board के बारे में serious है।

Firmware developers जिनकी एक product ship करने की aim है, को Arduino को skip करना चाहिए और directly ESP-IDF को जाना चाहिए, फिर LVGL को एक component के रूप में bring करना चाहिए। यह अधिक setup है, लेकिन यह ceiling को remove करता है।

Python-first hobbyists और educators को MicroPython में अधिक काम हो जाता है, especially kids के workshops या in-house tools के लिए।

और अगर CYD एक wall पर live करने के लिए destined है Home Assistant के साथ, ESPHome सब कुछ को bypass करता है और हमें dashboard को YAML में एक afternoon में describe करने देता है।

FAQ

Cheap Yellow Display exactly क्या है? यह ESP32-2432S028R है, एक ESP32-WROOM-32 module जो एक board पर soldered है जिसमें एक 2.8 inch 320x240 touchscreen (ILI9341 driver, XPT2046 resistive touch), SD card slot, RGB LED, light sensor और USB port है। यह around eight to twelve dollars पर sell होता है most marketplaces पर और “Cheap Yellow Display” nickname pickup किया क्योंकि early runs yellow PCBs पर shipped हुए थे।

क्या मुझे LVGL use करना चाहिए, या alternatives हैं? LVGL सबसे popular choice है, लेकिन सिर्फ एक नहीं है। TFT_eSPI और LovyanGFX दोनों हमें fast primitives (lines, shapes, sprites, text) देते हैं अगर हम UI को ourselves draw करना चाहते हैं। Simple gauges और dashboards के लिए यह plenty है। LVGL जीतता है जैसे ही हम widgets, animation या keyboard चाहते हैं।

क्या मैं macOS या Linux पर CYD के लिए develop कर सकता हूँ? हाँ। इस article में हर tool नatively Windows, macOS और Linux पर run करता है। Linux पर हमें एक udev rule की जरूरत हो सकती है ताकि हमारा user account board पर CH340 या CP2102 USB-to-serial chip से talk कर सके, लेकिन setup एक one-time step है।

मैं CYD को USB की जगह Wi-Fi पर कैसे flash करूँ? PlatformIO, Arduino IDE 2, ESP-IDF और ESPHome सभी OTA updates को support करते हैं। Common pattern है firmware में एक OTA library या component को include करना, board को Wi-Fi से connect करना और फिर tool में upload method को board के IP address पर point करना। First upload USB पर है, बाकी सब wireless हो सकता है।

क्या SquareLine Studio hobby use के लिए free है? Personal tier free है और most hobby CYD projects को cover करता है। यह screens की संख्या और asset resolution जैसी चीज़ों को cap करता है, लेकिन exported LVGL code के कोई runtime restrictions नहीं हैं। Pro subscription unlimited screens, higher-resolution assets और commercial use को unlock करता है।