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: mbed
Diff: main.cpp
- Revision:
- 0:80071421e22f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat Sep 23 17:51:37 2017 +0000 @@ -0,0 +1,15 @@ +#include "mbed.h" + +DigitalOut speaker(p26); // use onboard loudspeaker #1 + + +int main() { + + + while(1) { //starts indefinite loop + speaker = 1; //turns on loudspeaker + wait(0.001); //for frequency 500Hz + speaker = 0; //turns off loudspeaker + wait(0.001); //for frequency 500Hz + } +}