Test code for the touch display, should output the number 12.
Dependencies: SPI_TFT_ILI9341 TFT_fonts mbed
Fork of TFT_Mikroelectronika_IL9341_sketchpad by
main.cpp
- Committer:
- JHutchinson
- Date:
- 2017-05-24
- Revision:
- 10:0352f75f87c1
- Parent:
- 9:6b60556b4cdf
File content as of revision 10:0352f75f87c1:
#include "stdio.h" #include "mbed.h" #include "SPI_TFT_ILI9341.h" #include "string" #include "Arial12x12.h" #include "Arial24x23.h" #include "Arial28x28.h" #include "font_big.h" Serial pc (USBTX,USBRX); // the display has a backlight switch on board DigitalOut LCD_LED(PTA13); DigitalOut pwr(PTD7); // the TFT is connected to SPI pin 5-7 //SPI_TFT_ILI9341 TFT(p5, p6, p7, p8, p9, p10,"TFT"); // mosi, miso, sclk, cs, reset, dc for lpc1768 SPI_TFT_ILI9341 TFT(PTD2, PTD3, PTD1, PTD5, PTD0, PTA13,"TFT"); // mosi, miso, sclk, cs, reset, dc for frdmkl25z int main() { pwr=1; LCD_LED = 1; // backlight on TFT.claim(stdout); // send stdout to the TFT display TFT.set_orientation(1); TFT.background(Black); // set background to black TFT.foreground(White); // set chars to white TFT.cls(); // clear the screen TFT.set_orientation(0); TFT.background(Black); TFT.cls(); TFT.set_font((unsigned char*) Arial28x28); TFT.locate(1,1); printf("12"); }