Skip to content

Commit 4841673

Browse files
Added the text
1 parent fa0d46f commit 4841673

File tree

1 file changed

+16
-0
lines changed
  • content/hardware/10.mega/shields/giga-display-shield/tutorials/10.square-line-tutorial

1 file changed

+16
-0
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,22 @@ void loop() {
203203
}
204204
```
205205

206+
## Rotating the SquareLine UI
207+
208+
If there is a need to rotate the UI created in SqaureLine on the GIGA Display Shield, there is one 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+
![Finding ui.c inside the folders]()
211+
212+
The lvgl code we need to add is:
213+
214+
```arduino
215+
lv_display_set_rotation(dispp, rotation);
216+
```
217+
218+
Where `rotation` can be set to `0`, `90`, `180` or `270` depending on how much you want to rotate the UI.
219+
220+
![Rotation code added to ui.c file]()
221+
206222
## Next Step
207223

208224
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)