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:862276502fe2, committed 2011-12-26
- Comitter:
- yueee_yt
- Date:
- Mon Dec 26 12:45:32 2011 +0000
- Commit message:
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 Mon Dec 26 12:45:32 2011 +0000 @@ -0,0 +1,24 @@ +#define mC 261.626 +#define mD 293.665 +#define mE 329.628 +#define mF 349.228 +#define mG 391.995 +#define mA 440.000 +#define mB 493.883 + +#include "mbed.h" + +PwmOut sp1(p25); + +int main() { + float mm[]={mC,mD,mE,mF,mG,mA,mB,mC*2}; + int i; + + for (i=0;i<sizeof(mm);i++) { + sp1.period(1.0/mm[i]); + sp1.write(0.5f); + wait(0.5f); + sp1.write(0.0f); + } + while (1); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Dec 26 12:45:32 2011 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/078e4b97a13e