Skip to content

Commit

Permalink
Merge pull request #2255 from arduino/benjamindannegard/squareline-tu…
Browse files Browse the repository at this point in the history
…torial-rotation-addition

[PXCT-161] Added rotation instructions for SqaureLine
  • Loading branch information
karlsoderby authored Oct 29, 2024
2 parents f1ed4de + ee2686d commit b8dd3b2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down

0 comments on commit b8dd3b2

Please sign in to comment.