Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: RTC-DS1307 SPI_TFT_ILI9341 TFT_fonts mbed tsi_sensor
Fork of TFT_Mikroelectronika_IL9341_sketchpad by
Diff: settings.h
- Revision:
- 26:47271cf8d6b2
- Parent:
- 25:ff73360cd038
- Child:
- 27:a895a2c9acb8
--- a/settings.h Thu May 25 12:05:17 2017 +0000
+++ b/settings.h Thu May 25 12:25:47 2017 +0000
@@ -146,5 +146,32 @@
}
void settings() {
int a_h, a_m, t_h, t_m,t_d,t_mo,t_y = 0;
+ int multiplier = 8
+ int o_setting = 11;
+ while (true)
+ int option = setting_press();
+ if (option == 0) break;
+ switch (option)
+ {
+ case (11): o_setting = 11; break; //Alarm Hour
+ case (12): o_setting = 12; break; //Alarm Min
+ case (13): o_setting = 13; break; //
+ case (14): o_setting = 14; break; //
+ case (15): o_setting = 15; break; //
+ case (16): o_setting = 16; break; //
+ case (17): o_setting = 17; break; //
+ }
+ switch (o_setting)
+ {
+ case(11):
+ newval = a_h + tsi.d() * multiplier;
+ if (newval < 0) newval += 24;
+ a_h = newval % 25;
+ TFT.fillrect(90, 40, 150, 80, Black);
+ TFT.set_font((unsigned char*) Arial28x28); //set alarm hour
+ TFT.locate(90,40);
+ TFT.foreground(Red);
+ TFT.printf("%d", a_h);//Alarm_Hour
+
}
\ No newline at end of file
