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
Revision 23:72e2d9e422f7, committed 2017-05-25
- Comitter:
- mlin
- Date:
- Thu May 25 11:31:47 2017 +0000
- Parent:
- 22:7a453c1d4d22
- Parent:
- 21:bcdd41235b69
- Child:
- 24:93e1474d6d8b
- Commit message:
- Merged
Changed in this revision
--- a/render.h Thu May 25 11:30:31 2017 +0000 +++ b/render.h Thu May 25 11:31:47 2017 +0000 @@ -24,15 +24,15 @@ void draw_clockface(int x0, int y0, int r, int markerlength, int color) { TFT.circle(x0, y0, r, White); - //for ( int n = 0; n < 13; n++) { - // int x1, y1, x2, y2= 0; - // double angle = n * 2 * M_PI / 12; - // x2 = r * cos(angle) + x0; - // y2 = r * sin(angle) + y0; - // x1 = (r - markerlength) * cos(angle) + x0; - // y2 = (r - markerlength) * sin(angle) + y0; - // TFT.line(x1, y1, x2, y2, color); - //} + for ( int n = 0; n < 13; n++) { + int x1, y1, x2, y2= 0; + double angle = n * 2 * M_PI / 12; + x2 = r * cos(angle) + x0; + y2 = r * sin(angle) + y0; + x1 = (r - markerlength) * cos(angle) + x0; + y1 = (r - markerlength) * sin(angle) + y0; + TFT.line(x1, y1, x2, y2, color); + } } void whiteboard() {