Haris Imamovic
/
LV04_Grupa3_Tim3_Zad03
Haris Imamovic Almir Hamza
Revision 0:8f8a67cd03ea, committed 2016-03-25
- Comitter:
- 2016US_HarisImamovic
- Date:
- Fri Mar 25 17:45:59 2016 +0000
- Commit message:
- LV04_Grupa3_Tim3
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 8f8a67cd03ea main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Mar 25 17:45:59 2016 +0000 @@ -0,0 +1,26 @@ +#include "mbed.h" + +AnalogOut psi(PTE30); + +int main() +{ + const double pi = 3.141592; + const double amplitude = 3.3; + float deg = 0.0f; + + float niz[50]; + for (int i = 0; i < 50; i++) { + niz[i] = (0.5 + sin(deg)/2)/3.3; + deg += pi/25; + } + + + while(1) { + + for (int i = 0; i < 50; i++) { + psi = niz[i]; + wait_us(40); + } + + } +}
diff -r 000000000000 -r 8f8a67cd03ea mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Mar 25 17:45:59 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/c0f6e94411f5 \ No newline at end of file