code: function rotateScreen(r) {
      lcd.setRotation(r);
      lcd.fillRect(0, 0, 5, 5, ili9341.ILI9341_WHITE);
      if (r < 4) {
          r++;
          setTimeout(function() { rotateScreen(r); }, 1000);
      }
  }
docs: Test screen rotation