![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
ファミリーマートの入店音楽を楽しもう
Revision 0:954b5a9e5594, committed 2015-12-16
- Comitter:
- kohacraft
- Date:
- Wed Dec 16 00:52:26 2015 +0000
- Commit message:
- ver1.0
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 954b5a9e5594 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Dec 16 00:52:26 2015 +0000 @@ -0,0 +1,98 @@ +#include "mbed.h" + +DigitalOut myled(LED1); + +int main() { + while(1) { + for( int i=0 ; i<150 ; i++ ) + { + myled = 1; + wait(1.0/659.26/2); + myled = 0; + wait(1.0/659.26/2); + } + for( int i=0 ; i<120 ; i++ ) + { + myled = 1; + wait(1.0/523.25/2); + myled = 0; + wait(1.0/523.25/2); + } + for( int i=0 ; i<150/2 ; i++ ) + { + myled = 1; + wait(1.0/783.99/1); + myled = 0; + wait(1.0/783.99/1); + } + for( int i=0 ; i<120 ; i++ ) + { + myled = 1; + wait(1.0/523.25/2); + myled = 0; + wait(1.0/523.25/2); + } + for( int i=0 ; i<150 ; i++ ) + { + myled = 1; + wait(1.0/587.33/2); + myled = 0; + wait(1.0/587.33/2); + } + for( int i=0 ; i<450 ; i++ ) + { + myled = 1; + wait(1.0/783.99/2); + myled = 0; + wait(1.0/783.99/2); + } + + + for( int i=0 ; i<150/2.0 ; i++ ) + { + myled = 1; + wait(1.0/783.99/1); + myled = 0; + wait(1.0/783.99/1); + } + + for( int i=0 ; i<150 ; i++ ) + { + myled = 1; + wait(1.0/587.33/2); + myled = 0; + wait(1.0/587.33/2); + } + + for( int i=0 ; i<150 ; i++ ) + { + myled = 1; + wait(1.0/659.26/2); + myled = 0; + wait(1.0/659.26/2); + } + for( int i=0 ; i<150 ; i++ ) + { + myled = 1; + wait(1.0/587.33/2); + myled = 0; + wait(1.0/587.33/2); + } + + for( int i=0 ; i<150/2 ; i++ ) + { + myled = 1; + wait(1.0/783.99/1); + myled = 0; + wait(1.0/783.99/1); + } + for( int i=0 ; i<520 ; i++ ) + { + myled = 1; + wait(1.0/523.25/2); + myled = 0; + wait(1.0/523.25/2); + } + wait(0.1); + } +}
diff -r 000000000000 -r 954b5a9e5594 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Dec 16 00:52:26 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/4336505e4b1c \ No newline at end of file