// paste this code into Ardiono IDE and connect to the Arduino Due for results
#include <gLCD.h>
const char RST = 8;
const char CS = 9;
const char Clk = 13;
const char Data = 11;
//Create an instance of the display. Lets call it 'graphic'.
gLCD graphic(RST,CS,Clk,Data,HIGH_SPEED); //High speed
void setup() {
Serial.begin(9600);
//Initialise the display
graphic.begin(0,0,0,PHILLIPS_0); //Normal X direction
graphic.setBackColour(0,0,0); //set background color to black
graphic.Clear();
//set the brightness level of the LCD screen
graphic.set_brightness(100);
}
void loop() {
// set a random colour for the screen of the lcd display for 1 second before cycling through to the next colour
graphic.setBackColour(random(0,100), random(0,100),random(0,100));
graphic.Box(0,0, 150, 150,4);
delay(1000);
}