LittlevGL Basic Sample¶
Overview¶
This sample application displays “Hello World” in the center of the screen and a counter at the bottom which increments every second.
Wiring¶
The nrf52840 Preview development kit should be connected as follows to the Adafruit TFT display.
nrf52840
Pin
|
Adafruit TFT
Pin
|
---|---|
P0.27 | SCK |
P0.31 | D/C |
P0.30 | RST |
P0.26 | MOSI |
P0.29 | MISO |
P0.4 | NSS |
Building and Running¶
Build this sample using the following commands:
# On Linux/macOS
cd $ZEPHYR_BASE/samples/gui/lvgl
mkdir build && cd build
# On Windows
cd %ZEPHYR_BASE%\samples\gui\lvgl
mkdir build & cd build
cmake -GNinja -DBOARD=nrf52840_pca10056 ..
ninja
See nRF52840-PCA10056 on how to flash the build.
or
# On Linux/macOS
cd $ZEPHYR_BASE/samples/gui/lvgl
mkdir build && cd build
# On Windows
cd %ZEPHYR_BASE%\samples\gui\lvgl
mkdir build & cd build
cmake -GNinja -DBOARD=native_posix ..
ninja