Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
fabeltranm
Date:
Mon Feb 19 23:52:31 2018 +0000
Parent:
0:52095c095cf0
Commit message:
soluci?n clase 1

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 52095c095cf0 -r 947d30f0d240 main.cpp
--- a/main.cpp	Mon Feb 19 23:47:13 2018 +0000
+++ b/main.cpp	Mon Feb 19 23:52:31 2018 +0000
@@ -7,14 +7,14 @@
     
     myservo1.period_ms(20);
     int cw=1;
-    int dpulse=1000;
+    int dpulse=500;
     myservo1.pulsewidth_us(dpulse);
     
     while(1) {
         myled = 1;
-        if (dpulse==1000) 
+        if (dpulse==500) 
             cw=1;
-        if (dpulse==2000) 
+        if (dpulse==2300) 
             cw=0;
         if (cw==1)
             dpulse+=100;