SMART CLEO Buzzer

Files at this revision

API Documentation at this revision

Comitter:
SMART_CLEO
Date:
Thu Sep 28 02:08:54 2017 +0000
Commit message:
SMART_CLEO

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-os.lib Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Sep 28 02:08:54 2017 +0000
@@ -0,0 +1,15 @@
+#include "mbed.h"
+
+PinName pin_BUZZER = PD_2;
+
+DigitalOut Buzzer(pin_BUZZER);
+
+int main() {
+
+    while(1) {
+        Buzzer = 1; // Buzzer On
+        wait(0.5);
+        Buzzer = 0; // Buzzer Off
+        wait(0.5);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-os.lib	Thu Sep 28 02:08:54 2017 +0000
@@ -0,0 +1,1 @@
+https://github.com/ARMmbed/mbed-os/#ca661f9d28526ca8f874b05432493a489c9671ea