Time: 17:33 Date: 10/12/2017 Description: Task 1,7,8 Currently Functioning
Dependencies: BME280 BMP280 TextLCD
Working Repository
TIME.hpp@31:4a88bf97b53e, 2018-01-06 (annotated)
- Committer:
- thomasmorris
- Date:
- Sat Jan 06 23:04:05 2018 +0000
- Revision:
- 31:4a88bf97b53e
- Parent:
- 30:4cde05cc7c4f
- Child:
- 33:3b5096f0126a
Working LCD set time
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
thomasmorris | 30:4cde05cc7c4f | 1 | #ifndef _TIME_HPP_ //Known as header guards |
thomasmorris | 30:4cde05cc7c4f | 2 | #define _TIME_HPP_ |
thomasmorris | 30:4cde05cc7c4f | 3 | |
thomasmorris | 30:4cde05cc7c4f | 4 | #include "mbed.h" |
thomasmorris | 30:4cde05cc7c4f | 5 | #include "rtos.h" |
thomasmorris | 31:4a88bf97b53e | 6 | #include <string> |
thomasmorris | 31:4a88bf97b53e | 7 | #include <iostream> |
thomasmorris | 31:4a88bf97b53e | 8 | #include <sstream> |
thomasmorris | 30:4cde05cc7c4f | 9 | |
thomasmorris | 31:4a88bf97b53e | 10 | #define Days_In_Month 30.436875 |
thomasmorris | 31:4a88bf97b53e | 11 | #define second 1 |
thomasmorris | 31:4a88bf97b53e | 12 | #define minute 60 |
thomasmorris | 31:4a88bf97b53e | 13 | #define hour 3600 |
thomasmorris | 31:4a88bf97b53e | 14 | #define day 86400 |
thomasmorris | 31:4a88bf97b53e | 15 | #define week 604800 |
thomasmorris | 31:4a88bf97b53e | 16 | #define month 2629743 |
thomasmorris | 31:4a88bf97b53e | 17 | #define year 31556926 |
thomasmorris | 30:4cde05cc7c4f | 18 | |
thomasmorris | 31:4a88bf97b53e | 19 | int get_current_time(); |
thomasmorris | 31:4a88bf97b53e | 20 | void Add_Second(); |
thomasmorris | 31:4a88bf97b53e | 21 | void Subtract_Second(); |
thomasmorris | 31:4a88bf97b53e | 22 | void Add_Minute(); |
thomasmorris | 31:4a88bf97b53e | 23 | void Subtract_Minute(); |
thomasmorris | 31:4a88bf97b53e | 24 | void Add_Hour(); |
thomasmorris | 31:4a88bf97b53e | 25 | void Subtract_Hour(); |
thomasmorris | 31:4a88bf97b53e | 26 | void Add_Day(); |
thomasmorris | 31:4a88bf97b53e | 27 | void Subtract_Day(); |
thomasmorris | 31:4a88bf97b53e | 28 | void Add_Month(); |
thomasmorris | 31:4a88bf97b53e | 29 | void Subtract_Month(); |
thomasmorris | 31:4a88bf97b53e | 30 | void Add_Year(); |
thomasmorris | 31:4a88bf97b53e | 31 | void Subtract_Year(); |
thomasmorris | 31:4a88bf97b53e | 32 | int LCD_Time_Get(string Unit); |
thomasmorris | 31:4a88bf97b53e | 33 | |
thomasmorris | 30:4cde05cc7c4f | 34 | #endif |