In all chapters the setup code example contains this:
// Set the Touchscreen rotation in landscape mode // Note: in some displays, the touchscreen might be upside down // so you might need to set the rotation to 0: touchscreen.setRotation(0); touchscreen.setRotation(2);
Value 0 or 2 sets the touchscreen in PORTRAIT mode, not LANDSCAPE. Portrait is the correct value.
The only purpose to set the touchscreen rotation to 0 or 2 is to align the origin of the touchscreen with the origin of the display. Other than that, the touchcreen must never be rotated when using LGVL.