Ce programme a été adapté du programme Canary prévu pour 2 afficheur.
Dependencies: SPI_TFTx2_w9341 TFT_fonts mbed
main.cpp
00001 #include "stdio.h" 00002 #include "mbed.h" 00003 #include "SPI_TFTx2_ILI9341.h" 00004 #include "string" 00005 #include "Arial12x12.h" 00006 #include "Arial24x23.h" 00007 00008 SPI_TFTx2_ILI9341 TFT(p5, p6, p7, p8, p9, p10,"TFT"); // mosi, miso, sclk, cs, reset, dc 00009 00010 int main() { 00011 TFT.claim(stdout); // send stdout to the TFT display 00012 //TFT.claim(stderr); // send stderr to the TFT display 00013 00014 TFT.background(Black); // set background to black 00015 TFT.foreground(White); // set chars to white 00016 TFT.cls(); // clear the screen 00017 TFT.set_font((unsigned char*) Arial12x12); // select the font 00018 00019 TFT.set_orientation(1); 00020 printf(" Hello Mbed 0"); 00021 TFT.set_font((unsigned char*) Arial24x23); // select font 2 00022 TFT.locate(48,115); 00023 TFT.printf("I'm Corentin oups"); 00024 TFT.fillrect(0,160,320,170,Blue); 00025 TFT.fillrect(0,170,320,180,Red); 00026 TFT.fillrect(0,180,320,190,White); 00027 }
Generated on Wed Jul 13 2022 23:45:41 by 1.7.2