# Rotate Arduino Giga Display 180

**URL:** <http://forum.squareline.io/t/rotate-arduino-giga-display-180/3831>\
**Category:** How to\
**Created:** [September 20, 2024, 5:00pm UTC](http://forum.squareline.io/t/rotate-arduino-giga-display-180/3831 "2024-09-20T17:00:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MasonMenzies](http://forum.squareline.io/user_avatar/forum.squareline.io/masonmenzies/32/1544_2.png) [@MasonMenzies](http://forum.squareline.io/u/MasonMenzies)\
**Post date:** [September 20, 2024, 5:00pm UTC](http://forum.squareline.io/t/rotate-arduino-giga-display-180/3831/1 "2024-09-20T17:00:09Z")

</div>

Hello! I’m working on a project with the Arduino Giga Display.  
I’ve built an interface using Squareline 1.4.2 Studio and LVGL 8.3.11

I’m using the Arduino\_H7\_Video library and have setup the display like so

```auto
Arduino_H7_Video Display(800, 480, GigaDisplayShield);
Arduino_GigaDisplayTouch TouchDetector;

```

And then in my setup code I just have Display.begin();

How can I go about rotating the display 180 degrees? I’ve read that I just need to flip the X and Y coordinates of my display driver, but I have no clue how to do that.

I’m on Arduino Mbed OS Giga 4.1.5

Thanks!

---

<div class="post-metadata">

**Author:** ![Hermit](http://forum.squareline.io/user_avatar/forum.squareline.io/hermit/32/971_2.png) [@Hermit](http://forum.squareline.io/u/Hermit)\
**Post date:** [September 23, 2024, 8:05am UTC](http://forum.squareline.io/t/rotate-arduino-giga-display-180/3831/2 "2024-09-23T08:05:38Z")

</div>

Checking the constructor function (you use above) in Arduino\_H7\_Video.cpp file reveals that the internal \_rotation boolean variable (which in turn sets rotation by lv\_display\_set\_rotation in the ‘begin’ function) is really set depending on the EDID-mode correlated with resolution. With most EDID-modes (640x480,800x600,1024x78,etc.) it really sets rotation to ‘true’ if the width and height gives the opposite aspect-ratio what EDID resolution dictates. There’s EDID-mode 480x800 as a distinct case, and if you have that mode, your function above should set the \_rotation to ‘true’. But if you have 800x480 EDID-mode, the width and height should be exchanged to set the opposite, 480 and 800. (If that still doesn’t help, maybe you should play around with the EDID-mode. There’s set\_display\_mode function in edid.h for example…)

---

<div class="post-metadata">

**Author:** ![MasonMenzies](http://forum.squareline.io/user_avatar/forum.squareline.io/masonmenzies/32/1544_2.png) [@MasonMenzies](http://forum.squareline.io/u/MasonMenzies)\
**Post date:** [September 23, 2024, 2:16pm UTC](http://forum.squareline.io/t/rotate-arduino-giga-display-180/3831/3 "2024-09-23T14:16:57Z")

</div>

Thank you for the response!

With the info you shared I was able to rotate the display 90 degrees (from Landscape to Portrait) by changing the resolution from 800x480 to 480x800. So that works for portrait.

Digging into the edid.h now and the edid modes to figure out if I can rotate it the full 180 degrees to get landscape inverted/flipped. I’ll keep playing with it. But if you have any ides, please do let me know.

Appreciate it

---

<div class="post-metadata">

**Author:** ![MasonMenzies](http://forum.squareline.io/user_avatar/forum.squareline.io/masonmenzies/32/1544_2.png) [@MasonMenzies](http://forum.squareline.io/u/MasonMenzies)\
**Post date:** [September 23, 2024, 3:29pm UTC](http://forum.squareline.io/t/rotate-arduino-giga-display-180/3831/4 "2024-09-23T15:29:07Z")

</div>

Ok, with the info you shared I ended up finding a solution.

I ended up just setting the rotation at runtime with LVGL’s lv\_set\_disp\_rotation();

---

<div class="post-metadata">

**Author:** ![DavidYU](http://forum.squareline.io/letter_avatar_proxy/v4/letter/d/3bc359/32.png) [@DavidYU](http://forum.squareline.io/u/DavidYU)\
**Post date:** [March 11, 2025, 11:04am UTC](http://forum.squareline.io/t/rotate-arduino-giga-display-180/3831/5 "2025-03-11T11:04:21Z")

</div>

excuse me, which file and where did you add the “lv\_set\_disp\_rotation();”  
to let the screen do the 180 degrees rotation?  
Thanks for help~

---

<div class="post-metadata">

**Author:** ![hjani](http://forum.squareline.io/user_avatar/forum.squareline.io/hjani/32/1744_2.png) [@hjani](http://forum.squareline.io/u/hjani)\
**Post date:** [March 12, 2025, 3:36pm UTC](http://forum.squareline.io/t/rotate-arduino-giga-display-180/3831/6 "2025-03-12T15:36:20Z")

</div>

You can place lv\_set\_disp\_rotation after where you initialize the display like:

// Register the display driver  
lv\_disp\_t \* disp = lv\_disp\_drv\_register(&disp\_drv);

// Set display rotation (here, rotate 90 degrees)  
lv\_disp\_set\_rotation(disp, LV\_DISP\_ROT\_90);
