Program baru, sudah dipersingkat void2nya.

Dependencies:   Motor PID Joystick_OrdoV5 mbed millis

Fork of Joystick_ManualBaseBaru_12FEB by KRAI 2017

Files at this revision

API Documentation at this revision

Comitter:
gustavaditya
Date:
Mon Feb 13 13:49:50 2017 +0000
Parent:
31:d5cbda07fd95
Commit message:
L3

Changed in this revision

JoystickPS3.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/JoystickPS3.h	Mon Feb 13 12:03:37 2017 +0000
+++ b/JoystickPS3.h	Mon Feb 13 13:49:50 2017 +0000
@@ -89,7 +89,7 @@
             R2_click = false;
         }            
         if (L2 > 100) {
-            if ( R2sebelum) { L2_click = false;
+            if ( L2sebelum) { L2_click = false;
                 } else { L2_click = true;}   
             L2sebelum = true; 
         }else { L2sebelum = false;
--- a/main.cpp	Mon Feb 13 12:03:37 2017 +0000
+++ b/main.cpp	Mon Feb 13 13:49:50 2017 +0000
@@ -54,7 +54,7 @@
 #define PERPINDAHAN 1       // Perpindahan ke kanan dan kiri
 
 // Variable Atas
-double speed, speed2, maxSpeed = 0.8, minSpeed = 0;
+double speed, speed2, maxSpeed = 0.95, minSpeed = 0;
 double kpA=0.6757, kdA=0.6757, kiA=0.00006757;
 double p,i,d;
 double p2,i2,d2;
@@ -172,7 +172,7 @@
         // Motor Launcher
         caseJoystick = 5;
     }
-    else if (joystick.R2_click && (target_rpm2 < 14)){
+    else if (joystick.R2_click && (target_rpm2 < 20)){
         // Target Pulse PID ++ Motor Depan
          caseJoystick = 6;
     }  
@@ -180,7 +180,7 @@
         // Target Pulse PID -- Motor Depan
          caseJoystick = 7;
     }
-    else if (joystick.R3_click && (target_rpm < 14)){
+    else if (joystick.R3_click && (target_rpm < 20  )){
         // Target Pulse PID ++ Motor Belakang
          caseJoystick = 8;
     }
@@ -297,7 +297,7 @@
         }
         case (8) : 
         {
-            // Target Pulse PID ++ Motor Belakang
+            // Target Pulse PID ++ Motor Belakang=
             target_rpm = target_rpm++;
             break;
         }