Contains the main execution of the clock uses headers to import functions

Dependencies:   RTC-DS1307 SPI_TFT_ILI9341 TFT_fonts mbed tsi_sensor

Fork of TFT_Mikroelectronika_IL9341_sketchpad by Oxford CWM Team

Revision:
19:4c30c3182e04
Parent:
16:3cb9b1fbc039
Child:
29:684e2a3e17b5
--- a/main.cpp	Thu May 25 10:17:45 2017 +0000
+++ b/main.cpp	Thu May 25 10:58:02 2017 +0000
@@ -1,26 +1,31 @@
+bool f_alarm = false, f_alarm_sound;
+int f_state;
 #include "libs.h"
 //DigitalOut led(LED1);
-bool f_alarm, f_alarm_sound;
-int f_state_no;
+
 //DigitalIn sw_w(SW3);
 
 void main()
 {
+    while(!rtc.startClock()){}
     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();
     // pc.baud(115200);
-    /*int i = 0;
+    f_state = 1;
+    f_alarm = false;
+    runclock();
+    int i = 0;
     while (true) {
         i = (i % 3) + 1;
         draw_state(i);
         wait(1);
-    }*/
+    }
     
     
-    draw_state(4);
+    //draw_state(4);