Example of аnalog clock for K64F with 4.3" display, FT800 or FT801

Dependencies:   FT800-480x272

Example of аnalog clock for K64F with 4.3" display based FT800 or FT801

HARDWARE:

WIRING: FRDM-K64F Break Out Board ----------------------------------- +3.3V --- Pin 1 VDD, Pin 17 BLVDD GND --- Pin 2 GND D13 (PTD1) SCLK --- Pin 3 SPI SCLK D12 (PTD3) MISO --- Pin 4 MISO D11 (PTD2) MOSI --- PIN 5 MOSI D10 (PTD0) --- Pin 6 CS D9 (PTC4) --- Pin 7 INT D8 (PTC12) --- Pin 8 PD -----------------------------------

https://os.mbed.com/media/uploads/nz/demo-clock.jpg

Files at this revision

API Documentation at this revision

Comitter:
nz
Date:
Fri Dec 11 13:54:24 2020 +0000
Parent:
1:eb2a62ab9e2f
Commit message:
sprintf to top

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Thu Dec 10 17:11:11 2020 +0000
+++ b/main.cpp	Fri Dec 11 13:54:24 2020 +0000
@@ -43,7 +43,8 @@
 int main()
 {   
     //printf("Mbed OS %d.%d.%d.\n", MBED_MAJOR_VERSION, MBED_MINOR_VERSION, MBED_PATCH_VERSION);
-        
+    sprintf(textbuff, "Mbed OS %d.%d.%d.", MBED_MAJOR_VERSION, MBED_MINOR_VERSION, MBED_PATCH_VERSION);
+    
     TFT.Init();
         
     set_time(1577869200);   // Set RTC time to 9:00:00, date to 01.01.2020
@@ -125,7 +126,6 @@
         strftime(timebuff, 32, "%d.%m.%Y", localtime(&seconds));// Date
         TFT.drawText(420,50, 27, BLACK, OPT_CENTERX, timebuff);
         
-        sprintf(textbuff, "Mbed OS %d.%d.%d.", MBED_MAJOR_VERSION, MBED_MINOR_VERSION, MBED_PATCH_VERSION);
         TFT.drawText(10, 25, 27, BLACK, OPT_FLAT, textbuff);    // Mbed Version
         
         TFT.DLend();