pong game added to the main sketch

Dependencies:   RTC-DS1307 SPI_TFT_ILI9341 TFT_fonts mbed tsi_sensor

Fork of MainSketch by IoT Ox

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers settings.h Source File

settings.h

00001 
00002 
00003 void drawsettingsbuttons() //Navigation Buttons
00004 {
00005   TFT.fillrect(0,0,50,100,Blue);        //ste alarm button
00006     TFT.fillrect(0,100,50,200,White);   //set time button
00007     TFT.fillrect(0,200,50,240,Green);   //home button
00008 
00009  
00010     TFT.rect(0,0,50,100,Blue);      //outlines
00011     TFT.rect(0,100,50,200,White);   //outlines
00012     TFT.rect(0,200,50,240,White);   //outlines
00013     
00014     //set New button (used to set new alarm/time/date)
00015     TFT.set_font((unsigned char*) Arial12x12); 
00016     TFT.locate(0,40);
00017     TFT.printf("Set New");
00018 
00019     //Full reset button
00020     TFT.locate(0,140);
00021     TFT.printf("Full reset");
00022 
00023      //home button
00024     TFT.locate(0,210);
00025     TFT.printf("Home");
00026 
00027 }
00028 
00029 void drawoutlines() //draw alarm, time, date
00030 {
00031     TFT.rect(50,0,320,100,Blue);  //set alarm box
00032     TFT.rect(50,100,320,200,White); //set time box
00033     TFT.rect(50,200,320,240,White); //set date box
00034     
00035     TFT.set_font((unsigned char*) Arial12x12); //set alarm title
00036     TFT.locate(105,0);
00037     TFT.printf("Set Alarm");
00038 
00039     TFT.set_font((unsigned char*) Arial28x28); //set alarm hour
00040     TFT.locate(50,30);
00041     TFT.printf("Alarm_Hour");
00042 
00043      //set alarm mins
00044     TFT.locate(230,30);
00045     TFT.printf("Alarm_Min");
00046     
00047     TFT.set_font((unsigned char*) Arial12x12); //set time title
00048     TFT.locate(105,100);
00049     TFT.printf("Set Time");
00050 
00051     TFT.set_font((unsigned char*) Arial28x28); //set time hour
00052     TFT.locate(50,130);
00053     TFT.printf("Time_Hour");
00054     
00055     //set time mins
00056     TFT.locate(230,130);
00057     TFT.printf("Alarm_Min");
00058 
00059     TFT.set_font((unsigned char*) Arial12x12);//set date day
00060     TFT.locate(50,200);
00061     TFT.printf("day");
00062 
00063     //set date month
00064     TFT.locate(120,200);
00065     TFT.printf("month");
00066 
00067     //set date year
00068     TFT.locate(190,200);
00069     TFT.printf("year");
00070 
00071     
00072 }