gb.setScreenRotation

Description

void gb.setScreenRotation( Rotation r )

gb.setScreenRotation sets the rotation of the screen. Default is down. After rotating the screen it is highly recommended to clear the display with gb.display.clear().

Parameters

  • Rotation r: Rotation what to set the screen to. Possible values are: ROTATION_LEFT, ROTATION_UP, ROTATION_RIGHT, ROTATION_DOWN

Returns

none

Example

#include <Gamebuino-Meta.h>

void setup() { gb.begin();

// rotate the screen right gb.setScreenRotation(ROTATION_RIGHT); }

void loop() { while(!gb.update()); gb.display.clear(); gb.display.println("Hello World"); }