Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: DigitDisplay Motor PID Ping mbed millis
Fork of MainProgram_BaseBaru_fix_omni12Feb by
Diff: main.cpp
- Revision:
- 34:1cfd9b1c7d27
- Parent:
- 33:69d266bc3fe9
- Child:
- 35:69a47b4cb3fc
diff -r 69d266bc3fe9 -r 1cfd9b1c7d27 main.cpp
--- a/main.cpp	Tue Feb 14 10:34:39 2017 +0000
+++ b/main.cpp	Tue Feb 14 13:56:53 2017 +0000
@@ -61,7 +61,7 @@
 double last_error = 0, current_error, sum_error = 0;
 double last_error2 = 0, current_error2, sum_error2 = 0;
 float rpm, target_rpm = 8.0;
-float rpm2, target_rpm2 = 8.0;
+float rpm2, target_rpm2 = 10.0;
 float pwmPowerUp        = 0.70;
 float pwmPowerDown      = -0.80;
 bool henti=false, hentis=false; 
@@ -130,7 +130,7 @@
 DigitalOut pneumatik(PB_3, PullUp);
 
 /*Dekalrasi Limit Switch */
-DigitalIn limitAtas(PC_9, PullUp);
+DigitalIn infraAtas(PC_9, PullUp);
 DigitalIn limitTengah(PB_10, PullUp);
 DigitalIn limitBawah(PC_8, PullUp);
 
@@ -339,7 +339,7 @@
         {
             motorDpn.brake(1);
             motorBlk.brake(1);
-            if (!limitAtas)
+            if (!infraAtas)
             {
                 powerScrew.brake(1);
             }
    