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
Revision 0:80071421e22f, committed 2017-09-23
- Comitter:
- davey
- Date:
- Sat Sep 23 17:51:37 2017 +0000
- Commit message:
- ex6
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | 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 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 + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Sep 23 17:51:37 2017 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/675da3299148 \ No newline at end of file