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: beep.cpp
- Revision:
- 5:ad66d64c3d33
- Parent:
- 4:ae81aeeed069
- Child:
- 6:42ecdff5956a
--- a/beep.cpp Thu Nov 15 07:28:39 2018 +0000
+++ b/beep.cpp Thu Nov 15 07:40:02 2018 +0000
@@ -1,9 +1,10 @@
#include "beep.h"
-extern PwmOut buzzer;
+extern SoftPWM buzzer;
void beepStart()
{
+ buzzer.start();
buzzer.write(0.5);
buzzer.period_us(1000000/Do5);
wait(0.1);
@@ -11,7 +12,7 @@
wait(0.1);
buzzer.period_us(1000000/So5);
wait(0.1);
- buzzer.write(1);
+ buzzer.stop();
}
void beepAfterset()