Both displays functioning independently, we will use this program to bring them both into the same code.
Dependencies: SPI_TFT_ILI9341 TFT_fonts TextLCD mbed
Revision 3:d93153494516, committed 2017-05-24
- Comitter:
- JHutchinson
- Date:
- Wed May 24 16:10:36 2017 +0000
- Parent:
- 2:16a5516577af
- Child:
- 4:970713d48893
- Commit message:
- Commented.
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed May 24 16:03:38 2017 +0000 +++ b/main.cpp Wed May 24 16:10:36 2017 +0000 @@ -25,7 +25,7 @@ //void updateDisplay(int time, int date, int temp) { -int main() { +int main() { // Main program int time = 1234; int date = 221217; @@ -53,27 +53,27 @@ // Control for the touch screen display - pwr=1; + pwr=1; // Power On - LCD_LED = 1; // backlight on + 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.claim(stdout); // Send stdout to the TFT display + TFT.set_orientation(1); // Orients screen to wipe in the horizontal direction + TFT.background(Black); // Sets background to black + TFT.foreground(White); // Sets text to white + TFT.cls(); // Clear the screen - TFT.set_orientation(0); - TFT.background(Black); - TFT.cls(); + TFT.set_orientation(0); // Ensures orientation vertical 0 degrees + TFT.background(Black); // Sets background to black + TFT.cls(); // Clear the screen - TFT.set_font((unsigned char*) Arial24x23); - TFT.locate(10, 180); // x,y - TFT.printf("Oxford"); + TFT.set_font((unsigned char*) Arial24x23); // Select header font + TFT.locate(10, 180); // x,y - locates cursor + TFT.printf("Oxford"); // Print Oxford - TFT.set_font((unsigned char*) Arial28x28); - TFT.locate(10,220); // x,y - TFT.printf("%dC", temp); + TFT.set_font((unsigned char*) Arial28x28); // Select header font + TFT.locate(10,220); // x,y - locates cursor + TFT.printf("%dC", temp); // Print temperature data // Print weather dependant images on the touch screen