Peter Bartels / Mbed 2 deprecated Main-script_groep7_PID_31-10-2014

Dependencies:   Encoder HIDScope TextLCD mbed

Fork of Main-script_groep7 by Peter Bartels

Files at this revision

API Documentation at this revision

Comitter:
phgbartels
Date:
Fri Oct 31 11:23:37 2014 +0000
Parent:
5:4842219cb77c
Child:
7:f016dd2e8ea9
Commit message:
Werkend script, nu nog waarden vari?ren

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Oct 31 08:36:46 2014 +0000
+++ b/main.cpp	Fri Oct 31 11:23:37 2014 +0000
@@ -89,6 +89,10 @@
 float Speed_motor1rad;
 float setpoint = 0;
 float prev_setpoint = 0; 
+float hoek_gewenst = 0; 
+float hoek_nul = 0; 
+float snelheid_slaan = 8; 
+float snelheid_naar_nul = 3;
 
 //HIDScope scope(6);
 
@@ -304,7 +308,7 @@
 
         case SLAAN: 
         {
-            GotoPosition(1.5 ,8);
+            GotoPosition(hoek_gewenst , snelheid_slaan);
             if (current_herhalingen == 100) 
             {
                 state = RETURN2RUST;
@@ -319,7 +323,7 @@
 
         case RETURN2RUST: 
         {
-            GotoPosition(0,2);
+            GotoPosition(hoek_nul, snelheid_naar_nul);
             if (current_herhalingen == 100) 
             {
                 state = RUST;