Adnan Kičin Nurif Dedagić

Dependencies:   mbed

Fork of LV5_zadatak1_grupa3_tim003 by tim003 tim003

Files at this revision

API Documentation at this revision

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