Luke Cartwright / Mbed 2 deprecated ELEC2645_Project_el18loc_nearlythere

Dependencies:   mbed

Revision:
15:1c67f064278e
Parent:
14:9cfe0041cc4e
Child:
16:14c231624f3e
diff -r 9cfe0041cc4e -r 1c67f064278e main.cpp
--- a/main.cpp	Tue May 19 15:04:33 2020 +0000
+++ b/main.cpp	Tue May 19 18:38:33 2020 +0000
@@ -51,6 +51,7 @@
 //Global Variables
 volatile extern int g_isr_flag; //may need extern
 
+
 int main()
 {
     printf("RUNNING CODE \n");
@@ -62,9 +63,11 @@
 #endif
 
 #ifdef SLOW_TIME //ATTACH TICKERS FOR SOUND
-    tick.attach_us(&noise_isr, 100000); //extended for debug (1Hz)
-#else
-    tick.attach_us(&noise_isr, 250); //normal mode (4kHz)
+    printf("Running in SLOW_TIME\n");
+    tick.attach(&noise_isr, 1); //extended for debug (1Hz)
+#endif
+#ifndef SLOW_TIME
+    tick.attach_us(&noise_isr, 63); //normal mode SR=20kHz
 #endif
 
     menu.mainmenu(lcd,pad);