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

Committer:
mlin
Date:
Wed May 24 11:21:37 2017 +0000
Revision:
10:9d9b3b9b28b8
Parent:
9:eee503060d69
Child:
11:1da15361a35b
Working Render of states

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mlin 9:eee503060d69 1 #include "libs.h"
mlin 9:eee503060d69 2 int f_state, f_button;
mlin 9:eee503060d69 3 bool f_alarm;
mlin 8:b9aa9fdf286b 4 DigitalIn sw_w(SW3);
cstevens 6:18c7288b5e00 5
mlin 9:eee503060d69 6 void main()
dreschpe 0:7c3b9bfd6ead 7 {
dreschpe 0:7c3b9bfd6ead 8 TFT.claim(stdout); // send stdout to the TFT display
dreschpe 0:7c3b9bfd6ead 9 TFT.set_orientation(1);
dreschpe 0:7c3b9bfd6ead 10 TFT.background(Black); // set background to black
dreschpe 0:7c3b9bfd6ead 11 TFT.foreground(White); // set chars to white
mlin 10:9d9b3b9b28b8 12 TFT.cls();
mlin 10:9d9b3b9b28b8 13 // pc.baud(115200);
mlin 10:9d9b3b9b28b8 14 int i = 0;
mlin 10:9d9b3b9b28b8 15 while (true) {
mlin 10:9d9b3b9b28b8 16 i = (i % 3) + 1;
mlin 10:9d9b3b9b28b8 17 draw_state(i);
mlin 10:9d9b3b9b28b8 18 wait(1);
mlin 10:9d9b3b9b28b8 19 }
mlin 10:9d9b3b9b28b8 20
mlin 9:eee503060d69 21
mlin 10:9d9b3b9b28b8 22
cstevens 6:18c7288b5e00 23
dreschpe 0:7c3b9bfd6ead 24 }