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.
Dependencies: Keypad TextLCD mbed
Diff: main.cpp
- Revision:
- 1:5461144fd540
- Parent:
- 0:93cb8707aa8c
--- a/main.cpp Mon Apr 23 01:23:45 2018 +0000
+++ b/main.cpp Thu Apr 26 18:44:07 2018 +0000
@@ -22,6 +22,7 @@
DigitalOut led_green(LED_GREEN);
DigitalOut active_buzzer(PTC4); //Buzzer on pin PTC4=D9
+PwmOut beep(PTC4); // buzzer
//Serial pc(USBTX, USBRX);
@@ -42,7 +43,7 @@
led_red = 0;
active_buzzer = 0;
-
+ beep.period(0.001);
lcd.cls();
wait(0.001);
@@ -159,7 +160,8 @@
}
wait(1);
- active_buzzer = 0;
+ active_buzzer = 1;
+ beep = 80.3/100.0;
led_red = 0;
wait(1);
lcd.cls();
@@ -173,9 +175,11 @@
led_green = 1;
wait(1);
led_green = 0;
-
+ active_buzzer = 0;
+ beep = 0.0/100.0;
}
-
+
+ beep = 0.0/100.0;
}
}