1.. zephyr:code-sample:: lvgl 2 :name: LVGL basic sample 3 :relevant-api: display_interface input_interface 4 5 Display a "Hello World" and react to user input using LVGL. 6 7Overview 8******** 9 10This sample application displays "Hello World" in the center of the screen 11and a counter at the bottom which increments every second. 12Based on the available input devices on the board used to run the sample, 13additional widgets may be displayed and additional interactions enabled: 14 15* Pointer 16 If your board has a touch panel controller 17 (:dtcompatible:`zephyr,lvgl-pointer-input`), a button widget is displayed 18 in the center of the screen. Otherwise a label widget is displayed. 19* Button 20 The button pseudo device (:dtcompatible:`zephyr,lvgl-button-input`) maps 21 a press/release action to a specific coordinate on screen. In the case 22 of this sample, the coordinates are mapped to the center of the screen. 23* Encoder 24 The encoder pseudo device (:dtcompatible:`zephyr,lvgl-encoder-input`) 25 can be used to navigate between widgets and edit their values. If the 26 board contains an encoder, an arc widget is displayed, which can be 27 edited. 28* Keypad 29 The keypad pseudo device (:dtcompatible:`zephyr,lvgl-keypad-input`) can 30 be used for focus shifting and also entering characters inside editable 31 widgets such as text areas. If the board used with this sample has a 32 keypad device, a button matrix is displayed at the bottom of the screen 33 to showcase the focus shifting capabilities. 34 35Requirements 36************ 37 38Display shield and a board which provides a configuration 39for Arduino connectors, for example: 40 41- :ref:`adafruit_2_8_tft_touch_v2` and :ref:`nrf52840dk_nrf52840` 42- :ref:`buydisplay_2_8_tft_touch_arduino` and :ref:`nrf52840dk_nrf52840` 43- :ref:`ssd1306_128_shield` and :ref:`frdm_k64f` 44 45or a board with an integrated display: 46 47- :ref:`esp_wrover_kit` 48 49or a simulated display environment in a :ref:`native_sim <native_sim>` application: 50 51- :ref:`native_sim` 52- `SDL2`_ 53 54or 55 56- :ref:`mimxrt1050_evk` 57- `RK043FN02H-CT`_ 58 59or 60 61- :ref:`mimxrt1060_evk` 62- `RK043FN02H-CT`_ 63 64Building and Running 65******************** 66 67Example building for :ref:`nrf52840dk_nrf52840`: 68 69.. zephyr-app-commands:: 70 :zephyr-app: samples/subsys/display/lvgl 71 :board: nrf52840dk_nrf52840 72 :shield: adafruit_2_8_tft_touch_v2 73 :goals: build flash 74 75Example building for :ref:`native_sim <native_sim>`: 76 77.. zephyr-app-commands:: 78 :zephyr-app: samples/subsys/display/lvgl 79 :board: native_sim 80 :goals: build run 81 82Alternatively, if building from a 64-bit host machine, the previous target 83board argument may also be replaced by ``native_sim_64``. 84 85References 86********** 87 88.. target-notes:: 89 90.. _LVGL Web Page: https://lvgl.io/ 91.. _SDL2: https://www.libsdl.org 92.. _RK043FN02H-CT: https://www.nxp.com/products/processors-and-microcontrollers/arm-based-processors-and-mcus/i.mx-applications-processors/i.mx-rt-series/4.3-lcd-panel:RK043FN02H-CT 93