Makoto Kobayashi
/
test_volume
volume test
Revision 0:aafad4013d38, committed 2014-10-20
- Comitter:
- neoqased
- Date:
- Mon Oct 20 11:11:27 2014 +0000
- Commit message:
- aaa
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 aafad4013d38 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Oct 20 11:11:27 2014 +0000 @@ -0,0 +1,14 @@ +#include "mbed.h" + +PwmOut myled(LED1); +AnalogIn volume(p20); + +int main(){ + float vol = 0; + myled.period_us(100); + while(1){ + vol = 1 - volume; + myled = vol; + wait_ms(50); + } +} \ No newline at end of file
diff -r 000000000000 -r aafad4013d38 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Oct 20 11:11:27 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/9327015d4013 \ No newline at end of file