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.
Revision 0:55482a69d9e9, committed 2019-04-13
- Comitter:
- niallmoyvane
- Date:
- Sat Apr 13 14:51:20 2019 +0000
- Commit message:
- lab2.5
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 |
diff -r 000000000000 -r 55482a69d9e9 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat Apr 13 14:51:20 2019 +0000 @@ -0,0 +1,24 @@ +#include "mbed.h" + +DigitalIn fire(p14); +PwmOut spkr(p26); + +int main() +{ + while(1) { + for (float i=2000.0; i<5000.0; i+=100) + { + spkr.period(1.0/i); + spkr=0.5; + wait(0.1); + } + for (float i=5000.0; i>2000.0; i-=100) + { + spkr.period(1.0/i); + spkr=0.5; + wait(0.1); + } + spkr=0.0; + while (!fire) {} + } +}
diff -r 000000000000 -r 55482a69d9e9 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Apr 13 14:51:20 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file