Working on general setpage rendering 15:00 wed
Dependencies: mbed
main.cpp
- Committer:
- Owenmatthewmcgowan
- Date:
- 2017-05-24
- Revision:
- 0:bb7ae3488b3f
- Child:
- 1:1169d3c7571e
File content as of revision 0:bb7ae3488b3f:
#include "mbed.h" #include "string" #include "Arial12x12.h" #include "Arial24x23.h" #include "Arial28x28.h" #include "font_big.h" void drawbuttons() //Navigation Buttons { TFT.fillrect(0,0,50,100,blue); //ste alarm button TFT.fillrect(0,100,50,200,white); //set time button TFT.fillrect(0,200,50,240,green); //home button TFT.rect(0,0,50,100,blue); //outlines TFT.rect(0,100,50,200,White); //outlines TFT.rect(0,200,50,240,White); //outlines TFT.set_font((unsigned char*) Arial28x28); //set alarm hour TFT.locate(50,30); TFT.printf("Alarm_Hour"); TFT.set_font((unsigned char*) Arial28x28); //set alarm hour TFT.locate(50,30); TFT.printf("Alarm_Hour"); } void drawoutlines() //draw alarm, time, date { rect(50,0,320,100,blue); //set alarm box rect(50,100,320,200,white); //set time box rect(50,200,320,240,white); //set date box } //first show the 4 directions TFT.set_orientation(0); TFT.background(Black); TFT.cls(); TFT.set_font((unsigned char*) Arial12x12); TFT.locate(0,0); printf(" Hello Mbed 0"); TFT.set_orientation(1); TFT.locate(0,0); printf(" Hello Mbed 1"); TFT.set_orientation(2); TFT.locate(0,0); printf(" Hello Mbed 2"); TFT.set_orientation(3); TFT.locate(0,0); printf(" Hello Mbed 3"); TFT.set_orientation(1); TFT.set_font((unsigned char*) Arial24x23); TFT.locate(50,100); TFT.printf("TFT orientation");