Make noise with a piezo buzzer. Use a pwm pin. IO expander ints done.

Dependencies:   aconno_bsp mbed

Fork of beep by Jurica Resetar

Files at this revision

API Documentation at this revision

Comitter:
jurica238814
Date:
Fri Sep 23 12:12:16 2016 +0000
Parent:
5:49c961e79a12
Commit message:
IO expander ints done.

Changed in this revision

beep.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 49c961e79a12 -r 936ba3699e47 beep.cpp
--- a/beep.cpp	Thu Sep 22 18:11:47 2016 +0000
+++ b/beep.cpp	Fri Sep 23 12:12:16 2016 +0000
@@ -1,6 +1,7 @@
 #include "beep.h"
 #include "mbed.h"
 #include "notes.h"
+#include "MCP23017.h"
 
 /** class to make sound with a buzzer, based on a PwmOut
  *   The class use a timeout to switch off the sound  - it is not blocking while making noise
@@ -206,6 +207,14 @@
     {
       //wait((float)duration/1000);
     }
+    
+    /*
+    *       SEE IF THERE'S INTERRUPT OCCURED    
+    */
+    if (getInt()){
+        nobeep();
+        return;
+    }
   }
 }