Biblioteka za buzzer

Revision:
0:49754bfa1d97
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buzzer.h	Wed Dec 01 07:21:02 2021 +0000
@@ -0,0 +1,24 @@
+#ifndef MBED_BEEP_H
+#define MBED_BEEP_H
+ 
+#include "mbed.h"
+
+namespace mbed {
+//Klasa koja daje funkcije za mjenjanje frekvencije i vremena trajanja tona
+class Beep {
+ 
+public:
+ 
+    Beep (PinName pin);
+    
+    void beep (float frequency, float time);
+ 
+    void nobeep();
+ 
+private :
+    PwmOut _pwm;
+    Timeout toff;
+};
+ 
+}
+#endif
\ No newline at end of file