ECE 4180 Lab 2 Part 7

Dependencies:   mbed

Revision:
0:40a62a63d5b7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Oct 09 00:49:51 2018 +0000
@@ -0,0 +1,17 @@
+#include "mbed.h"
+
+PwmOut mymot(p21);
+
+int main()
+{
+    while (1) {
+        for (float i = 0.0; i < 1.0; i += 0.02) {
+            mymot = i;
+            wait(0.05);
+        }
+        for (float i = 1.0; i > 0.0; i -= 0.02) {
+            mymot = i;
+            wait(0.05);
+        }
+    }
+}