diff --git a/content/hardware/10.mega/shields/giga-display-shield/tutorials/10.square-line-tutorial/assets/ui_rotation.png b/content/hardware/10.mega/shields/giga-display-shield/tutorials/10.square-line-tutorial/assets/ui_rotation.png new file mode 100644 index 0000000000..7c83c26842 Binary files /dev/null and b/content/hardware/10.mega/shields/giga-display-shield/tutorials/10.square-line-tutorial/assets/ui_rotation.png differ diff --git a/content/hardware/10.mega/shields/giga-display-shield/tutorials/10.square-line-tutorial/content.md b/content/hardware/10.mega/shields/giga-display-shield/tutorials/10.square-line-tutorial/content.md index 5372e1ed12..c5811ffe56 100644 --- a/content/hardware/10.mega/shields/giga-display-shield/tutorials/10.square-line-tutorial/content.md +++ b/content/hardware/10.mega/shields/giga-display-shield/tutorials/10.square-line-tutorial/content.md @@ -203,6 +203,20 @@ void loop() { } ``` +## Rotating the SquareLine UI + +If there is a need to rotate the UI created in SquareLine on the GIGA Display Shield, there is a single line that needs to be added to one of the exported library files. In the `/ui/src` folder, find the `ui.c` file and open it. + +The code we need to add is: + +```arduino +lv_display_set_rotation(dispp, rotation); +``` + +The `rotation` can be set to `0`, `90`, `180` or `270` depending on how much you want to rotate the UI. + +![Rotation code added to ui.c file](assets/ui_rotation.png) + ## Next Step If you are curious about how LVGL works with the GIGA Display Shield, take a look at our [LVGL Guide](/tutorials/giga-display-shield/lvgl-guide).