![](/media/cache/group/Logo-slogen.png.50x50_q85.png)
Seeed Grove Buzzer example. The buzzer buzzes on for .5 second and then off for .5 second.
Dependencies: mbed
Fork of Seeed_Grove_Buzzer by
Diff: main.cpp
- Revision:
- 0:3da67ed4c5a4
diff -r 000000000000 -r 3da67ed4c5a4 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Sep 04 02:41:17 2014 +0000 @@ -0,0 +1,14 @@ +#include "mbed.h" + +DigitalOut buzzer(D8); + +int main() { + int on = 1, off = 0; + + while(1){ + buzzer = on; + wait(.5); + buzzer = off; + wait(.5); + } +}