examples/javascript/ili9341.js
function rotateScreen(r) {
    lcd.setRotation(r);
    lcd.fillRect(0, 0, 5, 5, ili9341.ILI9341_WHITE);
    if (r < 4) {
        r++;
        setTimeout(function() { rotateScreen(r); }, 1000);
    }
}
function rotateScreen(r) {
    lcd.setRotation(r);
    lcd.fillRect(0, 0, 5, 5, ili9341.ILI9341_WHITE);
    if (r < 4) {
        r++;
        setTimeout(function() { rotateScreen(r); }, 1000);
    }
}
function rotateScreen ( r ) { lcd . setRotation ( r ) ; lcd . fillRect ( 0 , 0 , 5 , 5 , ili9341 . ILI9341_WHITE ) ; if ( r < 4 ) { r ++ ; setTimeout ( function ( ) { rotateScreen ( r ) ; } , 1000 ) ; } }
Test screen rotation
Test screen rotation