Pablo Pelaez / Mbed 2 deprecated ELEC241_COURSEWORK_C1

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Pabs44
Date:
Wed May 20 17:40:02 2020 +0000
Parent:
1:7a2a95ba57a4
Commit message:
updated;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Wed May 20 17:38:01 2020 +0000
+++ b/main.cpp	Wed May 20 17:40:02 2020 +0000
@@ -38,6 +38,7 @@
         count_array[i] = count_test;
         timer.attach_us(&counter, 1000);
     }else if(button_pressed == 1){
+        timer.detach();
         button_pressed = 0;
         next = 1;
     }