Ce programme a été adapté du programme Canary prévu pour 2 afficheur.

Dependencies:   SPI_TFTx2_w9341 TFT_fonts mbed

Revision:
0:3e86ee2d8c14
diff -r 000000000000 -r 3e86ee2d8c14 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Mar 15 14:56:05 2016 +0000
@@ -0,0 +1,27 @@
+#include "stdio.h"
+#include "mbed.h"
+#include "SPI_TFTx2_ILI9341.h"
+#include "string"
+#include "Arial12x12.h"
+#include "Arial24x23.h"
+ 
+SPI_TFTx2_ILI9341 TFT(p5, p6, p7, p8, p9, p10,"TFT"); // mosi, miso, sclk, cs, reset, dc
+
+int main() {
+    TFT.claim(stdout);      // send stdout to the TFT display
+    //TFT.claim(stderr);      // send stderr to the TFT display
+ 
+    TFT.background(Black);    // set background to black
+    TFT.foreground(White);    // set chars to white
+    TFT.cls();                // clear the screen
+    TFT.set_font((unsigned char*) Arial12x12);  // select the font
+ 
+    TFT.set_orientation(1);
+    printf("  Hello Mbed 0");
+    TFT.set_font((unsigned char*) Arial24x23);  // select font 2
+    TFT.locate(48,115);
+    TFT.printf("I'm Corentin oups");
+    TFT.fillrect(0,160,320,170,Blue);    
+    TFT.fillrect(0,170,320,180,Red);  
+     TFT.fillrect(0,180,320,190,White);     
+    }