tim003 tim003
/
zad2
Adnan Kičin Nurif Dedagić
Fork of LV5_zadatak1_grupa3_tim003 by
Revision 1:c6e9be44bae5, committed 2014-03-31
- Comitter:
- tim003
- Date:
- Mon Mar 31 15:58:53 2014 +0000
- Parent:
- 0:f26ed78adf52
- Commit message:
- LV3-grupa3-tim003-zadatak1
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Mar 31 15:26:23 2014 +0000 +++ b/main.cpp Mon Mar 31 15:58:53 2014 +0000 @@ -1,18 +1,15 @@ #include "mbed.h" -#include "math.h" -AnalogOut izlaz(PTE30); -Ticker t; -float frekvencija=1000; -float pi=3.14159265359; -float omega=2*pi*frekvencija; -int i(0); -void funkcija(){ - izlaz=(0.5/3.3) + (0.5/3.3)*sin(omega*i*0.0001); - i++; - if(i==100) i=0; + +PwmOut peveem(dp18); +AnalogIn ulaz(dp9); + + +int main() { +peveem.period_us(500); +int i=0; +while(1){ + if(i%100==0){ peveem=ulaz; i=1;} + i++; } - -int main() { - t.attach_us(&funkcija, 250); - while(1){} -} + +} \ No newline at end of file