An analog clock for LPC1768 or LPC1114 with Sharp Memory LCD and DS1307
Dependencies: Adafruit_SHARP_Memory_Display RTC-DS1307 mbed
Analog Clock
This is a small example of an analog clock based on a TinyRTC (DS1307) for LPC1768 and LPC1114. The clock is displayed on a small (96x96) Sharp Memory LCD. http://www.adafruit.com/products/1393 The TinyRTC is something like that (a simple DS1307 with some capacitors and a crystal does the job too): http://www.amazon.com/SainSmart-DS1307-AT24C32-memory-Arduino/dp/B00E37VTWY The RTC-lib created by Henry Leinen is used and the algorithm for calculation the clock-hands is based on input from http://arduino-project.net.
debug.h@0:202fb7a03a00, 2015-12-06 (annotated)
- Committer:
- worstcase_ffm
- Date:
- Sun Dec 06 15:28:18 2015 +0000
- Revision:
- 0:202fb7a03a00
initial version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
worstcase_ffm | 0:202fb7a03a00 | 1 | #ifndef __DEBUG_H__ |
worstcase_ffm | 0:202fb7a03a00 | 2 | #define __DEBUG_H__ |
worstcase_ffm | 0:202fb7a03a00 | 3 | |
worstcase_ffm | 0:202fb7a03a00 | 4 | |
worstcase_ffm | 0:202fb7a03a00 | 5 | #ifdef DEBUG |
worstcase_ffm | 0:202fb7a03a00 | 6 | #define INFO(x, ...) std::printf("[INFO: %s:%d]"x"\r\n", __FILE__, __LINE__, ##__VA_ARGS__); |
worstcase_ffm | 0:202fb7a03a00 | 7 | #define WARN(x, ...) std::printf("[WARN: %s:%d]"x"\r\n", __FILE__, __LINE__, ##__VA_ARGS__); |
worstcase_ffm | 0:202fb7a03a00 | 8 | #define ERR(x, ...) std::printf("[ERR: %s:%d]"x"\r\n", __FILE__, __LINE__, ##__VA_ARGS__); |
worstcase_ffm | 0:202fb7a03a00 | 9 | #else |
worstcase_ffm | 0:202fb7a03a00 | 10 | #define INFO(x, ...) |
worstcase_ffm | 0:202fb7a03a00 | 11 | #define WARN(x, ...) |
worstcase_ffm | 0:202fb7a03a00 | 12 | #define ERR(x, ...) |
worstcase_ffm | 0:202fb7a03a00 | 13 | #endif |
worstcase_ffm | 0:202fb7a03a00 | 14 | |
worstcase_ffm | 0:202fb7a03a00 | 15 | |
worstcase_ffm | 0:202fb7a03a00 | 16 | #endif |