Skip to content

Commit b8dd3b2

Browse files
authored
Merge pull request #2255 from arduino/benjamindannegard/squareline-tutorial-rotation-addition
[PXCT-161] Added rotation instructions for SqaureLine
2 parents f1ed4de + ee2686d commit b8dd3b2

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

content/hardware/10.mega/shields/giga-display-shield/tutorials/10.square-line-tutorial/content.md

+14
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,20 @@ void loop() {
203203
}
204204
```
205205

206+
## Rotating the SquareLine UI
207+
208+
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.
209+
210+
The code we need to add is:
211+
212+
```arduino
213+
lv_display_set_rotation(dispp, rotation);
214+
```
215+
216+
The `rotation` can be set to `0`, `90`, `180` or `270` depending on how much you want to rotate the UI.
217+
218+
![Rotation code added to ui.c file](assets/ui_rotation.png)
219+
206220
## Next Step
207221

208222
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).

0 commit comments

Comments
 (0)