double frequency eneko
Dependencies: mbed
Revision 0:ac283b91327e, committed 2015-12-05
- Comitter:
- eneko
- Date:
- Sat Dec 05 18:44:38 2015 +0000
- Commit message:
- double frequency eneko
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 Dec 05 18:44:38 2015 +0000 @@ -0,0 +1,19 @@ +#include "mbed.h" + DigitalIn switchinput(p7); + AnalogOut Aout(p18); + + int main() { + while(1) { + if (switchinput==1) { + Aout = 1; + wait_ms(0.0005); + Aout = 0; + wait_ms(0.0005); + } else if (switchinput==0) { + Aout = 1; + wait_ms(0.001); + Aout = 0; + wait_ms(0.001); + } + } + } \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Dec 05 18:44:38 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/165afa46840b \ No newline at end of file