Franjo Tudek

Dependencies:   mbed SeeedShieldBot BluetoothSerial

https://os.mbed.com/media/uploads/franjo1/shema.png

Revision:
0:90b835ec611a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Doorbell.cpp	Fri May 07 15:22:28 2021 +0000
@@ -0,0 +1,12 @@
+#include "Doorbell.h"
+#include "mbed.h"
+Bell::Bell(PinName Piezzo) : Buzzer(Piezzo) {
+    
+}
+
+void Bell::Buzz(int f, int b) {
+    
+    Buzzer.period(1/(f)); // set PWM period
+    Buzzer=0.5; // set duty cycle
+    wait(0.5*b);
+}