Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: lib.cpp
- Revision:
- 7:800afb8c4cb5
- Parent:
- 6:d0582711a5d1
- Child:
- 8:9b41712fd2c3
--- a/lib.cpp Mon Apr 25 00:57:50 2016 +0000
+++ b/lib.cpp Mon Apr 25 01:03:46 2016 +0000
@@ -162,4 +162,12 @@
char temp = android->getc();
if (temp == SUCCESS) return true;
else return false;
-}
\ No newline at end of file
+}
+
+void buzzer(PwmOut *speaker, int seconds)
+{
+ speaker->period(1.0/500.0);
+ *speaker = 0.5;
+ wait(seconds);
+ *speaker = 0.0;
+}