Jozef Staník / Mbed OS Cvicenie_4

Files at this revision

API Documentation at this revision

Comitter:
joes
Date:
Mon Oct 26 21:26:10 2020 +0000
Parent:
2:7235899a3ac7
Commit message:
CV04-Uloha1-minuta

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon Oct 19 13:29:50 2020 +0000
+++ b/main.cpp	Mon Oct 26 21:26:10 2020 +0000
@@ -1,7 +1,7 @@
 #include "mbed.h"
 #include "MyLed.h"
 
-#define TICKER_TIME             1.0    // ticker period (1 second)
+#define TICKER_TIME             60.0    // ticker period (1 second)
 
 MyLed led(LED1);                    // TO DO: implement methotds and use this class
 
@@ -36,10 +36,10 @@
 int main()
 {
     pc.printf("\r\n----- Start of application ----- \r\n");
-    /*
-        led = 0;
+    
+    //    led = 0;
         ticker.attach(&OnTick,TICKER_TIME);
-    */
+    
     sw.rise(&RiseHandler);
 
     char z;
@@ -49,12 +49,12 @@
             pc.printf("Button was pressed. \r\n");
             btnPressed = false;
         }
+        
+        if(tick) {
+            pc. printf("Counter value : %d \r\n", counter);
+            tick = false;
+        }
         /*
-                if(tick) {
-                    pc. printf("Counter value : %d \r\n", counter);
-                    tick = false;
-                }
-        */
         if(pc.readable()) {
             z = pc.getc();
             pc.printf("Pressed key : %c \r\n", z);
@@ -64,6 +64,6 @@
                 led.SetBlinkPeriod(period);
             } else
                 pc.printf("you entered the wrong value. \r\n");
-        }
+        }*/
     }
 }
\ No newline at end of file