lib simple mais pas d'image (utiliser la 9341 pour cela) en revanche, très rapide
Dependencies: ILI9340_Driver_Lib mbed
Fork of ILI9340_Driver by
Diff: Demo.cpp
- Revision:
- 3:69850a7d7cc3
- Parent:
- 2:7800c62c22d1
diff -r 7800c62c22d1 -r 69850a7d7cc3 Demo.cpp --- a/Demo.cpp Sun Jun 01 17:02:58 2014 +0000 +++ b/Demo.cpp Sun Jul 09 20:52:09 2017 +0000 @@ -29,7 +29,7 @@ int main() { // create the display object - ILI9340_Display tft = ILI9340_Display(p5, p6, p7, p24, p25, p26); + ILI9340_Display tft = ILI9340_Display(D11, D12, D13, D4, D2, D7); // mosi,miso,slck,cs,rst,dc // initialise the display tft.DispInit(); @@ -50,6 +50,7 @@ int green[] = {0,30,60,90,120}; int blue[] = {0,30,60,90,120}; + tft.InvertDisplay (true); while(true) { // draws a black window @@ -59,6 +60,9 @@ tft.DrawString("Hello ILI9340 Lib!", 50, 120, 1, ILI9340_BLACK); tft.DrawString("Frame Count:", 70, 135, 1, ILI9340_BLACK); tft.DrawString("Go Create!", 45, 210, 2, ILI9340_BLUE); + + + // convert the RGB values into values that can be writen to the screen c1 = tft.Colour565(r, g, b);