Mathias Rasmussen / Music
Revision:
0:e44696c93c6b
Child:
1:50204a498764
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/play_buzzer.h	Thu Jan 10 07:33:55 2019 +0000
@@ -0,0 +1,26 @@
+#ifndef MBED_BEEP_H
+#define MBED_BEEP_H
+ 
+#include "mbed.h"
+
+namespace mbed {
+ 
+class play_buzzer {
+ 
+private :
+    PinName _pin;
+    PwmOut _pwm;
+    Timeout toff;
+public:
+    play_buzzer(PinName);
+    void beep (float frequency, int time);
+    void nobeep();
+    void Play_tunes(int notes, int tones);
+    int play();
+    void setPin(PinName pin);
+    PinName getPin();
+    };
+};
+#endif
+ 
+