Analogni izlaz - trokutasti napon.

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
dfraj
Date:
Thu Nov 10 18:20:33 2016 +0000
Commit message:
VT1_dean_fraj

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 ae5888ab3999 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Nov 10 18:20:33 2016 +0000
@@ -0,0 +1,17 @@
+#include "mbed.h"
+
+AnalogOut Aout(p18);
+
+int main() {
+float i;
+    while(1) {
+        for(i = 0; i < 1; i = i + 0.001){
+            Aout = i;
+            wait(1.0E-5);
+        }
+        for(i = 1; i >= 0; i = i - 0.001){
+            Aout = i;
+            wait(1.0E-5);
+    }
+  }
+}
diff -r 000000000000 -r ae5888ab3999 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Nov 10 18:20:33 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/4fc01daae5a5
\ No newline at end of file