US, Vjezba 4 Stol 4, Amer Surkovic, Mirza Herdic Zadatak 3

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
2016US_AmerSurkovic
Date:
Fri Mar 25 14:27:27 2016 +0000
Commit message:
US, Vjezba 4 Stol 4, Amer Surkovic, Mirza Herdic Zadatak 3

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	Fri Mar 25 14:27:27 2016 +0000
@@ -0,0 +1,27 @@
+#include "mbed.h"
+#define dp23 P0_0
+#define PERIOD_UZORKA (36e-6)
+
+// Tim 4
+AnalogOut signal(PTE30);
+
+
+int main(){
+  
+  signal = 0;
+  int i = 0;
+  while(1){
+    signal = signal + 0.04 / 3.3;
+    wait(PERIOD_UZORKA);
+    ++i;
+    if(i == 25) signal = 0;
+    else if(i == 50)
+    {
+        signal = 0;
+        i = 0;
+    }
+  
+    
+  }
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Mar 25 14:27:27 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/c0f6e94411f5
\ No newline at end of file