Vjezba_sinus
Dependencies: mbed
Revision 0:35f1fb764f89, committed 2015-12-10
- Comitter:
- miljkovic
- Date:
- Thu Dec 10 15:53:17 2015 +0000
- Commit message:
- Vjezba_sinus
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 Thu Dec 10 15:53:17 2015 +0000 @@ -0,0 +1,19 @@ +#include "mbed.h" + +#define INPUT_SCALAR (0.01f) + +AnalogIn Ain(p20); +AnalogOut Aout(p18); +float i; +float pi=3.14159; + +int main() +{ + while(1) { + for (i=0; i<2; i=i+0.005) { + Aout=0.5+0.5*sin(i*pi); + wait(Ain*INPUT_SCALAR); + + } + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Dec 10 15:53:17 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/165afa46840b \ No newline at end of file