han back
/
CLEO_BUZZER
SMART CLEO Buzzer
Revision 0:1111e1dc9eb2, committed 2017-09-28
- 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